Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
import.spec should not assume Deployment param always exists for OVA/OVFs #487
It looks like the import.spec always assumes there's a Deployment Type param defined which is not always the case. This is something that needs to be inspected by parsing the OVF definition to see what options are available.
The issue is that if you simply generate the spec and then modify just the OVF params and don't realize this, you'll get an fault when running import.ova command:
Here's output of the import.spec:
Here's the OVA that I was using: https://bintray.com/artifact/download/photon-controller/esxi-appliances/nested_esxi_appliance_v6.0u2.ova
Ok looking at the ovf file of vcsa i see an IpAssignmentSection (xml node) in the declared vmw namespace pointing to http://www.vmware.com/schema/ovf. But on the vmware website the url (hoping for a xsd)... but 404 :-(
I would have like to handle extra parameters properly before looking into adding networkmapping:
Currently govc simply adds the mentionned options per default (apparently these comes more from vapp implementation). It doesn't even check if the ovf provides any insight.
PS: also an occasion to check how golang xml unmarshaling handles namespaces.