Fix juju wait to work against correct model

juju_wait assumes it is working against the current model so
explicitly set the JUJU_MODEL env variable before calling it
to ensure it monitors the correct environment
This commit is contained in:
Liam Young
2018-04-12 15:31:55 +00:00
parent 2206387c34
commit 67984a231b

View File

@@ -5,6 +5,8 @@ import sys
import juju_wait
import zaza.charm_lifecycle.utils as utils
def deploy_bundle(bundle, model):
"""Deploy the given bundle file in the specified model
@@ -31,6 +33,7 @@ def deploy(bundle, model, wait=True):
deploy_bundle(bundle, model)
if wait:
logging.info("Waiting for environment to settle")
utils.set_juju_model(model)
juju_wait.wait()