From 971863457012f5c188ead2151780dec4d42fdecd Mon Sep 17 00:00:00 2001 From: Adam Lowe Date: Fri, 8 Jun 2012 10:30:35 +0100 Subject: [PATCH] openstack-keystone: reducing ServiceClient to simply listTenants() --- .../v2_0/features/ServiceAsyncClient.java | 22 ---------- .../keystone/v2_0/features/ServiceClient.java | 16 ------- .../features/ServiceClientExpectTest.java | 44 ------------------- .../v2_0/features/ServiceClientLiveTest.java | 21 +-------- 4 files changed, 1 insertion(+), 102 deletions(-) diff --git a/apis/openstack-keystone/src/main/java/org/jclouds/openstack/keystone/v2_0/features/ServiceAsyncClient.java b/apis/openstack-keystone/src/main/java/org/jclouds/openstack/keystone/v2_0/features/ServiceAsyncClient.java index d18fa64ffc..52c2bd5da4 100644 --- a/apis/openstack-keystone/src/main/java/org/jclouds/openstack/keystone/v2_0/features/ServiceAsyncClient.java +++ b/apis/openstack-keystone/src/main/java/org/jclouds/openstack/keystone/v2_0/features/ServiceAsyncClient.java @@ -23,8 +23,6 @@ import java.util.Set; import javax.ws.rs.Consumes; import javax.ws.rs.GET; import javax.ws.rs.Path; -import javax.ws.rs.PathParam; -import javax.ws.rs.QueryParam; import javax.ws.rs.core.MediaType; import org.jclouds.Constants; @@ -35,7 +33,6 @@ import org.jclouds.rest.annotations.RequestFilters; import org.jclouds.rest.annotations.SelectJson; import org.jclouds.rest.annotations.SkipEncoding; import org.jclouds.rest.functions.ReturnEmptySetOnNotFoundOr404; -import org.jclouds.rest.functions.ReturnNullOnNotFoundOr404; import com.google.common.util.concurrent.ListenableFuture; @@ -63,23 +60,4 @@ public interface ServiceAsyncClient { @RequestFilters(AuthenticateRequest.class) @ExceptionParser(ReturnEmptySetOnNotFoundOr404.class) ListenableFuture> listTenants(); - - /** @see ServiceClient#getTenant(String) */ - @GET - @SelectJson("tenant") - @Consumes(MediaType.APPLICATION_JSON) - @Path("/tenants/{tenantId}") - @RequestFilters(AuthenticateRequest.class) - @ExceptionParser(ReturnNullOnNotFoundOr404.class) - ListenableFuture getTenant(@PathParam("tenantId") String tenantId); - - /** @see ServiceClient#getTenantByName(String) */ - @GET - @SelectJson("tenant") - @Consumes(MediaType.APPLICATION_JSON) - @Path("/tenants") - @RequestFilters(AuthenticateRequest.class) - @ExceptionParser(ReturnNullOnNotFoundOr404.class) - ListenableFuture getTenantByName(@QueryParam("name") String tenantName); - } diff --git a/apis/openstack-keystone/src/main/java/org/jclouds/openstack/keystone/v2_0/features/ServiceClient.java b/apis/openstack-keystone/src/main/java/org/jclouds/openstack/keystone/v2_0/features/ServiceClient.java index 852e5fec61..552579874f 100644 --- a/apis/openstack-keystone/src/main/java/org/jclouds/openstack/keystone/v2_0/features/ServiceClient.java +++ b/apis/openstack-keystone/src/main/java/org/jclouds/openstack/keystone/v2_0/features/ServiceClient.java @@ -41,20 +41,4 @@ public interface ServiceClient { * The operation returns a list of tenants which the current token provides access to. */ Set listTenants(); - - /** - * Retrieve information about a tenant, by tenant ID - * - * @return the information about the tenant - */ - Tenant getTenant(String tenantId); - - /** - * Retrieve information about a tenant, by tenant name - *

- * NOTE: currently not working in openstack ( https://bugs.launchpad.net/keystone/+bug/956687 ) - * - * @return the information about the tenant - */ - Tenant getTenantByName(String tenantName); } \ No newline at end of file diff --git a/apis/openstack-keystone/src/test/java/org/jclouds/openstack/keystone/v2_0/features/ServiceClientExpectTest.java b/apis/openstack-keystone/src/test/java/org/jclouds/openstack/keystone/v2_0/features/ServiceClientExpectTest.java index 7b30253064..f5c57748d5 100644 --- a/apis/openstack-keystone/src/test/java/org/jclouds/openstack/keystone/v2_0/features/ServiceClientExpectTest.java +++ b/apis/openstack-keystone/src/test/java/org/jclouds/openstack/keystone/v2_0/features/ServiceClientExpectTest.java @@ -22,7 +22,6 @@ import static javax.ws.rs.core.MediaType.APPLICATION_JSON; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertFalse; import static org.testng.Assert.assertNotNull; -import static org.testng.Assert.assertNull; import static org.testng.Assert.assertTrue; import java.util.Set; @@ -30,7 +29,6 @@ import java.util.Set; import org.jclouds.openstack.keystone.v2_0.KeystoneClient; import org.jclouds.openstack.keystone.v2_0.domain.Tenant; import org.jclouds.openstack.keystone.v2_0.internal.BaseKeystoneRestClientExpectTest; -import org.jclouds.rest.AuthorizationException; import org.testng.annotations.Test; import com.google.common.collect.ImmutableSet; @@ -67,46 +65,4 @@ public class ServiceClientExpectTest extends BaseKeystoneRestClientExpectTest