QuerySharedBlockGroupPrimaryStorage
API Request
URLs
GET zstack/v1/primary-storage/sharedblockgroup
GET zstack/v1/primary-storage/sharedblockgroup/{uuid}
Headers
Authorization: OAuth the-session-uuid
Curl
Sample
curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X GET http://localhost:8080/zstack/v1/primary-storage/sharedblockgroup
curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X GET http://localhost:8080/zstack/v1/primary-storage/sharedblockgroup/ab5776cffa893955a533f7e89cdaf025
Queryable Fields
You can check all queryable fields and resource names that can be queried across tables by using zstack-cli, entering QuerySharedBlock, and pressing the Tab key.
API Response
Sample
Response
{
"inventories": [
{
"sharedBlocks": [
{
"uuid": "2bf68818dc2c3ffbb9c9f283c8a1f524",
"sharedBlockGroupUuid": "23ef265b88143074b88ad450afe5cbac",
"type": "LvmLogicalVolumeBasic",
"diskUuid": "b4d9459d02533fdeb4dee8b8bf943bed",
"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": "23ef265b88143074b88ad450afe5cbac",
"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. | 2.3.2 |
inventories | List | See inventories. | 2.3.2 |
#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. | 2.3.2 |
description | String | The brief description of the error. | 2.3.2 |
details | String | The details about the error. | 2.3.2 |
elaboration | String | The reserved field. Default value: null. | 2.3.2 |
opaque | LinkedHashMap | The reserved field. Default value: null. | 2.3.2 |
cause | ErrorCode | The root error, which is the associated root cause of the current error. If no root error exists, this parameter is null. | 2.3.2 |
#inventories
Name | Type | Description | Starting Version |
---|---|---|---|
uuid | String | The resource UUID. | 2.3.2 |
zoneUuid | String | The zone UUID. | 2.3.2 |
name | String | The resource name. | 2.3.2 |
url | String | The reserved field. | 2.3.2 |
description | String | The detailed description of the resource. | 2.3.2 |
totalCapacity | Long | The total capacity. | 2.3.2 |
availableCapacity | Long | The available capacity. | 2.3.2 |
totalPhysicalCapacity | Long | The total physical capacity. | 2.3.2 |
availablePhysicalCapacity | Long | The available physical capacity. | 2.3.2 |
systemUsedCapacity | Long | The system used capacity. | 2.3.2 |
type | String | The type of the primary storage. | 2.3.2 |
state | String | The state. | 2.3.2 |
status | String | The status. | 2.3.2 |
mountPath | String | The reserved field. | 2.3.2 |
createDate | Timestamp | The creation date. | 2.3.2 |
lastOpDate | Timestamp | The last operation date. | 2.3.2 |
attachedClusterUuids | List | The attached cluster UUID list. | 2.3.2 |
sharedBlocks | List | See sharedBlocks. | 2.3.2 |
sharedBlockGroupType | SharedBlockGroupType | See sharedBlockGroupType. | 2.3.2 |
#sharedBlocks
Name | Type | Description | Starting Version |
---|---|---|---|
uuid | String | The resource UUID. | 2.3.2 |
sharedBlockGroupUuid | String | The LUN group UUID. | 2.3.2 |
diskUuid | String | The unique identifier of the disk. For example, UUID, WWN, and WWID. | 2.3.2 |
name | String | The resource name. | 2.3.2 |
description | String | The detailed description of the resource. | 2.3.2 |
createDate | Timestamp | The creation date. | 2.3.2 |
lastOpDate | Timestamp | The last operation date. | 2.3.2 |
type | SharedBlockType | See type. | 2.3.2 |
state | SharedBlockState | See state. | 2.3.2 |
status | SharedBlockStatus | See status. | 2.3.2 |
#type
Name | Type | Description | Starting Version |
---|---|---|---|
name | String | The resource name. | 2.3.2 |
ordinal | int | 2.3.2 |
#state
Name | Type | Description | Starting Version |
---|---|---|---|
name | String | The resource name. | 2.3.2 |
ordinal | int | 2.3.2 |
#status
Name | Type | Description | Starting Version |
---|---|---|---|
name | String | The resource name. | 2.3.2 |
ordinal | int | 2.3.2 |
#sharedBlockGroupType
Name | Type | Description | Starting Version |
---|---|---|---|
name | String | The resource name. | 2.3.2 |
ordinal | int | 2.3.2 |
SDK Sample
Java
SDK
QuerySharedBlockGroupPrimaryStorageAction action = new QuerySharedBlockGroupPrimaryStorageAction();
action.conditions = asList();
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
QuerySharedBlockGroupPrimaryStorageAction.Result res = action.call();
Python
SDK
QuerySharedBlockGroupPrimaryStorageAction action = QuerySharedBlockGroupPrimaryStorageAction()
action.conditions = []
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
QuerySharedBlockGroupPrimaryStorageAction.Result res = action.call()