X-Git-Url: https://osm.etsi.org/gitweb/?p=osm%2FN2VC.git;a=blobdiff_plain;f=examples%2Fconfig.py;h=c7580f6300f53e5c6f1f3f88465800637bacb20f;hp=bacc840a04e56f7d040b5a909e80ea1c0acb97c7;hb=b8a8281b1785358bd5632a119c016f21811172c6;hpb=dcdf82bbc1ef310379f746518b2dd3b006353cb3 diff --git a/examples/config.py b/examples/config.py index bacc840..c7580f6 100644 --- a/examples/config.py +++ b/examples/config.py @@ -6,7 +6,6 @@ This example: 3. Deploys a charm and prints its config and constraints """ -import asyncio import logging from juju.model import Model @@ -19,8 +18,8 @@ MB = 1 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() ubuntu_app = await model.deploy( 'mysql', @@ -47,7 +46,7 @@ async def main(): await model.disconnect() - + if __name__ == '__main__': logging.basicConfig(level=logging.DEBUG) ws_logger = logging.getLogger('websockets.protocol')