X-Git-Url: https://osm.etsi.org/gitweb/?p=osm%2FN2VC.git;a=blobdiff_plain;f=modules%2Flibjuju%2Fexamples%2Funitrun.py;h=805f0ae0d3dc9144eb3f115c230fee813506f449;hp=3dfacd62e4c078592dc984246aabc2ed27cbc413;hb=b2a07f566be558a8b59b8b5dedfe8da5ae1b0132;hpb=68858c1915122c2dbc8999a5cd3229694abf5f3a diff --git a/modules/libjuju/examples/unitrun.py b/modules/libjuju/examples/unitrun.py index 3dfacd6..805f0ae 100644 --- a/modules/libjuju/examples/unitrun.py +++ b/modules/libjuju/examples/unitrun.py @@ -7,7 +7,6 @@ This example: 4. Waits for the action results to come back, then exits. """ -import asyncio import logging from juju.model import Model @@ -24,8 +23,8 @@ async def run_command(unit): async def main(): model = Model() - await model.connect_current() - await model.reset(force=True) + # connect to current model with current user, per Juju CLI + await model.connect() app = await model.deploy( 'ubuntu-0',