Bug 1331068 - [OVIRT-PYTHON-SDK] Template's sub-collection nics and cdroms have no 'delete' attribute
Summary: [OVIRT-PYTHON-SDK] Template's sub-collection nics and cdroms have no 'delete'...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: RestAPI
Version: 3.6.5
Hardware: Unspecified
OS: Unspecified
high
unspecified vote
Target Milestone: ovirt-3.6.7
: 3.6.7
Assignee: Juan Hernández
QA Contact: movciari
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-04-27 15:18 UTC by sefi litmanovich
Modified: 2016-07-04 12:29 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-07-04 12:29:05 UTC
oVirt Team: Infra
rule-engine: ovirt-3.6.z+
mgoldboi: planning_ack+
juan.hernandez: devel_ack+
pstehlik: testing_ack+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 57342 0 ovirt-engine-3.6 MERGED restapi: Manually add RSDL links impossible to generate 2016-05-14 20:02:26 UTC

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.


Note You need to log in before you can comment on or make changes to this bug.