Query Distributed Storage OSD Group

GET/zstack/v1/primary-storage/ceph/osdgroups
GET/zstack/v1/primary-storage/ceph/osdgroups/{uuid}

Headers

Authorization: OAuth the-session-uuid

Curl Examples

curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X GET http://localhost:8080/zstack/v1/primary-storage/ceph/osdgroups\
	q=uuid=b2c53eee77bc3bfea5374d417babff07
curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X GET http://localhost:8080/zstack/v1/primary-storage/ceph/osdgroups/9ee0973b0e79393e9f7d03a6e3a6f645

Queryable Fields

Run the CLI command tool, enter QueryCephOsdGroup and press Tab to view all queryable fields and resource names that support cross-table queries.

API Response

Response Example

{
  "inventories": [
    {
      "osds": "osd.1",
      "availableCapacity": 0.0,
      "availablePhysicalCapacity": 1024.0,
      "totalPhysicalCapacity": 1024.0,
      "createDate": "Nov 14, 2017 10:20:57 PM",
      "lastOpDate": "Nov 14, 2017 10:20:57 PM"
    }
  ]
}
NameTypeDescriptionStarting Version
successboolean 4.5.0
inventoriesListFor details, see inventories4.5.0
errorErrorCodeError code. If not null, indicates the operation failed. This field is null when the operation succeeds. For details, see error4.5.0

inventories

NameTypeDescriptionStarting Version
primaryStorageUuidStringPrimary Storage UUID4.5.0
osdsString 4.5.0
availableCapacitylong 4.5.0
availablePhysicalCapacitylong 4.5.0
totalPhysicalCapacitylong 4.5.0
createDateTimestampCreation time4.5.0
lastOpDateTimestampLast modification time4.5.0
uuidStringResource UUID, uniquely identifies the resource4.5.0

error

NameTypeDescriptionStarting Version
codeStringError code number, globally unique identifier for the error, such as SYS.1000, HOST.10014.5.0
descriptionStringBrief description of the error4.5.0
detailsStringDetailed error information4.5
elaborationStringReserved field, defaults to null4.5.0
opaqueLinkedHashMapReserved field, defaults to null4.5.0
causeErrorCodeRoot cause. The source error that triggered the current error. If there is no original error, this field is null4.5.0

SDK Examples

Java SDK

QueryCephOsdGroupAction action = new QueryCephOsdGroupAction();
action.conditions = asList("uuid=3e479fc0962c3561a854d868fce5ab3e");
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
QueryCephOsdGroupAction.Result res = action.call();

Python SDK

QueryCephOsdGroupAction action = QueryCephOsdGroupAction()
action.conditions = ["uuid=45906504e89335809e54a79897eb1357"]
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
QueryCephOsdGroupAction.Result res = action.call()