pyvmomi icon indicating copy to clipboard operation
pyvmomi copied to clipboard

Parsing OVFs with ovf:value="0" results in invalid property values

Open AdmiralGT opened this issue 5 years ago • 0 comments

pyvmomni version: v6.7.1.2018-12 python version: v3.6.6

After running ParseDescriptor on an OVF and print out the result I get the following error.

DEBUG:virtutils.vmware:(vim.OvfManager.ParseDescriptorResult) {
   dynamicType = <unset>,
   dynamicProperty = (vmodl.DynamicProperty) [],
   eula = (str) [],
   network = (vim.OvfManager.NetworkInfo) [],
   ipAllocationScheme = (str) [],
   ipProtocols = (str) [],
   property = (vim.vApp.PropertyInfo) [],
   productInfo = <unset>,
   annotation = '',
   approximateDownloadSize = <unset>,
   approximateFlatDeploymentSize = <unset>,
   approximateSparseDeploymentSize = <unset>,
   defaultEntityName = '',
   virtualApp = false,
   deploymentOption = (vim.OvfManager.DeploymentOption) [],
   defaultDeploymentOption = '',
   entityName = (vim.KeyValue) [],
   annotatedOst = <unset>,
   error = (vmodl.MethodFault) [
      (vim.fault.OvfPropertyValue) {
         dynamicType = <unset>,
         dynamicProperty = (vmodl.DynamicProperty) [],
         msg = "Line 42: Invalid property value '0'.",
         faultCause = <unset>,
         faultMessage = (vmodl.LocalizableMessage) [],
         lineNumber = 42,
         type = 'int(0..2147483647)',
         value = '0'
      }
   ],
   warning = (vmodl.MethodFault) []
}

Line 42 of the OVF looks as follow

      <Property ovf:key="elasticsearch.disk.size" ovf:qualifiers="MinValue(0)" ovf:type="int"  ovf:userConfigurable="true" ovf:value="0">

In this case, 0 is a valid value (and deploying to the same rig through the UI doesn't show any errors).

AdmiralGT avatar Sep 03 '19 17:09 AdmiralGT