Package org.jclouds.cloudstack.domain

Examples of org.jclouds.cloudstack.domain.ServiceOffering


      Set<ServiceOffering> response = client.getOfferingClient().listServiceOfferings();
      assert null != response;
      long offeringCount = response.size();
      assertTrue(offeringCount >= 0);
      for (ServiceOffering offering : response) {
         ServiceOffering newDetails = Iterables.getOnlyElement(client.getOfferingClient().listServiceOfferings(
               ListServiceOfferingsOptions.Builder.id(offering.getId())));
         assertEquals(offering, newDetails);

         assert offering.getId() != null : offering;
         assert offering.getName() != null : offering;
View Full Code Here


   public void testCreateServiceOffering() throws Exception {
      skipIfNotGlobalAdmin();

      String name = prefix + "-test-create-service-offering";
      String displayText = name + "-display";
      ServiceOffering offering = null;
      try {
         offering = globalAdminClient.getOfferingClient().
            createServiceOffering(name, displayText, 2, 1024, 2048, highlyAvailable(true).storageType(StorageType.LOCAL));
         Logger.CONSOLE.info("Created Service Offering: " + offering);

         assertEquals(offering.getName(), name);
         assertEquals(offering.getDisplayText(), displayText);
         checkServiceOffering(offering);

         offering = globalAdminClient.getOfferingClient()
            .updateServiceOffering(offering.getId(),
               UpdateServiceOfferingOptions.Builder.name(name + "-2").displayText(displayText + "-2"));

         assertEquals(offering.getName(), name + "-2");
         assertEquals(offering.getDisplayText(), displayText + "-2");
         checkServiceOffering(offering);

      } finally {
         if (offering != null) {
            globalAdminClient.getOfferingClient().deleteServiceOffering(offering.getId());
         }
      }
   }
View Full Code Here

   public void testCreateServiceOffering() throws Exception {
      skipIfNotGlobalAdmin();

      String name = prefix + "-test-create-service-offering";
      String displayText = name + "-display";
      ServiceOffering offering = null;
      try {
         offering = globalAdminClient.getOfferingApi().
            createServiceOffering(name, displayText, 2, 1024, 2048, highlyAvailable(true).storageType(StorageType.LOCAL));
         Logger.CONSOLE.info("Created Service Offering: " + offering);

         assertEquals(offering.getName(), name);
         assertEquals(offering.getDisplayText(), displayText);
         checkServiceOffering(offering);

         offering = globalAdminClient.getOfferingApi()
            .updateServiceOffering(offering.getId(),
               UpdateServiceOfferingOptions.Builder.name(name + "-2").displayText(displayText + "-2"));

         assertEquals(offering.getName(), name + "-2");
         assertEquals(offering.getDisplayText(), displayText + "-2");
         checkServiceOffering(offering);

      } finally {
         if (offering != null) {
            globalAdminClient.getOfferingApi().deleteServiceOffering(offering.getId());
         }
      }
   }
View Full Code Here

      Set<ServiceOffering> response = client.getOfferingApi().listServiceOfferings();
      assert null != response;
      long offeringCount = response.size();
      assertTrue(offeringCount >= 0);
      for (ServiceOffering offering : response) {
         ServiceOffering newDetails = Iterables.getOnlyElement(client.getOfferingApi().listServiceOfferings(
               ListServiceOfferingsOptions.Builder.id(offering.getId())));
         assertEquals(offering, newDetails);

         assert offering.getId() != null : offering;
         assert offering.getName() != null : offering;
View Full Code Here

   public void testCreateServiceOffering() throws Exception {
      skipIfNotGlobalAdmin();

      String name = prefix + "-test-create-service-offering";
      String displayText = name + "-display";
      ServiceOffering offering = null;
      try {
         offering = globalAdminClient.getOfferingClient().
            createServiceOffering(name, displayText, 2, 1024, 2048, highlyAvailable(true).storageType(StorageType.LOCAL));
         Logger.CONSOLE.info("Created Service Offering: " + offering);

         assertEquals(offering.getName(), name);
         assertEquals(offering.getDisplayText(), displayText);
         checkServiceOffering(offering);

         offering = globalAdminClient.getOfferingClient()
            .updateServiceOffering(offering.getId(),
               UpdateServiceOfferingOptions.Builder.name(name + "-2").displayText(displayText + "-2"));

         assertEquals(offering.getName(), name + "-2");
         assertEquals(offering.getDisplayText(), displayText + "-2");
         checkServiceOffering(offering);

      } finally {
         if (offering != null) {
            globalAdminClient.getOfferingClient().deleteServiceOffering(offering.getId());
         }
      }
   }
View Full Code Here

      Set<ServiceOffering> response = client.getOfferingClient().listServiceOfferings();
      assert null != response;
      long offeringCount = response.size();
      assertTrue(offeringCount >= 0);
      for (ServiceOffering offering : response) {
         ServiceOffering newDetails = Iterables.getOnlyElement(client.getOfferingClient().listServiceOfferings(
               ListServiceOfferingsOptions.Builder.id(offering.getId())));
         assertEquals(offering, newDetails);

         assert offering.getId() != null : offering;
         assert offering.getName() != null : offering;
View Full Code Here

   public void testCreateServiceOffering() throws Exception {
      skipIfNotGlobalAdmin();

      String name = prefix + "-test-create-service-offering";
      String displayText = name + "-display";
      ServiceOffering offering = null;
      try {
         offering = globalAdminClient.getOfferingApi().
            createServiceOffering(name, displayText, 2, 1024, 2048, highlyAvailable(true).storageType(StorageType.LOCAL));
         Logger.CONSOLE.info("Created Service Offering: " + offering);

         assertEquals(offering.getName(), name);
         assertEquals(offering.getDisplayText(), displayText);
         checkServiceOffering(offering);

         offering = globalAdminClient.getOfferingApi()
            .updateServiceOffering(offering.getId(),
               UpdateServiceOfferingOptions.Builder.name(name + "-2").displayText(displayText + "-2"));

         assertEquals(offering.getName(), name + "-2");
         assertEquals(offering.getDisplayText(), displayText + "-2");
         checkServiceOffering(offering);

      } finally {
         if (offering != null) {
            globalAdminClient.getOfferingApi().deleteServiceOffering(offering.getId());
         }
      }
   }
View Full Code Here

      Set<ServiceOffering> response = client.getOfferingApi().listServiceOfferings();
      assert null != response;
      long offeringCount = response.size();
      assertTrue(offeringCount >= 0);
      for (ServiceOffering offering : response) {
         ServiceOffering newDetails = Iterables.getOnlyElement(client.getOfferingApi().listServiceOfferings(
               ListServiceOfferingsOptions.Builder.id(offering.getId())));
         assertEquals(offering, newDetails);

         assert offering.getId() != null : offering;
         assert offering.getName() != null : offering;
View Full Code Here

TOP

Related Classes of org.jclouds.cloudstack.domain.ServiceOffering

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.