Merge "Noop host destroy all when there are no hosts"

This commit is contained in:
Zuul 2018-06-04 06:02:57 +00:00 committed by Gerrit Code Review
commit 4ceed99c43
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: