Bug 830511 - RESTAPI: RSDL does not expose add for /api/templates/xxx/nics
RESTAPI: RSDL does not expose add for /api/templates/xxx/nics
Status: CLOSED DUPLICATE of bug 846950
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine-restapi (Show other bugs)
3.1.0
Unspecified Unspecified
unspecified Severity high
: ---
: ---
Assigned To: Ori Liel
Elena
infra
: Reopened
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-06-10 05:54 EDT by Elena
Modified: 2016-02-10 14:23 EST (History)
10 users (show)

See Also:
Fixed In Version: si13
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-08-14 01:43:46 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: Infra
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Elena 2012-06-10 05:54:07 EDT
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 09:33:35 EDT
merged, commit 5b89e03de3fb9a5e0f9a8828c68b40efc9d2526e
Comment 4 Elena 2012-08-08 10:19:11 EDT
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 11:04:42 EDT
ori?
Comment 6 Ori Liel 2012-08-09 05:03:23 EDT
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 04:00:11 EDT
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 17:44:19 EDT
mike - duplicate of bug 846950?
Comment 9 Mike Kolesnik 2012-08-14 01:43:46 EDT
(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.