4 1. Connects to the current model
6 3. Deploys a charm and prints its config and constraints
12 from juju
.model
import Model
17 await model
.connect_current()
18 await model
.reset(force
=True)
20 ubuntu_app
= await model
.deploy(
26 'mem': 512 * 1024 * 1024
29 print(await ubuntu_app
.get_config())
30 print(await ubuntu_app
.get_constraints())
32 await model
.disconnect()
35 logging
.basicConfig(level
=logging
.DEBUG
)
36 ws_logger
= logging
.getLogger('websockets.protocol')
37 ws_logger
.setLevel(logging
.INFO
)
38 loop
= asyncio
.get_event_loop()
40 loop
.create_task(run())