From 2fa4a475aa3498e7051aedf9c83bfa5816ff0aa9 Mon Sep 17 00:00:00 2001 From: Koushik Das Date: Thu, 29 Jan 2015 11:33:42 +0530 Subject: [PATCH] volume-upload: getUploadParamsForVolume/Template response differs from spec Fixed the response parameters --- .../org/apache/cloudstack/api/ApiConstants.java | 1 + .../api/response/GetUploadParamsResponse.java | 14 +++++++------- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/api/src/org/apache/cloudstack/api/ApiConstants.java b/api/src/org/apache/cloudstack/api/ApiConstants.java index 066df9d3f31..54604f3f80f 100755 --- a/api/src/org/apache/cloudstack/api/ApiConstants.java +++ b/api/src/org/apache/cloudstack/api/ApiConstants.java @@ -190,6 +190,7 @@ public class ApiConstants { public static final String PORTAL = "portal"; public static final String PORTABLE_IP_ADDRESS = "portableipaddress"; public static final String PORT_FORWARDING_SERVICE_ID = "portforwardingserviceid"; + public static final String POST_URL = "postURL"; public static final String PRIVATE_INTERFACE = "privateinterface"; public static final String PRIVATE_IP = "privateip"; public static final String PRIVATE_PORT = "privateport"; diff --git a/api/src/org/apache/cloudstack/api/response/GetUploadParamsResponse.java b/api/src/org/apache/cloudstack/api/response/GetUploadParamsResponse.java index 7426d9f76ed..b9be06ecc8f 100644 --- a/api/src/org/apache/cloudstack/api/response/GetUploadParamsResponse.java +++ b/api/src/org/apache/cloudstack/api/response/GetUploadParamsResponse.java @@ -33,7 +33,7 @@ public class GetUploadParamsResponse extends BaseResponse { @Param(description = "the template/volume ID") private UUID id; - @SerializedName(ApiConstants.URL) + @SerializedName(ApiConstants.POST_URL) @Param(description = "POST url to upload the file to") private URL postURL; @@ -41,19 +41,19 @@ public class GetUploadParamsResponse extends BaseResponse { @Param(description = "encrypted data to be sent in the POST request.") private String metadata; - @SerializedName(ApiConstants.TIMEOUT) + @SerializedName(ApiConstants.EXPIRES) @Param(description = "the timestamp after which the signature expires") - private String timeout; + private String expires; @SerializedName(ApiConstants.SIGNATURE) @Param(description = "signature to be sent in the POST request.") private String signature; - public GetUploadParamsResponse(UUID id, URL postURL, String metadata, String timeout, String signature) { + public GetUploadParamsResponse(UUID id, URL postURL, String metadata, String expires, String signature) { this.id = id; this.postURL = postURL; this.metadata = metadata; - this.timeout = timeout; + this.expires = expires; this.signature = signature; setObjectName("getuploadparams"); } @@ -74,8 +74,8 @@ public class GetUploadParamsResponse extends BaseResponse { this.metadata = metadata; } - public void setTimeout(String timeout) { - this.timeout = timeout; + public void setTimeout(String expires) { + this.expires = expires; } public void setSignature(String signature) {