glennmatthews / cot

Common OVF Tool
MIT License
92 stars 23 forks source link

cot edit-hardware RuntimeError when adding NICs and creating a profile at the same time #64

Closed glennmatthews closed 7 years ago

glennmatthews commented 7 years ago
cot edit-hardware COT/tests/input.ovf -o temp.ova -n 5 -p foo
    INFO: Loading 'COT/tests/input.ovf' as OVF
    INFO: OVF version is 1.x
    INFO: OVF product class None --> platform GenericPlatform
Overwrite existing file temp.ova? [y] 
Profile 'foo' does not exist. Create it? [y] 
Please enter a label for this configuration profile [foo] 
Please enter a description for this configuration profile [foo] 
    INFO: Updating NIC count in OVF under profile ['foo'] to 5
Traceback (most recent call last):
  File "bin/cot", line 66, in <module>
    COT.cli.main()
  File "COT/cli.py", line 684, in main
    CLI().run(sys.argv[1:])
  File "COT/cli.py", line 341, in run
    return self.main(args)
  File "COT/cli.py", line 647, in main
    args.instance.run()
  File "COT/edit_hardware.py", line 573, in run
    self._run_update_nics()
  File "COT/edit_hardware.py", line 458, in _run_update_nics
    vm.set_nic_count(self.nics, self.profiles)
  File "COT/ovf/ovf.py", line 1651, in set_nic_count
    profile_list)
  File "COT/ovf/hardware.py", line 477, in set_item_count_per_profile
    (_, new_item) = self.clone_item(last_item, new_item_profiles)
  File "COT/ovf/hardware.py", line 207, in clone_item
    ovfitem.set_property(self.ovf.INSTANCE_ID, instance, profile_list)
  File "COT/ovf/item.py", line 476, in set_property
    self.validate()
  File "COT/ovf/item.py", line 671, in validate
    self.property_values(name)))
RuntimeError: OVFItem illegally contains multiple InstanceID values: ['13', '14']