Refresh NVMe Target

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

Headers

Authorization: OAuth the-session-uuid

Body

{
  "params": {
    "zoneUuid": "7a7b52cf91933070af3c8273f30ef458"
  },
  "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":{"zoneUuid":"7a7b52cf91933070af3c8273f30ef458"}}' \
http://localhost:8080/zstack/v1/storage-devices/nvme/controllers

Parameter List

NameTypeLocationDescriptionAllowed ValuesStarting Version
zoneUuidStringbody (included in params structure) Data Center UUID4.6.21
nvmeLunUuids (Optional)Listbody (included in params structure) NVMe disk UUID4.6.21
systemTags (Optional)Listbody System Tag4.6.21
userTags (Optional)Listbody User Tag4.6.21

API Response

Response Example

{
  "inventories": [
    {
      "uuid": "88ed12f1c3d7329c9b3fd00a87ce999e",
      "state": "Enabled",
      "nvmeLuns": [
        {
          "nvmeTargetUuid": "88ed12f1c3d7329c9b3fd00a87ce999e",
          "nvmeLunHostRefs": [
            {
              "id": 1,
              "nvmeLunUuid": "3adbd21bfa483cb2bc48b91c1438c788",
              "hostUuid": "8c26dfd50d963292b8a51ddc0f9957f5",
              "createDate": "Nov 14, 2017 10:20:57 PM",
              "lastOpDate": "Nov 14, 2017 10:20:57 PM"
            }
          ],
          "name": "nvme-lun-36b083fe000daf018000022905ba35d8f",
          "uuid": "3adbd21bfa483cb2bc48b91c1438c788",
          "wwid": "uuid.48daeab7-7f15-405e-8481-7152cb9b0aca",
          "wwn": "uuid.48daeab7-7f15-405e-8481-7152cb9b0aca",
          "serial": "3d87eca1686c1782",
          "type": "disk",
          "path": "nvme-uuid.48daeab7-7f15-405e-8481-7152cb9b0aca ",
          "size": 5497558138880
        }
      ],
      "createDate": "Nov 14, 2017 10:20:57 PM",
      "lastOpDate": "Nov 14, 2017 10:20:57 PM"
    }
  ]
}
NameTypeDescriptionStarting Version
successboolean 4.6.21
errorErrorCodeError code. If not null, the operation failed. If null, the operation succeeded. For details, see error4.6.21
inventoriesListFor details, see inventories4.6.21

error

NameTypeDescriptionStarting Version
codeStringError code number, globally unique identifier of the error, for example SYS.1000, HOST.10014.6.21
descriptionStringBrief summary of the error4.6.21
detailsStringDetailed error information4.6.21
elaborationStringReserved field, defaults to null4.6.21
opaqueLinkedHashMapReserved field, defaults to null4.6.21
causeErrorCodeRoot cause: the source error that triggered the current error. If there is no original error, this field is null4.6.21

inventories

NameTypeDescriptionStarting Version
uuidStringResource UUID, uniquely identifies the resource4.6.21
nameStringResource name4.6.21
nqnStringNVMe Qualified Name4.6.21
stateStringState4.6.21
createDateTimestampCreation time4.6.21
lastOpDateTimestampLast modification time4.6.21
nvmeLunsListFor details, see nvmeLuns.4.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 nvmeLunHostRefs.4.6.21

nvmeLunHostRefs

NameTypeDescriptionStarting Version
nvmeLunUuidListNVMe 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

SDK Examples

Java SDK

QueryNvmeTargetAction action = new QueryNvmeTargetAction();
action.conditions = asList();
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
QueryNvmeTargetAction.Result res = action.call();

Python SDK

QueryNvmeTargetAction action = QueryNvmeTargetAction()
action.conditions = []
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
QueryNvmeTargetAction.Result res = action.call()