Examples of RedDwarfApi


Examples of org.jclouds.openstack.reddwarf.v1.RedDwarfApi

      assertEquals(flavor.getLinks().size(), 2);
   }
  
   public void testGetFlavorByAccountId() {
        URI endpoint = URI.create("http://172.16.0.1:8776/v1/3456/flavors/40806637803162");
        RedDwarfApi redDwarfApi = requestsSendResponses(
               keystoneAuthWithUsernameAndPasswordAndTenantName,
               responseWithKeystoneAccess,
               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
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.