Package org.jclouds.abiquo.domain.enterprise

Examples of org.jclouds.abiquo.domain.enterprise.Enterprise


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

   @Test(dependsOnMethods = "testUndeployVirtualMachine")
   public void testDeployFailsWhenHardLimitsAreExceeded() {
      Enterprise ent = view.getAdministrationService().getCurrentEnterprise();

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

      VirtualMachineTask task = vm.update();
      assertNull(task);
View Full Code Here


      assertFalse(env.machine.isReserved());

      env.machine.reserveFor(env.enterprise);
      assertTrue(env.machine.isReserved());

      Enterprise owner = env.machine.getOwnerEnterprise();
      assertNotNull(owner);
      assertEquals(owner.getId(), env.enterprise.getId());
   }
View Full Code Here

   @Test(dependsOnMethods = "testReserveMachine")
   public void testCancelReservation() {
      env.machine.cancelReservationFor(env.enterprise);
      assertFalse(env.machine.isReserved());

      Enterprise owner = env.machine.getOwnerEnterprise();
      assertNull(owner);
   }
View Full Code Here

      assertEquals(virtualDatacenters.get(0).getName(), virtualDatacenters.get(1).getName());
      repeated.delete();
   }

   public void testCreateFromEnterprise() {
      Enterprise enterprise = env.enterpriseAdminContext.getAdministrationService().getCurrentUser().getEnterprise();
      assertNotNull(enterprise);

      List<Datacenter> datacenters = enterprise.listAllowedDatacenters();
      assertNotNull(datacenters);
      assertTrue(size(datacenters) > 0);

      Datacenter datacenter = datacenters.get(0);
View Full Code Here

   }

   public void testCreateFromVirtualDatacenter() {
      HypervisorType hypervisor = env.virtualDatacenter.getHypervisorType();

      Enterprise enterprise = env.user.getEnterprise();
      assertNotNull(enterprise);

      Datacenter datacenter = env.virtualDatacenter.getDatacenter();
      assertNotNull(datacenter);
View Full Code Here

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

   @Test(dependsOnMethods = "testUndeployVirtualMachine")
   public void testDeployFailsWhenHardLimitsAreExceeded() {
      Enterprise ent = view.getAdministrationService().getCurrentEnterprise();

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

      AsyncTask task = vm.update();
      assertNull(task);
View Full Code Here

      assertFalse(env.machine.isReserved());

      env.machine.reserveFor(env.enterprise);
      assertTrue(env.machine.isReserved());

      Enterprise owner = env.machine.getOwnerEnterprise();
      assertNotNull(owner);
      assertEquals(owner.getId(), env.enterprise.getId());
   }
View Full Code Here

   @Test(dependsOnMethods = "testReserveMachine")
   public void testCancelReservation() {
      env.machine.cancelReservationFor(env.enterprise);
      assertFalse(env.machine.isReserved());

      Enterprise owner = env.machine.getOwnerEnterprise();
      assertNull(owner);
   }
View Full Code Here

   @Override
   public NodeAndInitialCredentials<VirtualMachine> createNodeWithGroupEncodedIntoName(final String tag,
         final String name, final Template template) {
      AbiquoTemplateOptions options = template.getOptions().as(AbiquoTemplateOptions.class);
      Enterprise enterprise = adminService.getCurrentEnterprise();

      // Get the region where the template is available
      Datacenter datacenter = regionMap.get().get(Integer.valueOf(template.getImage().getLocation().getId()));

      // Load the template
      VirtualMachineTemplate virtualMachineTemplate = enterprise.getTemplateInRepository(datacenter,
            Integer.valueOf(template.getImage().getId()));

      // Get the zone where the template will be deployed
      VirtualDatacenter vdc = cloudService.getVirtualDatacenter(Integer.valueOf(template.getHardware().getLocation()
            .getId()));
View Full Code Here

            }));
   }

   @Override
   public Iterable<VirtualMachineTemplate> listImages() {
      Enterprise enterprise = adminService.getCurrentEnterprise();
      return enterprise.listTemplates();
   }
View Full Code Here

TOP

Related Classes of org.jclouds.abiquo.domain.enterprise.Enterprise

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.