Skip to content

Commit 67772d8

Browse files
committed
Add destroy-units to destroy several units at once
Fixes #811
1 parent f52ca42 commit 67772d8

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

juju/model.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2014,7 +2014,13 @@ async def destroy_unit(self, unit_id, destroy_storage=False, dry_run=False, forc
20142014
'max-wait': max_wait,
20152015
'dry-run': dry_run,
20162016
}])
2017-
destroy_units = destroy_unit
2017+
2018+
async def destroy_units(self, *unit_names, destroy_storage=False, dry_run=False, force=False, max_wait=None):
2019+
"""Destroy several units at once.
2020+
2021+
"""
2022+
for u in unit_names:
2023+
await self.destroy_unit(u, destroy_storage, dry_run, force, max_wait)
20182024

20192025
def download_backup(self, archive_id, target_filename=None):
20202026
"""Download a backup archive file.

0 commit comments

Comments
 (0)