We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3098a08 commit d101000Copy full SHA for d101000
1 file changed
examples/deploywithrevision.py
@@ -0,0 +1,33 @@
1
+from juju import jasyncio
2
+from juju.model import Model
3
+
4
5
+async def main():
6
+ charm = 'juju-qa-test'
7
8
+ model = Model()
9
+ print('Connecting to model')
10
+ # connect to current model with current user, per Juju CLI
11
+ await model.connect()
12
13
+ try:
14
+ print(f'Deploying {charm} --channel 2.0/stable --revision 22')
15
+ application = await model.deploy(
16
+ 'juju-qa-test',
17
+ application_name='test',
18
+ channel='2.0/stable',
19
+ revision=22,
20
+ )
21
22
+ print('Waiting for active')
23
+ await model.wait_for_idle(status='active')
24
25
+ print(f'Removing {charm}')
26
+ await application.remove()
27
+ finally:
28
+ print('Disconnecting from model')
29
+ await model.disconnect()
30
31
32
+if __name__ == '__main__':
33
+ jasyncio.run(main())
0 commit comments