Refresh Shared Block Device Capacity

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

Headers

Authorization: OAuth the-session-uuid

Body

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

In the example above, systemTags and userTags fields can be omitted. They are listed to indicate that the body can contain these two fields.

Curl Example


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

Parameter List

NameTypeLocationDescriptionAllowed ValuesStarting Version
uuid (optional)StringurlShared block device UUID. If empty, updates all devices under the shared block storage 2.6.0
sharedBlockGroupUuidStringurlShared block storage UUID 2.6.0
systemTags (optional)Listbody  2.6.0
userTags (optional)Listbody  2.6.0

API Response

Response Example

{
  "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"
  }
}
NameTypeDescriptionStarting Version
errorErrorCodeError code. If not null, the operation failed. This field is null when the operation succeeds. For details, see error2.6.0
inventorySharedBlockGroupPrimaryStorageInventoryFor details, see inventory2.6.0

error

NameTypeDescriptionStarting Version
codeStringError code number, a globally unique identifier for the error, e.g. SYS.1000, HOST.10012.6.0
descriptionStringBrief description of the error2.6.0
detailsStringDetailed error information2.6.0
elaborationStringReserved field, defaults to null2.6.0
opaqueLinkedHashMapReserved field, defaults to null2.6.0
causeErrorCodeRoot cause: the source error that caused the current error. If there is no original error, this field is null2.6.0

inventory

NameTypeDescriptionStarting Version
uuidStringResource UUID, uniquely identifies the resource2.6.0
zoneUuidStringData Center UUID2.6.0
nameStringResource name2.6.0
urlStringUnused2.6.0
descriptionStringDetailed description of the resource2.6.0
totalCapacityLongTotal capacity2.6.0
availableCapacityLongAvailable capacity2.6.0
totalPhysicalCapacityLongTotal physical capacity2.6.0
availablePhysicalCapacityLongAvailable physical capacity2.6.0
systemUsedCapacityLongSystem used capacity2.6.0
typeStringData storage type2.6.0
stateStringEnabled state2.6.0
statusStringConnection status2.6.0
mountPathStringUnused2.6.0
createDateTimestampCreate date2.6.0
lastOpDateTimestampLast update date2.6.0
attachedClusterUuidsListAttached clusters2.6.0
sharedBlocksListFor details, see sharedBlocks2.6.0
sharedBlockGroupTypeSharedBlockGroupTypeFor details, see sharedBlockGroupType2.6.0

sharedBlocks

NameTypeDescriptionStarting Version
uuidStringResource UUID, uniquely identifies the resource2.6.0
sharedBlockGroupUuidStringShared block device group UUID2.6.0
diskUuidStringDisk unique identifier (e.g. UUID, WWN, WWID)2.6.0
nameStringResource name2.6.0
descriptionStringDetailed description of the resource2.6.0
createDateTimestampCreate date2.6.0
lastOpDateTimestampLast update date2.6.0
typeSharedBlockTypeFor details, see type2.6.0
stateSharedBlockStateFor details, see state2.6.0
statusSharedBlockStatusFor details, see status2.6.0

type

NameTypeDescriptionStarting Version
nameStringResource name2.6.0
ordinalint 2.6.0

state

NameTypeDescriptionStarting Version
nameStringResource name2.6.0
ordinalint 2.6.0

status

NameTypeDescriptionStarting Version
nameStringResource name2.6.0
ordinalint 2.6.0

sharedBlockGroupType

NameTypeDescriptionStarting Version
nameStringResource name2.6.0
ordinalint 2.6.0

SDK Examples

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()