Package org.jclouds.openstack.keystone.v2_0.config

Examples of org.jclouds.openstack.keystone.v2_0.config.KeystoneAuthenticationModule$RegionModule


      server.enqueue(addCommonHeaders(new MockResponse().setBody(stringFromResource("/admin_extensions.json"))));
      server.enqueue(addCommonHeaders(new MockResponse().setResponseCode(201).setBody(
            stringFromResource("/user_create_response.json"))));

      try {
         KeystoneApi keystoneApi = api(server.getUrl("/").toString(), "openstack-keystone");
         UserAdminApi userAdminApi = keystoneApi.getUserAdminApi().get();
         CreateUserOptions createUserOptions = CreateUserOptions.Builder.email("john.smith@example.org").enabled(true);
         User testUser = userAdminApi.create("jqsmith", "jclouds-password", createUserOptions);

         assertNotNull(testUser);
         assertEquals(testUser.getId(), "u1000");
View Full Code Here


      server.enqueue(addCommonHeaders(new MockResponse().setBody(stringFromResource("/access_version_uids.json"))));
      server.enqueue(addCommonHeaders(new MockResponse().setBody(stringFromResource("/admin_extensions.json"))));
      server.enqueue(addCommonHeaders(new MockResponse().setResponseCode(404)));

      try {
         KeystoneApi keystoneApi = api(server.getUrl("/").toString(), "openstack-keystone");
         UserAdminApi userAdminApi = keystoneApi.getUserAdminApi().get();
         CreateUserOptions createUserOptions = CreateUserOptions.Builder.email("john.smith@example.org").enabled(true);
         User testUser = userAdminApi.create("jqsmith", "jclouds-password", createUserOptions);

         assertNull(testUser);
View Full Code Here

      server.enqueue(addCommonHeaders(new MockResponse().setBody(stringFromResource("/admin_extensions.json"))));
      server.enqueue(addCommonHeaders(new MockResponse().setResponseCode(200).setBody(
            stringFromResource("/user_update_response.json"))));

      try {
         KeystoneApi keystoneApi = api(server.getUrl("/").toString(), "openstack-keystone");
         UserAdminApi userAdminApi = keystoneApi.getUserAdminApi().get();
         UpdateUserOptions updateUserOptions = UpdateUserOptions.Builder.email("john.smith.renamed@example.org")
               .enabled(false).name("jqsmith-renamed").password("jclouds-password");
         User updatedUser = userAdminApi.update("u1000", updateUserOptions);

         assertNotNull(updatedUser);
View Full Code Here

      server.enqueue(addCommonHeaders(new MockResponse().setBody(stringFromResource("/access_version_uids.json"))));
      server.enqueue(addCommonHeaders(new MockResponse().setBody(stringFromResource("/admin_extensions.json"))));
      server.enqueue(addCommonHeaders(new MockResponse().setResponseCode(404)));

      try {
         KeystoneApi keystoneApi = api(server.getUrl("/").toString(), "openstack-keystone");
         UserAdminApi userAdminApi = keystoneApi.getUserAdminApi().get();
         UpdateUserOptions updateUserOptions = UpdateUserOptions.Builder.email("john.smith.renamed@example.org")
               .enabled(false).name("jqsmith-renamed").password("jclouds-password");
         User updatedUser = userAdminApi.update("u1000", updateUserOptions);

         assertNull(updatedUser);
View Full Code Here

      server.enqueue(addCommonHeaders(new MockResponse().setBody(stringFromResource("/access_version_uids.json"))));
      server.enqueue(addCommonHeaders(new MockResponse().setBody(stringFromResource("/admin_extensions.json"))));
      server.enqueue(addCommonHeaders(new MockResponse().setResponseCode(204)));

      try {
         KeystoneApi keystoneApi = api(server.getUrl("/").toString(), "openstack-keystone");
         UserAdminApi userAdminApi = keystoneApi.getUserAdminApi().get();
         userAdminApi.delete("u1000");

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

      server.enqueue(addCommonHeaders(new MockResponse().setBody(stringFromResource("/access_version_uids.json"))));
      server.enqueue(addCommonHeaders(new MockResponse().setBody(stringFromResource("/admin_extensions.json"))));
      server.enqueue(addCommonHeaders(new MockResponse().setResponseCode(404)));

      try {
         KeystoneApi keystoneApi = api(server.getUrl("/").toString(), "openstack-keystone");
         UserAdminApi userAdminApi = keystoneApi.getUserAdminApi().get();
         boolean success = userAdminApi.delete("u1000");

         assertFalse(success);

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

      server.enqueue(addCommonHeaders(new MockResponse().setBody(stringFromResource("/admin_extensions.json"))));
      server.enqueue(addCommonHeaders(new MockResponse().setResponseCode(200).setBody(
            stringFromResource("/role_list_response.json"))));

      try {
         KeystoneApi keystoneApi = api(server.getUrl("/").toString(), "openstack-keystone");
         RoleAdminApi roleAdminApi = keystoneApi.getRoleAdminApi().get();
         FluentIterable<? extends Role> roles = roleAdminApi.list();

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

      server.enqueue(addCommonHeaders(new MockResponse().setBody(stringFromResource("/access_version_uids.json"))));
      server.enqueue(addCommonHeaders(new MockResponse().setBody(stringFromResource("/admin_extensions.json"))));
      server.enqueue(addCommonHeaders(new MockResponse().setResponseCode(404)));

      try {
         KeystoneApi keystoneApi = api(server.getUrl("/").toString(), "openstack-keystone");
         RoleAdminApi roleAdminApi = keystoneApi.getRoleAdminApi().get();
         FluentIterable<? extends Role> roles = roleAdminApi.list();

         ImmutableList<? extends Role> roleList = roles.toList();

         assertTrue(roleList.isEmpty());
View Full Code Here

      server.enqueue(addCommonHeaders(new MockResponse().setBody(stringFromResource("/admin_extensions.json"))));
      server.enqueue(addCommonHeaders(new MockResponse().setResponseCode(201).setBody(
            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");
View Full Code Here

      server.enqueue(addCommonHeaders(new MockResponse().setBody(stringFromResource("/admin_extensions.json"))));
      server.enqueue(addCommonHeaders(new MockResponse().setResponseCode(404).setBody(
            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);
View Full Code Here

TOP

Related Classes of org.jclouds.openstack.keystone.v2_0.config.KeystoneAuthenticationModule$RegionModule

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.