Bug 846950 - REST API: RSDL doesn't support add, update and delete template nics
Summary: REST API: RSDL doesn't support add, update and delete template nics
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine-sdk
Version: 3.1.0
Hardware: x86_64
OS: Linux
high
urgent
Target Milestone: ---
: ---
Assignee: Mike Kolesnik
QA Contact: Yaniv Kaul
URL:
Whiteboard: network
: 830511 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-08-09 08:41 UTC by Avi Tal
Modified: 2016-04-22 04:59 UTC (History)
11 users (show)

Fixed In Version: si16
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-12-04 19:57:29 UTC
oVirt Team: Network
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Avi Tal 2012-08-09 08:41:24 UTC
Description of problem:
api?rsdl doesn't support add, update and delete nic from template which influence SDK that doesn't support these functionalities automatically.

for example:
An exception from sdk when try to add nic:
File "/usr/lib/python2.6/site-packages/ovirtsdk/infrastructure/common.py", line 28, in __getattr__
    return self.__getattribute__(item)
AttributeError: 'TemplateNics' object has no attribute 'add'


note: adding nic to template through REST API works.

Steps to Reproduce:
1. try to add/edit/delete nic from template using SDK

Comment 2 Mike Kolesnik 2012-08-12 09:11:11 UTC
http://gerrit.ovirt.org/7098

Comment 4 Mike Kolesnik 2012-08-14 05:43:46 UTC
*** Bug 830511 has been marked as a duplicate of this bug. ***

Comment 6 Michael Pasternak 2012-08-22 09:00:46 UTC
RSDL meta not updated accordingly, also notice that this is sdk bug,
so you cannot move it to MODIFIED till new sdk generated based on changes
you have done.

Comment 7 Mike Kolesnik 2012-08-23 13:05:34 UTC
(In reply to comment #6)
> RSDL meta not updated accordingly, also notice that this is sdk bug,
> so you cannot move it to MODIFIED till new sdk generated based on changes
> you have done.

As we discussed, it is visible when you run /api?rsdl

Comment 8 Michael Pasternak 2012-08-23 13:34:20 UTC
(In reply to comment #7)
> (In reply to comment #6)
> > RSDL meta not updated accordingly, also notice that this is sdk bug,
> > so you cannot move it to MODIFIED till new sdk generated based on changes
> > you have done.
> 
> As we discussed, it is visible when you run /api?rsdl

but not available in sdk yet, target release 3.1.0.7

Comment 9 Avi Tal 2012-08-30 15:54:23 UTC
Verify on SI16 - PASS

Run SDK test to add, update and delete template nics

<link href="/api/templates/{template:id}/nics/{nic:id}" rel="delete">
<request>
<http_method>DELETE</http_method>
<body/>
</request>
</link>

<link href="/api/templates/{template:id}/nics/{nic:id}" rel="update">
<request>
<http_method>PUT</http_method>
<body>
<type>NIC</type>
</body>
</request>
<response>
<type>NIC</type>
</response>
</link>

<link href="/api/templates/{template:id}/nics" rel="add">
<request>
<http_method>POST</http_method>
<headers>
...


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