Skip to content

Commit

Permalink
Fix ceph pool related doc
Browse files Browse the repository at this point in the history
Signed-off-by: AlanJager <[email protected]>
  • Loading branch information
AlanJager committed Feb 1, 2018
1 parent e26c874 commit a1354e4
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 44 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,12 @@
import org.zstack.header.message.APIEvent;
import org.zstack.header.rest.RestResponse;

import java.sql.Timestamp;

/**
* Created by xing5 on 2017/2/28.
*/
@RestResponse(fieldsTo = {"all"})
@RestResponse(allTo = "inventory")
public class APIAddCephPrimaryStoragePoolEvent extends APIEvent {
public APIAddCephPrimaryStoragePoolEvent() {
}
Expand All @@ -26,8 +28,19 @@ public void setInventory(CephPrimaryStoragePoolInventory inventory) {
}

public static APIAddCephPrimaryStoragePoolEvent __example__() {
APIAddCephPrimaryStoragePoolEvent msg = new APIAddCephPrimaryStoragePoolEvent();
return msg;
APIAddCephPrimaryStoragePoolEvent event = new APIAddCephPrimaryStoragePoolEvent();

CephPrimaryStoragePoolInventory inv = new CephPrimaryStoragePoolInventory();
inv.setUuid(uuid());
inv.setPoolName("pool name");
inv.setAliasName("alias name");
inv.setDescription("description");
inv.setType(CephPrimaryStoragePoolType.Data.toString());
inv.setCreateDate(new Timestamp(org.zstack.header.message.DocUtils.date));
inv.setLastOpDate(new Timestamp(org.zstack.header.message.DocUtils.date));
inv.setPrimaryStorageUuid(uuid());
event.setInventory(inv);
return event;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import org.zstack.storage.ceph.primary.APIAddCephPrimaryStoragePoolEvent
doc {
title "AddCephPrimaryStoragePool"

category "未知类别"
category "storage.ceph.primary"

desc """在这里填写API描述"""
desc """为Ceph主存储添加Pool"""

rest {
request {
Expand All @@ -33,14 +33,24 @@ doc {

}
column {
name "name"
enclosedIn ""
desc "资源名称"
name "poolName"
enclosedIn "params"
desc ""
location "body"
type "String"
optional false
since "0.6"

}
column {
name "aliasName"
enclosedIn "params"
desc ""
location "body"
type "String"
optional true
since "0.6"

}
column {
name "description"
Expand All @@ -53,8 +63,8 @@ doc {

}
column {
name "errorIfNotExist"
enclosedIn ""
name "isCreate"
enclosedIn "params"
desc ""
location "body"
type "boolean"
Expand Down Expand Up @@ -92,41 +102,11 @@ doc {
since "0.6"

}
column {
name "poolName"
enclosedIn "params"
desc ""
location "body"
type "String"
optional false
since "0.6"

}
column {
name "aliasName"
enclosedIn "params"
desc ""
location "body"
type "String"
optional true
since "0.6"

}
column {
name "isCreate"
enclosedIn "params"
desc ""
location "body"
type "boolean"
optional true
since "0.6"

}
}
}

response {
clz APIAddCephPrimaryStoragePoolEvent.class
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import org.zstack.storage.ceph.primary.APIAddMonToCephPrimaryStorageEvent
doc {
title "为 Ceph 主存储添加 mon 节点(AddMonToCephPrimaryStorage)"

category "stroage.ceph.primary"
category "storage.ceph.primary"

desc """为 Ceph 主存储添加 mon 节点"""

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import org.zstack.storage.ceph.primary.APIDeleteCephPrimaryStoragePoolEvent
doc {
title "DeleteCephPrimaryStoragePool"

category "未知类别"
category "storage.ceph.primary"

desc """在这里填写API描述"""

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import org.zstack.header.query.APIQueryMessage
doc {
title "QueryCephPrimaryStoragePool"

category "未知类别"
category "storage.ceph.primary"

desc """在这里填写API描述"""

Expand Down

0 comments on commit a1354e4

Please sign in to comment.