diff --git a/server/src/com/cloud/api/ApiResponseHelper.java b/server/src/com/cloud/api/ApiResponseHelper.java index b693e538355..ad01ecea9c4 100644 --- a/server/src/com/cloud/api/ApiResponseHelper.java +++ b/server/src/com/cloud/api/ApiResponseHelper.java @@ -890,6 +890,7 @@ public class ApiResponseHelper { StoragePoolResponse poolResponse = new StoragePoolResponse(); poolResponse.setId(pool.getId()); poolResponse.setName(pool.getName()); + poolResponse.setState(pool.getStatus()); poolResponse.setPath(pool.getPath()); poolResponse.setIpAddress(pool.getHostAddress()); poolResponse.setZoneId(pool.getDataCenterId()); diff --git a/server/src/com/cloud/api/response/StoragePoolResponse.java b/server/src/com/cloud/api/response/StoragePoolResponse.java index ddc6c0137e4..b5a2dc8cf31 100644 --- a/server/src/com/cloud/api/response/StoragePoolResponse.java +++ b/server/src/com/cloud/api/response/StoragePoolResponse.java @@ -19,6 +19,8 @@ package com.cloud.api.response; import java.util.Date; +import com.cloud.api.ApiConstants; +import com.cloud.host.Status; import com.cloud.serializer.Param; import com.google.gson.annotations.SerializedName; @@ -68,8 +70,8 @@ public class StoragePoolResponse extends BaseResponse { @SerializedName("tags") @Param(description="the tags for the storage pool") private String tags; - @SerializedName("state") @Param(description="the state of the storage pool") - private String state; + @SerializedName(ApiConstants.STATE) @Param(description="the state of the storage pool") + private Status state; public Long getId() { return id; @@ -191,11 +193,11 @@ public class StoragePoolResponse extends BaseResponse { this.tags = tags; } - public String getState() { + public Status getState() { return state; } - public void setState(String state) { + public void setState(Status state) { this.state = state; } }