Exemple #1
0
 @Override
 public List<VirtualMachine> list(Machine owner) {
   List<VirtualMachine> vms = new ArrayList<VirtualMachine>();
   vms.addAll(memory(owner.getId()).values());
   return vms;
 }
Exemple #2
0
 @Override
 public void migrate(VirtualMachine vm, Machine source, Machine dest) {
   migrationHistory.add(new Object[] {vm, source, dest});
   memory(source.getId()).remove(vm.getName());
   memory(dest.getId()).put(vm.getName(), vm);
 }
Exemple #3
0
 @Override
 public VirtualMachine find(Machine owner, String name) {
   return memory.get(owner.getId()).get(name);
 }