From: Pete Vander Giessen Date: Fri, 27 Jan 2017 22:47:14 +0000 (-0500) Subject: Fixed error in add_model example. X-Git-Tag: 0.2.0~1^2~4 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=c71e189ef6650a0a335c9539c0ceacbce917bd25;p=osm%2FN2VC.git Fixed error in add_model example. We weren't actually awaiting the 'juju ssh' test, and had a mistake in the command, to boot. --- 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')