diff --git a/api/src/com/cloud/api/ApiConstants.java b/api/src/com/cloud/api/ApiConstants.java index 62dd6cfaa51..d94b2d12b2a 100755 --- a/api/src/com/cloud/api/ApiConstants.java +++ b/api/src/com/cloud/api/ApiConstants.java @@ -150,6 +150,7 @@ public class ApiConstants { public static final String START_IP = "startip"; public static final String START_PORT = "startport"; public static final String STATE = "state"; + public static final String STATUS = "status"; public static final String STORAGE_TYPE = "storagetype"; public static final String SYSTEM_VM_TYPE = "systemvmtype"; public static final String TAGS = "tags"; diff --git a/api/src/com/cloud/api/response/VolumeResponse.java b/api/src/com/cloud/api/response/VolumeResponse.java index c760c594bf5..8df95a884f1 100755 --- a/api/src/com/cloud/api/response/VolumeResponse.java +++ b/api/src/com/cloud/api/response/VolumeResponse.java @@ -68,6 +68,9 @@ public class VolumeResponse extends BaseResponse { @SerializedName(ApiConstants.STATE) @Param(description="the state of the disk volume") private String state; + + @SerializedName(ApiConstants.STATUS) @Param(description="the status of the disk volume") + private String status; @SerializedName(ApiConstants.ACCOUNT) @Param(description="the account associated with the disk volume") private String accountName; @@ -252,12 +255,12 @@ public class VolumeResponse extends BaseResponse { this.created = created; } - public String getState() { - return state; + public String getStatus() { + return status; } - public void setState(String state) { - this.state = state; + public void setStatus(String status) { + this.status = status; } public String getAccountName() { @@ -395,4 +398,12 @@ public class VolumeResponse extends BaseResponse { public void setExtractable(Boolean extractable) { this.extractable = extractable; } + + public String getState() { + return state; + } + + public void setState(String state) { + this.state = state; + } } diff --git a/server/src/com/cloud/api/ApiResponseHelper.java b/server/src/com/cloud/api/ApiResponseHelper.java index c8416838164..01184cf0c75 100755 --- a/server/src/com/cloud/api/ApiResponseHelper.java +++ b/server/src/com/cloud/api/ApiResponseHelper.java @@ -784,7 +784,8 @@ public class ApiResponseHelper implements ResponseGenerator { volResponse.setSize(volume.getSize()); volResponse.setCreated(volume.getCreated()); - volResponse.setState(volume.getStatus().toString()); + volResponse.setState(volume.getState().toString()); + volResponse.setStatus(volume.getStatus().toString()); Account accountTemp = ApiDBUtils.findAccountById(volume.getAccountId()); if (accountTemp != null) {