Noop host destroy all when there are no hosts

Noop host destroy all when there are no hosts

Change-Id: Iffd88812f5ecbd6b7193e73fbbbb64c8d2c42761
This commit is contained in:
Borne Mace 2018-05-29 23:42:24 -07:00
parent a49cddd8fa
commit 05daa451fb
1 changed files with 3 additions and 0 deletions

View File

@ -79,6 +79,9 @@ class HostDestroy(Command):
hostnames = [hostname]
if hostname == 'all':
hostnames = _get_all_hostnames()
# if there are no hosts, don't bother doing anything
if not hostnames:
return
destroy_type = 'kill'
if parsed_args.stop: