Issue 695: Renamed method

This commit is contained in:
Jason King 2011-11-23 15:52:31 +00:00
parent 1a2db01330
commit 39be81a337
5 changed files with 12 additions and 12 deletions

View File

@ -74,11 +74,11 @@ public interface VirtualMachineAsyncClient {
ListenableFuture<AssignedIpAddresses> getAssignedIpAddresses(@EndpointParam URI uri);
/**
* @see VirtualMachineClient#getVirtualMachineConfigurationOptions
* @see VirtualMachineClient#getConfigurationOptions
*/
@GET
@Consumes("application/vnd.tmrk.cloud.virtualMachineConfigurationOptions")
@JAXBResponseParser
@ExceptionParser(ReturnNullOnNotFoundOr404.class)
ListenableFuture<VirtualMachineConfigurationOptions> getVirtualMachineConfigurationOptions(@EndpointParam URI uri);
ListenableFuture<VirtualMachineConfigurationOptions> getConfigurationOptions(@EndpointParam URI uri);
}

View File

@ -69,6 +69,6 @@ public interface VirtualMachineClient {
* @param uri the uri for the configuration options. e.g. /cloudapi/ecloud/virtualmachines/{id}/configurationoptions
* @return the configuration options
*/
VirtualMachineConfigurationOptions getVirtualMachineConfigurationOptions(URI uri);
VirtualMachineConfigurationOptions getConfigurationOptions(URI uri);
}

View File

@ -82,7 +82,7 @@ public class VirtualMachineAsyncClientTest extends BaseTerremarkEnterpriseCloudA
}
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"));
assertRequestLineEquals(httpRequest, "GET https://services-beta.enterprisecloud.terremark.com/cloudapi/ecloud/virtualmachines/5504/configurationoptions HTTP/1.1");

View File

@ -86,7 +86,7 @@ public class VirtualMachineClientLiveTest extends BaseTerremarkEnterpriseCloudCl
}
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);
}
}

View File

@ -89,7 +89,7 @@ public class VirtualMachineConfigurationOptionsJAXBParsingTest extends BaseRestC
@Test
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"));
assertResponseParserClassEquals(method, request, ParseXMLWithJAXB.class);
@ -97,13 +97,13 @@ public class VirtualMachineConfigurationOptionsJAXBParsingTest extends BaseRestC
.createResponseParser(parserFactory, injector, method, request);
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());
assertMemoryOptions(virtualMachineConfigurationOptions.getMemory());
assertDiskConfigurationOption(virtualMachineConfigurationOptions.getDisk());
assertNetworkAdapterOptions(virtualMachineConfigurationOptions.getNetworkAdapter());
assertCustomizationOption(virtualMachineConfigurationOptions.getCustomization());
assertProcessorOptions(configurationOptions.getProcessor());
assertMemoryOptions(configurationOptions.getMemory());
assertDiskConfigurationOption(configurationOptions.getDisk());
assertNetworkAdapterOptions(configurationOptions.getNetworkAdapter());
assertCustomizationOption(configurationOptions.getCustomization());
}
private void assertProcessorOptions(ConfigurationOptionRange processor) {