Package org.jclouds.abiquo.domain.enterprise

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


   @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


   }

   protected NodeAndInitialCredentials<VirtualMachine> createNodeWithGroupEncodedIntoName(final String name,
         final VirtualApplianceCachingTemplate 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()));

      Integer overrideCores = options.getOverrideCores();
      Integer overrideRam = options.getOverrideRam();
View Full Code Here

            }));
   }

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

   @SuppressWarnings("unchecked")
   private static VirtualDatacenter mockVirtualDatacenter() {
      ApiContext<AbiquoApi> context = EasyMock.createMock(ApiContext.class);
      Datacenter datacenter = EasyMock.createMock(Datacenter.class);
      Enterprise enterprise = EasyMock.createMock(Enterprise.class);
      PrivateNetwork network = EasyMock.createMock(PrivateNetwork.class);

      VirtualDatacenter vdc = VirtualDatacenter.builder(context, datacenter, enterprise) //
            .network(network) //
            .name("mock").build();
View Full Code Here

   }

   protected NodeAndInitialCredentials<VirtualMachine> createNodeWithGroupEncodedIntoName(final String name,
         final VirtualApplianceCachingTemplate 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()));

      Integer overrideCores = options.getOverrideCores();
      Integer overrideRam = options.getOverrideRam();
View Full Code Here

            }));
   }

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

         TemplateOptions options) {

      if (!options.getNetworks().isEmpty()) {
         ImmutableList.Builder<Ip<?, ?>> ips = ImmutableList.<Ip<?, ?>> builder();

         Enterprise enterprise = adminService.getCurrentEnterprise();
         Iterable<ExternalNetwork> externalNetworks = enterprise.listExternalNetworks(datacenter);

         for (String networkId : options.getNetworks()) {
            Network<? extends Ip<?, ?>> network = template.getVirtualDatacenter().getPrivateNetwork(
                  Ints.tryParse(networkId));
View Full Code Here

   @SuppressWarnings("unchecked")
   private static VirtualDatacenter mockVirtualDatacenter() {
      ApiContext<AbiquoApi> context = EasyMock.createMock(ApiContext.class);
      Datacenter datacenter = EasyMock.createMock(Datacenter.class);
      Enterprise enterprise = EasyMock.createMock(Enterprise.class);
      PrivateNetwork network = EasyMock.createMock(PrivateNetwork.class);

      VirtualDatacenter vdc = VirtualDatacenter.builder(context, datacenter, enterprise) //
            .network(network) //
            .name("mock").build();
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 = newArrayList(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

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.