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
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 14Michael Pasternak
2012-08-20 15:16:07 UTC
i hope <name> is not mandatory <host_nic> param, as interface name should be
derived from the nic.name+network.vlanid
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