refactor: Remove invalid codes for volumes and snapshots

The patch: https://review.opendev.org/c/openstack/python-cinderclient/+/767451
has been merged. And it has been released in Xena branch.

So We change the requirements.txt of the python-cinderclient
version as 8.1.0.

Change-Id: Ibf0ddb4c3ea532fdc1bffab210671bf63c128b02
This commit is contained in:
Boxiang Zhu 2022-08-23 15:42:29 +08:00
parent aa77306945
commit 22ea97f536
2 changed files with 1 additions and 15 deletions

View File

@ -25,7 +25,7 @@ h11<0.13,>=0.11 # MIT
MarkupSafe>=2.0.1,<=2.1.1 # BSD License (3 clause)
python-multipart>=0.0.5 # Apache-2.0
python-keystoneclient>=3.21.0 # Apache-2.0
python-cinderclient>=5.0.2 # Apache-2.0
python-cinderclient>=8.1.0 # Apache-2.0
python-glanceclient>=2.17.1 # Apache-2.0
python-neutronclient>=6.14.1 # Apache-2.0
python-novaclient>=15.1.1 # Apache-2.0

View File

@ -632,13 +632,6 @@ async def list_volumes(
)
result = []
server_ids = []
# commit: https://review.opendev.org/c/openstack/python-cinderclient/+/767451
# here is just a workaround way.
while True:
if volumes and isinstance(volumes[-1], int):
volumes = volumes[0]
else:
break
for volume in volumes:
origin_data = OSVolume(volume).to_dict()
volume = Volume(volume).to_dict()
@ -798,13 +791,6 @@ async def list_volume_snapshots(
result = []
volume_ids = []
snapshot_ids = []
# commit: https://review.opendev.org/c/openstack/python-cinderclient/+/767451
# here is just a workaround way.
while True:
if volume_snapshots and isinstance(volume_snapshots[-1], int):
volume_snapshots = volume_snapshots[0]
else:
break
for volume_snapshot in volume_snapshots:
origin_data = OSVolumeSnapshot(volume_snapshot).to_dict()
volume_snapshot = VolumeSnapshot(volume_snapshot).to_dict()