mirror of https://github.com/apache/jclouds.git
added skeleton for Ip features
This commit is contained in:
parent
95708f36ea
commit
5c315686e8
|
@ -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();
|
||||
}
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
|
|
@ -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() {
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue