Add Distributed Storage Pool

POST/zstack/v1/primary-storage/ceph/{primaryStorageUuid}/pools

Headers

Authorization: OAuth the-session-uuid

Body

{
  "params": {
    "poolName": "highPerformance",
    "aliasName": "alias pool name",
    "description": "for high performance data volumes",
    "isCreate": true
    "type": "ROOT
  },
  "systemTags": [],
  "userTags": []
}

In the example above, systemTags and userTags fields can be omitted. They are listed to indicate that the body can contain these two fields.

Curl Examples

curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X POST -d '{"params":{"poolName":"highPerformance","aliasName":"alias pool name","description":"for high performance data volumes","isCreate":true,"type":"Root"}}' http://localhost:8080/zstack/v1/primary-storage/ceph/fe5adfa6042b33cd8ee7b5bcd994245f/pools

Parameter List

NameTypeLocationDescriptionAllowed ValuesStarting Version
primaryStorageUuidStringurlPrimary Storage UUID 0.6
poolNameStringbody (nested in params structure)  0.6
aliasName (optional)Stringbody (nested in params structure)  0.6
description (optional)Stringbody (nested in params structure)Resource description 0.6
isCreate (optional)booleanbody (nested in params structure)  0.6
typeStringbody (nested in params structure)Storage pool type 3.1.1
resourceUuid (optional)Stringbody (nested in params structure)  0.6
systemTags (optional)Listbody  0.6
userTags (optional)Listbody  0.6

API Response

Response Example

{
  "inventory": {
    "uuid": "97ac9dc5fc223f80918747a8a398478b",
    "primaryStorageUuid": "82b127a3f6cc3ec7bd7ff01069310099",
    "poolName": "pool name",
    "aliasName": "alias name",
    "description": "description",
    "createDate": "Nov 14, 2017 10:20:57 PM",
    "lastOpDate": "Nov 14, 2017 10:20:57 PM",
    "type": "Data"
  }
}
NameTypeDescriptionStarting Version
successboolean 0.6
errorErrorCodeFor details, see error0.6
inventoryCephPrimaryStoragePoolInventoryFor details, see inventory0.6

error

NameTypeDescriptionStarting Version
codeStringError code number, globally unique identifier for the error, such as SYS.1000, HOST.10010.6
descriptionStringBrief description of the error0.6
detailsStringDetailed error information0.6
elaborationStringReserved field, defaults to null0.6
opaqueLinkedHashMapReserved field, defaults to null0.6
causeErrorCodeRoot cause. The source error that triggered the current error. If there is no original error, this field is null0.6

inventory

Name

Type

Description

Starting Version

uuid

String

Resource UUID, uniquely identifies the resource

0.6

primaryStorageUuid

String

Primary Storage UUID

0.6

poolName

String

 

0.6

aliasName

String

 

0.6

description

String

Resource description

0.6

createDate

Timestamp

Creation time

0.6

lastOpDate

Timestamp

Last modification time

0.6

type

String

 

0.6

availableCapacity

Long

 

2.3.2

usedCapacity

Long

 

2.3.2

replicatedSize

Integer

 

2.3.2

SDK Examples

Java SDK

AddCephPrimaryStoragePoolAction action = new AddCephPrimaryStoragePoolAction();
action.primaryStorageUuid = "fe5adfa6042b33cd8ee7b5bcd994245f";
action.poolName = "highPerformance";
action.aliasName = "alias pool name";
action.description = "for high performance data volumes";
action.isCreate = true;
action.type = "Root"
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
AddCephPrimaryStoragePoolAction.Result res = action.call();

Python SDK

AddCephPrimaryStoragePoolAction action = AddCephPrimaryStoragePoolAction()
action.primaryStorageUuid = "fe5adfa6042b33cd8ee7b5bcd994245f"
action.poolName = "highPerformance"
action.aliasName = "alias pool name"
action.type = "Root"
action.description = "for high performance data volumes"
action.isCreate = true
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
AddCephPrimaryStoragePoolAction.Result res = action.call()