Package org.jclouds.openstack.keystone.v2_0.extensions

Examples of org.jclouds.openstack.keystone.v2_0.extensions.ServiceAdminAsyncApi


      server.enqueue(addCommonHeaders(new MockResponse().setBody(stringFromResource("/admin_extensions.json"))));
      server.enqueue(addCommonHeaders(new MockResponse().setResponseCode(200).setBody(
            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);
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();
         Role role = roleAdminApi.get("r1000");

         assertNull(role);
         assertEquals(server.getRequestCount(), 3);
         assertAuthentication(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(204)));

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

         assertTrue(success);
         assertEquals(server.getRequestCount(), 3);
         assertAuthentication(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();
         boolean success = roleAdminApi.delete("r1000");

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

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

      try {
         KeystoneApi keystoneApi = api(server.getUrl("/").toString(), "openstack-keystone");
         ServiceAdminApi serviceAdminApi = keystoneApi.getServiceAdminApi().get();
         PagedIterable<? extends Service> services = serviceAdminApi.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");
         ServiceAdminApi serviceAdminApi = keystoneApi.getServiceAdminApi().get();
         PagedIterable<? extends Service> services = serviceAdminApi.list();

         ImmutableList<? extends Service> servicesList = services.concat().toList();
         assertTrue(servicesList.isEmpty());
View Full Code Here

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

      try {
         KeystoneApi keystoneApi = api(server.getUrl("/").toString(), "openstack-keystone");
         ServiceAdminApi serviceAdminApi = keystoneApi.getServiceAdminApi().get();
         PaginatedCollection<? extends Service> services = serviceAdminApi.list(new PaginationOptions());

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

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

      try {
         KeystoneApi keystoneApi = api(server.getUrl("/").toString(), "openstack-keystone");
         ServiceAdminApi serviceAdminApi = keystoneApi.getServiceAdminApi().get();
         Service testService = serviceAdminApi.create("jclouds-service-test", "jclouds-service-type",
               "jclouds-service-description");

         assertNotNull(testService);
         assertEquals(testService.getId(), "s1000");
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");
         ServiceAdminApi serviceAdminApi = keystoneApi.getServiceAdminApi().get();
         Service testService = serviceAdminApi.create("jclouds-service-test", "jclouds-service-type",
               "jclouds-service-description");

         assertNull(testService);
View Full Code Here

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

      try {
         KeystoneApi keystoneApi = api(server.getUrl("/").toString(), "openstack-keystone");
         ServiceAdminApi serviceAdminApi = keystoneApi.getServiceAdminApi().get();
         Service service = serviceAdminApi.get("s1000");

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

TOP

Related Classes of org.jclouds.openstack.keystone.v2_0.extensions.ServiceAdminAsyncApi

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.