Package org.jclouds.openstack.keystone.v2_0

Examples of org.jclouds.openstack.keystone.v2_0.KeystoneApi


      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 service = serviceAdminApi.get("s1000");

         assertNull(service);

         assertEquals(server.getRequestCount(), 3);
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");
         ServiceAdminApi serviceAdminApi = keystoneApi.getServiceAdminApi().get();
         serviceAdminApi.delete("s1000");

         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();
         boolean success = serviceAdminApi.delete("s1000");

         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(201).setBody(
            stringFromResource("/tenant_create_response.json"))));

      try {
         KeystoneApi keystoneApi = api(server.getUrl("/").toString(), "openstack-keystone");
         TenantAdminApi tenantAdminApi = keystoneApi.getTenantAdminApi().get();
         CreateTenantOptions createTenantOptions = CreateTenantOptions.Builder.description("jclouds-description")
               .enabled(true);
         Tenant testTenant = tenantAdminApi.create("jclouds-tenant", createTenantOptions);

         assertNotNull(testTenant);
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");
         TenantAdminApi tenantAdminApi = keystoneApi.getTenantAdminApi().get();
         CreateTenantOptions createTenantOptions = CreateTenantOptions.Builder.description("jclouds-description")
               .enabled(true);
         Tenant testTenant = tenantAdminApi.create("jclouds-tenant", createTenantOptions);

         assertNull(testTenant);
View Full Code Here

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

      try {
         KeystoneApi keystoneApi = api(server.getUrl("/").toString(), "openstack-keystone");
         TenantAdminApi tenantAdminApi = keystoneApi.getTenantAdminApi().get();
         UpdateTenantOptions updateTenantOptions = UpdateTenantOptions.Builder
               .description("jclouds-description-modified").enabled(false).name("jclouds-tenant-modified");
         Tenant updatedTenant = tenantAdminApi.update("t1000", updateTenantOptions);

         assertNotNull(updatedTenant);
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");
         TenantAdminApi tenantAdminApi = keystoneApi.getTenantAdminApi().get();
         UpdateTenantOptions updateTenantOptions = UpdateTenantOptions.Builder
               .description("jclouds-description-modified").enabled(false).name("jclouds-tenant-modified");
         Tenant updatedTenant = tenantAdminApi.update("t1000", updateTenantOptions);

         assertNull(updatedTenant);
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");
         TenantAdminApi tenantAdminApi = keystoneApi.getTenantAdminApi().get();
         tenantAdminApi.delete("t1000");

         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");
         TenantAdminApi tenantAdminApi = keystoneApi.getTenantAdminApi().get();
         boolean success = tenantAdminApi.delete("t1000");

         assertFalse(success);

         assertEquals(server.getRequestCount(), 3);
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(201)));

      try {
         KeystoneApi keystoneApi = api(server.getUrl("/").toString(), "openstack-keystone");
         TenantAdminApi tenantAdminApi = keystoneApi.getTenantAdminApi().get();
         tenantAdminApi.addRoleOnTenant("u1000", "t1000", "r1000");

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

TOP

Related Classes of org.jclouds.openstack.keystone.v2_0.KeystoneApi

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.