Bug 830511 - RESTAPI: RSDL does not expose add for /api/templates/xxx/nics
Summary: RESTAPI: RSDL does not expose add for /api/templates/xxx/nics
Keywords:
Status: CLOSED DUPLICATE of bug 846950
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine-restapi
Version: 3.1.0
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
: ---
Assignee: Ori Liel
QA Contact: Elena
URL:
Whiteboard: infra
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-06-10 09:54 UTC by Elena
Modified: 2016-02-10 19:23 UTC (History)
10 users (show)

Fixed In Version: si13
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-08-14 05:43:46 UTC
oVirt Team: Infra
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Elena 2012-06-10 09:54:07 UTC
response = collection.add(entity) 

where collection is templates nics and entity=new nic

Got exception:
  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'

Comment 3 Ori Liel 2012-07-15 13:33:35 UTC
merged, commit 5b89e03de3fb9a5e0f9a8828c68b40efc9d2526e

Comment 4 Elena 2012-08-08 14:19:11 UTC
si13, rhevm-sdk-3.1.0.5-1.el6ev.noarch: same error as before:

    response = collection.add(entity)
  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'

Comment 5 Michael Pasternak 2012-08-08 15:04:42 UTC
ori?

Comment 6 Ori Liel 2012-08-09 09:03:23 UTC
This signature for add template-nic was added to yaml file in commit: 5b89e03de3fb9a5e0f9a8828c68b40efc9d2526e
about three weeks ago:

+- name: /api/templates/{template:id}/nics|rel=add
+  request:
+    body:
+      parameterType: NIC
+      signatures:
+      - mandatoryArguments: {nic.network.id|name: 'xs:string', nic.name: 'xs:string'}
+        optionalArguments: {nic.mac.address: 'xs:string', nic.interface: 'xs:string', nic.port_mirroring.networks.network--COLLECTION: {network.id: 'xs:string'}}
+    urlparams: {}
+    headers: {Content-Type: application/xml|json, Expect: 201-created}


If sdk was generated since then it should be in

Comment 7 Ori Liel 2012-08-12 08:00:11 UTC
Another issue is causing the problem, being fixed in the context of another bug by Michael Kolesnik; patch will be sent shortly by him

Comment 8 Itamar Heim 2012-08-13 21:44:19 UTC
mike - duplicate of bug 846950?

Comment 9 Mike Kolesnik 2012-08-14 05:43:46 UTC
(In reply to comment #8)
> mike - duplicate of bug 846950?

Yes, therefore I am closing as duplicate (as the other bug is already in proccess of being merged into the product).

*** This bug has been marked as a duplicate of bug 846950 ***


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