Return "status" field in StoragePoolResponse. Status can be Up, Maintenance, ErrorInMaintenance

This commit is contained in:
alena 2010-11-03 14:57:36 -07:00
parent 9c2ecb2af4
commit 6bd87ca161
2 changed files with 7 additions and 4 deletions

View File

@ -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());

View File

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