3d55084cde7f30aba2ec41c003242d2762cf4413

The logic to fetch a volume details is scattered all over which makes it hard to read as well as maintain. There are currently two ways we fetch volume details: 1. client.volumes.get 2. volume.manager.get The first one being the correct way maintaining abstraction and using the cinderclient for API calls. The problem with current code is: 1. Hard to read and maintain 2. Any change in volume GET logic will require changes across whole store 3. Not handling exceptions in a common place 4. vulnerable to bugs as issue in one place cannot be detected easily by other code paths and needs to be isolately tested This patch aims to standardize the volume GET call so we can avoid the above stated issues. This patch has been tested with the following operations massaging every place modified in this patch: 1. Create image - _wait_volume_status 2. Create > 1 GB image 2.1 offline - _call_offline_extend 2.2 online - _call_online_extend 3. upload volume to image - is_image_associated_with_store Depends-On: https://review.opendev.org/c/openstack/glance/+/962445 Signed-off-by: Rajat Dhasmana <rajatdhasmana@gmail.com> Change-Id: I5a4bad40ea03b0d746aaad392781f1b0fe78c8bc
Team and repository tags
Glance Store Library
Glance's stores library
This library has been extracted from the Glance source code for the specific use of the Glance and Glare projects.
The API it exposes is not stable, has some shortcomings, and is not a general purpose interface. We would eventually like to change this, but for now using this library outside of Glance or Glare will not be supported by the core team.
- License: Apache License, Version 2.0
- Documentation: https://docs.openstack.org/glance_store/latest/
- Source: https://opendev.org/openstack/glance_store/
- Bugs: https://bugs.launchpad.net/glance-store
- Release notes: https://docs.openstack.org/releasenotes/glance_store/index.html
Description
Languages
Python
100%