刷新共享块设备容量

POST/zstack/v1/primary-storage/sharedblockgroup/{sharedBlockGroupUuid}/sharedblocks/{uuid}

Headers

Authorization: OAuth the-session-uuid

Body

{
  "params": {},
  "systemTags": [],
  "userTags": []
}

上述示例中systemTagsuserTags字段可以省略。列出是为了表示body中可以包含这两个字段。

Curl示例


curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X POST -d '{"params":{}}' http://localhost:8080/zstack/v1/primary-storage/sharedblockgroup/2974c033608537e68a305b0f29412776/sharedblocks/9bd10e4bcc0939a2b041755a160d7b34

参数列表

名字类型位置描述可选值起始版本
uuid (可选)Stringurl共享块设备UUID,如为空则更新共享块存储下所有设备 2.6.0
sharedBlockGroupUuidStringurl共享块存储UUID 2.6.0
systemTags (可选)Listbody  2.6.0
userTags (可选)Listbody  2.6.0

API返回

返回示例

{
  "inventory": {
    "sharedBlocks": [
      {
        "uuid": "fd474b5a711f3bcab14061e1507b0691",
        "sharedBlockGroupUuid": "9f900d7cc336370da2dccdd832a1613d",
        "type": "LvmLogicalVolumeBasic",
        "diskUuid": "b9bec04964ab30a7bf80bdbf7ec997d9",
        "name": "test shared block",
        "description": "description",
        "state": "Enabled",
        "status": "Connected",
        "createDate": "Nov 14, 2017 10:20:57 PM",
        "lastOpDate": "Nov 14, 2017 10:20:57 PM"
      }
    ],
    "sharedBlockGroupType": "LvmVolumeGroupBasic",
    "uuid": "9f900d7cc336370da2dccdd832a1613d",
    "name": "shared block group primary storage",
    "description": "shared block group primary storage description",
    "availableCapacity": 1073741824.0,
    "availablePhysicalCapacity": 1073741824.0,
    "type": "SharedBlock",
    "state": "Enabled",
    "status": "Connected",
    "createDate": "Nov 14, 2017 10:20:57 PM",
    "lastOpDate": "Nov 14, 2017 10:20:57 PM"
  }
}
名字类型描述起始版本
errorErrorCode错误码,若不为null,则表示操作失败, 操作成功时该字段为null。 详情参考error2.6.0
inventorySharedBlockGroupPrimaryStorageInventory详情参考inventory2.6.0

error

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

inventory

名字类型描述起始版本
uuidString资源的UUID,唯一标示该资源2.6.0
zoneUuidString数据中心UUID2.6.0
nameString资源名称2.6.0
urlString未使用2.6.0
descriptionString资源的详细描述2.6.0
totalCapacityLong总空间2.6.0
availableCapacityLong可用空间2.6.0
totalPhysicalCapacityLong总物理空间2.6.0
availablePhysicalCapacityLong物理可用空间2.6.0
systemUsedCapacityLong系统使用空间2.6.0
typeString数据存储类型2.6.0
stateString启用状态2.6.0
statusString连接状态2.6.0
mountPathString未使用2.6.0
createDateTimestamp创建时间2.6.0
lastOpDateTimestamp最后一次修改时间2.6.0
attachedClusterUuidsList挂载的集群2.6.0
sharedBlocksList详情参考sharedBlocks2.6.0
sharedBlockGroupTypeSharedBlockGroupType详情参考sharedBlockGroupType2.6.0

sharedBlocks

名字类型描述起始版本
uuidString资源的UUID,唯一标示该资源2.6.0
sharedBlockGroupUuidString共享块设备组UUID2.6.0
diskUuidString磁盘唯一标示(例如UUID, WWN, WWID)2.6.0
nameString资源名称2.6.0
descriptionString资源的详细描述2.6.0
createDateTimestamp创建时间2.6.0
lastOpDateTimestamp最后一次修改时间2.6.0
typeSharedBlockType详情参考type2.6.0
stateSharedBlockState详情参考state2.6.0
statusSharedBlockStatus详情参考status2.6.0

type

名字类型描述起始版本
nameString资源名称2.6.0
ordinalint 2.6.0

state

名字类型描述起始版本
nameString资源名称2.6.0
ordinalint 2.6.0

status

名字类型描述起始版本
nameString资源名称2.6.0
ordinalint 2.6.0

sharedBlockGroupType

名字类型描述起始版本
nameString资源名称2.6.0
ordinalint 2.6.0

SDK示例

Java SDK


RefreshSharedblockDeviceCapacityAction action = new RefreshSharedblockDeviceCapacityAction();
action.uuid = "9bd10e4bcc0939a2b041755a160d7b34";
action.sharedBlockGroupUuid = "2974c033608537e68a305b0f29412776";
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
RefreshSharedblockDeviceCapacityAction.Result res = action.call();

Python SDK


RefreshSharedblockDeviceCapacityAction action = RefreshSharedblockDeviceCapacityAction()
action.uuid = "9bd10e4bcc0939a2b041755a160d7b34"
action.sharedBlockGroupUuid = "2974c033608537e68a305b0f29412776"
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
RefreshSharedblockDeviceCapacityAction.Result res = action.call()