Prepared fixed for the MOS Yoga-based image, MOS 23.2
The list of the fixes / improvements:
* Dockerfiles: set the FROM image to the Mirantis heat
Yoga image of MOS 23.2. Fixed some packages installation.
* Python cleanup.py script: re-wrote opertions with the
volume groups 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.
* Fixed e2e sctipt to find the hypervisor.
* Refreshed the si-tests, mos-spt repositories, archived.
Change-Id: I1153ebcf3691cc43eb3fc0a7e98a0d88da3a8154
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)