Examples of QuotaClass


Examples of org.jclouds.openstack.nova.v2_0.domain.QuotaClass

   public void testUpdateAndGetQuotaClass() {
      if (apiOption.isPresent()) {
         QuotaClassApi api = apiOption.get();

         QuotaClass firstVersion =
               QuotaClassApiExpectTest.getTestQuotas().toBuilder()
                     .id("jcloudstestquotas")
                     .cores(10)
                     .instances(5)
                     .ram(4096)
                     .volumes(5)
                     .build();

         assertTrue(api.update(firstVersion.getId(), firstVersion));

         assertEquals(api.get(firstVersion.getId()), firstVersion);

         // Change it again (since we may have run this test before and we can't delete the QuotaClass)
         QuotaClass secondVersion = firstVersion.toBuilder().ram(8192).build();

         assertTrue(api.update(secondVersion.getId(), secondVersion));

         assertEquals(api.get(secondVersion.getId()), secondVersion);
      }
   }
View Full Code Here

Examples of org.jclouds.openstack.nova.v2_0.domain.QuotaClass

   public void testUpdateAndGetQuotaClass() {
      if (apiOption.isPresent()) {
         QuotaClassApi api = apiOption.get();

         QuotaClass firstVersion =
               QuotaClassApiExpectTest.getTestQuotas().toBuilder()
                     .id("jcloudstestquotas")
                     .cores(10)
                     .instances(5)
                     .ram(4096)
                     .volumes(5)
                     .build();

         assertTrue(api.update(firstVersion.getId(), firstVersion));

         assertEquals(api.get(firstVersion.getId()), firstVersion);

         // Change it again (since we may have run this test before and we can't delete the QuotaClass)
         QuotaClass secondVersion = firstVersion.toBuilder().ram(8192).build();

         assertTrue(api.update(secondVersion.getId(), secondVersion));

         assertEquals(api.get(secondVersion.getId()), secondVersion);
      }
   }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.