Package org.jclouds.openstack.trove.v1.domain

Examples of org.jclouds.openstack.trove.v1.domain.Instance


   public static class Builder extends BaseProviderMetadata.Builder {

      protected Builder(){
         id("rackspace-clouddatabases-us")
         .name("Rackspace Clouddatabases US")
         .apiMetadata(new TroveApiMetadata().toBuilder()
                  .identityName("${userName}")
                  .credentialName("${apiKey}")
                  .defaultEndpoint("https://identity.api.rackspacecloud.com/v2.0/")
                  .endpointName("identity service url ending in /v2.0/")
                  .documentation(URI.create("http://docs.rackspace.com/cbs/api/v1.0/cbs-devguide/content/overview.html"))
View Full Code Here


*/
@Test(groups = "unit", testName = "CloudDatabasesUKProviderTest")
public class CloudDatabasesUKProviderTest extends BaseProviderMetadataTest {

   public CloudDatabasesUKProviderTest() {
      super(new CloudDatabasesUKProviderMetadata(), new TroveApiMetadata());
   }
View Full Code Here

   public static class Builder extends BaseProviderMetadata.Builder {

      protected Builder(){
         id("rackspace-clouddatabases-uk")
         .name("Rackspace Clouddatabases UK")
         .apiMetadata(new TroveApiMetadata().toBuilder()
                  .identityName("${userName}")
                  .credentialName("${apiKey}")
                  .defaultEndpoint("https://lon.identity.api.rackspacecloud.com/v2.0")
                  .endpointName("identity service url ending in /v2.0/")
                  .documentation(URI.create("http://docs.rackspace.com/cbs/api/v1.0/cbs-devguide/content/overview.html"))
View Full Code Here

   public static class Builder extends BaseProviderMetadata.Builder {

      protected Builder(){
         id("rackspace-clouddatabases-us")
         .name("Rackspace Clouddatabases US")
         .apiMetadata(new TroveApiMetadata().toBuilder()
                  .identityName("${userName}")
                  .credentialName("${apiKey}")
                  .defaultEndpoint("https://identity.api.rackspacecloud.com/v2.0/")
                  .endpointName("identity service url ending in /v2.0/")
                  .documentation(URI.create("http://docs.rackspace.com/cbs/api/v1.0/cbs-devguide/content/overview.html"))
View Full Code Here

   public static class Builder extends BaseProviderMetadata.Builder {

      protected Builder(){
         id("rackspace-clouddatabases-uk")
         .name("Rackspace Clouddatabases UK")
         .apiMetadata(new TroveApiMetadata().toBuilder()
                  .identityName("${userName}")
                  .credentialName("${apiKey}")
                  .defaultEndpoint("https://lon.identity.api.rackspacecloud.com/v2.0")
                  .endpointName("identity service url ending in /v2.0/")
                  .documentation(URI.create("http://docs.rackspace.com/cbs/api/v1.0/cbs-devguide/content/overview.html"))
View Full Code Here

            responseWithKeystoneAccess,
            authenticatedGET().endpoint(endpoint).build(),
            HttpResponse.builder().statusCode(200).payload(payloadFromResource("/flavor_get.json")).build()
      ).getFlavorApiForZone("RegionOne");

      Flavor flavor = api.get(1);
      assertEquals(flavor.getName(), "512MB Instance");
      assertEquals(flavor.getId(), 1);
      assertEquals(flavor.getRam(), 512);
      assertEquals(flavor.getLinks().size(), 2);
   }
View Full Code Here

               authenticatedGET().endpoint(endpoint).build(),
               HttpResponse.builder().statusCode(200).payload(payloadFromResource("/flavor_list.json")).build() );
        FlavorApi api = redDwarfApi.getFlavorApiForZone("RegionOne");

        Set<? extends Flavor> flavors = api.list( redDwarfApi.getCurrentTenantId().get().getId() ).toSet();
        Flavor flavor = flavors.iterator().next();
        assertEquals(flavor.getName(), "512MB Instance");
        assertEquals(flavor.getId(), 1);
        assertEquals(flavor.getRam(), 512);
        assertEquals(flavor.getLinks().size(), 2);
     }
View Full Code Here

    @Test
    public void testGetFlavor() {
        for (String zone : api.getConfiguredZones()) {
            FlavorApi flavorApi = api.getFlavorApiForZone(zone);          
            for (Flavor flavor : flavorApi.list()) {
                Flavor flavorFromGet = flavorApi.get(flavor.getId());
                assertEquals(flavorFromGet.getId(), flavor.getId());
                assertEquals(flavorFromGet.getRam(), flavor.getRam());
                assertEquals(flavorFromGet.getName(), flavor.getName());
                assertEquals(flavorFromGet.getLinks(), flavor.getLinks());
            }
        }
    }
View Full Code Here

            responseWithKeystoneAccess,
            authenticatedGET().endpoint(endpoint).build(),
            HttpResponse.builder().statusCode(200).payload(payloadFromResource("/flavor_get.json")).build()
      ).getFlavorApiForZone("RegionOne");

      Flavor flavor = api.get(1);
      assertEquals(flavor.getName(), "512MB Instance");
      assertEquals(flavor.getId(), 1);
      assertEquals(flavor.getRam(), 512);
      assertEquals(flavor.getLinks().size(), 2);
   }
View Full Code Here

               authenticatedGET().endpoint(endpoint).build(),
               HttpResponse.builder().statusCode(200).payload(payloadFromResource("/flavor_list.json")).build() );
        FlavorApi api = redDwarfApi.getFlavorApiForZone("RegionOne");

        Set<? extends Flavor> flavors = api.list( redDwarfApi.getCurrentTenantId().get().getId() ).toSet();
        Flavor flavor = flavors.iterator().next();
        assertEquals(flavor.getName(), "512MB Instance");
        assertEquals(flavor.getId(), 1);
        assertEquals(flavor.getRam(), 512);
        assertEquals(flavor.getLinks().size(), 2);
     }
View Full Code Here

TOP

Related Classes of org.jclouds.openstack.trove.v1.domain.Instance

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.