Hide Forgot
Description of problem: In python-sdk there's no way to remove template's sub-collection like disks and nics, 'delete' functions for classes TemplateNIC TemplateCdRom in brokers.py do not exist. Version-Release number of selected component (if applicable): rhevm-3.6.5.3-0.1.el6.noarch rhevm-sdk-python-3.6.5.0-1.el6ev.noarch How reproducible: always Steps to Reproduce: 1. Connect to engine API with rhevm-sdk. 2. Get one of your templates that have a nic. 3. Try to delete the nic - template.nics.list()[0].delete() Actual results: AttributeError: 'NIC' object has no attribute 'delete' Expected results: nic is removed from template. Additional info: No need for log, problem is in brokers.py as mentioned above.
The problem is that the RSDL isn't generated correctly, probably because of the way we use Java generics to write the interfaces that define devices. Once this is fixed in the engine the SDK will need to be regenerated.
It unfeasible to fix properly this issue in the 3.6 branch. In the master branch the problem has been solved with the introduction of the model and metamodel, but that can't be backported. So we will fix this adding manually to the RSDL the required link description. That is what the proposed patch does. Once that is fixed the Python SDK will need to be regenerated.