volume-upload: getUploadParamsForVolume/Template response differs from spec

Fixed the response parameters
This commit is contained in:
Koushik Das 2015-01-29 11:33:42 +05:30
parent ae21f44c7b
commit 2fa4a475aa
2 changed files with 8 additions and 7 deletions

View File

@ -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";

View File

@ -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) {