Bug 842324 - REST API: unable to add multiple vlans over the same interface via setupnetworks and rest api
REST API: unable to add multiple vlans over the same interface via setupnetwo...
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine-restapi (Show other bugs)
3.1.0
x86_64 Linux
high Severity urgent
: ---
: ---
Assigned To: Mike Kolesnik
Yaniv Kaul
network
: TestBlocker
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-07-23 09:42 EDT by Avi Tal
Modified: 2016-04-22 00:59 EDT (History)
11 users (show)

See Also:
Fixed In Version: si14
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-12-04 15:01:25 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)
engine log (625.06 KB, application/x-compressed-tar)
2012-07-23 09:42 EDT, Avi Tal
no flags Details

  None (edit)
Description Avi Tal 2012-07-23 09:42:48 EDT
Created attachment 599780 [details]
engine log

I was trying to add multiple vlas over the same interface, a simple action which looks impossible vie REST API and setupnetworks

The idea in rest is to create the entire host_nics collections and send it to setupnetworks action.
The entire collection should look as followed (if you copy the final result of multiple vlans):

for example: adding sw1 vlan 164 and sw2 vlan 165 on top of eth1

<host_nics>
 <host_nic>
  <name>eth1</name>
  ...
 </host_nic>
 <host_nic>
  <name>eth1.164</name>
  <network>
   <name>sw1</name>
  </network>
  ...
 </host_nic>
 <host_nic>
  <name>eth1.165</name>
  <network>
   <name>sw2</name>
  </network>
  ....
 </host_nic>
</host_nics>

Sending this collection will cause ERROR [org.ovirt.engine.core.bll.SetupNetworksCommand] (ajp-/0.0.0.0:8009-6) [4d585298] Error during CanDoActionFailure.: java.lang.NullPointerException
...


BTW, when using only one vlan over eth1 the only thing we had to do is add sw1 as eth1's network.
for example:
<host_nics>
 <host_nic>
  <name>eth1</name>
  <network>
   <name>sw1</name>
  </network>
 </host_nic>
</host_nics>

and it automatically add eth1.164 element to the collection.

So The problem is that i can't really find a way to add multiple vlans over one interface through REST API and setupnetworks
Comment 8 Mike Kolesnik 2012-08-05 04:51:13 EDT
http://gerrit.ovirt.org/6895
Comment 13 Avi Tal 2012-08-20 11:00:49 EDT
Verify on SI14 - PASS

I have verified due to the modelling specified in the bug.
<host_nics>
 <host_nic>
  <name>eth1</name>
 </host_nic>
 <host_nic>
  <name>eth1.160</name>
  <network>
   <name>sw1</name>
  </network>
 </host_nic>
 <host_nic>
  <name>eth1.161</name>
  <network>
   <name>sw2</name>
  </network>
 </host_nic>
</host_nics>
Comment 14 Michael Pasternak 2012-08-20 11:16:07 EDT
i hope <name> is not mandatory <host_nic> param, as interface name should be 
derived from the nic.name+network.vlanid

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