mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-23 10:51:24 -07:00
module_utils: vmware.py. Incorrect chain of attributes to obtain snapshots from virtual machine (#32669)
* Update vmware.py Incorrect chain of attributes to obtain snapshots from virtual machine. Module 'vmware_guest_facts' uses method 'gather_vm_facts' of vmware.py and always gets empty list of snapshots. * Added test for module vmware_guest_facts. Checked VM snapshots. * Fixed tests for vmware_guest_facts. Ignored certificate for vmware_guest_snapshot module.
This commit is contained in:
parent
cabd7f078b
commit
c56dcb7afa
2 changed files with 63 additions and 1 deletions
|
@ -370,7 +370,7 @@ def get_current_snap_obj(snapshots, snapob):
|
|||
|
||||
def list_snapshots(vm):
|
||||
result = {}
|
||||
snapshot = _get_vm_prop(vm, ('vm', 'snapshot'))
|
||||
snapshot = _get_vm_prop(vm, ('snapshot',))
|
||||
if not snapshot:
|
||||
return result
|
||||
if vm.snapshot is None:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue