fix api APIQueryCephPrimaryStoragePoolReply missing example issue
@@ -3,8 +3,11 @@ package org.zstack.storage.ceph.primary;
import org.zstack.header.query.APIQueryReply;
import org.zstack.header.rest.RestResponse;
+import java.sql.Timestamp;
import java.util.List;
+import static java.util.Arrays.asList;
+
/**
* Created by xing5 on 2017/2/28.
*/
@@ -19,4 +22,18 @@ public class APIQueryCephPrimaryStoragePoolReply extends APIQueryReply {
public void setInventories(List<CephPrimaryStoragePoolInventory> inventories) {
this.inventories = inventories;
}
+
+ public static APIQueryCephPrimaryStoragePoolReply __example__() {
+ APIQueryCephPrimaryStoragePoolReply reply = new APIQueryCephPrimaryStoragePoolReply();
+ CephPrimaryStoragePoolInventory cephPrimaryStoragePool = new CephPrimaryStoragePoolInventory();
+ cephPrimaryStoragePool.setDescription("high performance");
+ cephPrimaryStoragePool.setPoolName("test pool");
+ cephPrimaryStoragePool.setPrimaryStorageUuid(uuid());
+ cephPrimaryStoragePool.setCreateDate(new Timestamp(System.currentTimeMillis()));
+ cephPrimaryStoragePool.setLastOpDate(new Timestamp(System.currentTimeMillis()));
+ reply.setInventories(asList(cephPrimaryStoragePool));
+ reply.setSuccess(true);
+ return reply;
+ }
+
}
