mirror of
https://github.com/apache/cloudstack.git
synced 2025-11-02 20:02:29 +01:00
Return "status" field in StoragePoolResponse. Status can be Up, Maintenance, ErrorInMaintenance
This commit is contained in:
parent
9c2ecb2af4
commit
6bd87ca161
@ -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());
|
||||
|
||||
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user