vmware-archive / vsphere-flocker-driver

vSphere Flocker driver
Other
24 stars 16 forks source link

_list_vsphere_volumes and vim.VirtualApp #5

Closed jm66 closed 8 years ago

jm66 commented 8 years ago

Looks like the code doesn't validad for the existence of vm.config.hardware and when vim.VirtualApp is found the code exits.

2016-01-22 11:38:48,723 - ERROR - List volumes failed with error: 'vim.ResourceConfigSpec' object has no attribute 'hardware'

I think the following validation would be good to have within the vms loop in _list_vsphere_volumes:

if isinstance(vm, vim.VirtualMachine) and hasattr(vm.config, 'hardware')
ferrantim commented 8 years ago

Hi @pratikvgupta could you take a look at this issue and PR? Thanks!