Skip to content

Commit 2fa4a47

Browse files
committed
volume-upload: getUploadParamsForVolume/Template response differs from spec
Fixed the response parameters
1 parent ae21f44 commit 2fa4a47

2 files changed

Lines changed: 8 additions & 7 deletions

File tree

‎api/src/org/apache/cloudstack/api/ApiConstants.java‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,7 @@ public class ApiConstants {
190190
public static final String PORTAL = "portal";
191191
public static final String PORTABLE_IP_ADDRESS = "portableipaddress";
192192
public static final String PORT_FORWARDING_SERVICE_ID = "portforwardingserviceid";
193+
public static final String POST_URL = "postURL";
193194
public static final String PRIVATE_INTERFACE = "privateinterface";
194195
public static final String PRIVATE_IP = "privateip";
195196
public static final String PRIVATE_PORT = "privateport";

‎api/src/org/apache/cloudstack/api/response/GetUploadParamsResponse.java‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,27 +33,27 @@ public class GetUploadParamsResponse extends BaseResponse {
3333
@Param(description = "the template/volume ID")
3434
private UUID id;
3535

36-
@SerializedName(ApiConstants.URL)
36+
@SerializedName(ApiConstants.POST_URL)
3737
@Param(description = "POST url to upload the file to")
3838
private URL postURL;
3939

4040
@SerializedName(ApiConstants.METADATA)
4141
@Param(description = "encrypted data to be sent in the POST request.")
4242
private String metadata;
4343

44-
@SerializedName(ApiConstants.TIMEOUT)
44+
@SerializedName(ApiConstants.EXPIRES)
4545
@Param(description = "the timestamp after which the signature expires")
46-
private String timeout;
46+
private String expires;
4747

4848
@SerializedName(ApiConstants.SIGNATURE)
4949
@Param(description = "signature to be sent in the POST request.")
5050
private String signature;
5151

52-
public GetUploadParamsResponse(UUID id, URL postURL, String metadata, String timeout, String signature) {
52+
public GetUploadParamsResponse(UUID id, URL postURL, String metadata, String expires, String signature) {
5353
this.id = id;
5454
this.postURL = postURL;
5555
this.metadata = metadata;
56-
this.timeout = timeout;
56+
this.expires = expires;
5757
this.signature = signature;
5858
setObjectName("getuploadparams");
5959
}
@@ -74,8 +74,8 @@ public void setMetadata(String metadata) {
7474
this.metadata = metadata;
7575
}
7676

77-
public void setTimeout(String timeout) {
78-
this.timeout = timeout;
77+
public void setTimeout(String expires) {
78+
this.expires = expires;
7979
}
8080

8181
public void setSignature(String signature) {

0 commit comments

Comments
 (0)