Fix issue when disassociating resources from firewall group
When disassociating ports from firewall group to cleanup resources, an error is occurred without waiting for the firewall status to complete. Change-Id: I12a91e75584d5e967d81abab32acf4258995a396 Closes-Bug: #1870296 Signed-off-by: ZijianGuo <guozijn@gmail.com>
This commit is contained in:
parent
0bdc63d7c1
commit
5a67e3546e
@ -121,6 +121,11 @@ class FWaaSClientMixin(object):
|
||||
firewall_rule_id=firewall_rule_id)
|
||||
self._wait_firewall_group_ready(firewall_group_id)
|
||||
|
||||
def update_firewall_group_and_wait(self, firewall_group_id, **kwargs):
|
||||
self.firewall_groups_client.update_firewall_group(
|
||||
firewall_group_id, **kwargs)
|
||||
self._wait_firewall_group_ready(firewall_group_id)
|
||||
|
||||
@staticmethod
|
||||
def _call_and_ignore_exceptions(exc_list, func, *args, **kwargs):
|
||||
"""Call the given function and pass if a given exception is raised."""
|
||||
|
@ -299,5 +299,4 @@ class TestFWaaS_v2(base.FWaaSScenarioTest_V2):
|
||||
should_connect=False)
|
||||
|
||||
# Disassociate ports of this firewall group for cleanup resources
|
||||
self.firewall_groups_client.update_firewall_group(
|
||||
fw_group['id'], ports=[])
|
||||
self.update_firewall_group_and_wait(fw_group['id'], ports=[])
|
||||
|
Loading…
x
Reference in New Issue
Block a user