Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1331068

Summary: [OVIRT-PYTHON-SDK] Template's sub-collection nics and cdroms have no 'delete' attribute
Product: [oVirt] ovirt-engine Reporter: sefi litmanovich <slitmano>
Component: RestAPIAssignee: Juan Hernández <juan.hernandez>
Status: CLOSED CURRENTRELEASE QA Contact: movciari
Severity: unspecified Docs Contact:
Priority: high    
Version: 3.6.5CC: bugs, mgoldboi, sbonazzo
Target Milestone: ovirt-3.6.7Keywords: ZStream
Target Release: 3.6.7Flags: rule-engine: ovirt-3.6.z+
mgoldboi: planning_ack+
juan.hernandez: devel_ack+
pstehlik: testing_ack+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-07-04 12:29:05 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Infra RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description sefi litmanovich 2016-04-27 15:18:15 UTC
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.

Comment 1 Juan Hernández 2016-04-27 17:43:36 UTC
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.

Comment 2 Juan Hernández 2016-05-11 10:41:12 UTC
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.