public boolean isNetworkActive(String name) throws LibvirtException {
return getNetworks().contains(name);
}
public NetworkInfo getNetwork(String name) throws LibvirtException {
Network net = getLibVirtNetwork(name);
try {
NetworkInfo info = new NetworkInfo();
info.name = net.getName();
info.autostart = net.getAutostart();
info.bridgeName = net.getBridgeName();
return info;
} finally {
net.free();
}
}