@Override
 protected NIC populate(NIC model, VmNetworkInterface entity) {
   Network network = findNetwork(model);
   model.getNetwork().setId(network.getId().toString());
   model.getNetwork().setName(null);
   return model;
 }
Ejemplo n.º 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;
 }
Ejemplo n.º 3
0
 @Override
 public int compare(Network x, Network y) {
   return x.getname().compareTo(y.getname());
 }