From 494adcaedacd0e54e838b58fee32153cdcb334ba Mon Sep 17 00:00:00 2001 From: Dies Koper Date: Wed, 23 Jan 2013 12:41:07 +1100 Subject: [PATCH 1/2] Fgcp: changed broken base64 logic and added unit tests --- .../org/jclouds/http/HttpRequestTest.java | 47 +++++ .../fgcp/filters/RequestAuthenticator.java | 61 +++++-- .../FGCPBaseComputeServiceLiveTest.java | 2 +- .../filters/RequestAuthenticatorTest.java | 160 ++++++++++++++++++ .../services/BaseFGCPRestApiExpectTest.java | 2 +- 5 files changed, 252 insertions(+), 20 deletions(-) create mode 100644 labs/fgcp/src/test/java/org/jclouds/fujitsu/fgcp/filters/RequestAuthenticatorTest.java diff --git a/core/src/test/java/org/jclouds/http/HttpRequestTest.java b/core/src/test/java/org/jclouds/http/HttpRequestTest.java index 5388f73f1d..cfc49752ef 100644 --- a/core/src/test/java/org/jclouds/http/HttpRequestTest.java +++ b/core/src/test/java/org/jclouds/http/HttpRequestTest.java @@ -69,4 +69,51 @@ public class HttpRequestTest { .builder().method("GET").endpoint("http://foo").payload(payload).build()); } + // the following caused issues for the fgcp provider + // (see RequestAuthenticator#addQueryParamsToRequest) + // base64 symbols should be url encoded in query param + // note that + ends up encoded as %20 (space), not %2B (plus) + public void testAddingBase64EncodedQueryParamCausingPlusToUrlEncodedSpaceConversion() { + String base64Chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="; + URI uri = URI + .create("http://goo.com:443?header1=valueWithUrlEncoded%2BPlus"); + HttpRequest request = HttpRequest.builder().method("GET").endpoint(uri) + // addQueryParam invocation causes %2B's in prev. params to + // convert to %20. + .addQueryParam("header2", base64Chars).build(); + + assertEquals( + request.getRequestLine(), + "GET http://goo.com:443?header1=valueWithUrlEncoded%20Plus&header2=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789%20/%3D HTTP/1.1"); + } + + // note that + ends up encoded as %20 (space) in the first param, %2B (plus) + // in the last param and %2F converts back into slash + public void testAddBase64AndUrlEncodedQueryParams() { + String base64Chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789%2B%2F%3D"; + URI uri = URI.create("http://goo.com:443?header1=" + base64Chars); + HttpRequest request = HttpRequest.builder() + .method("GET") + .endpoint(uri) + // the addition of another param causes %2B's in prev. params to + // convert to %20. + .addQueryParam("header2", base64Chars) + .build(); + + assertEquals( + request.getRequestLine(), + "GET http://goo.com:443?header1=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789%20/%3D&header2=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789%2B/%3D HTTP/1.1"); + } + + // base64 symbols with newline separator should be url encoded in query param + public void testAddBase64EncodedQueryParamWithNewlines() { + String base64Chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZ\nabcdefghijklmnopqrstuvwxyz\n0123456789%2B/="; + URI uri = URI.create("http://goo.com:443?header1=value1"); + HttpRequest request = HttpRequest.builder().method("GET").endpoint(uri) + .addQueryParam("header2", base64Chars).build(); + + assertEquals( + request.getRequestLine(), + "GET http://goo.com:443?header1=value1&header2=ABCDEFGHIJKLMNOPQRSTUVWXYZ%0Aabcdefghijklmnopqrstuvwxyz%0A0123456789%2B/%3D HTTP/1.1"); + } } diff --git a/labs/fgcp/src/main/java/org/jclouds/fujitsu/fgcp/filters/RequestAuthenticator.java b/labs/fgcp/src/main/java/org/jclouds/fujitsu/fgcp/filters/RequestAuthenticator.java index 1a45006483..65dbdb8e68 100644 --- a/labs/fgcp/src/main/java/org/jclouds/fujitsu/fgcp/filters/RequestAuthenticator.java +++ b/labs/fgcp/src/main/java/org/jclouds/fujitsu/fgcp/filters/RequestAuthenticator.java @@ -51,6 +51,7 @@ import org.jclouds.domain.Credentials; import org.jclouds.fujitsu.fgcp.reference.RequestParameters; import org.jclouds.http.HttpException; import org.jclouds.http.HttpRequest; +import org.jclouds.http.HttpRequest.Builder; import org.jclouds.http.HttpRequestFilter; import org.jclouds.http.HttpUtils; import org.jclouds.http.internal.SignatureWire; @@ -87,8 +88,10 @@ public class RequestAuthenticator implements HttpRequestFilter, RequestSigner { private final static String signatureMethod = "SHA1withRSA"; @Inject - public RequestAuthenticator(@TimeStamp Provider calendarProvider, SignatureForCredentials loader, - @org.jclouds.location.Provider Supplier creds, HttpUtils utils, SignatureWire signatureWire, + public RequestAuthenticator(@TimeStamp Provider calendarProvider, + SignatureForCredentials loader, + @org.jclouds.location.Provider Supplier creds, + HttpUtils utils, SignatureWire signatureWire, @ApiVersion String apiVersion) { this.calendarProvider = checkNotNull(calendarProvider); this.creds = checkNotNull(creds, "creds"); @@ -102,7 +105,8 @@ public class RequestAuthenticator implements HttpRequestFilter, RequestSigner { * it is relatively expensive to create a new signing key. cache the relationship between current credentials so that * the signer is only recalculated once. */ - private static class SignatureForCredentials extends CacheLoader { + @VisibleForTesting + static class SignatureForCredentials extends CacheLoader { private final Supplier keyStore; @Inject @@ -146,15 +150,8 @@ public class RequestAuthenticator implements HttpRequestFilter, RequestSigner { .getLanguage() : Locale.ENGLISH.getLanguage(); if (HttpMethod.GET.equals(request.getMethod())) { - Multimap decodedParams = queryParser().apply(request.getEndpoint().getRawQuery()); - - if (!decodedParams.containsKey(RequestParameters.VERSION)) { - decodedParams.put(RequestParameters.VERSION, apiVersion); - } - decodedParams.put(RequestParameters.LOCALE, lang); - decodedParams.put(RequestParameters.ACCESS_KEY_ID, accessKeyId); - decodedParams.put(RequestParameters.SIGNATURE, signature); - request = request.toBuilder().replaceQueryParams(decodedParams).build(); + request = addQueryParamsToRequest(request, accessKeyId, signature, + lang); } else { String payload = request.getPayload().getRawContent().toString(); @@ -173,10 +170,37 @@ public class RequestAuthenticator implements HttpRequestFilter, RequestSigner { .build(); utils.logRequest(signatureLog, filteredRequest, ">>->"); - return filteredRequest; } + @VisibleForTesting + HttpRequest addQueryParamsToRequest(HttpRequest request, String accessKeyId, + String signature, String lang) { + // url encode "+" (which comes from base64 encoding) or else it may be + // converted into a %20 (space) which the API endpoint doesn't + // expect/accept. + accessKeyId = accessKeyId.replace("+", "%2B"); + signature = signature.replace("+", "%2B"); + + Multimap decodedParams = queryParser().apply( + request.getEndpoint().getRawQuery()); + Builder builder = request.toBuilder() + .endpoint(request.getEndpoint()) + .method(request.getMethod()); + if (!decodedParams.containsKey("Version")) { + builder.addQueryParam(RequestParameters.VERSION, apiVersion); + } + builder.addQueryParam(RequestParameters.LOCALE, lang) + .addQueryParam(RequestParameters.ACCESS_KEY_ID, accessKeyId) + // the addition of another param causes %2B's in prev. params to + // convert to %20. Needs to be addressed if there are cases where + // accessKeyId contains %2B's. + // So signature should be added last: + .addQueryParam(RequestParameters.SIGNATURE, signature); + + return builder.build(); + } + String createXmlElementWithValue(String payload, String tag, String value) { String startTag = String.format("<%s>", tag); String endTag = String.format("", tag); @@ -184,13 +208,12 @@ public class RequestAuthenticator implements HttpRequestFilter, RequestSigner { return payload.replace(startTag + endTag, startTag + value + endTag); } - @VisibleForTesting public String sign(String stringToSign) { String signed; try { Signature signer = signerCache.get(checkNotNull(creds.get(), "credential supplier returned null")); signer.update(stringToSign.getBytes(UTF_8)); - signed = base64().encode(signer.sign()); + signed = base64().withSeparator("\n", 61).encode(signer.sign()); } catch (SignatureException e) { throw new HttpException("error signing request", e); } catch (ExecutionException e) { @@ -200,14 +223,16 @@ public class RequestAuthenticator implements HttpRequestFilter, RequestSigner { } @VisibleForTesting - public String generateAccessKeyId() { + String generateAccessKeyId() { Calendar cal = calendarProvider.get(); String timezone = cal.getTimeZone().getDisplayName(Locale.ENGLISH); String expires = String.valueOf(cal.getTime().getTime()); String signatureData = String.format("%s&%s&%s&%s", timezone, expires, signatureVersion, signatureMethod); - String accessKeyId = base64().encode(signatureData.getBytes(UTF_8)); - return accessKeyId.replace("\n", "\r\n"); + String accessKeyId = base64().withSeparator("\n", 61).encode( + signatureData.getBytes(UTF_8)); + + return accessKeyId; } @Override diff --git a/labs/fgcp/src/test/java/org/jclouds/fujitsu/fgcp/compute/config/FGCPBaseComputeServiceLiveTest.java b/labs/fgcp/src/test/java/org/jclouds/fujitsu/fgcp/compute/config/FGCPBaseComputeServiceLiveTest.java index cc9db44afe..2d216081c6 100644 --- a/labs/fgcp/src/test/java/org/jclouds/fujitsu/fgcp/compute/config/FGCPBaseComputeServiceLiveTest.java +++ b/labs/fgcp/src/test/java/org/jclouds/fujitsu/fgcp/compute/config/FGCPBaseComputeServiceLiveTest.java @@ -84,7 +84,7 @@ public abstract class FGCPBaseComputeServiceLiveTest extends // before running it, start an SSL/VPN connection to the last updated vsys' // DMZ. // may also need to configure SNAT and FW rules to allow the VM to - // communicate out (53 for DNS, 80 for yum). + // communicate out (53/tcp-udp for DNS, 80/tcp for yum). public void testAScriptExecutionAfterBootWithBasicTemplate() throws Exception { super.testAScriptExecutionAfterBootWithBasicTemplate(); diff --git a/labs/fgcp/src/test/java/org/jclouds/fujitsu/fgcp/filters/RequestAuthenticatorTest.java b/labs/fgcp/src/test/java/org/jclouds/fujitsu/fgcp/filters/RequestAuthenticatorTest.java new file mode 100644 index 0000000000..9f2a65ddcd --- /dev/null +++ b/labs/fgcp/src/test/java/org/jclouds/fujitsu/fgcp/filters/RequestAuthenticatorTest.java @@ -0,0 +1,160 @@ +package org.jclouds.fujitsu.fgcp.filters; + +import static org.testng.Assert.assertEquals; + +import java.security.KeyStore; +import java.util.Calendar; +import java.util.TimeZone; + +import javax.inject.Provider; + +import org.jclouds.domain.Credentials; +import org.jclouds.http.HttpRequest; +import org.jclouds.http.HttpUtils; +import org.jclouds.http.internal.SignatureWire; +import org.testng.annotations.Test; + +import com.google.common.base.Supplier; + +public class RequestAuthenticatorTest { + + Provider calendarProvider = new Provider() { + public Calendar get() { + Calendar c = Calendar.getInstance(TimeZone.getTimeZone("Australia/Sydney")); + c.setTimeInMillis(1358747939000L); // Mon Jan 21 16:58:59 +1100 2013 + return c; + } + }; + Supplier creds = new Supplier() { + @Override + public Credentials get() { + return null; + } + }; + Supplier keystore = new Supplier() { + public KeyStore get() { + return null; + } + }; + RequestAuthenticator a = new RequestAuthenticator(calendarProvider, + new RequestAuthenticator.SignatureForCredentials(keystore), creds, + new HttpUtils(0, 0, 0, 0), new SignatureWire(), ""); + + @Test + public void testGenerateAccessKeyIdWithNewline() throws Exception { + String accessKeyId = a.generateAccessKeyId(); + assertEquals( + accessKeyId, + "RWFzdGVybiBTdGFuZGFyZCBUaW1lIChOZXcgU291dGggV2FsZXMpJjEzNTg3N\nDc5MzkwMDAmMS4wJlNIQTF3aXRoUlNB"); + } + + @Test + public void testAddQueryParamsToRequest() throws Exception { + String accessKeyId = "accessKeyId"; + String signature = "signature"; + String lang = "en"; + + HttpRequest request = HttpRequest + .builder() + .endpoint( + "https://api.globalcloud.fujitsu.com.au/ovissapi/endpoint?Version=2012-02-18") + .method("GET").build(); + HttpRequest newRequest = a.addQueryParamsToRequest(request, accessKeyId, + signature, lang); + assertEquals( + newRequest.getRequestLine(), + "GET https://api.globalcloud.fujitsu.com.au/ovissapi/endpoint?Version=2012-02-18&Locale=en&AccessKeyId=accessKeyId&Signature=signature HTTP/1.1"); + } + + @Test + public void testAddQueryParamsWithRealValuesToRequest() throws Exception { + String accessKeyId = "RWFzdGVybiBTdGFuZGFyZCBUaW1lIChOZXcgU291dGggV2FsZXMpJjEzNTg4M\nzg4OTgwNTcmMS4wJlNIQTF3aXRoUlNB"; + String signature = "QFAmuZ0XyOjy6fmMLkMCH/xObY6Jhyltjo2hBcUrXHape8ecTmAlbCUO/+lKr\nQ3Qeu1cNqh8BXSnoc4vXR3aezR6V94aBlQ/4uowQuZP3S8yjnC0aPjWQ70JcB\nULR+qSGNmc97agOTMmIl4JJcukCBEEyLSzRDDe2ib2PqN11RA55GmAP/xx7qg\n0fj6ieauzuzImL1tJq03w0tPdCSuB6lnZe/81Z+Rbqwfl3kdGNBnV7YrdD3Qg\nRBDOKgA2okMlc5pzgk59i/O07ScfoJs7A58HnTZZ2KyVPFgHq6YGpCA2PqII6\nHUlqx6hkX9HFXIz+wz52gbSwBrqgloAw8w8Iw=="; + String lang = "en"; + + HttpRequest request = HttpRequest + .builder() + .endpoint( + "https://api.globalcloud.fujitsu.com.au/ovissapi/endpoint?Version=2012-02-18") + .method("GET").build(); + HttpRequest newRequest = a.addQueryParamsToRequest(request, accessKeyId, + signature, lang); + assertEquals( + newRequest.getRequestLine(), + "GET https://api.globalcloud.fujitsu.com.au/ovissapi/endpoint?Version=2012-02-18&Locale=en&AccessKeyId=RWFzdGVybiBTdGFuZGFyZCBUaW1lIChOZXcgU291dGggV2FsZXMpJjEzNTg4M%0Azg4OTgwNTcmMS4wJlNIQTF3aXRoUlNB&Signature=QFAmuZ0XyOjy6fmMLkMCH/xObY6Jhyltjo2hBcUrXHape8ecTmAlbCUO/%2BlKr%0AQ3Qeu1cNqh8BXSnoc4vXR3aezR6V94aBlQ/4uowQuZP3S8yjnC0aPjWQ70JcB%0AULR%2BqSGNmc97agOTMmIl4JJcukCBEEyLSzRDDe2ib2PqN11RA55GmAP/xx7qg%0A0fj6ieauzuzImL1tJq03w0tPdCSuB6lnZe/81Z%2BRbqwfl3kdGNBnV7YrdD3Qg%0ARBDOKgA2okMlc5pzgk59i/O07ScfoJs7A58HnTZZ2KyVPFgHq6YGpCA2PqII6%0AHUlqx6hkX9HFXIz%2Bwz52gbSwBrqgloAw8w8Iw%3D%3D HTTP/1.1"); + } + + @Test + public void testAddQueryParamsWithSlashes() throws Exception { + String accessKeyId = "accessKeyId"; + String signature = "sig/na/ture"; + String lang = "en"; + + HttpRequest request = HttpRequest + .builder() + .endpoint( + "https://api.globalcloud.fujitsu.com.au/ovissapi/endpoint?Version=2012-02-18") + .method("GET").build(); + HttpRequest newRequest = a.addQueryParamsToRequest(request, accessKeyId, + signature, lang); + assertEquals( + newRequest.getRequestLine(), + "GET https://api.globalcloud.fujitsu.com.au/ovissapi/endpoint?Version=2012-02-18&Locale=en&AccessKeyId=accessKeyId&Signature=sig/na/ture HTTP/1.1"); + } + + @Test + public void testAddQueryParamsWithNewlines() throws Exception { + String accessKeyId = "accessKey\nId"; + String signature = "sig\nna\nture"; + String lang = "en"; + + HttpRequest request = HttpRequest + .builder() + .endpoint( + "https://api.globalcloud.fujitsu.com.au/ovissapi/endpoint?Version=2012-02-18") + .method("GET").build(); + HttpRequest newRequest = a.addQueryParamsToRequest(request, accessKeyId, + signature, lang); + assertEquals( + newRequest.getRequestLine(), + "GET https://api.globalcloud.fujitsu.com.au/ovissapi/endpoint?Version=2012-02-18&Locale=en&AccessKeyId=accessKey%0AId&Signature=sig%0Ana%0Ature HTTP/1.1"); + } + + @Test + public void testAddQueryParamsWithPlus() throws Exception { + String accessKeyId = "accessKey+Id"; + String signature = "sign+ature"; + String lang = "en"; + + HttpRequest request = HttpRequest + .builder() + .endpoint( + "https://api.globalcloud.fujitsu.com.au/ovissapi/endpoint?Version=2012-02-18") + .method("GET").build(); + HttpRequest newRequest = a.addQueryParamsToRequest(request, accessKeyId, + signature, lang); + assertEquals( + newRequest.getRequestLine(), + // NOTE: AccessKeyId's "=" becomes a %20 (space) as explained in + // addQueryParamsToRequest(). + "GET https://api.globalcloud.fujitsu.com.au/ovissapi/endpoint?Version=2012-02-18&Locale=en&AccessKeyId=accessKey%20Id&Signature=sign%2Bature HTTP/1.1"); + } + + @Test + public void testAddQueryParamsWithBase64Symbols() throws Exception { + String accessKeyId = "accessKeyId\nWith/And+And="; + String signature = "signature\nWith/And+And="; + String lang = "en"; + + HttpRequest request = HttpRequest + .builder() + .endpoint( + "https://api.globalcloud.fujitsu.com.au/ovissapi/endpoint?Version=2012-02-18") + .method("GET").build(); + HttpRequest newRequest = a.addQueryParamsToRequest(request, accessKeyId, + signature, lang); + assertEquals( + newRequest.getRequestLine(), + "GET https://api.globalcloud.fujitsu.com.au/ovissapi/endpoint?Version=2012-02-18&Locale=en&AccessKeyId=accessKeyId%0AWith/And%20And%3D&Signature=signature%0AWith/And%2BAnd%3D HTTP/1.1"); + } +} diff --git a/labs/fgcp/src/test/java/org/jclouds/fujitsu/fgcp/services/BaseFGCPRestApiExpectTest.java b/labs/fgcp/src/test/java/org/jclouds/fujitsu/fgcp/services/BaseFGCPRestApiExpectTest.java index 3a50fc11f4..9bd338855f 100644 --- a/labs/fgcp/src/test/java/org/jclouds/fujitsu/fgcp/services/BaseFGCPRestApiExpectTest.java +++ b/labs/fgcp/src/test/java/org/jclouds/fujitsu/fgcp/services/BaseFGCPRestApiExpectTest.java @@ -95,7 +95,7 @@ public class BaseFGCPRestApiExpectTest extends + "&" + query + "&Locale=en" + "&AccessKeyId=R01ULTA5OjAwJjEyMzQ1Njc4OTAmMS4wJlNIQTF3aXRoUlNB" - + "&Signature=G2rGfLAkbq0IURQfXIWYxj3BnMGbjRk4KPnZLAze3Lt4SMMRt8lkjqKvR5Cm%20nFpDN7J6IprVCCsIrRq5BqPeXT6xtWyb6qMNds2BAr1h/JePGs0UosOh2tgPUMSFlZwLVjgNyrSa2zeHA3AEHjF6H1jqcWXXqfCAD4SOHaNavk%3D"); + + "&Signature=G2rGfLAkbq0IURQfXIWYxj3BnMGbjRk4KPnZLAze3Lt4SMMRt8lkjqKvR5Cm%2B%0AnFpDN7J6IprVCCsIrRq5BqPeXT6xtWyb6qMNds2BAr1h/JePGs0UosOh2tgPU%0AMSFlZwLVjgNyrSa2zeHA3AEHjF6H1jqcWXXqfCAD4SOHaNavk%3D"); return HttpRequest .builder() .method("GET") From c0c10f68a1369ee9ba688c8efbeecce181c6f69f Mon Sep 17 00:00:00 2001 From: Dies Koper Date: Wed, 23 Jan 2013 17:17:43 +1100 Subject: [PATCH 2/2] Fgcp: @Named annotations in all async api methods --- .../fgcp/services/AdditionalDiskAsyncApi.java | 9 +++++++++ .../fgcp/services/BuiltinServerAsyncApi.java | 14 +++++++++++++ .../fgcp/services/DiskImageAsyncApi.java | 4 ++++ .../fgcp/services/FirewallAsyncApi.java | 3 +++ .../services/PublicIPAddressAsyncApi.java | 6 ++++++ .../fgcp/services/SystemTemplateAsyncApi.java | 5 +++++ .../fgcp/services/VirtualDCAsyncApi.java | 20 +++++++++++++++++++ .../fgcp/services/VirtualServerAsyncApi.java | 15 ++++++++++++++ .../fgcp/services/VirtualSystemAsyncApi.java | 18 +++++++++++++++++ 9 files changed, 94 insertions(+) diff --git a/labs/fgcp/src/main/java/org/jclouds/fujitsu/fgcp/services/AdditionalDiskAsyncApi.java b/labs/fgcp/src/main/java/org/jclouds/fujitsu/fgcp/services/AdditionalDiskAsyncApi.java index c711a8a1bc..8515fe6b93 100644 --- a/labs/fgcp/src/main/java/org/jclouds/fujitsu/fgcp/services/AdditionalDiskAsyncApi.java +++ b/labs/fgcp/src/main/java/org/jclouds/fujitsu/fgcp/services/AdditionalDiskAsyncApi.java @@ -18,6 +18,7 @@ */ package org.jclouds.fujitsu.fgcp.services; +import javax.inject.Named; import javax.ws.rs.Consumes; import javax.ws.rs.GET; import javax.ws.rs.QueryParam; @@ -50,6 +51,7 @@ import com.google.common.util.concurrent.ListenableFuture; @Consumes(MediaType.TEXT_XML) public interface AdditionalDiskAsyncApi { + @Named("GetVDiskStatus") @GET @JAXBResponseParser @QueryParams(keys = "Action", values = "GetVDiskStatus") @@ -57,6 +59,7 @@ public interface AdditionalDiskAsyncApi { ListenableFuture getStatus( @BinderParam(BindAlsoToSystemId.class) @QueryParam("vdiskId") String id); + @Named("GetVDiskAttributes") @GET @JAXBResponseParser @QueryParams(keys = "Action", values = "GetVDiskAttributes") @@ -64,6 +67,7 @@ public interface AdditionalDiskAsyncApi { ListenableFuture get( @BinderParam(BindAlsoToSystemId.class) @QueryParam("vdiskId") String id); + @Named("UpdateVDiskAttribute") @GET @QueryParams(keys = "Action", values = "UpdateVDiskAttribute") ListenableFuture update( @@ -71,24 +75,28 @@ public interface AdditionalDiskAsyncApi { @QueryParam("attributeName") String name, @QueryParam("attributeValue") String value); + @Named("BackupVDisk") @GET @JAXBResponseParser @QueryParams(keys = "Action", values = "BackupVDisk") ListenableFuture backup( @BinderParam(BindAlsoToSystemId.class) @QueryParam("vdiskId") String id); + @Named("RestoreVDisk") @GET @JAXBResponseParser @QueryParams(keys = "Action", values = "RestoreVDisk") ListenableFuture restore(@QueryParam("vsysId") String systemId, @QueryParam("backupId") String backupId); + @Named("DestroyVDisk") @GET @JAXBResponseParser @QueryParams(keys = "Action", values = "DestroyVDisk") ListenableFuture destroy( @BinderParam(BindAlsoToSystemId.class) @QueryParam("vdiskId") String id); + @Named("DetachVDisk") @GET @JAXBResponseParser @QueryParams(keys = "Action", values = "DetachVDisk") @@ -96,6 +104,7 @@ public interface AdditionalDiskAsyncApi { @BinderParam(BindAlsoToSystemId.class) @QueryParam("vdiskId") String diskId, @QueryParam("vserverId") String serverId); + @Named("DestroyVDiskBackup") @GET @JAXBResponseParser @QueryParams(keys = "Action", values = "DestroyVDiskBackup") diff --git a/labs/fgcp/src/main/java/org/jclouds/fujitsu/fgcp/services/BuiltinServerAsyncApi.java b/labs/fgcp/src/main/java/org/jclouds/fujitsu/fgcp/services/BuiltinServerAsyncApi.java index 4516062d53..724c103bfa 100644 --- a/labs/fgcp/src/main/java/org/jclouds/fujitsu/fgcp/services/BuiltinServerAsyncApi.java +++ b/labs/fgcp/src/main/java/org/jclouds/fujitsu/fgcp/services/BuiltinServerAsyncApi.java @@ -19,6 +19,8 @@ package org.jclouds.fujitsu.fgcp.services; import java.util.Set; + +import javax.inject.Named; import javax.ws.rs.Consumes; import javax.ws.rs.GET; import javax.ws.rs.QueryParam; @@ -54,30 +56,35 @@ import com.google.common.util.concurrent.ListenableFuture; @Consumes(MediaType.TEXT_XML) public interface BuiltinServerAsyncApi { + @Named("StartEFM") @GET @JAXBResponseParser @QueryParams(keys = "Action", values = "StartEFM") ListenableFuture start( @BinderParam(BindAlsoToSystemId.class) @QueryParam("efmId") String id); + @Named("StopEFM") @GET @JAXBResponseParser @QueryParams(keys = "Action", values = "StopEFM") ListenableFuture stop( @BinderParam(BindAlsoToSystemId.class) @QueryParam("efmId") String id); + @Named("DestroyEFM") @GET @JAXBResponseParser @QueryParams(keys = "Action", values = "DestroyEFM") ListenableFuture destroy( @BinderParam(BindAlsoToSystemId.class) @QueryParam("efmId") String id); + @Named("BackupEFM") @GET @JAXBResponseParser @QueryParams(keys = "Action", values = "BackupEFM") ListenableFuture backup( @BinderParam(BindAlsoToSystemId.class) @QueryParam("efmId") String id); + @Named("RestoreEFM") @GET @JAXBResponseParser @QueryParams(keys = "Action", values = "RestoreEFM") @@ -85,12 +92,14 @@ public interface BuiltinServerAsyncApi { @BinderParam(BindAlsoToSystemId.class) @QueryParam("efmId") String id, @QueryParam("backupId") String backupId); + @Named("ListEFMBackup") @GET @JAXBResponseParser @QueryParams(keys = "Action", values = "ListEFMBackup") ListenableFuture> listBackups( @BinderParam(BindAlsoToSystemId.class) @QueryParam("efmId") String id); + @Named("DestroyEFMBackup") @GET @JAXBResponseParser @QueryParams(keys = "Action", values = "DestroyEFMBackup") @@ -98,6 +107,7 @@ public interface BuiltinServerAsyncApi { @BinderParam(BindAlsoToSystemId.class) @QueryParam("efmId") String id, @QueryParam("backupId") String backupId); + @Named("GetEFMAttributes") @GET @JAXBResponseParser @QueryParams(keys = "Action", values = "GetEFMAttributes") @@ -105,6 +115,7 @@ public interface BuiltinServerAsyncApi { ListenableFuture get( @BinderParam(BindAlsoToSystemId.class) @QueryParam("efmId") String id); + @Named("UpdateEFMAttribute") @GET @JAXBResponseParser @QueryParams(keys = "Action", values = "UpdateEFMAttribute") @@ -113,6 +124,7 @@ public interface BuiltinServerAsyncApi { @QueryParam("attributeName") String name, @QueryParam("attributeValue") String value); + @Named("GetEFMStatus") @GET @JAXBResponseParser @QueryParams(keys = "Action", values = "GetEFMStatus") @@ -120,6 +132,7 @@ public interface BuiltinServerAsyncApi { ListenableFuture getStatus( @BinderParam(BindAlsoToSystemId.class) @QueryParam("efmId") String id); + @Named("GetEFMConfiguration") @GET @JAXBResponseParser @QueryParams(keys = "Action", values = "GetEFMConfiguration") @@ -128,6 +141,7 @@ public interface BuiltinServerAsyncApi { @BinderParam(BindAlsoToSystemId.class) @QueryParam("efmId") String id, @QueryParam("configurationName") BuiltinServerConfiguration configuration); +// @Named("GetEFMConfiguration") // @POST // @JAXBResponseParser // @QueryParams(keys = "Action", values = "GetEFMConfiguration") diff --git a/labs/fgcp/src/main/java/org/jclouds/fujitsu/fgcp/services/DiskImageAsyncApi.java b/labs/fgcp/src/main/java/org/jclouds/fujitsu/fgcp/services/DiskImageAsyncApi.java index faf70a115c..416eebe57c 100644 --- a/labs/fgcp/src/main/java/org/jclouds/fujitsu/fgcp/services/DiskImageAsyncApi.java +++ b/labs/fgcp/src/main/java/org/jclouds/fujitsu/fgcp/services/DiskImageAsyncApi.java @@ -18,6 +18,7 @@ */ package org.jclouds.fujitsu.fgcp.services; +import javax.inject.Named; import javax.ws.rs.Consumes; import javax.ws.rs.GET; import javax.ws.rs.QueryParam; @@ -47,12 +48,14 @@ import com.google.common.util.concurrent.ListenableFuture; @Consumes(MediaType.TEXT_XML) public interface DiskImageAsyncApi { + @Named("GetDiskImageAttributes") @GET @JAXBResponseParser @QueryParams(keys = "Action", values = "GetDiskImageAttributes") @Transform(SingleElementResponseToElement.class) ListenableFuture get(@QueryParam("diskImageId") String id); + @Named("UpdateDiskImageAttribute") @GET @JAXBResponseParser @QueryParams(keys = "Action", values = "UpdateDiskImageAttribute") @@ -62,6 +65,7 @@ public interface DiskImageAsyncApi { @QueryParam("attributeName") String name, @QueryParam("attributeValue") String value); + @Named("UnregisterDiskImage") @GET @JAXBResponseParser @QueryParams(keys = "Action", values = "UnregisterDiskImage") diff --git a/labs/fgcp/src/main/java/org/jclouds/fujitsu/fgcp/services/FirewallAsyncApi.java b/labs/fgcp/src/main/java/org/jclouds/fujitsu/fgcp/services/FirewallAsyncApi.java index 6146cb97a2..204eb88b8c 100644 --- a/labs/fgcp/src/main/java/org/jclouds/fujitsu/fgcp/services/FirewallAsyncApi.java +++ b/labs/fgcp/src/main/java/org/jclouds/fujitsu/fgcp/services/FirewallAsyncApi.java @@ -19,6 +19,8 @@ package org.jclouds.fujitsu.fgcp.services; import java.util.Set; + +import javax.inject.Named; import javax.ws.rs.Consumes; import javax.ws.rs.POST; import javax.ws.rs.core.MediaType; @@ -48,6 +50,7 @@ import com.google.common.util.concurrent.ListenableFuture; @Consumes(MediaType.TEXT_XML) public interface FirewallAsyncApi extends BuiltinServerAsyncApi { + @Named("GetEFMConfiguration") @POST @JAXBResponseParser @QueryParams(keys = "Action", values = "GetEFMConfiguration") diff --git a/labs/fgcp/src/main/java/org/jclouds/fujitsu/fgcp/services/PublicIPAddressAsyncApi.java b/labs/fgcp/src/main/java/org/jclouds/fujitsu/fgcp/services/PublicIPAddressAsyncApi.java index 5e9b2b1935..9fb95f6b5a 100644 --- a/labs/fgcp/src/main/java/org/jclouds/fujitsu/fgcp/services/PublicIPAddressAsyncApi.java +++ b/labs/fgcp/src/main/java/org/jclouds/fujitsu/fgcp/services/PublicIPAddressAsyncApi.java @@ -18,6 +18,7 @@ */ package org.jclouds.fujitsu.fgcp.services; +import javax.inject.Named; import javax.ws.rs.Consumes; import javax.ws.rs.GET; import javax.ws.rs.QueryParam; @@ -48,18 +49,21 @@ import com.google.common.util.concurrent.ListenableFuture; @Consumes(MediaType.TEXT_XML) public interface PublicIPAddressAsyncApi { + @Named("AttachPublicIP") @GET @JAXBResponseParser @QueryParams(keys = "Action", values = "AttachPublicIP") ListenableFuture attach(@QueryParam("vsysId") String systemId, @QueryParam("publicIp") String ip); + @Named("DetachPublicIP") @GET @JAXBResponseParser @QueryParams(keys = "Action", values = "DetachPublicIP") ListenableFuture detach(@QueryParam("vsysId") String systemId, @QueryParam("publicIp") String ip); + @Named("GetPublicIPStatus") @GET @JAXBResponseParser @QueryParams(keys = "Action", values = "GetPublicIPStatus") @@ -67,12 +71,14 @@ public interface PublicIPAddressAsyncApi { ListenableFuture getStatus( @QueryParam("publicIp") String ip); + @Named("GetPublicIPAttributes") @GET @JAXBResponseParser @QueryParams(keys = "Action", values = "GetPublicIPAttributes") @Transform(SingleElementResponseToElement.class) ListenableFuture get(@QueryParam("publicIp") String ip); + @Named("FreePublicIP") @GET @JAXBResponseParser @QueryParams(keys = "Action", values = "FreePublicIP") diff --git a/labs/fgcp/src/main/java/org/jclouds/fujitsu/fgcp/services/SystemTemplateAsyncApi.java b/labs/fgcp/src/main/java/org/jclouds/fujitsu/fgcp/services/SystemTemplateAsyncApi.java index 8ce25df2e2..333a4f601a 100644 --- a/labs/fgcp/src/main/java/org/jclouds/fujitsu/fgcp/services/SystemTemplateAsyncApi.java +++ b/labs/fgcp/src/main/java/org/jclouds/fujitsu/fgcp/services/SystemTemplateAsyncApi.java @@ -18,6 +18,7 @@ */ package org.jclouds.fujitsu.fgcp.services; +import javax.inject.Named; import javax.ws.rs.Consumes; import javax.ws.rs.GET; import javax.ws.rs.QueryParam; @@ -48,6 +49,7 @@ import com.google.common.util.concurrent.ListenableFuture; @Consumes(MediaType.TEXT_XML) public interface SystemTemplateAsyncApi { + @Named("GetVSYSDescriptorConfiguration") @GET @JAXBResponseParser @QueryParams(keys = "Action", values = "GetVSYSDescriptorConfiguration") @@ -55,6 +57,7 @@ public interface SystemTemplateAsyncApi { ListenableFuture get( @QueryParam("vsysDescriptorId") String id); + @Named("UpdateVSYSDescriptorAttribute") @GET @JAXBResponseParser @QueryParams(keys = "Action", values = "UpdateVSYSDescriptorAttribute") @@ -63,12 +66,14 @@ public interface SystemTemplateAsyncApi { @QueryParam("attributeName") String name, @QueryParam("attributeValue") String value); + @Named("UnregisterVSYSDescriptor") @GET @JAXBResponseParser @QueryParams(keys = "Action", values = "UnregisterVSYSDescriptor") ListenableFuture deregister( @QueryParam("vsysDescriptorId") String id); + @Named("UnregisterPrivateVSYSDescriptor") @GET @JAXBResponseParser @QueryParams(keys = "Action", values = "UnregisterPrivateVSYSDescriptor") diff --git a/labs/fgcp/src/main/java/org/jclouds/fujitsu/fgcp/services/VirtualDCAsyncApi.java b/labs/fgcp/src/main/java/org/jclouds/fujitsu/fgcp/services/VirtualDCAsyncApi.java index cb8e6f898c..f67996f3d3 100644 --- a/labs/fgcp/src/main/java/org/jclouds/fujitsu/fgcp/services/VirtualDCAsyncApi.java +++ b/labs/fgcp/src/main/java/org/jclouds/fujitsu/fgcp/services/VirtualDCAsyncApi.java @@ -20,6 +20,8 @@ package org.jclouds.fujitsu.fgcp.services; import java.util.Map; import java.util.Set; + +import javax.inject.Named; import javax.ws.rs.Consumes; import javax.ws.rs.GET; import javax.ws.rs.QueryParam; @@ -58,6 +60,7 @@ import com.google.common.util.concurrent.ListenableFuture; @Consumes(MediaType.TEXT_XML) public interface VirtualDCAsyncApi { + @Named("CreateVSYS") // @POST @GET @JAXBResponseParser @@ -74,12 +77,14 @@ public interface VirtualDCAsyncApi { @QueryParam("vsysDescriptorId") String descriptorId, @QueryParam("vsysName") String name); + @Named("ListVSYS") @GET @JAXBResponseParser // @XMLResponseParser(VSYSListHandler.class) @QueryParams(keys = "Action", values = "ListVSYS") ListenableFuture> listVirtualSystems(); + @Named("ListServerType") @GET @JAXBResponseParser // according to the manual it takes a 'String diskImageId' but value seems @@ -90,11 +95,13 @@ public interface VirtualDCAsyncApi { // @XmlElement(type = ServerType.class) ListenableFuture> listServerTypes(); + @Named("ListDiskImage") @GET @JAXBResponseParser @QueryParams(keys = "Action", values = "ListDiskImage") ListenableFuture> listDiskImages(); + @Named("ListDiskImage") @GET @JAXBResponseParser @QueryParams(keys = "Action", values = "ListDiskImage") @@ -107,11 +114,13 @@ public interface VirtualDCAsyncApi { * @return * @see VirtualSystemAsyncApi#listPublicIPs(String) */ + @Named("ListPublicIP") @GET @JAXBResponseParser @QueryParams(keys = "Action", values = "ListPublicIP") ListenableFuture> listPublicIPs(); + @Named("AddAddressRange") @GET @JAXBResponseParser @QueryParams(keys = "Action", values = "AddAddressRange") @@ -119,6 +128,7 @@ public interface VirtualDCAsyncApi { @QueryParam("pipFrom") String pipFrom, @QueryParam("pipTo") String pipTo); + @Named("CreateAddressPool") @GET @JAXBResponseParser @QueryParams(keys = "Action", values = "CreateAddressPool") @@ -126,6 +136,7 @@ public interface VirtualDCAsyncApi { @QueryParam("pipFrom") String pipFrom, @QueryParam("pipTo") String pipTo); + @Named("DeleteAddressRange") @GET @JAXBResponseParser @QueryParams(keys = "Action", values = "DeleteAddressRange") @@ -133,16 +144,19 @@ public interface VirtualDCAsyncApi { @QueryParam("pipFrom") String pipFrom, @QueryParam("pipTo") String pipTo); + @Named("GetAddressRange") @GET @JAXBResponseParser @QueryParams(keys = "Action", values = "GetAddressRange") ListenableFuture> getAddressRange(); + @Named("ListVSYSDescriptor") @GET @JAXBResponseParser @QueryParams(keys = "Action", values = "ListVSYSDescriptor") ListenableFuture> listVSYSDescriptor(); + @Named("ListVSYSDescriptor") @GET @JAXBResponseParser @QueryParams(keys = "Action", values = "ListVSYSDescriptor") @@ -151,32 +165,38 @@ public interface VirtualDCAsyncApi { @QueryParam("estimateFrom") int estimateFrom, @QueryParam("estimateTo") int estimateTo); + @Named("GetEventLog") @GET @JAXBResponseParser @QueryParams(keys = "Action", values = "GetEventLog") ListenableFuture> getEventLogs(); + @Named("GetEventLog") @GET @JAXBResponseParser @QueryParams(keys = "Action", values = "GetEventLog") ListenableFuture> getEventLogs(@QueryParam("all") boolean all); + @Named("GetInformation") @GET @JAXBResponseParser @QueryParams(keys = "Action", values = "GetInformation") ListenableFuture> getInformation(); + @Named("GetInformation") @GET @JAXBResponseParser @QueryParams(keys = "Action", values = "GetInformation") ListenableFuture> getInformation( @QueryParam("all") boolean all); + @Named("GetSystemUsage") @GET @JAXBResponseParser @QueryParams(keys = "Action", values = "GetSystemUsage") ListenableFuture> getSystemUsage(); + @Named("GetSystemUsage") @GET @JAXBResponseParser @QueryParams(keys = "Action", values = "GetSystemUsage") diff --git a/labs/fgcp/src/main/java/org/jclouds/fujitsu/fgcp/services/VirtualServerAsyncApi.java b/labs/fgcp/src/main/java/org/jclouds/fujitsu/fgcp/services/VirtualServerAsyncApi.java index 93fc1437f6..62cd6495a3 100644 --- a/labs/fgcp/src/main/java/org/jclouds/fujitsu/fgcp/services/VirtualServerAsyncApi.java +++ b/labs/fgcp/src/main/java/org/jclouds/fujitsu/fgcp/services/VirtualServerAsyncApi.java @@ -19,6 +19,8 @@ package org.jclouds.fujitsu.fgcp.services; import java.util.Set; + +import javax.inject.Named; import javax.ws.rs.Consumes; import javax.ws.rs.GET; import javax.ws.rs.POST; @@ -54,30 +56,35 @@ import com.google.common.util.concurrent.ListenableFuture; @Consumes(MediaType.TEXT_XML) public interface VirtualServerAsyncApi { + @Named("StartVServer") @GET @JAXBResponseParser @QueryParams(keys = "Action", values = "StartVServer") ListenableFuture start( @BinderParam(BindAlsoToSystemId.class) @QueryParam("vserverId") String id); + @Named("StopVServer") @GET @JAXBResponseParser @QueryParams(keys = "Action", values = "StopVServer") ListenableFuture stop( @BinderParam(BindAlsoToSystemId.class) @QueryParam("vserverId") String id); + @Named("StopVServer") @GET @JAXBResponseParser @QueryParams(keys = { "Action", "force" }, values = { "StopVServer", "true" }) ListenableFuture stopForcefully( @BinderParam(BindAlsoToSystemId.class) @QueryParam("vserverId") String id); + @Named("DestroyVServer") @GET @JAXBResponseParser @QueryParams(keys = "Action", values = "DestroyVServer") ListenableFuture destroy( @BinderParam(BindAlsoToSystemId.class) @QueryParam("vserverId") String id); + @Named("GetVServerAttributes") @GET @JAXBResponseParser @QueryParams(keys = "Action", values = "GetVServerAttributes") @@ -85,6 +92,7 @@ public interface VirtualServerAsyncApi { ListenableFuture get( @BinderParam(BindAlsoToSystemId.class) @QueryParam("vserverId") String id); + @Named("GetVServerConfiguration") @GET @JAXBResponseParser @QueryParams(keys = "Action", values = "GetVServerConfiguration") @@ -92,6 +100,7 @@ public interface VirtualServerAsyncApi { ListenableFuture getDetails( @BinderParam(BindAlsoToSystemId.class) @QueryParam("vserverId") String id); + @Named("UpdateVServerAttribute") @GET @JAXBResponseParser @QueryParams(keys = "Action", values = "UpdateVServerAttribute") @@ -100,6 +109,7 @@ public interface VirtualServerAsyncApi { @QueryParam("attributeName") String name, @QueryParam("attributeValue") String value); + @Named("GetVServerStatus") @GET @JAXBResponseParser @QueryParams(keys = "Action", values = "GetVServerStatus") @@ -108,6 +118,7 @@ public interface VirtualServerAsyncApi { ListenableFuture getStatus( @BinderParam(BindAlsoToSystemId.class) @QueryParam("vserverId") String id); + @Named("GetVServerInitialPassword") @GET @JAXBResponseParser @QueryParams(keys = "Action", values = "GetVServerInitialPassword") @@ -115,6 +126,7 @@ public interface VirtualServerAsyncApi { ListenableFuture getInitialPassword( @BinderParam(BindAlsoToSystemId.class) @QueryParam("vserverId") String id); + @Named("AttachVDisk") @GET @JAXBResponseParser @QueryParams(keys = "Action", values = "AttachVDisk") @@ -122,6 +134,7 @@ public interface VirtualServerAsyncApi { @BinderParam(BindAlsoToSystemId.class) @QueryParam("vserverId") String serverId, @QueryParam("vdiskId") String diskId); + @Named("GetPerformanceInformation") @GET @JAXBResponseParser @QueryParams(keys = "Action", values = "GetPerformanceInformation") @@ -129,6 +142,7 @@ public interface VirtualServerAsyncApi { @BinderParam(BindAlsoToSystemId.class) @QueryParam("serverId") String id, @QueryParam("interval") String interval); + @Named("GetPerformanceInformation") @GET @JAXBResponseParser @QueryParams(keys = "Action", values = "GetPerformanceInformation") @@ -137,6 +151,7 @@ public interface VirtualServerAsyncApi { @QueryParam("dataType") String dataType, @QueryParam("interval") String interval); + @Named("RegisterPrivateDiskImage") @POST @JAXBResponseParser @QueryParams(keys = "Action", values = "RegisterPrivateDiskImage") diff --git a/labs/fgcp/src/main/java/org/jclouds/fujitsu/fgcp/services/VirtualSystemAsyncApi.java b/labs/fgcp/src/main/java/org/jclouds/fujitsu/fgcp/services/VirtualSystemAsyncApi.java index 921ec880ab..e750f063ac 100644 --- a/labs/fgcp/src/main/java/org/jclouds/fujitsu/fgcp/services/VirtualSystemAsyncApi.java +++ b/labs/fgcp/src/main/java/org/jclouds/fujitsu/fgcp/services/VirtualSystemAsyncApi.java @@ -19,6 +19,8 @@ package org.jclouds.fujitsu.fgcp.services; import java.util.Set; + +import javax.inject.Named; import javax.ws.rs.Consumes; import javax.ws.rs.GET; import javax.ws.rs.QueryParam; @@ -56,23 +58,27 @@ import com.google.common.util.concurrent.ListenableFuture; @Consumes(MediaType.TEXT_XML) public interface VirtualSystemAsyncApi { + @Named("DestroyVSYS") @GET @JAXBResponseParser @QueryParams(keys = "Action", values = "DestroyVSYS") ListenableFuture destroy(@QueryParam("vsysId") String id); + @Named("GetVSYSStatus") @GET @JAXBResponseParser @QueryParams(keys = "Action", values = "GetVSYSStatus") @Transform(SingleElementResponseToElement.class) ListenableFuture getStatus(@QueryParam("vsysId") String id); + @Named("GetVSYSAttributes") @GET @JAXBResponseParser @QueryParams(keys = "Action", values = "GetVSYSAttributes") @Transform(SingleElementResponseToElement.class) ListenableFuture get(@QueryParam("vsysId") String id); + @Named("GetVSYSConfiguration") @GET @JAXBResponseParser @QueryParams(keys = "Action", values = "GetVSYSConfiguration") @@ -80,6 +86,7 @@ public interface VirtualSystemAsyncApi { ListenableFuture getDetails( @QueryParam("vsysId") String id); + @Named("UpdateVSYSAttribute") @GET @JAXBResponseParser @QueryParams(keys = "Action", values = "UpdateVSYSAttribute") @@ -87,6 +94,7 @@ public interface VirtualSystemAsyncApi { @QueryParam("attributeName") String name, @QueryParam("attributeValue") String value); + @Named("UpdateVSYSConfiguration") @GET @JAXBResponseParser @QueryParams(keys = "Action", values = "UpdateVSYSConfiguration") @@ -94,6 +102,7 @@ public interface VirtualSystemAsyncApi { @QueryParam("configurationName") String name, @QueryParam("configurationValue") String value); + @Named("CreateVServer") @GET @JAXBResponseParser @QueryParams(keys = "Action", values = "CreateVServer") @@ -104,11 +113,13 @@ public interface VirtualSystemAsyncApi { @QueryParam("diskImageId") String diskImageId, @BinderParam(BindAlsoToSystemId.class) @QueryParam("networkId") String networkId); + @Named("ListVServer") @GET @JAXBResponseParser @QueryParams(keys = "Action", values = "ListVServer") ListenableFuture> listServers(@QueryParam("vsysId") String id); + @Named("CreateVDisk") @GET @JAXBResponseParser @QueryParams(keys = "Action", values = "CreateVDisk") @@ -116,11 +127,13 @@ public interface VirtualSystemAsyncApi { ListenableFuture createDisk(@QueryParam("vsysId") String id, @QueryParam("vdiskName") String name, @QueryParam("size") int size); + @Named("ListVDisk") @GET @JAXBResponseParser @QueryParams(keys = "Action", values = "ListVDisk") ListenableFuture> listDisks(@QueryParam("vsysId") String id); + @Named("AllocatePublicIP") @GET @JAXBResponseParser @QueryParams(keys = "Action", values = "AllocatePublicIP") @@ -131,6 +144,7 @@ public interface VirtualSystemAsyncApi { * @return * @see VirtualDCAsyncApi#listPublicIPs() */ + @Named("ListPublicIP") @GET @JAXBResponseParser @QueryParams(keys = "Action", values = "ListPublicIP") @@ -138,6 +152,7 @@ public interface VirtualSystemAsyncApi { ListenableFuture> listPublicIPs( @QueryParam("vsysId") String id); + @Named("CreateEFM") @GET @JAXBResponseParser // SLB is the only built-in server that can currently be created so @@ -148,12 +163,14 @@ public interface VirtualSystemAsyncApi { @QueryParam("efmName") String name, @BinderParam(BindAlsoToSystemId.class) @QueryParam("networkId") String networkId); + @Named("ListEFM") @GET @JAXBResponseParser @QueryParams(keys = "Action", values = "ListEFM") ListenableFuture> listBuiltinServers( @QueryParam("vsysId") String id, @QueryParam("efmType") String type); + @Named("StandByConsole") @GET @JAXBResponseParser @QueryParams(keys = "Action", values = "StandByConsole") @@ -161,6 +178,7 @@ public interface VirtualSystemAsyncApi { ListenableFuture standByConsole(@QueryParam("vsysId") String id, @QueryParam("networkId") String networkId); + @Named("RegisterPrivateVSYSDescriptor") @GET @JAXBResponseParser @QueryParams(keys = "Action", values = "RegisterPrivateVSYSDescriptor")