UpdateSharedBlockDiskUuid
API Request
URLs
PUT zstack/v1/primary-storage/sharedblockgroup/{sharedBlockGroupUuid}/sharedblocks/{uuid}/actions
Headers
Authorization: OAuth the-session-uuid
Body
Note: In
the preceding sample, both systemTags and userTags are optional.
These two fields can be included in the body structure.
{
"updateSharedBlockDiskUuid": {
"diskUuid": "2f7f9667fc2230d8b15790a3e95bf7e3"
},
"systemTags": [],
"userTags": []
}

Curl
Sample
curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X PUT -d '{"updateSharedBlockDiskUuid":{"diskUuid":"2f7f9667fc2230d8b15790a3e95bf7e3"}}' http://localhost:8080/zstack/v1/primary-storage/sharedblockgroup/6a95724b40cb36199eecf1c048c1d614/sharedblocks/a54e93ec15fb3002a5e3b26367b87965/actions
Request Parameters
Name | Type | Location | Description | Optional Value | Starting Version |
---|---|---|---|---|---|
uuid | String | url | The LUN UUID. | 3.9.0 | |
sharedBlockGroupUuid | String | url | The LUN group UUID. | 3.9.0 | |
diskUuid | String | body (contained in the updateSharedBlockDiskUuid structure) | The disk UUID. | 3.9.0 | |
systemTags | List | body | Optional. The system tags. | 3.9.0 | |
userTags | List | body | Optional. The user tags. | 3.9.0 |
API Response
Sample
Response
{
"inventory": {
"sharedBlocks": [
{
"uuid": "73e6d058e8c130f3b6ac54f424011f38",
"sharedBlockGroupUuid": "41057c8af5b638f796f8305cd6d0cb5a",
"type": "LvmLogicalVolumeBasic",
"diskUuid": "a2dc34af6cb83caf8eb2edc859d5fb2d",
"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": "41057c8af5b638f796f8305cd6d0cb5a",
"name": "shared block group primary storage",
"description": "shared block group primary storage description",
"availableCapacity": 1.073741824E9,
"availablePhysicalCapacity": 1.073741824E9,
"type": "SharedBlock",
"state": "Enabled",
"status": "Connected",
"createDate": "Nov 14, 2017 10:20:57 PM",
"lastOpDate": "Nov 14, 2017 10:20:57 PM"
}
}
Name | Type | Description | Starting Version |
---|---|---|---|
error | ErrorCode | The error code. If not null, the operation fails, or vice versa. For more information, see error. | 3.9.0 |
inventory | SharedBlockGroupPrimaryStorageInventory | See inventory. | 3.9.0 |
#error
Name | Type | Description | Starting Version |
---|---|---|---|
code | String | The error code, which is a numbered or alphanumeric code that specifies an error. For example, SYS.1000, HOST.1001. | 3.9.0 |
description | String | The brief description of the error. | 3.9.0 |
details | String | The details about the error. | 3.9.0 |
elaboration | String | The reserved field. Default value: null. | 3.9.0 |
opaque | LinkedHashMap | The reserved field. Default value: null. | 3.9.0 |
cause | ErrorCode | The root error, which is the associated root cause of the current error. If no root error exists, this parameter is null. | 3.9.0 |
#inventory
Name | Type | Description | Starting Version |
---|---|---|---|
uuid | String | The resource UUID. | 3.9.0 |
zoneUuid | String | The zone UUID. | 3.9.0 |
name | String | The resource name. | 3.9.0 |
url | String | The reserved field. | 3.9.0 |
description | String | The detailed description of the resource. | 3.9.0 |
totalCapacity | Long | The total capacity. | 3.9.0 |
availableCapacity | Long | The available capacity. | 3.9.0 |
totalPhysicalCapacity | Long | The total physical capacity. | 3.9.0 |
availablePhysicalCapacity | Long | The available physical capacity. | 3.9.0 |
systemUsedCapacity | Long | The system used capacity. | 3.9.0 |
type | String | The type of the primary storage. | 3.9.0 |
state | String | The state. | 3.9.0 |
status | String | The status. | 3.9.0 |
mountPath | String | The reserved field. | 3.9.0 |
createDate | Timestamp | The creation date. | 3.9.0 |
lastOpDate | Timestamp | The last operation date. | 3.9.0 |
attachedClusterUuids | List | The attached clusters. | 3.9.0 |
sharedBlocks | List | See sharedBlocks. | 3.9.0 |
sharedBlockGroupType | SharedBlockGroupType | See sharedBlockGroupType. | 3.9.0 |
#sharedBlocks
Name | Type | Description | Starting Version |
---|---|---|---|
uuid | String | The resource UUID. | 3.9.0 |
sharedBlockGroupUuid | String | 3.9.0 | |
diskUuid | String | 3.9.0 | |
name | String | The resource name. | 3.9.0 |
description | String | The detailed description of the resource. | 3.9.0 |
createDate | Timestamp | The creation date. | 3.9.0 |
lastOpDate | Timestamp | The last operation date. | 3.9.0 |
type | SharedBlockType | See type. | 3.9.0 |
state | SharedBlockState | See state. | 3.9.0 |
status | SharedBlockStatus | See status. | 3.9.0 |
#type
Name | Type | Description | Starting Version |
---|---|---|---|
LvmLogicalVolumeBasic | SharedBlockType | 3.9.0 |
#state
Name | Type | Description | Starting Version |
---|---|---|---|
Enabled | SharedBlockState | 3.9.0 | |
Disabled | SharedBlockState | 3.9.0 | |
Maintenance | SharedBlockState | 3.9.0 | |
Deleting | SharedBlockState | 3.9.0 |
#status
Name | Type | Description | Starting Version |
---|---|---|---|
Connecting | SharedBlockStatus | 3.9.0 | |
Connected | SharedBlockStatus | 3.9.0 | |
Disconnected | SharedBlockStatus | 3.9.0 |
#sharedBlockGroupType
Name | Type | Description | Starting Version |
---|---|---|---|
LvmVolumeGroupBasic | SharedBlockGroupType | 3.9.0 |
SDK Sample
Java
SDK
UpdateSharedBlockDiskUuidAction action = new UpdateSharedBlockDiskUuidAction();
action.uuid = "a54e93ec15fb3002a5e3b26367b87965";
action.sharedBlockGroupUuid = "6a95724b40cb36199eecf1c048c1d614";
action.diskUuid = "2f7f9667fc2230d8b15790a3e95bf7e3";
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
UpdateSharedBlockDiskUuidAction.Result res = action.call();
Python
SDK
UpdateSharedBlockDiskUuidAction action = UpdateSharedBlockDiskUuidAction()
action.uuid = "a54e93ec15fb3002a5e3b26367b87965"
action.sharedBlockGroupUuid = "6a95724b40cb36199eecf1c048c1d614"
action.diskUuid = "2f7f9667fc2230d8b15790a3e95bf7e3"
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
UpdateSharedBlockDiskUuidAction.Result res = action.call()