[Engine-devel] Problem with detachment of host interface using ovirt-sdk

Itzik Brown ItzikB at mellanox.com
Thu Mar 22 08:43:32 UTC 2012


Hi,

I'm using ovirt-sdk to attach and detach a network to a host's Interface.
Once the network is attached to the interface I try to detach the network from the interface using the following steps:

1.Detach the network from the cluster through the GUI.
2.Remove the network from the datacenter through the GUI.
3.Detach the network from the host's interface using the SDK:

nic = api.hosts.get(name=host).nics.get(name=if_name)
net = params.Network(name=net_name)
act = params.Action(network=net)
nic.detach(act)
api.hosts.get(name=host).commitnetconfig()

Then I get the error:
http://pastebin.com/3Md07huE

The same flow using the GUI works fine.

Network removal from the Datacenter is a trigger for me to run the detachment operation therefore I use this flow.

I use the following components:

rhevm-3.0.2_0001-2
ovirt-sdk (Using the latest from git repository)

Please advise how to proceed.

Thanks,
Itzik
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ovirt.org/pipermail/engine-devel/attachments/20120322/594afc44/attachment.html>


More information about the Engine-devel mailing list