Query SAN Storage

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.

API Response

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"
    }
  ]
}
NameTypeDescriptionStarting Version
errorErrorCodeError code. If not null, the operation failed. This field is null when the operation succeeds. For details, see error2.3.2
inventoriesListFor details, see inventories2.3.2

error

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

inventories

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

sharedBlocks

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

type

NameTypeDescriptionStarting Version
nameStringResource name2.3.2
ordinalint 2.3.2

state

NameTypeDescriptionStarting Version
nameStringResource name2.3.2
ordinalint 2.3.2

status

NameTypeDescriptionStarting Version
nameStringResource name2.3.2
ordinalint 2.3.2

sharedBlockGroupType

NameTypeDescriptionStarting Version
nameStringResource name2.3.2
ordinalint 2.3.2

SDK Examples

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