X-Git-Url: https://osm.etsi.org/gitweb/?p=osm%2FN2VC.git;a=blobdiff_plain;f=modules%2Flibjuju%2Fexamples%2Fconfig.py;h=c7580f6300f53e5c6f1f3f88465800637bacb20f;hp=bad5b6d8c4494fb47bb14e743f643a93be9f05da;hb=refs%2Fchanges%2F94%2F6394%2F1;hpb=421c4a23dc5e60db9596b79ea87cdc19cc463e9b diff --git a/modules/libjuju/examples/config.py b/modules/libjuju/examples/config.py index bad5b6d..c7580f6 100644 --- a/modules/libjuju/examples/config.py +++ b/modules/libjuju/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() + # connect to current model with current user, per Juju CLI await model.connect() - await model.reset(force=True) 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')