Prepared fixed for the MOS Victoria-based image, MOS 23.2
The list of the fixes / improvements:
* Dockerfiles: set the FROM image to the Mirantis heat
Victoria image of MOS 23.2. Fixed some packages installation.
* Python cleanup.py script: re-wrote opertions with the
volume groups and volume group types with the specific
API version, resettings volume status, finding the
server groups. Added the functions for non-existing
methods in downstream openstacksdk.
* FIO scripts: Fixed the attaching/detaching the volumes,
some other fixes.
* Refreshed the si-tests, mos-spt, cfg-checker repositories,
archived.
* Changed the tag of the toolset image for Victoria:
toolset:23.2-victoria
Change-Id: I762eaa813c4c864979a2dfb5151dd082aff98cb2
diff --git a/fio/connection.py b/fio/connection.py
index 6d82179..40018c4 100644
--- a/fio/connection.py
+++ b/fio/connection.py
@@ -78,13 +78,25 @@
def detach_volume(
+ att: openstack.compute.v2.volume_attachment.VolumeAttachment,
srv: openstack.compute.v2.server.Server,
vol: openstack.block_storage.v3.volume.Volume
) -> None:
- cloud.compute.delete_volume_attachment(srv, vol)
+ cloud.compute.delete_volume_attachment(att, srv)
cloud.volume.wait_for_status(vol, status='available')
+def find_server_group(
+ name: str
+) -> Union[openstack.compute.v2.server_group.ServerGroup, None]:
+ server_groups = cloud.compute.server_groups(all_projects=True)
+ matching_server_groups = [s for s in server_groups
+ if s.name == name]
+ server_group = matching_server_groups[0] \
+ if matching_server_groups else None
+ return server_group
+
+
if __name__ == "__main__":
print(UBUNTU_IMAGE_NAME)
print(FIO_SG_NAME)