GET/zstack/v1/primary-storage/sharedblockgroup GET/zstack/v1/primary-storage/sharedblockgroup/{uuid}
Headers
Authorization: OAuth the-session-uuid
Curl Example
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
Run the CLI command, enter QuerySharedBlock and press Tab to view all queryable fields and resources that support cross-table queries.
Response Example
{
"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": 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"
}
]
}
| Name | Type | Description | Starting Version |
|---|
| error | ErrorCode | Error code. If not null, the operation failed. This field is null when the operation succeeds. For details, see error | 2.3.2 |
| inventories | List | For details, see inventories | 2.3.2 |
| Name | Type | Description | Starting Version |
|---|
| code | String | Error code number, a globally unique identifier for the error, e.g. SYS.1000, HOST.1001 | 2.3.2 |
| description | String | Brief description of the error | 2.3.2 |
| details | String | Detailed error information | 2.3.2 |
| elaboration | String | Reserved field, defaults to null | 2.3.2 |
| opaque | LinkedHashMap | Reserved field, defaults to null | 2.3.2 |
| cause | ErrorCode | Root cause: the source error that caused the current error. If there is no original error, this field is null | 2.3.2 |
| Name | Type | Description | Starting Version |
|---|
| uuid | String | Resource UUID, uniquely identifies the resource | 2.3.2 |
| zoneUuid | String | Data Center UUID | 2.3.2 |
| name | String | Resource name | 2.3.2 |
| url | String | Unused | 2.3.2 |
| description | String | Detailed description of the resource | 2.3.2 |
| totalCapacity | Long | Total capacity | 2.3.2 |
| availableCapacity | Long | Available capacity | 2.3.2 |
| totalPhysicalCapacity | Long | Total physical capacity | 2.3.2 |
| availablePhysicalCapacity | Long | Available physical capacity | 2.3.2 |
| systemUsedCapacity | Long | System used capacity | 2.3.2 |
| type | String | Data storage type | 2.3.2 |
| state | String | Enabled state | 2.3.2 |
| status | String | Connection status | 2.3.2 |
| mountPath | String | Unused | 2.3.2 |
| createDate | Timestamp | Create date | 2.3.2 |
| lastOpDate | Timestamp | Last update date | 2.3.2 |
| attachedClusterUuids | List | Attached clusters | 2.3.2 |
| sharedBlocks | List | For details, see sharedBlocks | 2.3.2 |
| sharedBlockGroupType | SharedBlockGroupType | For details, see sharedBlockGroupType | 2.3.2 |
| Name | Type | Description | Starting Version |
|---|
| uuid | String | Resource UUID, uniquely identifies the resource | 2.3.2 |
| sharedBlockGroupUuid | String | Shared block device group UUID | 2.3.2 |
| diskUuid | String | Disk unique identifier (e.g. UUID, WWN, WWID) | 2.3.2 |
| name | String | Resource name | 2.3.2 |
| description | String | Detailed description of the resource | 2.3.2 |
| createDate | Timestamp | Create date | 2.3.2 |
| lastOpDate | Timestamp | Last update date | 2.3.2 |
| type | SharedBlockType | For details, see type | 2.3.2 |
| state | SharedBlockState | For details, see state | 2.3.2 |
| status | SharedBlockStatus | For details, see status | 2.3.2 |
| Name | Type | Description | Starting Version |
|---|
| name | String | Resource name | 2.3.2 |
| ordinal | int | | 2.3.2 |
| Name | Type | Description | Starting Version |
|---|
| name | String | Resource name | 2.3.2 |
| ordinal | int | | 2.3.2 |
| Name | Type | Description | Starting Version |
|---|
| name | String | Resource name | 2.3.2 |
| ordinal | int | | 2.3.2 |
| Name | Type | Description | Starting Version |
|---|
| name | String | Resource name | 2.3.2 |
| ordinal | int | | 2.3.2 |
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()