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);
detail: Network Interface is not attached to Logical Network.