From c71e189ef6650a0a335c9539c0ceacbce917bd25 Mon Sep 17 00:00:00 2001 From: Pete Vander Giessen Date: Fri, 27 Jan 2017 17:47:14 -0500 Subject: [PATCH] Fixed error in add_model example. We weren't actually awaiting the 'juju ssh' test, and had a mistake in the command, to boot. --- examples/add_model.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/examples/add_model.py b/examples/add_model.py index 323b6ec..efa325b 100644 --- a/examples/add_model.py +++ b/examples/add_model.py @@ -21,7 +21,8 @@ async def main(): await controller.connect_current() try: - model = await controller.add_model("quux") + model_name = "quux" + model = await controller.add_model(model_name) print('Deploying ubuntu') application = await model.deploy( @@ -38,7 +39,8 @@ async def main(): for unit in application.units)) print("Verifying that we can ssh into the created model") - ret = utils.execute_process('juju', 'ssh', 'ls /', log=LOG) + ret = await utils.execute_process( + 'juju', 'ssh', '-m', model_name, 'ubuntu/0', 'ls /', log=LOG) assert ret print('Removing ubuntu') -- 2.25.1