@Override
 protected NIC populate(NIC model, VmNetworkInterface entity) {
   Network network = findNetwork(model);
   model.getNetwork().setId(network.getId().toString());
   model.getNetwork().setName(null);
   return model;
 }
Beispiel #2
0
 public static Network FindNetworkByName(ArrayList<Network> items, String name) {
   for (Network n : items) {
     if (StringHelper.stringsEqual(n.getname(), name)) {
       return n;
     }
   }
   return null;
 }
Beispiel #3
0
 @Override
 public int compare(Network x, Network y) {
   return x.getname().compareTo(y.getname());
 }