Package org.jclouds.abiquo.domain.task

Examples of org.jclouds.abiquo.domain.task.VirtualMachineTask


            target.addLink(link);
            i++;
         }
      }

      VirtualMachineTask task = update(true);
      if (gatewayNetwork == null) {
         return task;
      }

      // If there is a gateway network, we have to wait until the network
View Full Code Here


            target.addLink(link);
            i++;
         }
      }

      VirtualMachineTask task = update(true);
      if (gatewayNetwork == null) {
         return task;
      }

      // If there is a gateway network, we have to wait until the network
View Full Code Here

   @Test(dependsOnMethods = "testFilterVolumes")
   public void testUpdateVolume() {
      Volume volume = find(env.virtualDatacenter.listVolumes(), volumeName(PREFIX + "Hawaian volume"));

      volume.setName("Hawaian volume updated");
      VirtualMachineTask task = volume.update();
      assertNull(task);

      // Reload the volume to check
      Volume updated = env.virtualDatacenter.getVolume(volume.getId());
      assertEquals(updated.getName(), "Hawaian volume updated");
View Full Code Here

   }

   @Test(dependsOnMethods = "testCreateVirtualMachine")
   public void testUpdateVirtualMachineWhenNotDeployed() {
      vm.setNameLabel(PREFIX + "VM Kane Updated");
      VirtualMachineTask task = vm.update();
      assertNull(task);

      find(vapp.listVirtualMachines(), new Predicate<VirtualMachine>() {
         @Override
         public boolean apply(VirtualMachine input) {
View Full Code Here

      });
   }

   @Test(dependsOnMethods = "testUpdateVirtualMachineWhenNotDeployed")
   public void testDeployVirtualMachine() {
      VirtualMachineTask task = vm.deploy(true);
      assertNotNull(task);

      monitoringService.getVirtualMachineMonitor().awaitCompletionDeploy(MAX_WAIT, TimeUnit.MINUTES, vm);
      assertEquals(vm.getState(), VirtualMachineState.ON);
   }
View Full Code Here

      assertEquals(vm.getState(), VirtualMachineState.ON);
   }

   @Test(dependsOnMethods = "testDeployVirtualMachine")
   public void testChangeVirtualMachineState() {
      VirtualMachineTask task = vm.changeState(VirtualMachineState.OFF);
      assertNotNull(task);

      monitoringService.getVirtualMachineMonitor().awaitState(MAX_WAIT, TimeUnit.MINUTES, VirtualMachineState.OFF, vm);
      assertEquals(vm.getState(), VirtualMachineState.OFF);
   }
View Full Code Here

   @Test(dependsOnMethods = "testChangeVirtualMachineState")
   public void testReconfigure() {
      final Ip<?, ?> ip = getLast(vdc.getDefaultNetwork().listUnusedIps());

      VirtualMachineTask task = vm.setNics(Lists.<Ip<?, ?>> newArrayList(ip));
      assertNotNull(task);

      monitoringService.getVirtualMachineMonitor().awaitState(MAX_WAIT, TimeUnit.MINUTES, VirtualMachineState.OFF, vm);

      find(vm.listAttachedNics(), new Predicate<Ip<?, ?>>() {
View Full Code Here

      });
   }

   @Test(dependsOnMethods = "testReconfigure")
   public void testUndeployVirtualMachine() {
      VirtualMachineTask task = vm.undeploy();
      assertNotNull(task);

      monitoringService.getVirtualMachineMonitor().awaitCompletionUndeploy(MAX_WAIT, TimeUnit.MINUTES, vm);
      assertEquals(vm.getState(), VirtualMachineState.NOT_ALLOCATED);
   }
View Full Code Here

         vm.setCpu(vdc.getCpuCountHardLimit() + 1);
      } else if (ent.getCpuCountHardLimit() != 0) {
         vm.setCpu(ent.getCpuCountHardLimit() + 1);
      }

      VirtualMachineTask task = vm.update();
      assertNull(task);

      try {
         vm.deploy(true);
         fail("Deployments over the hard limits should not be allowed");
View Full Code Here

   public void testAttachVolumes() {
      volume = createVolume();

      // Since the virtual machine is not deployed, this should not generate a
      // task
      VirtualMachineTask task = env.virtualMachine.attachVolumes(volume);
      assertNull(task);

      Iterable<Volume> attached = env.virtualMachine.listAttachedVolumes();
      assertEquals(size(attached), 1);
      assertEquals(get(attached, 0).getId(), volume.getId());
View Full Code Here

TOP

Related Classes of org.jclouds.abiquo.domain.task.VirtualMachineTask

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.