Skip to content

Instantly share code, notes, and snippets.

@tvansteenburgh
Last active February 2, 2017 17:22
Show Gist options
  • Save tvansteenburgh/5fdcbc81eaa67659e8633429ef6e274c to your computer and use it in GitHub Desktop.
Save tvansteenburgh/5fdcbc81eaa67659e8633429ef6e274c to your computer and use it in GitHub Desktop.
from juju import loop
from juju.model import Model
async def main():
model = Model()
await model.connect_current()
application = await model.deploy(
'ubuntu-10',
application_name='ubuntu',
series='trusty',
channel='stable',
)
await model.block_until(
lambda: all(unit.workload_status == 'active'
for unit in application.units))
await application.remove()
await model.disconnect()
loop.run(main())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment