diff --git a/zaza/openstack/utilities/openstack.py b/zaza/openstack/utilities/openstack.py index 14c708c..c5e2bfa 100644 --- a/zaza/openstack/utilities/openstack.py +++ b/zaza/openstack/utilities/openstack.py @@ -63,6 +63,9 @@ import tenacity import textwrap import urllib +import zaza +import zaza.charm_lifecycle.utils as lifecycle_utils + from zaza import model from zaza.openstack.utilities import ( exceptions, @@ -794,7 +797,15 @@ def configure_gateway_ext_port(novaclient, neutronclient, net_id=None, # NOTE(fnordahl): We are stuck with juju_wait until we figure out how # to deal with all the non ['active', 'idle', 'Unit is ready.'] # workload/agent states and msgs that our mojo specs are exposed to. - juju_wait.wait(wait_for_workload=True) + if lifecycle_utils.get_config_options().get( + 'configure_gateway_ext_port_use_juju_wait', True): + juju_wait.wait(wait_for_workload=True) + else: + zaza.model.wait_for_agent_status() + test_config = zaza.charm_lifecycle.utils.get_charm_config( + fatal=False) + zaza.model.wait_for_application_states( + states=test_config.get('target_deploy_status', {})) @tenacity.retry(wait=tenacity.wait_exponential(multiplier=1, max=60),