コード例 #1
0
 private static void detachNetwork(
     List<VdsNetworkInterface> allNics, LogicalNetworkModel networkToDetach) {
   // remove the vlan device
   if (networkToDetach.hasVlan()) {
     allNics.remove(networkToDetach.getVlanNicModel().getEntity());
   }
   networkToDetach.detach();
 }
コード例 #2
0
 private static boolean isDisplayNetwork(LogicalNetworkModel logicalNetworkModel) {
   return logicalNetworkModel.getEntity().getCluster().isDisplay();
 }
コード例 #3
0
 @Override
 public boolean isDisplayNetworkAffected(NetworkItemModel<?> op1, NetworkItemModel<?> op2) {
   LogicalNetworkModel networkToBeAttached = (LogicalNetworkModel) op1;
   return isDisplayNetwork(networkToBeAttached) && networkToBeAttached.isAttached();
 }