mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Show UUID instead of name when using UUID to select snapshot (#23787)
This commit is contained in:
parent
cc745b0224
commit
504a768636
1 changed files with 5 additions and 1 deletions
|
@ -298,7 +298,11 @@ def main():
|
||||||
uuid=module.params['uuid'])
|
uuid=module.params['uuid'])
|
||||||
|
|
||||||
if not vm:
|
if not vm:
|
||||||
module.fail_json(msg="Unable to manage snapshots for non-existing VM %(name)s" % module.params)
|
# If UUID is set, getvm select UUID, show error message accordingly.
|
||||||
|
if module.params['uuid'] is not None:
|
||||||
|
module.fail_json(msg="Unable to manage snapshots for non-existing VM %(uuid)s" % module.params)
|
||||||
|
else:
|
||||||
|
module.fail_json(msg="Unable to manage snapshots for non-existing VM %(name)s" % module.params)
|
||||||
|
|
||||||
if not module.params['snapshot_name'] and module.params['state'] != 'remove_all':
|
if not module.params['snapshot_name'] and module.params['state'] != 'remove_all':
|
||||||
module.fail_json(msg="snapshot_name param is required when state is '%(state)s'" % module.params)
|
module.fail_json(msg="snapshot_name param is required when state is '%(state)s'" % module.params)
|
||||||
|
|
Loading…
Reference in a new issue