public static void clearNetworks(NetworkInterfaceModel nic, List<VdsNetworkInterface> allNics) { List<LogicalNetworkModel> attachedNetworks = nic.getItems(); if (attachedNetworks.size() > 0) { for (LogicalNetworkModel networkModel : new ArrayList<LogicalNetworkModel>(attachedNetworks)) { DETACH_NETWORK.getCommand(networkModel, null, allNics).execute(); } } }
private static boolean isDisplayNetworkAttached(NetworkInterfaceModel networkItemModel) { return isDisplayNetworkAttached(networkItemModel.getItems()); }