Package org.jclouds.abiquo.domain.task

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


   @Test(dependsOnMethods = "detachHardDisk")
   public void detachAllHardDisks() {
      // Since the virtual machine is not deployed, this should not generate a
      // task
      VirtualMachineTask task = env.virtualMachine.attachHardDisks(hardDisk);
      assertNull(task);

      env.virtualMachine.detachAllHardDisks();
      Iterable<HardDisk> attached = env.virtualMachine.listAttachedHardDisks();
      assertTrue(isEmpty(attached));
View Full Code Here


      });
   }

   @AfterClass
   public void restorePrivateIp() {
      VirtualMachineTask task = env.virtualMachine.setNics(Lists.<Ip<?, ?>> newArrayList(privateIp));
      assertNull(task);

      Iterable<Ip<?, ?>> nics = env.virtualMachine.listAttachedNics();
      assertEquals(size(nics), 1);
      assertEquals(get(nics, 0).getId(), privateIp.getId());
View Full Code Here

   }

   // TODO: Infrastructure edit link for public ips can not be used to attach
   @Test(enabled = false)
   public void testAttachInfrastructurePublicIp() {
      VirtualMachineTask task = env.virtualMachine.setNics(Lists.<Ip<?, ?>> newArrayList(publicIpInfrastructure));
      assertNull(task);

      Iterable<Ip<?, ?>> nics = env.virtualMachine.listAttachedNics();
      assertEquals(size(nics), 1);
      assertEquals(get(nics, 0).getId(), publicIpInfrastructure.getId());
View Full Code Here

      assertEquals(size(nics), 1);
      assertEquals(get(nics, 0).getId(), publicIpInfrastructure.getId());
   }

   public void testAttachPublicIp() {
      VirtualMachineTask task = env.virtualMachine.setNics(Lists.<Ip<?, ?>> newArrayList(publicIpCloud));
      assertNull(task);

      Iterable<Ip<?, ?>> nics = env.virtualMachine.listAttachedNics();
      assertEquals(size(nics), 1);
      assertEquals(get(nics, 0).getId(), publicIpCloud.getId());
View Full Code Here

   @Test(dependsOnMethods = "testAttachPublicIp")
   public void testAttachPrivateIp() {
      List<Ip<?, ?>> nics = Lists.newArrayList(env.virtualMachine.listAttachedNics());
      nics.add(privateIp);

      VirtualMachineTask task = env.virtualMachine.setNics(nics);
      assertNull(task);

      nics = Lists.newArrayList(env.virtualMachine.listAttachedNics());
      assertEquals(nics.size(), 2);
      assertEquals(nics.get(0).getId(), publicIpCloud.getId());
View Full Code Here

   @Test(dependsOnMethods = "testAttachPrivateIp")
   public void testAttachExternalIp() {
      List<Ip<?, ?>> nics = Lists.newArrayList(env.virtualMachine.listAttachedNics());
      nics.add(externalIp);

      VirtualMachineTask task = env.virtualMachine.setNics(nics);
      assertNull(task);

      nics = Lists.newArrayList(env.virtualMachine.listAttachedNics());
      assertEquals(nics.size(), 3);
      assertEquals(nics.get(0).getId(), publicIpCloud.getId());
View Full Code Here

   @Test(dependsOnMethods = "testAttachExternalIp")
   public void testAddUnmanagedNics() {
      Iterable<Ip<?, ?>> nics = env.virtualMachine.listAttachedNics();

      VirtualMachineTask task = env.virtualMachine.setNics(Lists.newArrayList(nics),
            Lists.<UnmanagedNetwork> newArrayList(env.unmanagedNetwork, env.unmanagedNetwork));
      assertNull(task);

      nics = env.virtualMachine.listAttachedNics();
      assertEquals(size(nics), 5);
View Full Code Here

   @Test(dependsOnMethods = "testAddUnmanagedNics")
   public void testReorderNics() {
      List<Ip<?, ?>> nics = Lists.newArrayList(env.virtualMachine.listAttachedNics());

      VirtualMachineTask task = env.virtualMachine.setNics(Lists.<Ip<?, ?>> newArrayList(nics.get(2), nics.get(1),
            nics.get(0), nics.get(4), nics.get(3)));
      assertNull(task);

      nics = Lists.newArrayList(env.virtualMachine.listAttachedNics());
      assertEquals(nics.size(), 5);
View Full Code Here

   @Test(dependsOnMethods = "testReorderNics")
   public void testDetachNics() {
      List<Ip<?, ?>> nics = Lists.newArrayList(env.virtualMachine.listAttachedNics());

      VirtualMachineTask task = env.virtualMachine.setNics(Lists.<Ip<?, ?>> newArrayList(nics.get(1), nics.get(2)));
      assertNull(task);

      nics = Lists.newArrayList(env.virtualMachine.listAttachedNics());
      assertEquals(nics.size(), 2);
      assertEquals(nics.get(0).getId(), privateIp.getId());
View Full Code Here

      env.virtualDatacenter.update();

      try {
         VirtualMachine vm = env.virtualAppliance.getVirtualMachine(env.virtualMachine.getId());
         vm.setCpu(7);
         VirtualMachineTask task = vm.update(true);

         assertNull(task);
         assertEquals(vm.getCpu().intValue(), 7);
      } finally {
         env.virtualDatacenter.setCpuCountHardLimit(originalHard);
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.