mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 21:32:49 +00: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:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user