Issue using VmDiskQuery and VmDiskQuery.Details

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Issue using VmDiskQuery and VmDiskQuery.Details


When I attempt to use VMDiskQuery.Details with VmDiskQuery I get attribute type excepting saying it is expecting FileInfo.Details.

This works
                       search_spec =[])
                        queryDetails =
                        queryDetails.fileSize = True
                        queryDetails.modification = True
                        queryDetails.fileType = True
                        queryDetails.fileOwner = True
                        search_spec.details = queryDetails

This throws and exception.
                       search_spec =[])
                        queryDetailsDisk =
                        queryDetailsDisk.capacityKb = True
                        queryDetailsDisk.diskType = True
                        queryDetailsDisk.hardwareVersion = True
                        queryDetailsDisk.thin = True
                        search_spec.details = queryDetailsDisk

   File "./", line NNNN, in myFunction
     search_spec.details = queryDetailsDisk
   File "/usr/lib/python2.7/site-packages/pyVmomi/", line 537, in __setattr__
     CheckField(self._GetPropertyInfo(name), val)
   File "/usr/lib/python2.7/site-packages/pyVmomi/", line 972, in CheckField
     % (, info.type.__name__, valType.__name__))
 TypeError: For "details" expected type, but got

Looking for suggestions on usage or could this be an actually issue.  
The server ESXI 6.5.