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:
Pavel 2017-11-15 18:00:22 +02:00 committed by Abhijeet Kasurde
parent cabd7f078b
commit c56dcb7afa
2 changed files with 63 additions and 1 deletions

View file

@ -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: