diff --git a/tobiko/openstack/stacks/_octavia.py b/tobiko/openstack/stacks/_octavia.py index c16987878..6af03774f 100644 --- a/tobiko/openstack/stacks/_octavia.py +++ b/tobiko/openstack/stacks/_octavia.py @@ -105,19 +105,21 @@ class OctaviaLoadbalancerStackFixture(heat.HeatStackFixture): else: return self.vip_network.ipv6_subnet_id - def wait_for_active_loadbalancer(self, **kwargs): + def wait_for_active_loadbalancer(self): + loadbalancer_id = self.stack.output_show( + 'loadbalancer_id')['output']['output_value'] octavia.wait_for_status(status_key=octavia.PROVISIONING_STATUS, status=octavia.ACTIVE, get_client=octavia.get_loadbalancer, - object_id=self.loadbalancer.loadbalancer_id, - **kwargs) + object_id=loadbalancer_id) - def wait_for_update_loadbalancer(self, **kwargs): + def wait_for_update_loadbalancer(self): + loadbalancer_id = self.stack.output_show( + 'loadbalancer_id')['output']['output_value'] octavia.wait_for_status(status_key=octavia.PROVISIONING_STATUS, status=octavia.PENDING_UPDATE, get_client=octavia.get_loadbalancer, - object_id=self.loadbalancer.loadbalancer_id, - **kwargs) + object_id=loadbalancer_id) class OctaviaListenerStackFixture(heat.HeatStackFixture): diff --git a/tobiko/tests/faults/octavia/test_faults.py b/tobiko/tests/faults/octavia/test_faults.py index 3f02410ac..c25f5b5d4 100644 --- a/tobiko/tests/faults/octavia/test_faults.py +++ b/tobiko/tests/faults/octavia/test_faults.py @@ -90,9 +90,7 @@ class OctaviaBasicFaultTest(testtools.TestCase): # Wait for the LB to be updated try: - self.loadbalancer_stack.wait_for_update_loadbalancer( - loadbalancer_id=self.loadbalancer_stack.loadbalancer_id, - timeout=30) + self.loadbalancer_stack.wait_for_update_loadbalancer(timeout=30) except tobiko.RetryTimeLimitError: LOG.info('The restarted servers reached ACTIVE status after the' @@ -100,8 +98,7 @@ class OctaviaBasicFaultTest(testtools.TestCase): ' being raised even though the update timeout was' ' reached.') - self.loadbalancer_stack.wait_for_active_loadbalancer( - loadbalancer_id=self.loadbalancer_stack.loadbalancer_id) + self.loadbalancer_stack.wait_for_active_loadbalancer() LOG.debug(f'Load Balancer {self.loadbalancer_stack.loadbalancer_id} is' f' ACTIVE')