mirror of https://github.com/apache/jclouds.git
Issue 695: Renamed method
This commit is contained in:
parent
1a2db01330
commit
39be81a337
|
@ -74,11 +74,11 @@ public interface VirtualMachineAsyncClient {
|
||||||
ListenableFuture<AssignedIpAddresses> getAssignedIpAddresses(@EndpointParam URI uri);
|
ListenableFuture<AssignedIpAddresses> getAssignedIpAddresses(@EndpointParam URI uri);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @see VirtualMachineClient#getVirtualMachineConfigurationOptions
|
* @see VirtualMachineClient#getConfigurationOptions
|
||||||
*/
|
*/
|
||||||
@GET
|
@GET
|
||||||
@Consumes("application/vnd.tmrk.cloud.virtualMachineConfigurationOptions")
|
@Consumes("application/vnd.tmrk.cloud.virtualMachineConfigurationOptions")
|
||||||
@JAXBResponseParser
|
@JAXBResponseParser
|
||||||
@ExceptionParser(ReturnNullOnNotFoundOr404.class)
|
@ExceptionParser(ReturnNullOnNotFoundOr404.class)
|
||||||
ListenableFuture<VirtualMachineConfigurationOptions> getVirtualMachineConfigurationOptions(@EndpointParam URI uri);
|
ListenableFuture<VirtualMachineConfigurationOptions> getConfigurationOptions(@EndpointParam URI uri);
|
||||||
}
|
}
|
||||||
|
|
|
@ -69,6 +69,6 @@ public interface VirtualMachineClient {
|
||||||
* @param uri the uri for the configuration options. e.g. /cloudapi/ecloud/virtualmachines/{id}/configurationoptions
|
* @param uri the uri for the configuration options. e.g. /cloudapi/ecloud/virtualmachines/{id}/configurationoptions
|
||||||
* @return the configuration options
|
* @return the configuration options
|
||||||
*/
|
*/
|
||||||
VirtualMachineConfigurationOptions getVirtualMachineConfigurationOptions(URI uri);
|
VirtualMachineConfigurationOptions getConfigurationOptions(URI uri);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -82,7 +82,7 @@ public class VirtualMachineAsyncClientTest extends BaseTerremarkEnterpriseCloudA
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testGetVirtualMachineConfigurationOptions() throws SecurityException, NoSuchMethodException, IOException, URISyntaxException {
|
public void testGetVirtualMachineConfigurationOptions() throws SecurityException, NoSuchMethodException, IOException, URISyntaxException {
|
||||||
Method method = VirtualMachineAsyncClient.class.getMethod("getVirtualMachineConfigurationOptions", URI.class);
|
Method method = VirtualMachineAsyncClient.class.getMethod("getConfigurationOptions", URI.class);
|
||||||
HttpRequest httpRequest = processor.createRequest(method,new URI("/cloudapi/ecloud/virtualmachines/5504/configurationoptions"));
|
HttpRequest httpRequest = processor.createRequest(method,new URI("/cloudapi/ecloud/virtualmachines/5504/configurationoptions"));
|
||||||
|
|
||||||
assertRequestLineEquals(httpRequest, "GET https://services-beta.enterprisecloud.terremark.com/cloudapi/ecloud/virtualmachines/5504/configurationoptions HTTP/1.1");
|
assertRequestLineEquals(httpRequest, "GET https://services-beta.enterprisecloud.terremark.com/cloudapi/ecloud/virtualmachines/5504/configurationoptions HTTP/1.1");
|
||||||
|
|
|
@ -86,7 +86,7 @@ public class VirtualMachineClientLiveTest extends BaseTerremarkEnterpriseCloudCl
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testGetVirtualMachineConfigurationOptions() throws Exception {
|
public void testGetVirtualMachineConfigurationOptions() throws Exception {
|
||||||
VirtualMachineConfigurationOptions virtualMachineConfigurationOptions = client.getVirtualMachineConfigurationOptions(new URI("/cloudapi/ecloud/virtualmachines/5504/configurationoptions"));
|
VirtualMachineConfigurationOptions virtualMachineConfigurationOptions = client.getConfigurationOptions(new URI("/cloudapi/ecloud/virtualmachines/5504/configurationoptions"));
|
||||||
assertNotNull(virtualMachineConfigurationOptions);
|
assertNotNull(virtualMachineConfigurationOptions);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -89,7 +89,7 @@ public class VirtualMachineConfigurationOptionsJAXBParsingTest extends BaseRestC
|
||||||
@Test
|
@Test
|
||||||
public void testParseVirtualMachineWithJAXB() throws Exception {
|
public void testParseVirtualMachineWithJAXB() throws Exception {
|
||||||
|
|
||||||
Method method = VirtualMachineAsyncClient.class.getMethod("getVirtualMachineConfigurationOptions", URI.class);
|
Method method = VirtualMachineAsyncClient.class.getMethod("getConfigurationOptions", URI.class);
|
||||||
HttpRequest request = factory(VirtualMachineAsyncClient.class).createRequest(method,new URI("/1"));
|
HttpRequest request = factory(VirtualMachineAsyncClient.class).createRequest(method,new URI("/1"));
|
||||||
assertResponseParserClassEquals(method, request, ParseXMLWithJAXB.class);
|
assertResponseParserClassEquals(method, request, ParseXMLWithJAXB.class);
|
||||||
|
|
||||||
|
@ -97,13 +97,13 @@ public class VirtualMachineConfigurationOptionsJAXBParsingTest extends BaseRestC
|
||||||
.createResponseParser(parserFactory, injector, method, request);
|
.createResponseParser(parserFactory, injector, method, request);
|
||||||
|
|
||||||
InputStream is = getClass().getResourceAsStream("/virtualMachineConfigurationOptions.xml");
|
InputStream is = getClass().getResourceAsStream("/virtualMachineConfigurationOptions.xml");
|
||||||
VirtualMachineConfigurationOptions virtualMachineConfigurationOptions = parser.apply(new HttpResponse(200, "ok", newInputStreamPayload(is)));
|
VirtualMachineConfigurationOptions configurationOptions = parser.apply(new HttpResponse(200, "ok", newInputStreamPayload(is)));
|
||||||
|
|
||||||
assertProcessorOptions(virtualMachineConfigurationOptions.getProcessor());
|
assertProcessorOptions(configurationOptions.getProcessor());
|
||||||
assertMemoryOptions(virtualMachineConfigurationOptions.getMemory());
|
assertMemoryOptions(configurationOptions.getMemory());
|
||||||
assertDiskConfigurationOption(virtualMachineConfigurationOptions.getDisk());
|
assertDiskConfigurationOption(configurationOptions.getDisk());
|
||||||
assertNetworkAdapterOptions(virtualMachineConfigurationOptions.getNetworkAdapter());
|
assertNetworkAdapterOptions(configurationOptions.getNetworkAdapter());
|
||||||
assertCustomizationOption(virtualMachineConfigurationOptions.getCustomization());
|
assertCustomizationOption(configurationOptions.getCustomization());
|
||||||
}
|
}
|
||||||
|
|
||||||
private void assertProcessorOptions(ConfigurationOptionRange processor) {
|
private void assertProcessorOptions(ConfigurationOptionRange processor) {
|
||||||
|
|
Loading…
Reference in New Issue