added skeleton for Ip features

This commit is contained in:
Adrian Cole 2011-11-29 14:59:51 -05:00
parent 95708f36ea
commit 5c315686e8
5 changed files with 18 additions and 1 deletions

View File

@ -18,6 +18,7 @@
*/
package org.jclouds.glesys;
import org.jclouds.glesys.features.IpAsyncClient;
import org.jclouds.glesys.features.ServerAsyncClient;
import org.jclouds.rest.annotations.Delegate;
@ -37,4 +38,9 @@ public interface GleSYSAsyncClient {
@Delegate
ServerAsyncClient getServerClient();
/**
* Provides asynchronous access to Ip Address features.
*/
@Delegate
IpAsyncClient getIpClient();
}

View File

@ -21,6 +21,7 @@ package org.jclouds.glesys;
import java.util.concurrent.TimeUnit;
import org.jclouds.concurrent.Timeout;
import org.jclouds.glesys.features.IpClient;
import org.jclouds.glesys.features.ServerClient;
import org.jclouds.rest.annotations.Delegate;
@ -41,4 +42,9 @@ public interface GleSYSClient {
@Delegate
ServerClient getServerClient();
/**
* Provides synchronous access to Ip Address features.
*/
@Delegate
IpClient getIpClient();
}

View File

@ -22,6 +22,8 @@ import java.util.Map;
import org.jclouds.glesys.GleSYSAsyncClient;
import org.jclouds.glesys.GleSYSClient;
import org.jclouds.glesys.features.IpAsyncClient;
import org.jclouds.glesys.features.IpClient;
import org.jclouds.glesys.features.ServerAsyncClient;
import org.jclouds.glesys.features.ServerClient;
import org.jclouds.glesys.handlers.GleSYSErrorHandler;
@ -48,6 +50,7 @@ public class GleSYSRestClientModule extends RestClientModule<GleSYSClient, GleSY
public static final Map<Class<?>, Class<?>> DELEGATE_MAP = ImmutableMap.<Class<?>, Class<?>> builder()//
.put(ServerClient.class, ServerAsyncClient.class)//
.put(IpClient.class, IpAsyncClient.class)//
.build();
public GleSYSRestClientModule() {

View File

@ -44,10 +44,12 @@ public class GleSYSAsyncClientTest extends BaseGleSYSAsyncClientTest<GleSYSAsync
public void testSync() throws SecurityException, NoSuchMethodException, InterruptedException, ExecutionException {
assert syncClient.getServerClient() != null;
assert syncClient.getIpClient() != null;
}
public void testAsync() throws SecurityException, NoSuchMethodException, InterruptedException, ExecutionException {
assert asyncClient.getServerClient() != null;
assert asyncClient.getIpClient() != null;
}
@Override

View File

@ -35,7 +35,7 @@ import com.google.inject.TypeLiteral;
*
* @author Adrian Cole
*/
@Test(groups = "unit")
@Test(groups = "unit", testName = "ServerAsyncClientTest")
public class ServerAsyncClientTest extends BaseGleSYSAsyncClientTest<ServerAsyncClient> {
public void testListServers() throws SecurityException, NoSuchMethodException, IOException {