bug 8641: adding a volume state in addition to volume status

status 8641: resolved fixed
This commit is contained in:
abhishek 2011-02-22 09:55:08 -08:00
parent e4765fb32b
commit 25f27674ce
3 changed files with 18 additions and 5 deletions

View File

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

View File

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

View File

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