Add NVMe Server

POST/zstack/v1/storage-devices/nvme/servers

Headers

Authorization: OAuth the-session-uuid

Body

{
  "params": {
    "ip": "10.0.0.201",
    "port": 4420
  },
  "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":{"ip":"10.0.0.201","port":4420}}' \
http://localhost:8080/zstack/v1/storage-devices/nvme/servers

Parameter List

NameTypeLocationDescriptionAllowed ValuesStarting Version
name (Optional)Stringbody (included in params structure)Name 4.7.21
ipStringbody (included in params structure)IP address 4.7.21
port (Optional)Integerbody (included in params structure)Port 4.7.21
transportStringbody (included in params structure)Target transport type 4.7.21
resourceUuid (Optional)Stringbody (included in params structure)Resource UUID 4.7.21
tagUuids (Optional)Listbody (included in params structure)Tag UUID list 4.7.21
systemTags (Optional)ListbodySystem Tag 4.7.21
userTags (Optional)ListbodyUser Tag 4.7.21

API Response

Response Example

{
  "inventory": {
    "uuid": "13b261814cc036629e76e2e218d3c764",
    "name": "nvme-server-10.0.0.201",
    "ip": "10.0.0.201",
    "port": 3260,
    "state": "Enabled",
    "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

AddNvmeServerAction action = new AddNvmeServerAction();
action.ip = "10.0.0.201";
action.port = 4420;
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
AddNvmeServerAction.Result res = action.call();

Python SDK

AddNvmeServerAction action = AddNvmeServerAction()
action.ip = "10.0.0.201"
action.port = 4420
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
AddNvmeServerAction.Result res = action.call()