从分布式存储删除监控节点

API请求

URLs

DELETE/v1/primary-storage/ceph/{uuid}/mons?monHostnames={monHostnames}

Headers

Authorization: OAuth the-session-uuid

Curl示例

curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b57c6816e9b64ae881a356f9308bb6c7" \
-X DELETE http://localhost:8080/zstack/v1/primary-storage/ceph/31db2011f3944c85ae24a7ca607302e5/mons?monHostnames=10.0.1.2

参数列表

名字类型位置描述可选值起始版本
uuidStringurl分布式存储的UUID 0.6
monHostnamesListbodymon 节点名字列表 0.6
systemTags (可选)Listbody系统标签 0.6
userTags (可选)Listbody用户标签 0.6

API返回

返回示例

{
  "inventory": {
    "mons": [
      {
        "monAddr": "10.0.1.2",
        "monUuid": "c72a3fc6e06649de811bf90ba8c9c574"
      }
    ],
    "name": "My Ceph Primary Storage",
    "description": "Public Ceph Primary Storage",
    "totalCapacity": 1073741824.0,
    "availableCapacity": 968884224.0,
    "type": "Ceph",
    "state": "Enabled",
    "status": "Connected",
    "createDate": "Jun 7, 2017 9:21:07 PM",
    "lastOpDate": "Jun 7, 2017 9:21:07 PM",
    "attachedClusterUuids": [
      "c0f667d99bfc41c1a133528a2089a9a7"
    ]
  }
}
名字类型描述起始版本
errorErrorCode错误码,若不为null,则表示操作失败, 操作成功时该字段为null。 详情参考error0.6
inventoryCephPrimaryStorageInventory详情参考inventory0.6

error

名字类型描述起始版本
codeString错误码号,错误的全局唯一标识,例如SYS.1000, HOST.10010.6
descriptionString错误的概要描述0.6
detailsString错误的详细信息0.6
elaborationString保留字段,默认为null0.6
opaqueLinkedHashMap保留字段,默认为null0.6
causeErrorCode根错误,引发当前错误的源错误,若无原错误,该字段为null0.6

inventory

名字类型描述起始版本
fsidString 0.6
rootVolumePoolNameString 0.6
dataVolumePoolNameString 0.6
imageCachePoolNameString 0.6
uuidString资源的UUID,唯一标示该资源0.6
zoneUuidString数据中心UUID0.6
nameString资源名称0.6
urlString 0.6
descriptionString资源的详细描述0.6
totalCapacityLong 0.6
availableCapacityLong 0.6
totalPhysicalCapacityLong 0.6
availablePhysicalCapacityLong 0.6
systemUsedCapacityLong 0.6
typeString 0.6
stateString 0.6
statusString 0.6
mountPathString 0.6
createDateTimestamp创建时间0.6
lastOpDateTimestamp最后一次修改时间0.6
attachedClusterUuidsList 0.6
monsList详情参考mons0.6

mons

名字类型描述起始版本
hostnameString 0.6
monPortInteger 0.6
createDateTimestamp创建时间0.6
lastOpDateTimestamp最后一次修改时间0.6
primaryStorageUuidString数据存储UUID0.6
monAddrString 0.6
sshUsernameString 0.6
sshPasswordString 0.6
sshPortInteger 0.6
statusString 0.6
monUuidString 0.6

SDK示例

Java SDK

RemoveMonFromCephPrimaryStorageAction action = new RemoveMonFromCephPrimaryStorageAction();
action.uuid = "05aa4826fdbd4021b72e4d9a5db67bbc";
action.monHostnames = asList("10.0.1.2");
action.sessionId = "2412a720a3bb4992887979298217b300";
RemoveMonFromCephPrimaryStorageAction.Result res = action.call();

Python SDK

RemoveMonFromCephPrimaryStorageAction action = RemoveMonFromCephPrimaryStorageAction()
action.uuid = "fb3dca5509154ca48698f374794f4d93"
action.monHostnames = [10.0.1.2]
action.sessionId = "9eb682deaa894cea80e1608056492948"
RemoveMonFromCephPrimaryStorageAction.Result res = action.call()