Attach NVMe Server To Cluster

POST/zstack/v1/clusters/{clusterUuid}/storage-devices/nvme/servers/{uuid}

Headers

Authorization: OAuth the-session-uuid

Body

{
  "params": {},
  "systemTags": [],
  "userTags": []
}

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

Curl Example

curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X POST -d '{"params":{}}' \
http://localhost:8080/zstack/v1/clusters/1f8daabbcca53e30bde1f6511f266b53/storage-devices/nvme/servers/28aca7875015311d814e12bb7d03dbab

Parameter List

NameTypeLocationDescriptionAllowed ValuesStarting Version
uuidStringurlResource UUID, uniquely identifies the resource 4.7.21
clusterUuidStringurlCluster UUID 4.7.21
systemTags (Optional)ListbodySystem Tag 4.7.21
userTags (Optional)ListbodyUser Tag 4.7.21

API Response

Response Example

{
  "inventory": {
    "uuid": "cdde290bd48134bf877336209102016e",
    "name": "nvme-server-10.0.0.201",
    "ip": "10.0.0.201",
    "port": 4420,
    "state": "Enabled",
    "nvmeTargets": [
      {
        "uuid": "2bbb184e884d356badc749a5c0710e39",
        "nqn": "nqn.2014-08.org.nvmexpress.example1",
        "state": "Enabled",
        "nvmeLuns": [
          {
            "nvmeTargetUuid": "2bbb184e884d356badc749a5c0710e39",
            "nvmeLunHostRefs": [],
            "uuid": "bc5cb990bd6032c4846069cb01b32e4b",
            "wwid": "36b083fe000daf018000015505abbe00a",
            "vendor": "DELL",
            "model": "MD32xx",
            "wwn": "0x6b083fe000daf018",
            "serial": "6b083fe000daf018000015505abbe00a",
            "type": "disk",
            "hctl": "6:0:1:1",
            "path": "uuid.a5ab00e7-3bfe-4d3d-bc57-bb4032e04951",
            "size": 30003188203520
          }
        ],
        "createDate": "Nov 14, 2017 2:20:57 PM",
        "lastOpDate": "Nov 14, 2017 2:20:57 PM"
      }
    ],
    "nvmeClusterRefs": [
      {
        "id": 1,
        "nvmeServerUuid": "cdde290bd48134bf877336209102016e",
        "clusterUuid": "c471747cf3a33fbc8d2202879b407611",
        "createDate": "Nov 14, 2017 2:20:57 PM",
        "lastOpDate": "Nov 14, 2017 2:20:57 PM"
      }
    ],
    "createDate": "Nov 14, 2017 2:20:57 PM",
    "lastOpDate": "Nov 14, 2017 2:20:57 PM"
  }
}
NameTypeDescriptionStarting Version
successboolean 4.7.21
inventoryNvmeServerInventoryFor details, see inventory4.7.21
errorErrorCodeError code. If not null, the operation failed. If null, the operation succeeded. For details, see error4.7.21

inventory

NameTypeDescriptionStarting Version
uuidStringResource UUID, uniquely identifies the resource4.7.21
nameStringResource name4.7.21
ipString 4.7.21
portInteger 4.7.21
stateString 4.7.21
transportString 4.7.21
createDateTimestampCreation time4.7.21
lastOpDateTimestampLast modification time4.7.21
nvmeTargetsListFor details, see nvmeTargets4.7.21
nvmeClusterRefsListFor details, see nvmeClusterRefs4.7.21

nvmeTargets

NameTypeDescriptionStarting Version
uuidStringResource UUID, uniquely identifies the resource4.6.21
nameStringResource name4.6.21
nqnStringNVMe Qualified Name4.6.21
nvmeServerUuidStringNVMe server UUID4.7.21
stateStringState4.6.21
createDateTimestampCreation time4.6.21
lastOpDateTimestampLast modification time4.6.21
nvmeLunsListFor details, see nvmeLuns4.6.21

nvmeLuns

NameTypeDescriptionStarting Version
nvmeTargetUuidStringNVMe device UUID4.6.21
nameStringResource name4.6.21
uuidStringResource UUID, uniquely identifies the resource4.6.21
wwidStringGlobal unique identifier4.6.21
vendorStringVendor4.6.21
modelStringModel4.6.21
wwnString 4.6.21
serialStringSerial number4.6.21
typeStringType4.6.21
hctlString 4.6.21
pathStringPath4.6.21
stateStringState4.6.21
sizeLongSize4.6.21
multipathDeviceUuidStringMultipath device UUID4.6.21
sourceStringDisk source, NVMe4.6.21
createDateTimestampCreation time4.6.21
lastOpDateTimestampLast modification time4.6.21
nvmeLunHostRefsListFor details, see nvmeLunHostRefs4.6.21

nvmeLunHostRefs

NameTypeDescriptionStarting Version
nvmeLunUuidStringNVMe disk UUID4.6.21
hostUuidStringHost UUID4.6.21
pathStringDisk path4.6.21
hctlStringDisk HCTL4.6.21
createDateTimestampCreation time4.6.21
lastOpDateTimestampLast modification time4.6.21

nvmeClusterRefs

NameTypeDescriptionStarting Version
nvmeServerUuidString 4.7.21
clusterUuidStringCluster UUID4.7.21
createDateTimestampCreation time4.7.21
lastOpDateTimestampLast modification time4.7.21

error

NameTypeDescriptionStarting Version
codeStringError code number, globally unique identifier of the error, for example SYS.1000, HOST.10010.6
descriptionStringBrief summary 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

SDK Examples

Java SDK

AttachNvmeServerToClusterAction action = new AttachNvmeServerToClusterAction();
action.uuid = "28aca7875015311d814e12bb7d03dbab";
action.clusterUuid = "1f8daabbcca53e30bde1f6511f266b53";
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
AttachNvmeServerToClusterAction.Result res = action.call();

Python SDK

AttachNvmeServerToClusterAction action = AttachNvmeServerToClusterAction()
action.uuid = "28aca7875015311d814e12bb7d03dbab"
action.clusterUuid = "1f8daabbcca53e30bde1f6511f266b53"
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
AttachNvmeServerToClusterAction.Result res = action.call()