Bug 846950 - REST API: RSDL doesn't support add, update and delete template nics
REST API: RSDL doesn't support add, update and delete template nics
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine-sdk (Show other bugs)
3.1.0
x86_64 Linux
high Severity urgent
: ---
: ---
Assigned To: Mike Kolesnik
Yaniv Kaul
network
: TestBlocker
: 830511 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-08-09 04:41 EDT by Avi Tal
Modified: 2016-04-22 00:59 EDT (History)
11 users (show)

See Also:
Fixed In Version: si16
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-12-04 14:57:29 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: Network
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Avi Tal 2012-08-09 04:41:24 EDT
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 05:11:11 EDT
http://gerrit.ovirt.org/7098
Comment 4 Mike Kolesnik 2012-08-14 01:43:46 EDT
*** Bug 830511 has been marked as a duplicate of this bug. ***
Comment 6 Michael Pasternak 2012-08-22 05:00:46 EDT
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 09:05:34 EDT
(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 09:34:20 EDT
(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 11:54:23 EDT
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.