[Users] Delete & Detach Logical Network
Tejesh M
tejeshmk at gmail.com
Mon Mar 10 11:22:08 UTC 2014
Hi,
I'm able to delete the logical network but this logical network after
deletion shows as unmanaged network in "Setup Host Networks" against the
hostnic.
I tried with this code to detach the logical network.
*Code 1:*
HostNIC nic = api.getHosts().get("rhevhost").getHostNics().get("eth1");
Action action = new Action();
action.setNetwork(api.getNetworks().get(nw_name));
action.setDetach(true);
action.setCheckConnectivity(false);
nic.detach(action);
*Returns*:
code : 409
reason: Conflict
detail: Network Interface is not attached to Logical Network.
*Code 2:*
HostNIC nic = api.getHosts().get("rhevhost").getHostNics().get("eth1.1345");
Action action = new Action();
action.setNetwork(api.getNetworks().get(nw_name));
action.setDetach(true);
action.setCheckConnectivity(false);
nic.detach(action);
*Returns*:
code : 409
reason: Conflict
detail: Cannot edit Network while Host is Active, change the Host to
Maintenance mode and try again.
--
Thanks & Regards
Tejesh
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ovirt.org/pipermail/users/attachments/20140310/fc0070c3/attachment-0001.html>
More information about the Users
mailing list