Skip to content

Commit be78351

Browse files
author
Sofiia Tavrovska
committed
Fix host deletion from segment in test_masakari.py
Related-prod: PRODX-50277 Change-Id: I8b4801aa45a3ef09807c6273fd99484f812ea8cf
1 parent 62b40aa commit be78351

File tree

1 file changed

+7
-1
lines changed
  • rockoon/tests/functional/masakari

1 file changed

+7
-1
lines changed

rockoon/tests/functional/masakari/base.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,13 @@ def segment_add_host(
5656
)
5757

5858
def segment_delete_host(self, host_name, segment_id):
59-
self.ocm.oc.instance_ha.delete_host(host_name, segment_id)
59+
host_id = [
60+
x
61+
for x in self.ocm.oc.instance_ha.hosts(segment_id)
62+
if x.name == host_name
63+
]
64+
if host_id:
65+
self.ocm.oc.instance_ha.delete_host(host_id[0].uuid, segment_id)
6066

6167
def get_notification_list(self):
6268
return list(self.ocm.oc.instance_ha.notifications())

0 commit comments

Comments
 (0)