Package org.jclouds.openstack.keystone.v2_0.functions

Examples of org.jclouds.openstack.keystone.v2_0.functions.InternalURL


            keystoneAuthWithUsernameAndPasswordAndTenantName, responseWithKeystoneAccess,
            HttpRequest.builder().method("GET").endpoint(endpoint + "/v2.0/").
            addHeader("Accept", APPLICATION_JSON).build(),
            HttpResponse.builder().statusCode(200).
                  payload(payloadFromResourceWithContentType("/raxVersion.json", APPLICATION_JSON)).build());
      ApiMetadata metadata = api.getApiMetadata();

      assertEquals(metadata, new ParseRackspaceApiMetadataTest().expected());
   }
View Full Code Here


*/
@Test(groups = "live", testName = "KeystoneApiLiveTest")
public class KeystoneApiLiveTest extends BaseKeystoneApiLiveTest {

   public void testGetApiMetaData() {
      ApiMetadata result = api.getApiMetadata();
      assertNotNull(result);
      assertNotNull(result.getId());
      assertNotNull(result.getStatus());
      assertNotNull(result.getUpdated());
   }
View Full Code Here

            keystoneAuthWithUsernameAndPasswordAndTenantName, responseWithKeystoneAccess,
            HttpRequest.builder().method("GET").endpoint(endpoint + "/v2.0/").
            addHeader("Accept", APPLICATION_JSON).build(),
            HttpResponse.builder().statusCode(200).
                  payload(payloadFromResourceWithContentType("/raxVersion.json", APPLICATION_JSON)).build());
      ApiMetadata metadata = api.getApiMetadata();

      assertEquals(metadata, new ParseRackspaceApiMetadataTest().expected());
   }
View Full Code Here

*/
@Test(groups = "live", testName = "KeystoneApiLiveTest")
public class KeystoneApiLiveTest extends BaseKeystoneApiLiveTest {

   public void testGetApiMetaData() {
      ApiMetadata result = api.getApiMetadata();
      assertNotNull(result);
      assertNotNull(result.getId());
      assertNotNull(result.getStatus());
      assertNotNull(result.getUpdated());
   }
View Full Code Here

      RoleAdminApi roleApi = roleAdminOption.get();
      Set<? extends Role> roles = roleApi.list().toSet();
      assertNotNull(roles);
      assertFalse(roles.isEmpty());
      for (Role role : roles) {
         Role aRole = roleApi.get(role.getId());
         assertEquals(aRole, role);
      }

   }
View Full Code Here

   }

   @Test(dependsOnMethods = { "testCreateRole" })
   public void testGetRole() {

      Role testGetRole = roleAdminOption.get().get(testRole.getId());
      assertNotNull(testGetRole);
      assertEquals(testGetRole.getName(), "jclouds-test-role");

   }
View Full Code Here

            stringFromResource("/role_create_response.json"))));

      try {
         KeystoneApi keystoneApi = api(server.getUrl("/").toString(), "openstack-keystone");
         RoleAdminApi roleAdminApi = keystoneApi.getRoleAdminApi().get();
         Role testRole = roleAdminApi.create("jclouds-role");

         assertNotNull(testRole);
         assertEquals(testRole.getId(), "r1000");

         assertEquals(server.getRequestCount(), 3);
         assertAuthentication(server);
         assertExtensions(server);
         RecordedRequest createRoleRequest = server.takeRequest();
View Full Code Here

            stringFromResource("/role_create_response.json"))));

      try {
         KeystoneApi keystoneApi = api(server.getUrl("/").toString(), "openstack-keystone");
         RoleAdminApi roleAdminApi = keystoneApi.getRoleAdminApi().get();
         Role testRole = roleAdminApi.create("jclouds-role");

         assertNull(testRole);

         assertEquals(server.getRequestCount(), 3);
         assertAuthentication(server);
View Full Code Here

            stringFromResource("/role_create_response.json"))));

      try {
         KeystoneApi keystoneApi = api(server.getUrl("/").toString(), "openstack-keystone");
         RoleAdminApi roleAdminApi = keystoneApi.getRoleAdminApi().get();
         Role role = roleAdminApi.get("r1000");

         assertEquals(server.getRequestCount(), 3);
         assertAuthentication(server);
         assertExtensions(server);
         RecordedRequest updateRoleRequest = server.takeRequest();
         assertEquals(updateRoleRequest.getRequestLine(), "GET /OS-KSADM/roles/r1000 HTTP/1.1");

         /*
          * Check response
          */
         assertEquals(role.getId(), "r1000");
         assertEquals(role.getName(), "jclouds-role");
      } finally {
         server.shutdown();
      }
   }
View Full Code Here

      server.enqueue(addCommonHeaders(new MockResponse().setResponseCode(404)));

      try {
         KeystoneApi keystoneApi = api(server.getUrl("/").toString(), "openstack-keystone");
         RoleAdminApi roleAdminApi = keystoneApi.getRoleAdminApi().get();
         Role role = roleAdminApi.get("r1000");

         assertNull(role);
         assertEquals(server.getRequestCount(), 3);
         assertAuthentication(server);
         assertExtensions(server);
View Full Code Here

TOP

Related Classes of org.jclouds.openstack.keystone.v2_0.functions.InternalURL

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.