Issue 695: Fixed api version header

This commit is contained in:
Jason King 2011-11-15 11:05:28 +00:00
parent a680905ca7
commit 1c9bde8015
4 changed files with 6 additions and 5 deletions

View File

@ -43,7 +43,8 @@ import java.net.URI;
* @author Adrian Cole
*/
@RequestFilters(BasicAuthentication.class)
@Headers(keys = "x-trmk-version", values = "{jclouds.api-version}")
@Headers(keys = "x-tmrk-version", values = "{jclouds.api-version}")
//@VirtualHost
public interface TaskAsyncClient {
/**

View File

@ -43,7 +43,7 @@ import javax.ws.rs.PathParam;
* @author Adrian Cole
*/
@RequestFilters(BasicAuthentication.class)
@Headers(keys = "x-trmk-version", values = "{jclouds.api-version}")
@Headers(keys = "x-tmrk-version", values = "{jclouds.api-version}")
public interface VirtualMachineAsyncClient {
/**

View File

@ -44,7 +44,7 @@ public class TaskAsyncClientTest extends BaseTerremarkEnterpriseCloudAsyncClient
assertRequestLineEquals(httpRequest, "GET https://services-beta.enterprisecloud.terremark.com/cloudapi/ecloud/tasks/environments/1 HTTP/1.1");
assertNonPayloadHeadersEqual(httpRequest,
"Accept: application/vnd.tmrk.cloud.task; type=collection\nx-trmk-version: 2011-07-01\n");
"Accept: application/vnd.tmrk.cloud.task; type=collection\nx-tmrk-version: 2011-07-01\n");
assertPayloadEquals(httpRequest, null, null, false);
assertResponseParserClassEquals(method, httpRequest, ParseXMLWithJAXB.class);
@ -59,7 +59,7 @@ public class TaskAsyncClientTest extends BaseTerremarkEnterpriseCloudAsyncClient
HttpRequest httpRequest = processor.createRequest(method, URI.create("https://services-beta.enterprisecloud.terremark.com/cloudapi/ecloud/tasks/1"));
assertRequestLineEquals(httpRequest, "GET https://services-beta.enterprisecloud.terremark.com/cloudapi/ecloud/tasks/1 HTTP/1.1");
assertNonPayloadHeadersEqual(httpRequest, "Accept: application/vnd.tmrk.cloud.task\nx-trmk-version: 2011-07-01\n");
assertNonPayloadHeadersEqual(httpRequest, "Accept: application/vnd.tmrk.cloud.task\nx-tmrk-version: 2011-07-01\n");
assertPayloadEquals(httpRequest, null, null, false);
assertResponseParserClassEquals(method, httpRequest, ParseXMLWithJAXB.class);

View File

@ -41,7 +41,7 @@ public class VirtualMachineAsyncClientTest extends BaseTerremarkEnterpriseCloudA
HttpRequest httpRequest = processor.createRequest(method, 1);
assertRequestLineEquals(httpRequest, "GET https://services-beta.enterprisecloud.terremark.com/cloudapi/ecloud/virtualMachines/1 HTTP/1.1");
assertNonPayloadHeadersEqual(httpRequest, "Accept: application/vnd.tmrk.cloud.virtualMachine\nx-trmk-version: 2011-07-01\n");
assertNonPayloadHeadersEqual(httpRequest, "Accept: application/vnd.tmrk.cloud.virtualMachine\nx-tmrk-version: 2011-07-01\n");
assertPayloadEquals(httpRequest, null, null, false);
assertResponseParserClassEquals(method, httpRequest, ParseXMLWithJAXB.class);