Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LookupError on inspection of OVA file #78

Open
gthieleb opened this issue Sep 25, 2019 · 2 comments
Open

LookupError on inspection of OVA file #78

gthieleb opened this issue Sep 25, 2019 · 2 comments

Comments

@gthieleb
Copy link

gthieleb commented Sep 25, 2019

COT version: 2.2.0 (installed via pip/python2.7/centos7)

When inspecting an OVA file (VMware whitness appliance) the cot info raises an exception:

cot info VPlex-5.4.1.05.00.08-vasa.ova
  File "/home/python/envs/ovftool/lib/python2.7/site-packages/COT/commands/info.py", line 102, in run
    with VMDescription.factory(package, None) as vm:
  File "/home/python/envs/ovftool/lib/python2.7/site-packages/COT/vm_description/vm_description.py", line 164, in factory
    vm = vm_class(input_file, *args, **kwargs)
  File "/home/python/envs/ovftool/lib/python2.7/site-packages/COT/vm_description/ovf/ovf.py", line 236, in __init__
    attrib=self.PRODUCT_SECTION_ATTRIB)
  File "/home/python/envs/ovftool/lib/python2.7/site-packages/COT/xml_file.py", line 156, in find_child
    "\n".join([ET.tostring(e).decode() for e in matches])))
LookupError: Found multiple matching <ProductSection> children (each with attributes '{}') under <VirtualSystem>:
<ovf:ProductSection xmlns:ovf="http://schemas.dmtf.org/ovf/envelope/1" ovf:required="false">
      <ovf:Info>VM ISV branding information</ovf:Info>
      <ovf:Product>VPLEX VASA Provider</ovf:Product>
      <ovf:Vendor>EMC Corporation</ovf:Vendor>




      <ovf:Version>1.0.0.0</ovf:Version>
      <ovf:FullVersion>VPlex-5.4.1.05.00.08_D35.27_VASA_3</ovf:FullVersion>
      <ovf:ProductUrl />
      <ovf:VendorUrl>http://www.emc.com</ovf:VendorUrl>
      <ovf:AppUrl>http://www.emc.com/products/family/vplex.htm</ovf:AppUrl>
      <ovf:Category>Application</ovf:Category>
      <ovf:Property ovf:key="VASA_USER_NAME" ovf:qualifiers="MinLen(0),MaxLen(65535)" ovf:type="string" ovf:userConfigurable="true" ovf:value="">
        <ovf:Label>VASA User Name</ovf:Label>
        <ovf:Description>A user for the VASA Provider VM which will be authenticated for use when adding this provider in VMware vCenter.

If left empty no user will be created. An existing user will not be created or changed.</ovf:Description>
      </ovf:Property>
      <ovf:Property ovf:key="VASA_USER_PASSWORD" ovf:qualifiers="MinLen(0),MaxLen(65535)" ovf:type="string" ovf:userConfigurable="true" ovf:value="">
        <ovf:Label>VASA User Password</ovf:Label>
        <ovf:Description>The password to be used with the VASA User Name specified above.</ovf:Description>
      </ovf:Property>
    </ovf:ProductSection>
@glennmatthews
Copy link
Owner

Thanks for the report!

I verified that the OVF specification allows for multiple ProductSection elements, so this is indeed a bug. Can you provide your complete OVF XML content for me to develop a fix against?

@glennmatthews
Copy link
Owner

Duplicate of #73, but I'll leave this open separately until the submitter replies.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants