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

Bug 846950

Summary: REST API: RSDL doesn't support add, update and delete template nics
Product: Red Hat Enterprise Virtualization Manager Reporter: Avi Tal <atal>
Component: ovirt-engine-sdkAssignee: Mike Kolesnik <mkolesni>
Status: CLOSED CURRENTRELEASE QA Contact: Yaniv Kaul <ykaul>
Severity: urgent Docs Contact:
Priority: high    
Version: 3.1.0CC: dyasny, ecohen, edolinin, iheim, jkt, mpastern, Rhev-m-bugs, sgrinber, srevivo, yeylon, ykaul
Target Milestone: ---Keywords: TestBlocker
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard: network
Fixed In Version: si16 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-12-04 19:57:29 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Network RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

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>
...