File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -38,7 +38,9 @@ async def main():
3838 )
3939 # add a lxd container to machine2
4040 machine3 = await model .add_machine (
41- 'lxd:{}' .format (machine2 .id ))
41+ 'lxd:{}' .format (machine2 .id ),
42+ series = 'xenial'
43+ )
4244
4345 # deploy charm to the lxd container
4446 application = await model .deploy (
Original file line number Diff line number Diff line change 11from juju import loop
2- from juju .client .client import ClientFacade
3- from juju .client .connection import Connection
2+ from juju .model import Model
43
54
65async def status ():
7- conn = await Connection . connect ()
8- client = ClientFacade . from_connection ( conn )
6+ model = Model ()
7+ await model . connect ( )
98
10- patterns = None
11- status = await client .FullStatus (patterns )
12- await conn .close ()
9+ status = await model .get_status ()
10+ await model .disconnect ()
1311
1412 print ('Applications:' , list (status .applications .keys ()))
1513 print ('Machines:' , list (status .machines .keys ()))
You can’t perform that action at this time.
0 commit comments