SAN Storage Related Interfaces
AddSharedBlockGroupPrimaryStorage
API Request
POST zstack/v1/primary-storage/sharedblockgroupAuthorization: OAuth the-session-uuid{
"params": {
"diskUuids": [
"1b5682b663b937a59adb9e318cab6b05"
],
"name": "shared-block-group-1",
"type": "SharedBlock",
"zoneUuid": "eee8b39ad50b300c8935e554a967691b"
},
"systemTags": [],
"userTags": []
}
Note: 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 -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X POST -d '{"params":{"diskUuids":["1b5682b663b937a59adb9e318cab6b05"],"name":"shared-block-group-1","type":"SharedBlock","zoneUuid":"eee8b39ad50b300c8935e554a967691b"}}' http://localhost:8080/zstack/v1/primary-storage/sharedblockgroup| Name | Type | Location | Description | Allowed Values | Starting Version |
|---|---|---|---|---|---|
| diskUuids | List | body (included in the params structure) | Disk unique identifier (e.g. UUID, WWN, WWID) | 2.3.2 | |
| name | String | body (included in the params structure) | Resource name | 2.3.2 | |
| description (可选) | String | body (included in the params structure) | Detailed description of the resource | 2.3.2 | |
| type (可选) | String | body (included in the params structure) | Data storage type, which is SharedBlock | 2.3.2 | |
| url | String | body (included in the params structure) | Unused | 2.3.2 | |
| zoneUuid | String | body (included in the params structure) | Data Center UUID | 2.3.2 | |
| resourceUuid (可选) | String | body (included in the params structure) | Optional. The resource UUID. | 2.3.2 | |
| systemTags (可选) | List | body | Optional. The system tags. | 2.3.2 | |
| userTags (可选) | List | body | Optional. The user tags. | 2.3.2 |
Note:
- ZStack ZSphere When adding SAN storage, you can specify the default disk provisioning method by adding primaryStorageVolumeProvisioningStrategy option to SystemTags.
- Option format:
primaryStorageVolumeProvisioningStrategy::ThinProvisioning, primaryStorageVolumeProvisioningStrategy::ThickProvisioning - Example:
primaryStorageVolumeProvisioningStrategy::ThinProvisioning, primaryStorageVolumeProvisioningStrategy::ThickProvisioning
- Option format:
API Response
{
"inventory": {
"name": "PS1",
"url": "/Cloud_ps",
"type": "LocalStorage",
"state": "Enabled",
"status": "Connected",
"attachedClusterUuids": [
"c6e9684e8bb93a9192c946dcd0564b39"
]
}
}| Name | Type | Description | Starting Version |
|---|---|---|---|
| error | ErrorCode | Error code. If not null, the operation failed. This field is null when the operation succeeds. For details, see error | 2.3.2 |
| inventory | PrimaryStorageInventory | For details, see inventory | 2.3.2 |
| Name | Type | Description | Starting Version |
|---|---|---|---|
| code | String | Error code number, a globally unique identifier for the error, e.g. SYS.1000, HOST.1001 | 2.3.2 |
| description | String | Brief description of the error | 2.3.2 |
| details | String | Detailed error information | 2.3.2 |
| elaboration | String | Reserved field, defaults to null | 2.3.2 |
| opaque | LinkedHashMap | Reserved field, defaults to null | 2.3.2 |
| cause | ErrorCode | Root cause: the source error that caused the current error. If there is no original error, this field is null | 2.3.2 |
| Name | Type | Description | Starting Version |
|---|---|---|---|
| uuid | String | Resource UUID, uniquely identifies the resource | 2.3.2 |
| zoneUuid | String | Data Center UUID | 2.3.2 |
| name | String | Resource name | 2.3.2 |
| url | String | The URL. | 2.3.2 |
| description | String | Detailed description of the resource | 2.3.2 |
| totalCapacity | Long | The total capacity. | 2.3.2 |
| availableCapacity | Long | The available capacity. | 2.3.2 |
| totalPhysicalCapacity | Long | The total physical capacity. | 2.3.2 |
| availablePhysicalCapacity | Long | The available physical capacity. | 2.3.2 |
| systemUsedCapacity | Long | The system used capacity. | 2.3.2 |
| type | String | The resource type. | 2.3.2 |
| state | String | The resource state. | 2.3.2 |
| status | String | The resource status. | 2.3.2 |
| mountPath | String | The mount path. | 2.3.2 |
| createDate | Timestamp | Create date | 2.3.2 |
| lastOpDate | Timestamp | Last update date | 2.3.2 |
| attachedClusterUuids | List | The attached cluster UUIDs. | 2.3.2 |
SDK Examples
AddSharedBlockGroupPrimaryStorageAction action = new AddSharedBlockGroupPrimaryStorageAction();
action.diskUuids = asList("1b5682b663b937a59adb9e318cab6b05");
action.name = "shared-block-group-1";
action.type = "SharedBlock";
action.zoneUuid = "eee8b39ad50b300c8935e554a967691b";
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
AddSharedBlockGroupPrimaryStorageAction.Result res = action.call();AddSharedBlockGroupPrimaryStorageAction action = AddSharedBlockGroupPrimaryStorageAction()
action.diskUuids = [1b5682b663b937a59adb9e318cab6b05]
action.name = "shared-block-group-1"
action.type = "SharedBlock"
action.zoneUuid = "eee8b39ad50b300c8935e554a967691b"
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
AddSharedBlockGroupPrimaryStorageAction.Result res = action.call()QuerySharedBlockGroupPrimaryStorageHostRef
Query SAN storage host connection status.
API Request
GET zstack/v1/sharedblock-group/host-refs
GET zstack/v1/sharedblock-group/{primaryStorageUuid}/host-refsAuthorization: OAuth the-session-uuidcurl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X GET http://localhost:8080/zstack/v1/sharedblock-group/host-refscurl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X GET http://localhost:8080/zstack/v1/sharedblock-group/{primaryStorageUuid}/host-refsQueryable Fields
Run the CLI command, enter QuerySharedBlock and press Tab to view all queryable fields and resources that support cross-table queries.
API Response
{
"inventories": [
{
"primaryStorageUuid": "a9e96e98cc2c3a3baa23e31503fc93e6",
"hostUuid": "7c5510f255663a3cbfd53367c0172507",
"hostId": 100.0,
"status": "Connected",
"createDate": "Nov 14, 2017 10:20:57 PM",
"lastOpDate": "Nov 14, 2017 10:20:57 PM"
}
]
}| Name | Type | Description | Starting Version |
|---|---|---|---|
| error | ErrorCode | Error code. If not null, the operation failed. This field is null when the operation succeeds. For details, see error | 2.3.2 |
| inventories | List | For details, see inventories | 2.3.2 |
| Name | Type | Description | Starting Version |
|---|---|---|---|
| code | String | Error code number, a globally unique identifier for the error, e.g. SYS.1000, HOST.1001 | 2.3.2 |
| description | String | Brief description of the error | 2.3.2 |
| details | String | Detailed error information | 2.3.2 |
| elaboration | String | Reserved field, defaults to null | 2.3.2 |
| opaque | LinkedHashMap | Reserved field, defaults to null | 2.3.2 |
| cause | ErrorCode | Root cause: the source error that caused the current error. If there is no original error, this field is null | 2.3.2 |
| Name | Type | Description | Starting Version |
|---|---|---|---|
| primaryStorageUuid | String | Primary storage UUID | 2.3.2 |
| hostUuid | String | Host UUID | 2.3.2 |
| hostId | Integer | Host ID | 2.3.2 |
| createDate | Timestamp | Create date | 2.3.2 |
| lastOpDate | Timestamp | Last update date | 2.3.2 |
| status | PrimaryStorageHostStatus | For details, see status | 2.3.2 |
| Name | Type | Description | Starting Version |
|---|---|---|---|
| name | String | Resource name | 2.3.2 |
| ordinal | int | The ordinal number. | 2.3.2 |
SDK Examples
QuerySharedBlockGroupPrimaryStorageHostRefAction action = new QuerySharedBlockGroupPrimaryStorageHostRefAction();
action.conditions = asList();
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
QuerySharedBlockGroupPrimaryStorageHostRefAction.Result res = action.call();QuerySharedBlockGroupPrimaryStorageHostRefAction action = QuerySharedBlockGroupPrimaryStorageHostRefAction()
action.conditions = []
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
QuerySharedBlockGroupPrimaryStorageHostRefAction.Result res = action.call()QuerySharedBlockGroupPrimaryStorage
API Request
GET zstack/v1/primary-storage/sharedblockgroup
GET zstack/v1/primary-storage/sharedblockgroup/{uuid}Authorization: OAuth the-session-uuidcurl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X GET http://localhost:8080/zstack/v1/primary-storage/sharedblockgroupcurl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X GET http://localhost:8080/zstack/v1/primary-storage/sharedblockgroup/ab5776cffa893955a533f7e89cdaf025Queryable Fields
Run the CLI command, enter QuerySharedBlock and press Tab to view all queryable fields and resources that support cross-table queries.
API Response
{
"inventories": [
{
"sharedBlocks": [
{
"uuid": "2bf68818dc2c3ffbb9c9f283c8a1f524",
"sharedBlockGroupUuid": "23ef265b88143074b88ad450afe5cbac",
"type": "LvmLogicalVolumeBasic",
"diskUuid": "b4d9459d02533fdeb4dee8b8bf943bed",
"name": "test shared block",
"description": "description",
"state": "Enabled",
"status": "Connected",
"createDate": "Nov 14, 2017 10:20:57 PM",
"lastOpDate": "Nov 14, 2017 10:20:57 PM"
}
],
"sharedBlockGroupType": "LvmVolumeGroupBasic",
"uuid": "23ef265b88143074b88ad450afe5cbac",
"name": "shared block group primary storage",
"description": "shared block group primary storage description",
"availableCapacity": 1.073741824E9,
"availablePhysicalCapacity": 1.073741824E9,
"type": "SharedBlock",
"state": "Enabled",
"status": "Connected",
"createDate": "Nov 14, 2017 10:20:57 PM",
"lastOpDate": "Nov 14, 2017 10:20:57 PM"
}
]
}| Name | Type | Description | Starting Version |
|---|---|---|---|
| error | ErrorCode | Error code. If not null, the operation failed. This field is null when the operation succeeds. For details, see error | 2.3.2 |
| inventories | List | For details, see inventories | 2.3.2 |
| Name | Type | Description | Starting Version |
|---|---|---|---|
| code | String | Error code number, a globally unique identifier for the error, e.g. SYS.1000, HOST.1001 | 2.3.2 |
| description | String | Brief description of the error | 2.3.2 |
| details | String | Detailed error information | 2.3.2 |
| elaboration | String | Reserved field, defaults to null | 2.3.2 |
| opaque | LinkedHashMap | Reserved field, defaults to null | 2.3.2 |
| cause | ErrorCode | Root cause: the source error that caused the current error. If there is no original error, this field is null | 2.3.2 |
| Name | Type | Description | Starting Version |
|---|---|---|---|
| uuid | String | Resource UUID, uniquely identifies the resource | 2.3.2 |
| zoneUuid | String | Data Center UUID | 2.3.2 |
| name | String | Resource name | 2.3.2 |
| url | String | Unused | 2.3.2 |
| description | String | Detailed description of the resource | 2.3.2 |
| totalCapacity | Long | Total capacity | 2.3.2 |
| availableCapacity | Long | Available capacity | 2.3.2 |
| totalPhysicalCapacity | Long | Total physical capacity | 2.3.2 |
| availablePhysicalCapacity | Long | Available physical capacity | 2.3.2 |
| systemUsedCapacity | Long | System used capacity | 2.3.2 |
| type | String | Data storage type | 2.3.2 |
| state | String | Enabled state | 2.3.2 |
| status | String | Connection status | 2.3.2 |
| mountPath | String | Unused | 2.3.2 |
| createDate | Timestamp | Create date | 2.3.2 |
| lastOpDate | Timestamp | Last update date | 2.3.2 |
| attachedClusterUuids | List | Attached clusters | 2.3.2 |
| sharedBlocks | List | For details, see sharedBlocks | 2.3.2 |
| sharedBlockGroupType | SharedBlockGroupType | For details, see sharedBlockGroupType | 2.3.2 |
| Name | Type | Description | Starting Version |
|---|---|---|---|
| uuid | String | Resource UUID, uniquely identifies the resource | 2.3.2 |
| sharedBlockGroupUuid | String | Shared block device group UUID | 2.3.2 |
| diskUuid | String | Disk unique identifier (e.g. UUID, WWN, WWID) | 2.3.2 |
| name | String | Resource name | 2.3.2 |
| description | String | Detailed description of the resource | 2.3.2 |
| createDate | Timestamp | Create date | 2.3.2 |
| lastOpDate | Timestamp | Last update date | 2.3.2 |
| type | SharedBlockType | For details, see type | 2.3.2 |
| state | SharedBlockState | For details, see state | 2.3.2 |
| status | SharedBlockStatus | For details, see status | 2.3.2 |
| Name | Type | Description | Starting Version |
|---|---|---|---|
| name | String | Resource name | 2.3.2 |
| ordinal | int | The ordinal number. | 2.3.2 |
| Name | Type | Description | Starting Version |
|---|---|---|---|
| name | String | Resource name | 2.3.2 |
| ordinal | int | The ordinal number. | 2.3.2 |
| Name | Type | Description | Starting Version |
|---|---|---|---|
| name | String | Resource name | 2.3.2 |
| ordinal | int | The ordinal number. | 2.3.2 |
| Name | Type | Description | Starting Version |
|---|---|---|---|
| name | String | Resource name | 2.3.2 |
| ordinal | int | The ordinal number. | 2.3.2 |
SDK Examples
QuerySharedBlockGroupPrimaryStorageAction action = new QuerySharedBlockGroupPrimaryStorageAction();
action.conditions = asList();
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
QuerySharedBlockGroupPrimaryStorageAction.Result res = action.call();QuerySharedBlockGroupPrimaryStorageAction action = QuerySharedBlockGroupPrimaryStorageAction()
action.conditions = []
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
QuerySharedBlockGroupPrimaryStorageAction.Result res = action.call()AddSharedBlockToSharedBlockGroup
Add shared block device to SAN storage.
API Request
POST zstack/v1/primary-storage/sharedblockgroup/{uuid}/sharedblocksAuthorization: OAuth the-session-uuid{
"params": {
"diskUuid": "3bc916e4700e36c9ad9575fcf47222ab"
},
"systemTags": [],
"userTags": []
}
Note: 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 -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X POST -d '{"params":{"diskUuid":"3bc916e4700e36c9ad9575fcf47222ab"}}' http://localhost:8080/zstack/v1/primary-storage/sharedblockgroup/506367e0d66d3fdb92eda345ed347c21/sharedblocks| Name | Type | Location | Description | Allowed Values | Starting Version |
|---|---|---|---|---|---|
| diskUuid | String | body (included in the params structure) | Disk unique identifier (e.g. UUID, WWN, WWID) | 2.3.2 | |
| uuid | String | url | Primary storage UUID | 2.3.2 | |
| systemTags (optional) | List | body | Optional. The system tags. | 2.3.2 | |
| userTags (optional) | List | body | Optional. The user tags. | 2.3.2 |
API Response
{
"inventory": {
"sharedBlocks": [
{
"uuid": "5bc4ef2f6f703bfd9aef732be038103d",
"sharedBlockGroupUuid": "08f3dd28f1c433fe871e3fe760476981",
"type": "LvmLogicalVolumeBasic",
"diskUuid": "b9a89d214e3b37eda7a1aa948c59db13",
"name": "test shared block",
"description": "description",
"state": "Enabled",
"status": "Connected",
"createDate": "Nov 14, 2017 10:20:57 PM",
"lastOpDate": "Nov 14, 2017 10:20:57 PM"
}
],
"sharedBlockGroupType": "LvmVolumeGroupBasic",
"uuid": "08f3dd28f1c433fe871e3fe760476981",
"name": "shared block group primary storage",
"description": "shared block group primary storage description",
"availableCapacity": 1.073741824E9,
"availablePhysicalCapacity": 1.073741824E9,
"type": "SharedBlock",
"state": "Enabled",
"status": "Connected",
"createDate": "Nov 14, 2017 10:20:57 PM",
"lastOpDate": "Nov 14, 2017 10:20:57 PM"
}
}| Name | Type | Description | Starting Version |
|---|---|---|---|
| error | ErrorCode | Error code. If not null, the operation failed. This field is null when the operation succeeds. For details, see error | 2.3.2 |
| inventory | SharedBlockGroupPrimaryStorageInventory | For details, see inventory | 2.3.2 |
| Name | Type | Description | Starting Version |
|---|---|---|---|
| code | String | Error code number, a globally unique identifier for the error, e.g. SYS.1000, HOST.1001 | 2.3.2 |
| description | String | Brief description of the error | 2.3.2 |
| details | String | Detailed error information | 2.3.2 |
| elaboration | String | Reserved field, defaults to null | 2.3.2 |
| opaque | LinkedHashMap | Reserved field, defaults to null | 2.3.2 |
| cause | ErrorCode | Root cause: the source error that caused the current error. If there is no original error, this field is null | 2.3.2 |
| Name | Type | Description | Starting Version |
|---|---|---|---|
| uuid | String | Resource UUID, uniquely identifies the resource | 2.3.2 |
| zoneUuid | String | Data Center UUID | 2.3.2 |
| name | String | Resource name | 2.3.2 |
| url | String | Unused | 2.3.2 |
| description | String | Detailed description of the resource | 2.3.2 |
| totalCapacity | Long | Total capacity | 2.3.2 |
| availableCapacity | Long | Available capacity | 2.3.2 |
| totalPhysicalCapacity | Long | Total physical capacity | 2.3.2 |
| availablePhysicalCapacity | Long | Available physical capacity | 2.3.2 |
| systemUsedCapacity | Long | System used capacity | 2.3.2 |
| type | String | Data storage type | 2.3.2 |
| state | String | Enabled state | 2.3.2 |
| status | String | Connection status | 2.3.2 |
| mountPath | String | Unused | 2.3.2 |
| createDate | Timestamp | Create date | 2.3.2 |
| lastOpDate | Timestamp | Last update date | 2.3.2 |
| attachedClusterUuids | List | Attached clusters | 2.3.2 |
| sharedBlocks | List | For details, see sharedBlocks | 2.3.2 |
| sharedBlockGroupType | SharedBlockGroupType | For details, see sharedBlockGroupType | 2.3.2 |
| Name | Type | Description | Starting Version |
|---|---|---|---|
| uuid | String | Resource UUID, uniquely identifies the resource | 2.3.2 |
| sharedBlockGroupUuid | String | Shared block device group UUID | 2.3.2 |
| diskUuid | String | Disk unique identifier (e.g. UUID, WWN, WWID) | 2.3.2 |
| name | String | Resource name | 2.3.2 |
| description | String | Detailed description of the resource | 2.3.2 |
| createDate | Timestamp | Create date | 2.3.2 |
| lastOpDate | Timestamp | Last update date | 2.3.2 |
| type | SharedBlockType | For details, see type | 2.3.2 |
| state | SharedBlockState | For details, see state | 2.3.2 |
| status | SharedBlockStatus | For details, see status | 2.3.2 |
| Name | Type | Description | Starting Version |
|---|---|---|---|
| name | String | Resource name | 2.3.2 |
| ordinal | int | The ordinal number. | 2.3.2 |
| Name | Type | Description | Starting Version |
|---|---|---|---|
| name | String | Resource name | 2.3.2 |
| ordinal | int | The ordinal number. | 2.3.2 |
| Name | Type | Description | Starting Version |
|---|---|---|---|
| name | String | Resource name | 2.3.2 |
| ordinal | int | The ordinal number. | 2.3.2 |
| Name | Type | Description | Starting Version |
|---|---|---|---|
| name | String | Resource name | 2.3.2 |
| ordinal | int | The ordinal number. | 2.3.2 |
SDK Examples
AddSharedBlockToSharedBlockGroupAction action = new AddSharedBlockToSharedBlockGroupAction();
action.diskUuid = "3bc916e4700e36c9ad9575fcf47222ab";
action.uuid = "506367e0d66d3fdb92eda345ed347c21";
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
AddSharedBlockToSharedBlockGroupAction.Result res = action.call();AddSharedBlockToSharedBlockGroupAction action = AddSharedBlockToSharedBlockGroupAction()
action.diskUuid = "3bc916e4700e36c9ad9575fcf47222ab"
action.uuid = "506367e0d66d3fdb92eda345ed347c21"
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
AddSharedBlockToSharedBlockGroupAction.Result res = action.call()GetSharedBlockCandidate
API Request
GET zstack/v1/primary-storage/sharedblockgroup/sharedblock-candidatesAuthorization: OAuth the-session-uuidcurl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X GET http://localhost:8080/zstack/v1/primary-storage/sharedblockgroup/sharedblock-candidates?clusterUuid=a8efc4d72a2334dcad7f71bcb4821d6f| Name | Type | Location | Description | Allowed Values | Starting Version |
|---|---|---|---|---|---|
| clusterUuid | String | query | Cluster UUID | 2.6.0 | |
| systemTags (optional) | List | query | Optional. The system tags. | 2.6.0 | |
| userTags (optional) | List | query | Optional. The user tags. | 2.6.0 |
API Response
{
"results": [
{
"wwid": "ata-Samsung_SSD_850_EVO_M.2_250GB_S33CNX0H600299D",
"vendor": "DELL",
"model": "MD32xx",
"wwn": "0x6b083fe000daf018",
"serial": "6b083fe000daf018000015505abbe00a",
"hctl": "",
"type": "mpath",
"size": 3.000318820352E13
},
{}
]
}| Name | Type | Description | Starting Version |
|---|---|---|---|
| error | ErrorCode | Error code. If not null, the operation failed. This field is null when the operation succeeds. For details, see error | 2.6.0 |
| results | List | For details, see results | 2.6.0 |
| Name | Type | Description | Starting Version |
|---|---|---|---|
| code | String | Error code number, a globally unique identifier for the error, e.g. SYS.1000, HOST.1001 | 2.6.0 |
| description | String | Brief description of the error | 2.6.0 |
| details | String | Detailed error information | 2.6.0 |
| elaboration | String | Reserved field, defaults to null | 2.6.0 |
| opaque | LinkedHashMap | Reserved field, defaults to null | 2.6.0 |
| cause | ErrorCode | Root cause: the source error that caused the current error. If there is no original error, this field is null | 2.6.0 |
| Name | Type | Description | Starting Version |
|---|---|---|---|
| wwid | String | Device WWID | 2.6.0 |
| vendor | String | Device vendor | 2.6.0 |
| model | String | Device model | 2.6.0 |
| wwn | String | Device WWN | 2.6.0 |
| serial | String | Device serial number | 2.6.0 |
| hctl | String | SCSI device HCTL | 2.6.0 |
| type | String | Device type | 2.6.0 |
| size | Long | Device size | 2.6.0 |
SDK Examples
GetSharedBlockCandidateAction action = new GetSharedBlockCandidateAction();
action.clusterUuid = "a8efc4d72a2334dcad7f71bcb4821d6f";
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
GetSharedBlockCandidateAction.Result res = action.call();GetSharedBlockCandidateAction action = GetSharedBlockCandidateAction()
action.clusterUuid = "a8efc4d72a2334dcad7f71bcb4821d6f"
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
GetSharedBlockCandidateAction.Result res = action.call()RefreshSharedblockDeviceCapacity
API Request
POST zstack/v1/primary-storage/sharedblockgroup/{sharedBlockGroupUuid}/sharedblocks/{uuid}Authorization: OAuth the-session-uuid{
"params": {},
"systemTags": [],
"userTags": []
}
Note: 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 -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X POST -d '{"params":{}}' http://localhost:8080/zstack/v1/primary-storage/sharedblockgroup/2974c033608537e68a305b0f29412776/sharedblocks/9bd10e4bcc0939a2b041755a160d7b34| Name | Type | Location | Description | Allowed Values | Starting Version |
|---|---|---|---|---|---|
| uuid (optional) | String | url | Shared block device UUID. If empty, updates all devices under the shared block storage | 2.6.0 | |
| sharedBlockGroupUuid | String | url | Shared block storage UUID | 2.6.0 | |
| systemTags (optional) | List | body | Optional. The system tags. | 2.6.0 | |
| userTags (optional) | List | body | Optional. The user tags. | 2.6.0 |
API Response
{
"inventory": {
"sharedBlocks": [
{
"uuid": "fd474b5a711f3bcab14061e1507b0691",
"sharedBlockGroupUuid": "9f900d7cc336370da2dccdd832a1613d",
"type": "LvmLogicalVolumeBasic",
"diskUuid": "b9bec04964ab30a7bf80bdbf7ec997d9",
"name": "test shared block",
"description": "description",
"state": "Enabled",
"status": "Connected",
"createDate": "Nov 14, 2017 10:20:57 PM",
"lastOpDate": "Nov 14, 2017 10:20:57 PM"
}
],
"sharedBlockGroupType": "LvmVolumeGroupBasic",
"uuid": "9f900d7cc336370da2dccdd832a1613d",
"name": "shared block group primary storage",
"description": "shared block group primary storage description",
"availableCapacity": 1.073741824E9,
"availablePhysicalCapacity": 1.073741824E9,
"type": "SharedBlock",
"state": "Enabled",
"status": "Connected",
"createDate": "Nov 14, 2017 10:20:57 PM",
"lastOpDate": "Nov 14, 2017 10:20:57 PM"
}
}| Name | Type | Description | Starting Version |
|---|---|---|---|
| error | ErrorCode | Error code. If not null, the operation failed. This field is null when the operation succeeds. For details, see error | 2.6.0 |
| inventory | SharedBlockGroupPrimaryStorageInventory | For details, see inventory | 2.6.0 |
| Name | Type | Description | Starting Version |
|---|---|---|---|
| code | String | Error code number, a globally unique identifier for the error, e.g. SYS.1000, HOST.1001 | 2.6.0 |
| description | String | Brief description of the error | 2.6.0 |
| details | String | Detailed error information | 2.6.0 |
| elaboration | String | Reserved field, defaults to null | 2.6.0 |
| opaque | LinkedHashMap | Reserved field, defaults to null | 2.6.0 |
| cause | ErrorCode | Root cause: the source error that caused the current error. If there is no original error, this field is null | 2.6.0 |
| Name | Type | Description | Starting Version |
|---|---|---|---|
| uuid | String | Resource UUID, uniquely identifies the resource | 2.6.0 |
| zoneUuid | String | Data Center UUID | 2.6.0 |
| name | String | Resource name | 2.6.0 |
| url | String | Unused | 2.6.0 |
| description | String | Detailed description of the resource | 2.6.0 |
| totalCapacity | Long | Total capacity | 2.6.0 |
| availableCapacity | Long | Available capacity | 2.6.0 |
| totalPhysicalCapacity | Long | Total physical capacity | 2.6.0 |
| availablePhysicalCapacity | Long | Available physical capacity | 2.6.0 |
| systemUsedCapacity | Long | System used capacity | 2.6.0 |
| type | String | Data storage type | 2.6.0 |
| state | String | Enabled state | 2.6.0 |
| status | String | Connection status | 2.6.0 |
| mountPath | String | Unused | 2.6.0 |
| createDate | Timestamp | Create date | 2.6.0 |
| lastOpDate | Timestamp | Last update date | 2.6.0 |
| attachedClusterUuids | List | Attached clusters | 2.6.0 |
| sharedBlocks | List | For details, see sharedBlocks | 2.6.0 |
| sharedBlockGroupType | SharedBlockGroupType | For details, see sharedBlockGroupType | 2.6.0 |
| Name | Type | Description | Starting Version |
|---|---|---|---|
| uuid | String | Resource UUID, uniquely identifies the resource | 2.6.0 |
| sharedBlockGroupUuid | String | Shared block device group UUID | 2.6.0 |
| diskUuid | String | Disk unique identifier (e.g. UUID, WWN, WWID) | 2.6.0 |
| name | String | Resource name | 2.6.0 |
| description | String | Detailed description of the resource | 2.6.0 |
| createDate | Timestamp | Create date | 2.6.0 |
| lastOpDate | Timestamp | Last update date | 2.6.0 |
| type | SharedBlockType | For details, see type | 2.6.0 |
| state | SharedBlockState | For details, see state | 2.6.0 |
| status | SharedBlockStatus | For details, see status | 2.6.0 |
| Name | Type | Description | Starting Version |
|---|---|---|---|
| name | String | Resource name | 2.6.0 |
| ordinal | int | The ordinal number. | 2.6.0 |
| Name | Type | Description | Starting Version |
|---|---|---|---|
| name | String | Resource name | 2.6.0 |
| ordinal | int | The ordinal number. | 2.6.0 |
| Name | Type | Description | Starting Version |
|---|---|---|---|
| name | String | Resource name | 2.6.0 |
| ordinal | int | The ordinal number. | 2.6.0 |
| Name | Type | Description | Starting Version |
|---|---|---|---|
| name | String | Resource name | 2.6.0 |
| ordinal | int | The ordinal number. | 2.6.0 |
SDK Examples
RefreshSharedblockDeviceCapacityAction action = new RefreshSharedblockDeviceCapacityAction();
action.uuid = "9bd10e4bcc0939a2b041755a160d7b34";
action.sharedBlockGroupUuid = "2974c033608537e68a305b0f29412776";
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
RefreshSharedblockDeviceCapacityAction.Result res = action.call();
RefreshSharedblockDeviceCapacityAction action = RefreshSharedblockDeviceCapacityAction()
action.uuid = "9bd10e4bcc0939a2b041755a160d7b34"
action.sharedBlockGroupUuid = "2974c033608537e68a305b0f29412776"
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
RefreshSharedblockDeviceCapacityAction.Result res = action.call()QuerySharedBlock
API Request
GET zstack/v1/sharedblock-group/sharedblocks
GET zstack/v1/sharedblock-group/
GET zstack/v1/sharedblock-group/sharedblock/{uuid}Authorization: OAuth the-session-uuidcurl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X GET http://localhost:8080/zstack/v1/sharedblock-group/sharedblockscurl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X GET http://localhost:8080/zstack/v1/sharedblock-group/curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X GET http://localhost:8080/zstack/v1/sharedblock-group/sharedblock/e6076fa169ed38ba8f66e73c2db7158dQueryable Fields
Run the CLI command, enter QuerySharedBlock and press Tab to view all queryable fields and resources that support cross-table queries.
API Response
{
"inventories": [
{
"uuid": "3787d759b8323d2e8f0b19ef0bfe930b",
"sharedBlockGroupUuid": "0dcfcb85f7613689886ae34114064cbd",
"type": "LvmLogicalVolumeBasic",
"name": "test shared block",
"description": "description",
"state": "Enabled",
"status": "Connected",
"createDate": "Nov 14, 2017 10:20:57 PM",
"lastOpDate": "Nov 14, 2017 10:20:57 PM"
}
]
}| Name | Type | Description | Starting Version |
|---|---|---|---|
| error | ErrorCode | Error code. If not null, the operation failed. This field is null when the operation succeeds. For details, see error | 2.3.2 |
| inventories | List | For details, see inventories | 2.3.2 |
| Name | Type | Description | Starting Version |
|---|---|---|---|
| code | String | Error code number, a globally unique identifier for the error, e.g. SYS.1000, HOST.1001 | 2.3.2 |
| description | String | Brief description of the error | 2.3.2 |
| details | String | Detailed error information | 2.3.2 |
| elaboration | String | Reserved field, defaults to null | 2.3.2 |
| opaque | LinkedHashMap | Reserved field, defaults to null | 2.3.2 |
| cause | ErrorCode | Root cause: the source error that caused the current error. If there is no original error, this field is null | 2.3.2 |
| Name | Type | Description | Starting Version |
|---|---|---|---|
| uuid | String | Resource UUID, uniquely identifies the resource | 2.3.2 |
| sharedBlockGroupUuid | String | Shared block device group UUID | 2.3.2 |
| diskUuid | String | Disk unique identifier (e.g. UUID, WWN, WWID) | 2.3.2 |
| name | String | Resource name | 2.3.2 |
| description | String | Detailed description of the resource | 2.3.2 |
| createDate | Timestamp | Create date | 2.3.2 |
| lastOpDate | Timestamp | Last update date | 2.3.2 |
| type | SharedBlockType | For details, see type | 2.3.2 |
| state | SharedBlockState | For details, see state | 2.3.2 |
| status | SharedBlockStatus | For details, see status | 2.3.2 |
| Name | Type | Description | Starting Version |
|---|---|---|---|
| name | String | Resource name | 2.3.2 |
| ordinal | int | The ordinal number. | 2.3.2 |
| Name | Type | Description | Starting Version |
|---|---|---|---|
| name | String | Resource name | 2.3.2 |
| ordinal | int | The ordinal number. | 2.3.2 |
| Name | Type | Description | Starting Version |
|---|---|---|---|
| name | String | Resource name | 2.3.2 |
| ordinal | int | The ordinal number. | 2.3.2 |
SDK Examples
QuerySharedBlockAction action = new QuerySharedBlockAction();
action.conditions = asList();
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
QuerySharedBlockAction.Result res = action.call();QuerySharedBlockAction action = QuerySharedBlockAction()
action.conditions = []
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
QuerySharedBlockAction.Result res = action.call()iSCSI Server Related Interfaces
AddIscsiServer
API Request
POST zstack/v1/storage-devices/iscsi/serversAuthorization: OAuth the-session-uuid{
"params": {
"ip": "10.0.0.201",
"port": 3260.0
},
"systemTags": [],
"userTags": []
}
Note: 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 -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X POST -d '{"params":{"ip":"10.0.0.201","port":3260.0}}' http://localhost:8080/zstack/v1/storage-devices/iscsi/servers| Name | Type | Location | Description | Allowed Values | Starting Version |
|---|---|---|---|---|---|
| name (optional) | String | body (included in the params structure) | Resource Name | 3.0.0 | |
| ip | String | body (included in the params structure) | IP Address | 3.0.0 | |
| port (optional) | Integer | body (included in the params structure) | Port, defaults to 3260 | 3.0.0 | |
| chapUserName (optional) | String | body (included in the params structure) | CHAP Username, defaults to empty | 3.0.0 | |
| chapUserPassword (optional) | String | body (included in the params structure) | CHAP Password, defaults to empty | 3.0.0 | |
| resourceUuid (optional) | String | body (included in the params structure) | Optional. The resource UUID. | 3.0.0 | |
| systemTags (optional) | List | body | Optional. The system tags. | 3.0.0 | |
| userTags (optional) | List | body | Optional. The user tags. | 3.0.0 |
API Response
{
"inventory": {
"uuid": "0b77c2e947ca3b40b79f6342728ec8fc",
"name": "iscsi-server-10.0.0.201",
"ip": "10.0.0.201",
"port": 3260.0,
"chapUserName": "username",
"chapUserPassword": "password",
"state": "Enabled",
"createDate": "Nov 14, 2017 10:20:57 PM",
"lastOpDate": "Nov 14, 2017 10:20:57 PM"
}
}| Name | Type | Description | Starting Version |
|---|---|---|---|
| code | String | Error code number, a globally unique identifier for the error, e.g. SYS.1000, HOST.1001 | 3.0.0 |
| description | String | Brief description of the error | 3.0.0 |
| details | String | Detailed error information | 3.0.0 |
| elaboration | String | Reserved field, defaults to null | 3.0.0 |
| opaque | LinkedHashMap | Reserved field, defaults to null | 3.0.0 |
| cause | ErrorCode | Root cause: the error that triggered the current error. If there is no original error, this field is null | 3.0.0 |
| Name | Type | Description | Starting Version |
|---|---|---|---|
| uuid | String | Resource UUID, uniquely identifies the resource | 3.0.0 |
| name | String | Resource Name | 3.0.0 |
| ip | String | IP Address | 3.0.0 |
| port | Integer | Port | 3.0.0 |
| chapUserName | String | CHAP Username | 3.0.0 |
| chapUserPassword | String | CHAP Password | 3.0.0 |
| state | String | Enabled State | 3.0.0 |
| createDate | Timestamp | Creation Time | 3.0.0 |
| lastOpDate | Timestamp | Last Modification Time | 3.0.0 |
| iscsiTargets | List | For details, see iscsiTargets | 3.0.0 |
| iscsiClusterRefs | List | For details, see iscsiClusterRefs | 3.0.0 |
| Name | Type | Description | Starting Version |
|---|---|---|---|
| iscsiServerUuid | String | iSCSI Server UUID | 3.0.0 |
| uuid | String | Resource UUID, uniquely identifies the resource | 3.0.0 |
| iqn | String | iSCSI IQN | 3.0.0 |
| createDate | Timestamp | Creation Time | 3.0.0 |
| lastOpDate | Timestamp | Last Modification Time | 3.0.0 |
| iscsiLuns | List | For details, see iscsiLuns | 3.0.0 |
| Name | Type | Description | Starting Version |
|---|---|---|---|
| uuid | String | Resource UUID, uniquely identifies the resource | 3.0.0 |
| iscsiTargetUuid | String | iSCSI Target UUID | 3.0.0 |
| wwid | String | Unique Identifier ID | 3.0.0 |
| vendor | String | Device Vendor | 3.0.0 |
| model | String | Device Model | 3.0.0 |
| wwn | String | Device WWN | 3.0.0 |
| serial | String | Device Serial Number | 3.0.0 |
| hctl | String | SCSI Device HCTL | 3.0.0 |
| type | String | Device Type | 3.0.0 |
| path | String | Device Path | 3.0.0 |
| size | Long | Device Size | 3.0.0 |
| createDate | Timestamp | Creation Time | 3.0.0 |
| lastOpDate | Timestamp | Last Modification Time | 3.0.0 |
| Name | Type | Description | Starting Version |
|---|---|---|---|
| iscsiServerUuid | String | The iscsi server UUID. | 3.0.0 |
| clusterUuid | String | Cluster UUID | 3.0.0 |
| createDate | Timestamp | Creation Time | 3.0.0 |
| lastOpDate | Timestamp | Last Modification Time | 3.0.0 |
SDK Examples
AddIscsiServerAction action = new AddIscsiServerAction();
action.ip = "10.0.0.201";
action.port = 3260.0;
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
AddIscsiServerAction.Result res = action.call();AddIscsiServerAction action = AddIscsiServerAction()
action.ip = "10.0.0.201"
action.port = 3260.0
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
AddIscsiServerAction.Result res = action.call()DeleteIscsiServer
API Request
DELETE zstack/v1/storage-devices/iscsi/servers/{uuid}?deleteMode={deleteMode}Authorization: OAuth the-session-uuidcurl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X DELETE http://localhost:8080/zstack/v1/storage-devices/iscsi/servers/7a3f7749fd393899b4b74d2b470e15eb?deleteMode=Permissive| Name | Type | Location | Description | Allowed Values | Starting Version |
|---|---|---|---|---|---|
| uuid | String | url | iSCSI Server UUID | 3.0.0 | |
| deleteMode (optional) | String | url | Optional. The delete mode. | 3.0.0 | |
| systemTags (optional) | List | body | Optional. The system tags. | 3.0.0 | |
| userTags (optional) | List | body | Optional. The user tags. | 3.0.0 |
API Response
{
"error": {
"code": "SYS.1001",
"description": "A message or a operation timeout",
"details": "Create VM on KVM timeout after 300s"
}
}SDK Examples
DeleteIscsiServerAction action = new DeleteIscsiServerAction();
action.uuid = "7a3f7749fd393899b4b74d2b470e15eb";
action.deleteMode = "Permissive";
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
DeleteIscsiServerAction.Result res = action.call();DeleteIscsiServerAction action = DeleteIscsiServerAction()
action.uuid = "7a3f7749fd393899b4b74d2b470e15eb"
action.deleteMode = "Permissive"
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
DeleteIscsiServerAction.Result res = action.call()QueryIscsiServer
API Request
GET zstack/v1/storage-devices/iscsi/servers
GET zstack/v1/storage-devices/iscsi
GET zstack/v1/storage-devices/iscsi/servers/{uuid}Authorization: OAuth the-session-uuidcurl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X GET http://localhost:8080/zstack/v1/storage-devices/iscsi/serverscurl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X GET http://localhost:8080/zstack/v1/storage-devices/iscsicurl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X GET http://localhost:8080/zstack/v1/storage-devices/iscsi/servers/cf91d809261735be9f20429880c1d19cQueryable Fields
Run the CLI command-line tool, enter QueryIscsiServer and press Tab to see all queryable fields and resource names that can be queried across tables.
API Response
{
"inventories": [
{
"uuid": "fd97e8b6d61c399abed358ea6b2fc206",
"name": "iscsi-server-10.0.0.201",
"ip": "10.0.0.201",
"port": 3260.0,
"chapUserName": "username",
"chapUserPassword": "password",
"state": "Enabled",
"iscsiTargets": [
{
"iscsiServerUuid": "fd97e8b6d61c399abed358ea6b2fc206",
"uuid": "d156429110f13c2ca07bbc04e4031231",
"iqn": "iqn.2018-01.io.cloud:tsn.00001",
"state": "Enabled",
"iscsiLuns": [
{
"uuid": "500f63c8f44939bbab102222927f9290",
"iscsiTargetUuid": "d156429110f13c2ca07bbc04e4031231",
"wwid": "36b083fe000daf018000015505abbe00a",
"vendor": "DELL",
"model": "MD32xx",
"wwn": "0x6b083fe000daf018",
"serial": "6b083fe000daf018000015505abbe00a",
"hctl": "6:0:1:1",
"type": "mpath",
"path": "ip-0.0.0.201:3260-iscsi-iqn.2018-01.io.cloud:tsn.00001-lun-0",
"size": 3.000318820352E13,
"multipathDeviceUuid": "36b083fe000daf018000015505abbe00a"
}
],
"createDate": "Nov 14, 2017 10:20:57 PM",
"lastOpDate": "Nov 14, 2017 10:20:57 PM"
}
],
"iscsiClusterRefs": [
{
"id": 1.0,
"iscsiServerUuid": "fd97e8b6d61c399abed358ea6b2fc206",
"clusterUuid": "02db8eb4e3043f55b7f1cf02df735611",
"createDate": "Nov 14, 2017 10:20:57 PM",
"lastOpDate": "Nov 14, 2017 10:20:57 PM"
}
],
"createDate": "Nov 14, 2017 10:20:57 PM",
"lastOpDate": "Nov 14, 2017 10:20:57 PM"
}
]
}| Name | Type | Description | Starting Version |
|---|---|---|---|
| error | ErrorCode | Error code. If not null, the operation failed. When the operation is successful, this field is null. For details, see error | 3.0.0 |
| inventories | List | For details, see inventories | 3.0.0 |
| Name | Type | Description | Starting Version |
|---|---|---|---|
| code | String | Error code number, a globally unique identifier for the error, e.g. SYS.1000, HOST.1001 | 3.0.0 |
| description | String | Brief description of the error | 3.0.0 |
| details | String | Detailed error information | 3.0.0 |
| elaboration | String | Reserved field, defaults to null | 3.0.0 |
| opaque | LinkedHashMap | Reserved field, defaults to null | 3.0.0 |
| cause | ErrorCode | Root cause: the error that triggered the current error. If there is no original error, this field is null | 3.0.0 |
| Name | Type | Description | Starting Version |
|---|---|---|---|
| uuid | String | Resource UUID, uniquely identifies the resource | 3.0.0 |
| name | String | Resource Name | 3.0.0 |
| ip | String | IP Address | 3.0.0 |
| port | Integer | Port | 3.0.0 |
| chapUserName | String | CHAP Username | 3.0.0 |
| chapUserPassword | String | CHAP Password | 3.0.0 |
| state | String | Enabled State | 3.0.0 |
| createDate | Timestamp | Creation Time | 3.0.0 |
| lastOpDate | Timestamp | Last Modification Time | 3.0.0 |
| iscsiTargets | List | For details, see iscsiTargets | 3.0.0 |
| iscsiClusterRefs | List | For details, see iscsiClusterRefs | 3.0.0 |
| Name | Type | Description | Starting Version |
|---|---|---|---|
| iscsiServerUuid | String | iSCSI Server UUID | 3.0.0 |
| uuid | String | Resource UUID, uniquely identifies the resource | 3.0.0 |
| iqn | String | iSCSI IQN | 3.0.0 |
| createDate | Timestamp | Creation Time | 3.0.0 |
| lastOpDate | Timestamp | Last Modification Time | 3.0.0 |
| iscsiLuns | List | For details, see iscsiLuns | 3.0.0 |
| Name | Type | Description | Starting Version |
|---|---|---|---|
| uuid | String | Resource UUID, uniquely identifies the resource | 3.0.0 |
| iscsiTargetUuid | String | iSCSI Target UUID | 3.0.0 |
| wwid | String | Unique Identifier ID | 3.0.0 |
| vendor | String | Device Vendor | 3.0.0 |
| model | String | Device Model | 3.0.0 |
| wwn | String | Device WWN | 3.0.0 |
| serial | String | Device Serial Number | 3.0.0 |
| hctl | String | SCSI Device HCTL | 3.0.0 |
| type | String | Device Type | 3.0.0 |
| path | String | Device Path | 3.0.0 |
| size | Long | Device Size | 3.0.0 |
| createDate | Timestamp | Creation Time | 3.0.0 |
| lastOpDate | Timestamp | Last Modification Time | 3.0.0 |
| Name | Type | Description | Starting Version |
|---|---|---|---|
| iscsiServerUuid | String | The iscsi server UUID. | 3.0.0 |
| clusterUuid | String | Cluster UUID | 3.0.0 |
| createDate | Timestamp | Creation Time | 3.0.0 |
| lastOpDate | Timestamp | Last Modification Time | 3.0.0 |
SDK Examples
QueryIscsiServerAction action = new QueryIscsiServerAction();
action.conditions = asList();
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
QueryIscsiServerAction.Result res = action.call();QueryIscsiServerAction action = QueryIscsiServerAction()
action.conditions = []
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
QueryIscsiServerAction.Result res = action.call()RefreshIscsiServer
API Request
POST zstack/v1/storage-devices/iscsi/servers/{uuid}Authorization: OAuth the-session-uuid{
"params": {},
"systemTags": [],
"userTags": []
}
Note: 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 -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X POST -d '{"params":{}}' http://localhost:8080/zstack/v1/storage-devices/iscsi/servers/0243c5d7322a36718ad76d865682ba44| Name | Type | Location | Description | Allowed Values | Starting Version |
|---|---|---|---|---|---|
| uuid | String | url | Resource UUID, uniquely identifies the resource | 3.0.0 | |
| systemTags (optional) | List | body | Optional. The system tags. | 3.0.0 | |
| userTags (optional) | List | body | Optional. The user tags. | 3.0.0 |
API Response
{
"inventory": {
"uuid": "a4a3ef3c3ed537e6b1040ee4b7d77686",
"name": "iscsi-server-10.0.0.201",
"ip": "10.0.0.201",
"port": 3260.0,
"chapUserName": "username",
"chapUserPassword": "password",
"state": "Enabled",
"iscsiTargets": [
{
"iscsiServerUuid": "a4a3ef3c3ed537e6b1040ee4b7d77686",
"uuid": "3da0cdedd9763edfab39a897f87454e9",
"iqn": "iqn.2018-01.io.cloud:tsn.00001",
"iscsiLuns": [
{
"uuid": "f569b3e3baf838e59d8a115458d72a9b",
"iscsiTargetUuid": "3da0cdedd9763edfab39a897f87454e9",
"wwid": "36b083fe000daf018000015505abbe00a",
"vendor": "DELL",
"model": "MD32xx",
"wwn": "0x6b083fe000daf018",
"serial": "6b083fe000daf018000015505abbe00a",
"hctl": "6:0:1:1",
"type": "mpath",
"path": "ip-0.0.0.201:3260-iscsi-iqn.2018-01.io.cloud:tsn.00001-lun-0",
"size": 3.000318820352E13,
"multipathDeviceUuid": "36b083fe000daf018000015505abbe00a"
}
],
"createDate": "Nov 14, 2017 10:20:57 PM",
"lastOpDate": "Nov 14, 2017 10:20:57 PM"
}
],
"iscsiClusterRefs": [
{
"id": 1.0,
"iscsiServerUuid": "a4a3ef3c3ed537e6b1040ee4b7d77686",
"clusterUuid": "da1ddc379fc137789b12bcac0ed90148",
"createDate": "Nov 14, 2017 10:20:57 PM",
"lastOpDate": "Nov 14, 2017 10:20:57 PM"
}
],
"createDate": "Nov 14, 2017 10:20:57 PM",
"lastOpDate": "Nov 14, 2017 10:20:57 PM"
}
}| Name | Type | Description | Starting Version |
|---|---|---|---|
| code | String | Error code number, a globally unique identifier for the error, e.g. SYS.1000, HOST.1001 | 3.0.0 |
| description | String | Brief description of the error | 3.0.0 |
| details | String | Detailed error information | 3.0.0 |
| elaboration | String | Reserved field, defaults to null | 3.0.0 |
| opaque | LinkedHashMap | Reserved field, defaults to null | 3.0.0 |
| cause | ErrorCode | Root cause: the error that triggered the current error. If there is no original error, this field is null | 3.0.0 |
| Name | Type | Description | Starting Version |
|---|---|---|---|
| uuid | String | Resource UUID, uniquely identifies the resource | 3.0.0 |
| name | String | Resource Name | 3.0.0 |
| ip | String | IP Address | 3.0.0 |
| port | Integer | Port | 3.0.0 |
| chapUserName | String | CHAP Username | 3.0.0 |
| chapUserPassword | String | CHAP Password | 3.0.0 |
| state | String | Enabled State | 3.0.0 |
| createDate | Timestamp | Creation Time | 3.0.0 |
| lastOpDate | Timestamp | Last Modification Time | 3.0.0 |
| iscsiTargets | List | For details, see iscsiTargets | 3.0.0 |
| iscsiClusterRefs | List | For details, see iscsiClusterRefs | 3.0.0 |
| Name | Type | Description | Starting Version |
|---|---|---|---|
| iscsiServerUuid | String | iSCSI Server UUID | 3.0.0 |
| uuid | String | Resource UUID, uniquely identifies the resource | 3.0.0 |
| iqn | String | iSCSI IQN | 3.0.0 |
| createDate | Timestamp | Creation Time | 3.0.0 |
| lastOpDate | Timestamp | Last Modification Time | 3.0.0 |
| iscsiLuns | List | For details, see iscsiLuns | 3.0.0 |
| Name | Type | Description | Starting Version |
|---|---|---|---|
| uuid | String | Resource UUID, uniquely identifies the resource | 3.0.0 |
| iscsiTargetUuid | String | iSCSI Target UUID | 3.0.0 |
| wwid | String | Unique Identifier ID | 3.0.0 |
| vendor | String | Device Vendor | 3.0.0 |
| model | String | Device Model | 3.0.0 |
| wwn | String | Device WWN | 3.0.0 |
| serial | String | Device Serial Number | 3.0.0 |
| hctl | String | SCSI Device HCTL | 3.0.0 |
| type | String | Device Type | 3.0.0 |
| path | String | Device Path | 3.0.0 |
| size | Long | Device Size | 3.0.0 |
| createDate | Timestamp | Creation Time | 3.0.0 |
| lastOpDate | Timestamp | Last Modification Time | 3.0.0 |
| Name | Type | Description | Starting Version |
|---|---|---|---|
| iscsiServerUuid | String | The iscsi server UUID. | 3.0.0 |
| clusterUuid | String | Cluster UUID | 3.0.0 |
| createDate | Timestamp | Creation Time | 3.0.0 |
| lastOpDate | Timestamp | Last Modification Time | 3.0.0 |
SDK Examples
RefreshIscsiServerAction action = new RefreshIscsiServerAction();
action.uuid = "0243c5d7322a36718ad76d865682ba44";
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
RefreshIscsiServerAction.Result res = action.call();RefreshIscsiServerAction action = RefreshIscsiServerAction()
action.uuid = "0243c5d7322a36718ad76d865682ba44"
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
RefreshIscsiServerAction.Result res = action.call()UpdateIscsiServer
API Request
POST zstack/v1/storage-devices/iscsi/serversAuthorization: OAuth the-session-uuid{
"updateIscsiServer": {
"name": "test-iscsi-server"
},
"systemTags": [],
"userTags": []
}
Note: 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 -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X PUT -d '{"updateIscsiServer":{"name":"test-iscsi-server"}}' http://localhost:8080/zstack/v1/storage-devices/iscsi/servers/98d2177199ca301d9fd842eace2dbc67/actions| Name | Type | Location | Description | Allowed Values | Starting Version |
|---|---|---|---|---|---|
| uuid | String | body (included in the params structure) | Resource UUID, uniquely identifies the resource | 3.0.0 | |
| name (optional) | String | body (included in the params structure) | Resource Name | 3.0.0 | |
| chapUserName (optional) | String | body (included in the params structure) | CHAP Username | 3.0.0 | |
| chapUserPassword (optional) | String | body (included in the params structure) | CHAP Password | 3.0.0 | |
| state (optional) | String | body (included in the params structure) | Enabled State |
|
3.0.0 |
| resourceUuid (optional) | String | body (included in the params structure) | Optional. The resource UUID. | 3.0.0 | |
| systemTags (optional) | List | body | Optional. The system tags. | 3.0.0 | |
| userTags (optional) | List | body | Optional. The user tags. | 3.0.0 |
API Response
{
"inventory": {
"uuid": "0b77c2e947ca3b40b79f6342728ec8fc",
"name": "iscsi-server-10.0.0.201",
"ip": "10.0.0.201",
"port": 3260.0,
"chapUserName": "username",
"chapUserPassword": "password",
"state": "Enabled",
"createDate": "Nov 14, 2017 10:20:57 PM",
"lastOpDate": "Nov 14, 2017 10:20:57 PM"
}
}| Name | Type | Description | Starting Version |
|---|---|---|---|
| code | String | Error code number, a globally unique identifier for the error, e.g. SYS.1000, HOST.1001 | 3.0.0 |
| description | String | Brief description of the error | 3.0.0 |
| details | String | Detailed error information | 3.0.0 |
| elaboration | String | Reserved field, defaults to null | 3.0.0 |
| opaque | LinkedHashMap | Reserved field, defaults to null | 3.0.0 |
| cause | ErrorCode | Root cause: the error that triggered the current error. If there is no original error, this field is null | 3.0.0 |
| Name | Type | Description | Starting Version |
|---|---|---|---|
| uuid | String | Resource UUID, uniquely identifies the resource | 3.0.0 |
| name | String | Resource Name | 3.0.0 |
| ip | String | IP Address | 3.0.0 |
| port | Integer | Port | 3.0.0 |
| chapUserName | String | CHAP Username | 3.0.0 |
| chapUserPassword | String | CHAP Password | 3.0.0 |
| state | String | Enabled State | 3.0.0 |
| createDate | Timestamp | Creation Time | 3.0.0 |
| lastOpDate | Timestamp | Last Modification Time | 3.0.0 |
| iscsiTargets | List | For details, see iscsiTargets | 3.0.0 |
| iscsiClusterRefs | List | For details, see iscsiClusterRefs | 3.0.0 |
| Name | Type | Description | Starting Version |
|---|---|---|---|
| iscsiServerUuid | String | iSCSI Server UUID | 3.0.0 |
| uuid | String | Resource UUID, uniquely identifies the resource | 3.0.0 |
| iqn | String | iSCSI IQN | 3.0.0 |
| createDate | Timestamp | Creation Time | 3.0.0 |
| lastOpDate | Timestamp | Last Modification Time | 3.0.0 |
| iscsiLuns | List | For details, see iscsiLuns | 3.0.0 |
| Name | Type | Description | Starting Version |
|---|---|---|---|
| uuid | String | Resource UUID, uniquely identifies the resource | 3.0.0 |
| iscsiTargetUuid | String | iSCSI Target UUID | 3.0.0 |
| wwid | String | Unique Identifier ID | 3.0.0 |
| vendor | String | Device Vendor | 3.0.0 |
| model | String | Device Model | 3.0.0 |
| wwn | String | Device WWN | 3.0.0 |
| serial | String | Device Serial Number | 3.0.0 |
| hctl | String | SCSI Device HCTL | 3.0.0 |
| type | String | Device Type | 3.0.0 |
| path | String | Device Path | 3.0.0 |
| size | Long | Device Size | 3.0.0 |
| createDate | Timestamp | Creation Time | 3.0.0 |
| lastOpDate | Timestamp | Last Modification Time | 3.0.0 |
| Name | Type | Description | Starting Version |
|---|---|---|---|
| iscsiServerUuid | String | The iscsi server UUID. | 3.0.0 |
| clusterUuid | String | Cluster UUID | 3.0.0 |
| createDate | Timestamp | Creation Time | 3.0.0 |
| lastOpDate | Timestamp | Last Modification Time | 3.0.0 |
SDK Examples
UpdateIscsiServerAction action = new UpdateIscsiServerAction();
action.uuid = "98d2177199ca301d9fd842eace2dbc67";
action.name = "test-iscsi-server";
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
UpdateIscsiServerAction.Result res = action.call();UpdateIscsiServerAction action = UpdateIscsiServerAction()
action.uuid = "98d2177199ca301d9fd842eace2dbc67"
action.name = "test-iscsi-server"
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
UpdateIscsiServerAction.Result res = action.call()AttachIscsiServerToCluster
API Request
POST zstack/v1/clusters/{clusterUuid}/storage-devices/iscsi/servers/{uuid}Authorization: OAuth the-session-uuid{
"params": {},
"systemTags": [],
"userTags": []
}
Note: 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 -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X POST -d '{"params":{}}' http://localhost:8080/zstack/v1/clusters/ee5a78dfa67b34598e9fe734111592a7/storage-devices/iscsi/servers/3ae1ec6d33d53ab7b8cea6e33e517e28| Name | Type | Location | Description | Allowed Values | Starting Version |
|---|---|---|---|---|---|
| uuid | String | url | iSCSI Server UUID | 3.0.0 | |
| clusterUuid | String | url | Cluster UUID | 3.0.0 | |
| systemTags (optional) | List | body | Optional. The system tags. | 3.0.0 | |
| userTags (optional) | List | body | Optional. The user tags. | 3.0.0 |
API Response
{
"inventory": {
"uuid": "a3d69cbb4ccc35f49354f34b9a52833d",
"name": "iscsi-server-10.0.0.201",
"ip": "10.0.0.201",
"port": 3260.0,
"chapUserName": "username",
"chapUserPassword": "password",
"state": "Enabled",
"iscsiTargets": [
{
"iscsiServerUuid": "a3d69cbb4ccc35f49354f34b9a52833d",
"uuid": "0a0f4da9f2ba3fddac178737e11cef73",
"iqn": "iqn.2018-01.io.cloud:tsn.00001",
"state": "Enabled",
"iscsiLuns": [
{
"uuid": "f63e921f951435ee9d18901b8eccf986",
"iscsiTargetUuid": "0a0f4da9f2ba3fddac178737e11cef73",
"wwid": "36b083fe000daf018000015505abbe00a",
"vendor": "DELL",
"model": "MD32xx",
"wwn": "0x6b083fe000daf018",
"serial": "6b083fe000daf018000015505abbe00a",
"hctl": "6:0:1:1",
"type": "mpath",
"path": "ip-0.0.0.201:3260-iscsi-iqn.2018-01.io.cloud:tsn.00001-lun-0",
"size": 3.000318820352E13,
"multipathDeviceUuid": "36b083fe000daf018000015505abbe00a"
}
],
"createDate": "Nov 14, 2017 10:20:57 PM",
"lastOpDate": "Nov 14, 2017 10:20:57 PM"
}
],
"iscsiClusterRefs": [
{
"id": 1.0,
"iscsiServerUuid": "a3d69cbb4ccc35f49354f34b9a52833d",
"clusterUuid": "962af991872e3ac98a2c4a7385f92541",
"createDate": "Nov 14, 2017 10:20:57 PM",
"lastOpDate": "Nov 14, 2017 10:20:57 PM"
}
],
"createDate": "Nov 14, 2017 10:20:57 PM",
"lastOpDate": "Nov 14, 2017 10:20:57 PM"
}
}| Name | Type | Description | Starting Version |
|---|---|---|---|
| code | String | Error code number, a globally unique identifier for the error, e.g. SYS.1000, HOST.1001 | 3.0.0 |
| description | String | Brief description of the error | 3.0.0 |
| details | String | Detailed error information | 3.0.0 |
| elaboration | String | Reserved field, defaults to null | 3.0.0 |
| opaque | LinkedHashMap | Reserved field, defaults to null | 3.0.0 |
| cause | ErrorCode | Root cause: the error that triggered the current error. If there is no original error, this field is null | 3.0.0 |
| Name | Type | Description | Starting Version |
|---|---|---|---|
| uuid | String | Resource UUID, uniquely identifies the resource | 3.0.0 |
| name | String | Resource Name | 3.0.0 |
| ip | String | IP Address | 3.0.0 |
| port | Integer | Port | 3.0.0 |
| chapUserName | String | CHAP Username | 3.0.0 |
| chapUserPassword | String | CHAP Password | 3.0.0 |
| state | String | Enabled State | 3.0.0 |
| createDate | Timestamp | Creation Time | 3.0.0 |
| lastOpDate | Timestamp | Last Modification Time | 3.0.0 |
| iscsiTargets | List | For details, see iscsiTargets | 3.0.0 |
| iscsiClusterRefs | List | For details, see iscsiClusterRefs | 3.0.0 |
| Name | Type | Description | Starting Version |
|---|---|---|---|
| iscsiServerUuid | String | iSCSI Server UUID | 3.0.0 |
| uuid | String | Resource UUID, uniquely identifies the resource | 3.0.0 |
| iqn | String | iSCSI IQN | 3.0.0 |
| createDate | Timestamp | Creation Time | 3.0.0 |
| lastOpDate | Timestamp | Last Modification Time | 3.0.0 |
| iscsiLuns | List | For details, see iscsiLuns | 3.0.0 |
| Name | Type | Description | Starting Version |
|---|---|---|---|
| uuid | String | Resource UUID, uniquely identifies the resource | 3.0.0 |
| iscsiTargetUuid | String | iSCSI Target UUID | 3.0.0 |
| wwid | String | Unique Identifier ID | 3.0.0 |
| vendor | String | Device Vendor | 3.0.0 |
| model | String | Device Model | 3.0.0 |
| wwn | String | Device WWN | 3.0.0 |
| serial | String | Device Serial Number | 3.0.0 |
| hctl | String | SCSI Device HCTL | 3.0.0 |
| type | String | Device Type | 3.0.0 |
| path | String | Device Path | 3.0.0 |
| size | Long | Device Size | 3.0.0 |
| createDate | Timestamp | Creation Time | 3.0.0 |
| lastOpDate | Timestamp | Last Modification Time | 3.0.0 |
| Name | Type | Description | Starting Version |
|---|---|---|---|
| iscsiServerUuid | String | The iscsi server UUID. | 3.0.0 |
| clusterUuid | String | Cluster UUID | 3.0.0 |
| createDate | Timestamp | Creation Time | 3.0.0 |
| lastOpDate | Timestamp | Last Modification Time | 3.0.0 |
SDK Examples
AttachIscsiServerToClusterAction action = new AttachIscsiServerToClusterAction();
action.uuid = "3ae1ec6d33d53ab7b8cea6e33e517e28";
action.clusterUuid = "ee5a78dfa67b34598e9fe734111592a7";
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
AttachIscsiServerToClusterAction.Result res = action.call();AttachIscsiServerToClusterAction action = AttachIscsiServerToClusterAction()
action.uuid = "3ae1ec6d33d53ab7b8cea6e33e517e28"
action.clusterUuid = "ee5a78dfa67b34598e9fe734111592a7"
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
AttachIscsiServerToClusterAction.Result res = action.call()DetachIscsiServerFromCluster
API Request
DELETE zstack/v1/clusters/{clusterUuid}/storage-devices/iscsi/servers/{uuid}Authorization: OAuth the-session-uuidcurl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X DELETE http://localhost:8080/zstack/v1/clusters/81ecbd4ae7c9346aa3225592441c36df/storage-devices/iscsi/servers/132d1caceecd3847b30bd901485ccc44| Name | Type | Location | Description | Allowed Values | Starting Version |
|---|---|---|---|---|---|
| uuid | String | url | iSCSI Server UUID | 3.0.0 | |
| clusterUuid | String | url | Cluster UUID | 3.0.0 | |
| systemTags (optional) | List | body | Optional. The system tags. | 3.0.0 | |
| userTags (optional) | List | body | Optional. The user tags. | 3.0.0 |
API Response
{
"inventory": {
"uuid": "2c42d5e271e93a91a4467bf936a21018",
"ip": "10.0.0.201",
"port": 3260.0,
"chapUserName": "username",
"chapUserPassword": "password",
"state": "Enabled",
"iscsiTargets": [
{
"iscsiServerUuid": "2c42d5e271e93a91a4467bf936a21018",
"uuid": "84fb04ce8ac03803b99cab5cccd831d1",
"iqn": "iqn.2018-01.io.cloud:tsn.00001",
"state": "Enabled",
"iscsiLuns": [
{
"uuid": "44d2c6a338123031a55ce32f102432af",
"iscsiTargetUuid": "84fb04ce8ac03803b99cab5cccd831d1",
"wwid": "36b083fe000daf018000015505abbe00a",
"vendor": "DELL",
"model": "MD32xx",
"wwn": "0x6b083fe000daf018",
"serial": "6b083fe000daf018000015505abbe00a",
"hctl": "6:0:1:1",
"type": "mpath",
"path": "ip-0.0.0.201:3260-iscsi-iqn.2018-01.io.cloud:tsn.00001-lun-0",
"size": 3.000318820352E13,
"multipathDeviceUuid": "36b083fe000daf018000015505abbe00a"
}
],
"createDate": "Nov 14, 2017 10:20:57 PM",
"lastOpDate": "Nov 14, 2017 10:20:57 PM"
}
],
"iscsiClusterRefs": [
{
"id": 1.0,
"iscsiServerUuid": "2c42d5e271e93a91a4467bf936a21018",
"clusterUuid": "ced139d5eded3049bbfe8364804fa8c0",
"createDate": "Nov 14, 2017 10:20:57 PM",
"lastOpDate": "Nov 14, 2017 10:20:57 PM"
}
],
"createDate": "Nov 14, 2017 10:20:57 PM",
"lastOpDate": "Nov 14, 2017 10:20:57 PM"
}
}| Name | Type | Description | Starting Version |
|---|---|---|---|
| code | String | Error code number, a globally unique identifier for the error, e.g. SYS.1000, HOST.1001 | 3.0.0 |
| description | String | Brief description of the error | 3.0.0 |
| details | String | Detailed error information | 3.0.0 |
| elaboration | String | Reserved field, defaults to null | 3.0.0 |
| opaque | LinkedHashMap | Reserved field, defaults to null | 3.0.0 |
| cause | ErrorCode | Root cause: the error that triggered the current error. If there is no original error, this field is null | 3.0.0 |
| Name | Type | Description | Starting Version |
|---|---|---|---|
| uuid | String | Resource UUID, uniquely identifies the resource | 3.0.0 |
| name | String | Resource Name | 3.0.0 |
| ip | String | IP Address | 3.0.0 |
| port | Integer | Port | 3.0.0 |
| chapUserName | String | CHAP Username | 3.0.0 |
| chapUserPassword | String | CHAP Password | 3.0.0 |
| state | String | Enabled State | 3.0.0 |
| createDate | Timestamp | Creation Time | 3.0.0 |
| lastOpDate | Timestamp | Last Modification Time | 3.0.0 |
| iscsiTargets | List | For details, see iscsiTargets | 3.0.0 |
| iscsiClusterRefs | List | For details, see iscsiClusterRefs | 3.0.0 |
| Name | Type | Description | Starting Version |
|---|---|---|---|
| iscsiServerUuid | String | iSCSI Server UUID | 3.0.0 |
| uuid | String | Resource UUID, uniquely identifies the resource | 3.0.0 |
| iqn | String | iSCSI IQN | 3.0.0 |
| createDate | Timestamp | Creation Time | 3.0.0 |
| lastOpDate | Timestamp | Last Modification Time | 3.0.0 |
| iscsiLuns | List | For details, see iscsiLuns | 3.0.0 |
| Name | Type | Description | Starting Version |
|---|---|---|---|
| uuid | String | Resource UUID, uniquely identifies the resource | 3.0.0 |
| iscsiTargetUuid | String | iSCSI Target UUID | 3.0.0 |
| wwid | String | Unique Identifier ID | 3.0.0 |
| vendor | String | Device Vendor | 3.0.0 |
| model | String | Device Model | 3.0.0 |
| wwn | String | Device WWN | 3.0.0 |
| serial | String | Device Serial Number | 3.0.0 |
| hctl | String | SCSI Device HCTL | 3.0.0 |
| type | String | Device Type | 3.0.0 |
| path | String | Device Path | 3.0.0 |
| size | Long | Device Size | 3.0.0 |
| createDate | Timestamp | Creation Time | 3.0.0 |
| lastOpDate | Timestamp | Last Modification Time | 3.0.0 |
| Name | Type | Description | Starting Version |
|---|---|---|---|
| iscsiServerUuid | String | The iscsi server UUID. | 3.0.0 |
| clusterUuid | String | Cluster UUID | 3.0.0 |
| createDate | Timestamp | Creation Time | 3.0.0 |
| lastOpDate | Timestamp | Last Modification Time | 3.0.0 |
SDK Examples
DetachIscsiServerFromClusterAction action = new DetachIscsiServerFromClusterAction();
action.uuid = "132d1caceecd3847b30bd901485ccc44";
action.clusterUuid = "81ecbd4ae7c9346aa3225592441c36df";
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
DetachIscsiServerFromClusterAction.Result res = action.call();DetachIscsiServerFromClusterAction action = DetachIscsiServerFromClusterAction()
action.uuid = "132d1caceecd3847b30bd901485ccc44"
action.clusterUuid = "81ecbd4ae7c9346aa3225592441c36df"
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
DetachIscsiServerFromClusterAction.Result res = action.call()QueryIscsiLun
API Request
GET zstack/v1/storage-devices/iscsi/luns
GET zstack/v1/storage-devices/iscsi/luns/{uuid}Authorization: OAuth the-session-uuidcurl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X GET http://localhost:8080/zstack/v1/storage-devices/iscsi/lunscurl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X GET http://localhost:8080/zstack/v1/storage-devices/iscsi/luns/da96929549c63b66b8afc63be70a373fQueryable Fields
Run the CLI command-line tool, enter QueryIscsiLun and press Tab to see all queryable fields and resource names that can be queried across tables.
API Response
{
"inventories": [
{
"uuid": "d833304319da3b32bc92f21c763a8e5b",
"wwid": "36b083fe000daf018000015505abbe00a",
"vendor": "DELL",
"model": "MD32xx",
"wwn": "0x6b083fe000daf018",
"serial": "6b083fe000daf018000015505abbe00a",
"hctl": "6:0:1:1",
"type": "mpath",
"path": "ip-0.0.0.201:3260-iscsi-iqn.2018-01.io.cloud:tsn.00001-lun-0",
"size": 3.000318820352E13,
"multipathDeviceUuid": "36b083fe000daf018000015505abbe00a"
},
{
"uuid": "a21ee1e2e3f63a61ac983c53c29552d2",
"wwid": "36b083fe000daf018000015505abbe00a",
"vendor": "DELL",
"model": "MD32xx",
"wwn": "0x6b083fe000daf018",
"serial": "6b083fe000daf018000015505abbe00a",
"hctl": "6:0:3:1",
"type": "mpath",
"path": "ip-0.0.0.201:3260-iscsi-iqn.2018-01.io.cloud:tsn.00002-lun-0",
"size": 3.000318820352E13,
"multipathDeviceUuid": "36b083fe000daf018000015505abbe00a"
}
]
}| Name | Type | Description | Starting Version |
|---|---|---|---|
| error | ErrorCode | Error code. If not null, the operation failed. When the operation is successful, this field is null. For details, see error | 3.0.0 |
| inventories | List | For details, see inventories | 3.0.0 |
| Name | Type | Description | Starting Version |
|---|---|---|---|
| code | String | Error code number, a globally unique identifier for the error, e.g. SYS.1000, HOST.1001 | 3.0.0 |
| description | String | Brief description of the error | 3.0.0 |
| details | String | Detailed error information | 3.0.0 |
| elaboration | String | Reserved field, defaults to null | 3.0.0 |
| opaque | LinkedHashMap | Reserved field, defaults to null | 3.0.0 |
| cause | ErrorCode | Root cause: the error that triggered the current error. If there is no original error, this field is null | 3.0.0 |
| Name | Type | Description | Starting Version |
|---|---|---|---|
| uuid | String | Resource UUID, uniquely identifies the resource | 3.0.0 |
| iscsiTargetUuid | String | iSCSI Target UUID | 3.0.0 |
| wwid | String | Unique Identifier ID | 3.0.0 |
| vendor | String | Device Vendor | 3.0.0 |
| model | String | Device Model | 3.0.0 |
| wwn | String | Device WWN | 3.0.0 |
| serial | String | Device Serial Number | 3.0.0 |
| hctl | String | SCSI Device HCTL | 3.0.0 |
| type | String | Device Type | 3.0.0 |
| path | String | Device Path | 3.0.0 |
| size | Long | Device Size | 3.0.0 |
| createDate | Timestamp | Creation Time | 3.0.0 |
| lastOpDate | Timestamp | Last Modification Time | 3.0.0 |
SDK Examples
QueryIscsiLunAction action = new QueryIscsiLunAction();
action.conditions = asList();
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
QueryIscsiLunAction.Result res = action.call();QueryIscsiLunAction action = QueryIscsiLunAction()
action.conditions = []
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
QueryIscsiLunAction.Result res = action.call()FC Storage Related Interfaces
QueryFiberChannelStorage
API Request
GET zstack/v1/storage-devices/fiber-channel/controllers
GET zstack/v1/storage-devices/fiber-channel
GET zstack/v1/storage-devices/fiber-channel/controllers/{uuid}Authorization: OAuth the-session-uuidcurl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X GET http://localhost:8080/zstack/v1/storage-devices/fiber-channel/controllers?curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X GET http://localhost:8080/zstack/v1/storage-devices/fiber-channel?curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X GET http://localhost:8080/zstack/v1/storage-devices/fiber-channel/controllers/6ca3d260093e3c06840309e9e756b1bfQueryable Fields
Run the CLI command tool, enter QueryFiberChannelStorage and press Tab to see all queryable fields and resource names that support cross-table queries.
API Response
{
"inventories": [
{
"uuid": "afedd6ab89d338fbaab258f981ca2295",
"state": "Enabled",
"fiberChannelLuns": [
{
"fiberChannelStorageUuid": "afedd6ab89d338fbaab258f981ca2295",
"name": "fc-lun-36b083fe000daf018000022905ba35d8f",
"uuid": "2e69f8443fbc3ec3a25a92ab8632f80f",
"wwid": "36b083fe000daf018000022905ba35d8f",
"vendor": "DELL",
"model": "MD32xx",
"wwn": "0x6f01faf000d5c3e7",
"serial": "6b083fe000daf018000015505abbe00a",
"type": "mpath",
"path": "pci-0000:05:00.0-fc-0x2012b083fedaf018-lun-11",
"size": 5.49755813888E12,
"scsiLunHostRefs": [
{
"id": 3.0,
"scsiLunUuid": "5a89fbd0d7793673acfa2e69acc56ce4",
"hostUuid": "bc3f69d449aa3410bd7267a1050de980",
"createDate": "Nov 14, 2017 10:20:57 PM",
"lastOpDate": "Nov 14, 2017 10:20:57 PM"
}
],
"scsiLunVmInstanceRefs": []
},
{
"fiberChannelStorageUuid": "afedd6ab89d338fbaab258f981ca2295",
"name": "fc-lun-36f01faf000d5c3e7000023ef5ba362f2",
"uuid": "52039a86c9173ff7a86ce214fc3d47cf",
"wwid": "36f01faf000d5c3e7000023ef5ba362f2",
"vendor": "DELL",
"model": "MD32xx",
"wwn": "0x6b083fe000daf018",
"serial": "6b083fe000daf018000015505abbe00a",
"type": "mpath",
"path": "pci-0000:05:00.0-fc-0x2012b083fedaf018-lun-12",
"size": 5.49755813888E12,
"scsiLunHostRefs": [
{
"id": 3.0,
"scsiLunUuid": "5a89fbd0d7793673acfa2e69acc56ce4",
"hostUuid": "bc3f69d449aa3410bd7267a1050de980",
"createDate": "Nov 14, 2017 10:20:57 PM",
"lastOpDate": "Nov 14, 2017 10:20:57 PM"
}
],
"scsiLunVmInstanceRefs": []
}
],
"createDate": "Nov 14, 2017 10:20:57 PM",
"lastOpDate": "Nov 14, 2017 10:20:57 PM"
},
{
"uuid": "4e902db710403f68a7703e45d00e551d",
"state": "Enabled",
"createDate": "Nov 14, 2017 10:20:57 PM",
"lastOpDate": "Nov 14, 2017 10:20:57 PM"
}
]
}| Name | Type | Description | Starting Version |
|---|---|---|---|
| error | ErrorCode | Error code. If not null, the operation failed. If null, the operation succeeded. For details, see error | 3.1.0 |
| inventories | List | For details, see inventories | 3.1.0 |
| Name | Type | Description | Starting Version |
|---|---|---|---|
| code | String | Error code number, globally unique identifier of the error, e.g. SYS.1000, HOST.1001 | 0.6 |
| description | String | Brief description of the error | 0.6 |
| details | String | Detailed error information | 0.6 |
| elaboration | String | Reserved field, defaults to null | 0.6 |
| opaque | LinkedHashMap | Reserved field, defaults to null | 0.6 |
| cause | ErrorCode | Root cause. The error that caused the current error. If there is no original error, this field is null | 0.6 |
| Name | Type | Description | Starting Version |
|---|---|---|---|
| uuid | String | Resource UUID, uniquely identifies the resource | 3.1.0 |
| name | String | Resource name | 3.1.0 |
| wwnn | String | FC SAN globally unique identifier | 3.1.0 |
| state | String | Enabled state | 3.1.0 |
| createDate | Timestamp | Creation time | 3.1.0 |
| lastOpDate | Timestamp | Last modification time | 3.1.0 |
| fiberChannelLuns | List | For details, see fiberChannelLuns | 3.1.0 |
| Name | Type | Description | Starting Version |
|---|---|---|---|
| uuid | String | Resource UUID, uniquely identifies the resource | 3.1.0 |
| fiberChannelStorageUuid | String | FC SAN Storage UUID | 3.1.0 |
| wwid | String | Disk globally unique identifier | 3.1.0 |
| vendor | String | Vendor | 3.1.0 |
| model | String | Model | 3.1.0 |
| wwn | String | Disk WWN | 3.1.0 |
| serial | String | Disk serial number | 3.1.0 |
| type | String | Disk type | 3.1.0 |
| path | String | Disk path | 3.1.0 |
| size | Long | Disk size | 3.1.0 |
| createDate | Timestamp | Creation time | 3.1.0 |
| lastOpDate | Timestamp | Last modification time | 3.1.0 |
| name | String | Resource name | 3.1.0 |
| state | String | Enabled state | 3.1.0 |
| scsiLunHostRefs | List | For details, see scsiLunHostRefs | 3.1.0 |
| scsiLunVmInstanceRefs | List | For details, see scsiLunVmInstanceRefs | 3.1.0 |
| Name | Type | Description | Starting Version |
|---|---|---|---|
| scsiLunUuid | String | SCSI LUN UUID | 3.1.0 |
| hostUuid | String | Host UUID | 3.1.0 |
| createDate | Timestamp | Creation time | 3.1.0 |
| lastOpDate | Timestamp | Last modification time | 3.1.0 |
| Name | Type | Description | Starting Version |
|---|---|---|---|
| scsiLunUuid | String | SCSI LUN UUID | 3.1.0 |
| vmInstanceUuid | String | Virtual Machine UUID | 3.1.0 |
| createDate | Timestamp | Creation time | 3.1.0 |
| lastOpDate | Timestamp | Last modification time | 3.1.0 |
SDK Examples
QueryFiberChannelStorageAction action = new QueryFiberChannelStorageAction();
action.conditions = asList();
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
QueryFiberChannelStorageAction.Result res = action.call();QueryFiberChannelStorageAction action = QueryFiberChannelStorageAction() action.conditions = [] action.sessionId = "b86c9016b4f24953a9edefb53ca0678c" QueryFiberChannelStorageAction.Result res = action.call()
RefreshFiberChannelStorage
API Request
POST zstack/v1/storage-devices/fiber-channel/controllers
POST zstack/v1/storage-devices/fiber-channel/controllers/{uuid}Authorization: OAuth the-session-uuid{
"params": {
"uuid": "52049ca66e8135f5aac2835aecab62a0"
},
"systemTags": [],
"userTags": []
}
Note: In the example above, the systemTags and userTags fields can be omitted. They are listed to indicate that the body can contain these two fields.curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X POST -d '{"params":{"uuid":"52049ca66e8135f5aac2835aecab62a0"}}' http://localhost:8080/zstack/v1/storage-devices/fiber-channel/controllerscurl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X POST -d '{"params":{"uuid":"52049ca66e8135f5aac2835aecab62a0"}}' http://localhost:8080/zstack/v1/storage-devices/fiber-channel/controllers/52049ca66e8135f5aac2835aecab62a0| Name | Type | Location | Description | Allowed Values | Starting Version |
|---|---|---|---|---|---|
| uuid (Optional) | String | body (contained in params structure) | FC SAN Storage UUID, uniquely identifies the resource | 3.1.0 | |
| zoneUuid | String | body (contained in params structure) | Data Center UUID | 3.1.0 | |
| systemTags (Optional) | List | body | Optional. The system tags. | 3.1.0 | |
| userTags (Optional) | List | body | Optional. The user tags. | 3.1.0 |
API Response
{
"inventories": [
{
"uuid": "971fa2e9e689304183d4eef676ad0241",
"state": "Enabled",
"fiberChannelLuns": [
{
"fiberChannelStorageUuid": "971fa2e9e689304183d4eef676ad0241",
"name": "fc-lun-36b083fe000daf018000022905ba35d8f",
"uuid": "2fb634b5c6ae3e1390360e982cdaf9d2",
"wwid": "36b083fe000daf018000022905ba35d8f",
"vendor": "DELL",
"model": "MD32xx",
"wwn": "0x6f01faf000d5c3e7",
"serial": "6b083fe000daf018000015505abbe00a",
"type": "mpath",
"path": "pci-0000:05:00.0-fc-0x2012b083fedaf018-lun-11",
"size": 5.49755813888E12,
"scsiLunHostRefs": [
{
"id": 3.0,
"scsiLunUuid": "fd0a53d0234e303c9ba7c316f5484a59",
"hostUuid": "ef288e9807853188b76d3d445a35b345",
"createDate": "Nov 14, 2017 10:20:57 PM",
"lastOpDate": "Nov 14, 2017 10:20:57 PM"
}
],
"scsiLunVmInstanceRefs": []
},
{
"fiberChannelStorageUuid": "971fa2e9e689304183d4eef676ad0241",
"name": "fc-lun-36f01faf000d5c3e7000023ef5ba362f2",
"uuid": "fb37b3bb268c38c3803b93ee60f25ef6",
"wwid": "36f01faf000d5c3e7000023ef5ba362f2",
"vendor": "DELL",
"model": "MD32xx",
"wwn": "0x6b083fe000daf018",
"serial": "6b083fe000daf018000015505abbe00a",
"type": "mpath",
"path": "pci-0000:05:00.0-fc-0x2012b083fedaf018-lun-12",
"size": 5.49755813888E12,
"scsiLunHostRefs": [
{
"id": 3.0,
"scsiLunUuid": "fd0a53d0234e303c9ba7c316f5484a59",
"hostUuid": "ef288e9807853188b76d3d445a35b345",
"createDate": "Nov 14, 2017 10:20:57 PM",
"lastOpDate": "Nov 14, 2017 10:20:57 PM"
}
],
"scsiLunVmInstanceRefs": []
}
],
"createDate": "Nov 14, 2017 10:20:57 PM",
"lastOpDate": "Nov 14, 2017 10:20:57 PM"
},
{
"uuid": "ddc6eb334da838b08224ed6c43e67d0e",
"state": "Enabled",
"createDate": "Nov 14, 2017 10:20:57 PM",
"lastOpDate": "Nov 14, 2017 10:20:57 PM"
}
]
}| Name | Type | Description | Starting Version |
|---|---|---|---|
| error | ErrorCode | Error code. If not null, the operation failed. If null, the operation succeeded. For details, see error | 3.1.0 |
| inventories | List | For details, see inventories | 3.1.0 |
| Name | Type | Description | Starting Version |
|---|---|---|---|
| code | String | Error code number, globally unique identifier of the error, e.g. SYS.1000, HOST.1001 | 0.6 |
| description | String | Brief description of the error | 0.6 |
| details | String | Detailed error information | 0.6 |
| elaboration | String | Reserved field, defaults to null | 0.6 |
| opaque | LinkedHashMap | Reserved field, defaults to null | 0.6 |
| cause | ErrorCode | Root cause. The error that caused the current error. If there is no original error, this field is null | 0.6 |
| Name | Type | Description | Starting Version |
|---|---|---|---|
| uuid | String | Resource UUID, uniquely identifies the resource | 3.1.0 |
| name | String | Resource name | 3.1.0 |
| wwnn | String | FC SAN globally unique identifier | 3.1.0 |
| state | String | Enabled state | 3.1.0 |
| createDate | Timestamp | Creation time | 3.1.0 |
| lastOpDate | Timestamp | Last modification time | 3.1.0 |
| fiberChannelLuns | List | For details, see fiberChannelLuns | 3.1.0 |
| Name | Type | Description | Starting Version |
|---|---|---|---|
| uuid | String | Resource UUID, uniquely identifies the resource | 3.1.0 |
| fiberChannelStorageUuid | String | FC SAN Storage UUID | 3.1.0 |
| wwid | String | Disk globally unique identifier | 3.1.0 |
| vendor | String | Vendor | 3.1.0 |
| model | String | Model | 3.1.0 |
| wwn | String | Disk WWN | 3.1.0 |
| serial | String | Disk serial number | 3.1.0 |
| type | String | Disk type | 3.1.0 |
| path | String | Disk path | 3.1.0 |
| size | Long | Disk size | 3.1.0 |
| createDate | Timestamp | Creation time | 3.1.0 |
| lastOpDate | Timestamp | Last modification time | 3.1.0 |
| name | String | Resource name | 3.1.0 |
| state | String | Enabled state | 3.1.0 |
| scsiLunHostRefs | List | For details, see scsiLunHostRefs | 3.1.0 |
| scsiLunVmInstanceRefs | List | For details, see scsiLunVmInstanceRefs | 3.1.0 |
| Name | Type | Description | Starting Version |
|---|---|---|---|
| scsiLunUuid | String | SCSI Lun UUID | 3.1.0 |
| hostUuid | String | Host UUID | 3.1.0 |
| createDate | Timestamp | Creation time | 3.1.0 |
| lastOpDate | Timestamp | Last modification time | 3.1.0 |
| Name | Type | Description | Starting Version |
|---|---|---|---|
| scsiLunUuid | String | SCSI Lun UUID | 3.1.0 |
| vmInstanceUuid | String | Virtual Machine UUID | 3.1.0 |
| createDate | Timestamp | Creation time | 3.1.0 |
| lastOpDate | Timestamp | Last modification time | 3.1.0 |
SDK Examples
RefreshFiberChannelStorageAction action = new RefreshFiberChannelStorageAction();
action.uuid = "52049ca66e8135f5aac2835aecab62a0";
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
RefreshFiberChannelStorageAction.Result res = action.call();RefreshFiberChannelStorageAction action = RefreshFiberChannelStorageAction()
action.uuid = "52049ca66e8135f5aac2835aecab62a0"
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
RefreshFiberChannelStorageAction.Result res = action.call()UpdateScsiLun
API Request
PUT zstack/v1/storage-devices/scsi-lun/{uuid}/actionsAuthorization: OAuth the-session-uuid{
"updateScsiLun": {
"name": "test-scsi-lun"
},
"systemTags": [],
"userTags": []
}
Note: In the example above, the systemTags and userTags fields can be omitted. They are listed to indicate that the body can contain these two fields.curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X PUT -d '{"updateScsiLun":{"name":"test-scsi-lun"}}' http://localhost:8080/zstack/v1/storage-devices/scsi-lun/e2e9d7f44ee23960bc6e4e31b0a010d9/actions| Name | Type | Location | Description | Allowed Values | Starting Version |
|---|---|---|---|---|---|
| uuid | String | url | Resource UUID, uniquely identifies the resource | 3.1.0 | |
| name (Optional) | String | body (contained in updateScsiLun structure) | Resource name | 3.1.0 | |
| state (Optional) | String | body (contained in updateScsiLun structure) | Enabled state |
|
3.1.0 |
| systemTags (Optional) | List | body | Optional. The system tags. | 3.1.0 | |
| userTags (Optional) | List | body | Optional. The user tags. | 3.1.0 |
API Response
{
"inventory": {
"name": "test-scsi-lun",
"uuid": "57cefcdc1746340ba1649c446059aea0",
"wwid": "36b083fe000daf018000022905ba35d8f",
"vendor": "DELL",
"model": "MD32xx",
"wwn": "0x6f01faf000d5c3e7",
"serial": "6b083fe000daf018000015505abbe00a",
"type": "mpath",
"path": "pci-0000:05:00.0-fc-0x2012b083fedaf018-lun-11",
"size": 5.49755813888E12,
"scsiLunHostRefs": [
{
"id": 1.0,
"scsiLunUuid": "57cefcdc1746340ba1649c446059aea0",
"hostUuid": "6e76dfbcc3b338c482ff51de1f0d76da",
"createDate": "Nov 14, 2017 10:20:57 PM"
}
],
"scsiLunVmInstanceRefs": [],
"createDate": "Nov 14, 2017 10:20:57 PM",
"lastOpDate": "Nov 14, 2017 10:20:57 PM"
}
}| Name | Type | Description | Starting Version |
|---|---|---|---|
| error | ErrorCode | Error code. If not null, the operation failed. If null, the operation succeeded. For details, see error | 3.1.0 |
| inventory | ScsiLunInventory | For details, see inventory | 3.1.0 |
| Name | Type | Description | Starting Version |
|---|---|---|---|
| code | String | Error code number, globally unique identifier of the error, e.g. SYS.1000, HOST.1001 | 0.6 |
| description | String | Brief description of the error | 0.6 |
| details | String | Detailed error information | 0.6 |
| elaboration | String | Reserved field, defaults to null | 0.6 |
| opaque | LinkedHashMap | Reserved field, defaults to null | 0.6 |
| cause | ErrorCode | Root cause. The error that caused the current error. If there is no original error, this field is null | 0.6 |
| Name | Type | Description | Starting Version |
|---|---|---|---|
| name | String | Resource name | 3.1.0 |
| uuid | String | Resource UUID, uniquely identifies the resource | 3.1.0 |
| wwid | String | Disk globally unique identifier | 3.1.0 |
| vendor | String | Disk vendor | 3.1.0 |
| model | String | Disk model | 3.1.0 |
| wwn | String | Disk WWN | 3.1.0 |
| serial | String | Disk serial number | 3.1.0 |
| type | String | Disk type | 3.1.0 |
| path | String | Disk path | 3.1.0 |
| state | String | Disk enabled state | 3.1.0 |
| size | Long | Disk size | 3.1.0 |
| createDate | Timestamp | Creation time | 3.1.0 |
| lastOpDate | Timestamp | Last modification time | 3.1.0 |
| scsiLunHostRefs | List | For details, see scsiLunHostRefs | 3.1.0 |
| scsiLunVmInstanceRefs | List | For details, see scsiLunVmInstanceRefs | 3.1.0 |
| Name | Type | Description | Starting Version |
|---|---|---|---|
| scsiLunUuid | String | SCSI LUN UUID | 3.1.0 |
| hostUuid | String | Host UUID | 3.1.0 |
| createDate | Timestamp | Creation time | 3.1.0 |
| lastOpDate | Timestamp | Last modification time | 3.1.0 |
| Name | Type | Description | Starting Version |
|---|---|---|---|
| scsiLunUuid | String | SCSI LUN UUID | 3.1.0 |
| vmInstanceUuid | String | Virtual Machine UUID | 3.1.0 |
| createDate | Timestamp | Creation time | 3.1.0 |
| lastOpDate | Timestamp | Last modification time | 3.1.0 |
SDK Examples
UpdateScsiLunAction action = new UpdateScsiLunAction();
action.uuid = "e2e9d7f44ee23960bc6e4e31b0a010d9";
action.name = "test-scsi-lun";
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
UpdateScsiLunAction.Result res = action.call();UpdateScsiLunAction action = UpdateScsiLunAction()
action.uuid = "e2e9d7f44ee23960bc6e4e31b0a010d9"
action.name = "test-scsi-lun"
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
UpdateScsiLunAction.Result res = action.call()AttachScsiLunToVmInstance
API Request
POST zstack/v1/vm-instances/{vmInstanceUuid}/scsi-lun/{uuid}Authorization: OAuth the-session-uuid{
"params": {
"disableMultiPathAttach": false
},
"systemTags": [],
"userTags": []
}
Note:
In the example above, the systemTags and userTags fields can be omitted. They are listed to indicate that the body can contain these two fields.
curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X POST -d '{"params":{"disableMultiPathAttach":false}}' http://localhost:8080/zstack/v1/vm-instances/e5bc51b4fdd13d35b4abe7be408435d4/scsi-lun/e4ea0f73829b3206a497c88b896613d6| Name | Type | Location | Description | Allowed Values | Starting Version |
|---|---|---|---|---|---|
| uuid | String | url | SCSI LUN UUID, uniquely identifies the resource | 3.1.0 | |
| vmInstanceUuid | String | url | Virtual Machine UUID | 3.1.0 | |
| disableMultiPathAttach (Optional) | String | url | Disable automatic multipath device attachment | 3.1.0 | |
| systemTags (Optional) | List | body | Optional. The system tags. | 3.1.0 | |
| userTags (Optional) | List | body | Optional. The user tags. | 3.1.0 |
API Response
{
"inventory": {
"name": "fc-lun-36b083fe000daf018000022905ba35d8f",
"uuid": "d20114f179003943904fee1127d16eba",
"wwid": "36b083fe000daf018000022905ba35d8f",
"vendor": "DELL",
"model": "MD32xx",
"wwn": "0x6f01faf000d5c3e7",
"serial": "6b083fe000daf018000015505abbe00a",
"type": "mpath",
"path": "pci-0000:05:00.0-fc-0x2012b083fedaf018-lun-11",
"size": 5.49755813888E12,
"scsiLunHostRefs": [
{
"id": 1.0,
"scsiLunUuid": "d20114f179003943904fee1127d16eba",
"hostUuid": "e62d261d3f293e0182f85779e105eb13",
"createDate": "Nov 14, 2017 10:20:57 PM"
}
],
"scsiLunVmInstanceRefs": [
{
"id": 1.0,
"scsiLunUuid": "d20114f179003943904fee1127d16eba",
"vmInstanceUuid": "84af387a5ef034818cc8488eaddbf5f3",
"createDate": "Nov 14, 2017 10:20:57 PM",
"attachMultipath": false
}
],
"createDate": "Nov 14, 2017 10:20:57 PM",
"lastOpDate": "Nov 14, 2017 10:20:57 PM"
}
}| Name | Type | Description | Starting Version |
|---|---|---|---|
| error | ErrorCode | Error code. If not null, the operation failed. If null, the operation succeeded. For details, see error | 3.1.0 |
| inventory | ScsiLunInventory | For details, see inventory | 3.1.0 |
| Name | Type | Description | Starting Version |
|---|---|---|---|
| code | String | Error code number, globally unique identifier of the error, e.g. SYS.1000, HOST.1001 | 3.1.0 |
| description | String | Brief description of the error | 3.1.0 |
| details | String | Detailed error information | 3.1.0 |
| elaboration | String | Reserved field, defaults to null | 3.1.0 |
| opaque | LinkedHashMap | Reserved field, defaults to null | 3.1.0 |
| cause | ErrorCode | Root cause. The error that caused the current error. If there is no original error, this field is null | 3.1.0 |
| Name | Type | Description | Starting Version |
|---|---|---|---|
| name | String | Resource name | 3.1.0 |
| uuid | String | Resource UUID, uniquely identifies the resource | 3.1.0 |
| wwid | String | Disk globally unique identifier | 3.1.0 |
| vendor | String | Disk vendor | 3.1.0 |
| model | String | Disk model | 3.1.0 |
| wwn | String | Disk WWN | 3.1.0 |
| serial | String | Disk serial number | 3.1.0 |
| type | String | Disk type | 3.1.0 |
| path | String | Disk path | 3.1.0 |
| state | String | Disk enabled state | 3.1.0 |
| size | Long | Disk size | 3.1.0 |
| createDate | Timestamp | Creation time | 3.1.0 |
| lastOpDate | Timestamp | Last modification time | 3.1.0 |
| scsiLunHostRefs | List | For details, see scsiLunHostRefs | 3.1.0 |
| scsiLunVmInstanceRefs | List | For details, see scsiLunVmInstanceRefs | 3.1.0 |
| Name | Type | Description | Starting Version |
|---|---|---|---|
| scsiLunUuid | String | SCSI LUN UUID | 3.1.0 |
| hostUuid | String | Host UUID | 3.1.0 |
| createDate | Timestamp | Creation time | 3.1.0 |
| lastOpDate | Timestamp | Last modification time | 3.1.0 |
| Name | Type | Description | Starting Version |
|---|---|---|---|
| scsiLunUuid | String | SCSI LUN UUID | 3.1.0 |
| vmInstanceUuid | String | Virtual Machine UUID | 3.1.0 |
| createDate | Timestamp | Creation time | 3.1.0 |
| lastOpDate | Timestamp | Last modification time | 3.1.0 |
SDK Examples
AttachScsiLunToVmInstanceAction action = new AttachScsiLunToVmInstanceAction();
action.uuid = "e4ea0f73829b3206a497c88b896613d6";
action.vmInstanceUuid = "e5bc51b4fdd13d35b4abe7be408435d4";
action.disableMultiPathAttach = false;
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
AttachScsiLunToVmInstanceAction.Result res = action.call();AttachScsiLunToVmInstanceAction action = AttachScsiLunToVmInstanceAction()
action.uuid = "e4ea0f73829b3206a497c88b896613d6"
action.vmInstanceUuid = "e5bc51b4fdd13d35b4abe7be408435d4"
action.disableMultiPathAttach = false
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
AttachScsiLunToVmInstanceAction.Result res = action.call()DetachScsiLunFromVmInstance
API Request
DELETE zstack/v1/vm-instances/{vmInstanceUuid}/scsi-lun/{uuid}Authorization: OAuth the-session-uuidcurl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X DELETE http://localhost:8080/zstack/v1/vm-instances/68b34252ae3a386e92b74ce3a2bd7e4a/scsi-lun/4af9531a118a3b7aba404d794a4cfa51| Name | Type | Location | Description | Allowed Values | Starting Version |
|---|---|---|---|---|---|
| uuid | String | url | Resource UUID, uniquely identifies the resource | 3.1.0 | |
| vmInstanceUuid | String | url | Virtual Machine UUID | 3.1.0 | |
| systemTags (Optional) | List | body | Optional. The system tags. | 3.1.0 | |
| userTags (Optional) | List | body | Optional. The user tags. | 3.1.0 |
API Response
Response Example
{
"inventory": {
"name": "fc-lun-36b083fe000daf018000022905ba35d8f",
"uuid": "a51554a318e333f1b96a7abe91674ede",
"wwid": "36b083fe000daf018000022905ba35d8f",
"vendor": "DELL",
"model": "MD32xx",
"wwn": "0x6f01faf000d5c3e7",
"serial": "6b083fe000daf018000015505abbe00a",
"type": "mpath",
"path": "pci-0000:05:00.0-fc-0x2012b083fedaf018-lun-11",
"size": 5.49755813888E12,
"scsiLunHostRefs": [
{
"id": 1.0,
"scsiLunUuid": "a51554a318e333f1b96a7abe91674ede",
"hostUuid": "5c5a4a7c480e3b5791e0915785968eb1",
"createDate": "Nov 14, 2017 10:20:57 PM"
}
],
"scsiLunVmInstanceRefs": [],
"createDate": "Nov 14, 2017 10:20:57 PM",
"lastOpDate": "Nov 14, 2017 10:20:57 PM"
}
}
| Name | Type | Description | Starting Version |
|---|---|---|---|
| error | ErrorCode | Error code. If not null, the operation failed. If null, the operation succeeded. For details, see error | 3.1.0 |
| inventory | ScsiLunInventory | For details, see inventory | 3.1.0 |
| Name | Type | Description | Starting Version |
|---|---|---|---|
| code | String | Error code number, globally unique identifier of the error, e.g. SYS.1000, HOST.1001 | 0.6 |
| description | String | Brief description of the error | 0.6 |
| details | String | Detailed error information | 0.6 |
| elaboration | String | Reserved field, defaults to null | 0.6 |
| opaque | LinkedHashMap | Reserved field, defaults to null | 0.6 |
| cause | ErrorCode | Root cause. The error that caused the current error. If there is no original error, this field is null | 0.6 |
| Name | Type | Description | Starting Version |
|---|---|---|---|
| name | String | Resource name | 3.1.0 |
| uuid | String | Resource UUID, uniquely identifies the resource | 3.1.0 |
| wwid | String | Disk globally unique identifier | 3.1.0 |
| vendor | String | Disk vendor | 3.1.0 |
| model | String | Disk model | 3.1.0 |
| wwn | String | Disk WWN | 3.1.0 |
| serial | String | Disk serial number | 3.1.0 |
| type | String | Disk type | 3.1.0 |
| path | String | Disk path | 3.1.0 |
| state | String | Disk enabled state | 3.1.0 |
| size | Long | Disk size | 3.1.0 |
| createDate | Timestamp | Creation time | 3.1.0 |
| lastOpDate | Timestamp | Last modification time | 3.1.0 |
| scsiLunHostRefs | List | For details, see scsiLunHostRefs | 3.1.0 |
| scsiLunVmInstanceRefs | List | For details, see scsiLunVmInstanceRefs | 3.1.0 |
| Name | Type | Description | Starting Version |
|---|---|---|---|
| scsiLunUuid | String | SCSI LUN UUID | 3.1.0 |
| hostUuid | String | Host UUID | 3.1.0 |
| createDate | Timestamp | Creation time | 3.1.0 |
| lastOpDate | Timestamp | Last modification time | 3.1.0 |
| Name | Type | Description | Starting Version |
|---|---|---|---|
| scsiLunUuid | String | SCSI LUN UUID | 3.1.0 |
| vmInstanceUuid | String | Virtual Machine UUID | 3.1.0 |
| createDate | Timestamp | Creation time | 3.1.0 |
| lastOpDate | Timestamp | Last modification time | 3.1.0 |
SDK Examples
DetachScsiLunFromVmInstanceAction action = new DetachScsiLunFromVmInstanceAction();
action.uuid = "4af9531a118a3b7aba404d794a4cfa51";
action.vmInstanceUuid = "68b34252ae3a386e92b74ce3a2bd7e4a";
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
DetachScsiLunFromVmInstanceAction.Result res = action.call();DetachScsiLunFromVmInstanceAction action = DetachScsiLunFromVmInstanceAction()
action.uuid = "4af9531a118a3b7aba404d794a4cfa51"
action.vmInstanceUuid = "68b34252ae3a386e92b74ce3a2bd7e4a"
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
DetachScsiLunFromVmInstanceAction.Result res = action.call()NVMe Storage Related Interfaces
QueryNvmeLun
API Request
GET zstack/v1/storage-devices/nvme/luns
GET zstack/v1/storage-devices/nvme/luns/{uuid}Authorization: OAuth the-session-uuidcurl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X GET http://localhost:8080/zstack/v1/storage-devices/nvme/lunscurl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X GET http://localhost:8080/zstack/v1/storage-devices/nvme/luns/066996e131e03824a7ef6a22defed432Queryable Fields
Run the CLI command tool, enter QueryNvmeLun and press Tab to view all queryable fields and resource names that can be queried across tables.
API Response
{
"inventories": [
{
"nvmeTargetUuid": "f04819a9445c3d068c075e753d48fc3c",
"nvmeLunHostRefs": [],
"name": "nvme-lun-36b083fe000daf018000022905ba35d8f",
"uuid": "138c10cda11c3b8e9c7d988350d5cf64",
"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
}
]
}| Name | Type | Description | Starting Version |
|---|---|---|---|
| success | boolean | Whether the operation succeeded. | 4.6.21 |
| error | ErrorCode | Error code. If not null, the operation failed. If null, the operation succeeded. For details, see error | 4.6.21 |
| inventories | List | For details, see inventories | 4.6.21 |
| Name | Type | Description | Starting Version |
|---|---|---|---|
| code | String | Error code number, globally unique identifier of the error, for example SYS.1000, HOST.1001 | 4.6.21 |
| description | String | Brief summary of the error | 4.6.21 |
| details | String | Detailed error information | 4.6.21 |
| elaboration | String | Reserved field, defaults to null | 4.6.21 |
| opaque | LinkedHashMap | Reserved field, defaults to null | 4.6.21 |
| cause | ErrorCode | Root cause: the source error that triggered the current error. If there is no original error, this field is null | 4.6.21 |
| Name | Type | Description | Starting Version |
|---|---|---|---|
| nvmeTargetUuid | String | NVMe device UUID | 4.6.21 |
| name | String | Resource name | 4.6.21 |
| uuid | String | Resource UUID, uniquely identifies the resource | 4.6.21 |
| wwid | String | Global unique identifier | 4.6.21 |
| vendor | String | Vendor | 4.6.21 |
| model | String | Model | 4.6.21 |
| wwn | String | The WWN. | 4.6.21 |
| serial | String | Serial number | 4.6.21 |
| type | String | Type | 4.6.21 |
| hctl | String | The hctl. | 4.6.21 |
| path | String | Path | 4.6.21 |
| state | String | State | 4.6.21 |
| size | Long | Size | 4.6.21 |
| multipathDeviceUuid | String | Multipath device UUID | 4.6.21 |
| source | String | Disk source, NVMe | 4.6.21 |
| createDate | Timestamp | Creation time | 4.6.21 |
| lastOpDate | Timestamp | Last modification time | 4.6.21 |
| nvmeLunHostRefs | List | For details, see nvmeLunHostRefs | 4.6.21 |
| Name | Type | Description | Starting Version |
|---|---|---|---|
| nvmeLunUuid | List | NVMe disk UUID | 4.6.21 |
| hostUuid | String | Host UUID | 4.6.21 |
| path | String | Disk path | 4.6.21 |
| hctl | String | Disk HCTL | 4.6.21 |
| createDate | Timestamp | Creation time | 4.6.21 |
| lastOpDate | Timestamp | Last modification time | 4.6.21 |
SDK Examples
QueryNvmeLunAction action = new QueryNvmeLunAction();
action.conditions = asList();
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
QueryNvmeLunAction.Result res = action.call();QueryNvmeLunAction action = QueryNvmeLunAction()
action.conditions = []
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
QueryNvmeLunAction.Result res = action.call()QueryNvmeTarget
API Request
GET zstack/v1/storage-devices/nvme/controllers
GET zstack/v1/storage-devices/nvme
GET zstack/v1/storage-devices/nvme/controllers/{uuid}Authorization: OAuth the-session-uuidcurl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X GET http://localhost:8080/zstack/v1/storage-devices/nvme/controllerscurl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X GET http://localhost:8080/zstack/v1/storage-devices/nvmecurl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X GET http://localhost:8080/zstack/v1/storage-devices/nvme/controllers/de0f2549ed0130948f14b00916fbf9a0Queryable Fields
Run the CLI command tool, enter QueryNvmeTarget and press Tab to view all queryable fields and resource names that can be queried across tables.
API Response
{
"inventories": [
{
"uuid": "40ab069909633d4293c62f44efb26db8",
"state": "Enabled",
"nvmeLuns": [
{
"nvmeTargetUuid": "40ab069909633d4293c62f44efb26db8",
"nvmeLunHostRefs": [
{
"id": 1,
"nvmeLunUuid": "5690b46050623763a0335e753c347fa1",
"hostUuid": "d6f8a7ff0069304080b345c077c3aeb9",
"createDate": "Nov 14, 2017 10:20:57 PM",
"lastOpDate": "Nov 14, 2017 10:20:57 PM"
}
],
"name": "nvme-lun-36b083fe000daf018000022905ba35d8f",
"uuid": "5690b46050623763a0335e753c347fa1",
"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"
}
]
}| Name | Type | Description | Starting Version |
|---|---|---|---|
| success | boolean | Whether the operation succeeded. | 4.6.21 |
| error | ErrorCode | Error code. If not null, the operation failed. If null, the operation succeeded. For details, see error | 4.6.21 |
| inventories | List | For details, see inventories | 4.6.21 |
| Name | Type | Description | Starting Version |
|---|---|---|---|
| code | String | Error code number, globally unique identifier of the error, for example SYS.1000, HOST.1001 | 4.6.21 |
| description | String | Brief summary of the error | 4.6.21 |
| details | String | Detailed error information | 4.6.21 |
| elaboration | String | Reserved field, defaults to null | 4.6.21 |
| opaque | LinkedHashMap | Reserved field, defaults to null | 4.6.21 |
| cause | ErrorCode | Root cause: the source error that triggered the current error. If there is no original error, this field is null | 4.6.21 |
| Name | Type | Description | Starting Version |
|---|---|---|---|
| uuid | String | Resource UUID, uniquely identifies the resource | 4.6.21 |
| name | String | Resource name | 4.6.21 |
| nqn | String | NVMe Qualified Name | 4.6.21 |
| state | String | State | 4.6.21 |
| createDate | Timestamp | Creation time | 4.6.21 |
| lastOpDate | Timestamp | Last modification time | 4.6.21 |
| nvmeLuns | List | For details, see nvmeLuns | 4.6.21 |
| Name | Type | Description | Starting Version |
|---|---|---|---|
| nvmeTargetUuid | String | NVMe device UUID | 4.6.21 |
| name | String | Resource name | 4.6.21 |
| uuid | String | Resource UUID, uniquely identifies the resource | 4.6.21 |
| wwid | String | Global unique identifier | 4.6.21 |
| vendor | String | Vendor | 4.6.21 |
| model | String | Model | 4.6.21 |
| wwn | String | The WWN. | 4.6.21 |
| serial | String | Serial number | 4.6.21 |
| type | String | Type | 4.6.21 |
| hctl | String | The hctl. | 4.6.21 |
| path | String | Path | 4.6.21 |
| state | String | State | 4.6.21 |
| size | Long | Size | 4.6.21 |
| multipathDeviceUuid | String | Multipath device UUID | 4.6.21 |
| source | String | Disk source, NVMe | 4.6.21 |
| createDate | Timestamp | Creation time | 4.6.21 |
| lastOpDate | Timestamp | Last modification time | 4.6.21 |
| nvmeLunHostRefs | List | For details, see nvmeLunHostRefs | 4.6.21 |
| Name | Type | Description | Starting Version |
|---|---|---|---|
| nvmeLunUuid | List | NVMe disk UUID | 4.6.21 |
| hostUuid | String | Host UUID | 4.6.21 |
| path | String | Disk path | 4.6.21 |
| hctl | String | Disk HCTL | 4.6.21 |
| createDate | Timestamp | Creation time | 4.6.21 |
| lastOpDate | Timestamp | Last modification time | 4.6.21 |
SDK Examples
QueryNvmeTargetAction action = new QueryNvmeTargetAction();
action.conditions = asList();
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
QueryNvmeTargetAction.Result res = action.call();QueryNvmeTargetAction action = QueryNvmeTargetAction()
action.conditions = []
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
QueryNvmeTargetAction.Result res = action.call()RefreshNvmeTarget
API Request
POST zstack/v1/storage-devices/nvme/controllersAuthorization: OAuth the-session-uuid{
"params": {
"zoneUuid": "7a7b52cf91933070af3c8273f30ef458"
},
"systemTags": [],
"userTags": []
}
Note: 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 -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| Name | Type | Location | Description | Allowed Values | Starting Version |
|---|---|---|---|---|---|
| zoneUuid | String | body (included in params structure) | The zone UUID. | Data Center UUID | 4.6.21 |
| nvmeLunUuids (Optional) | List | body (included in params structure) | Optional. The nvme lun UUIDs. | NVMe disk UUID | 4.6.21 |
| systemTags (Optional) | List | body | Optional. The system tags. | System Tag | 4.6.21 |
| userTags (Optional) | List | body | Optional. The user tags. | User Tag | 4.6.21 |
API Response
{
"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"
}
]
}| Name | Type | Description | Starting Version |
|---|---|---|---|
| success | boolean | Whether the operation succeeded. | 4.6.21 |
| error | ErrorCode | Error code. If not null, the operation failed. If null, the operation succeeded. For details, see error | 4.6.21 |
| inventories | List | For details, see inventories | 4.6.21 |
| Name | Type | Description | Starting Version |
|---|---|---|---|
| code | String | Error code number, globally unique identifier of the error, for example SYS.1000, HOST.1001 | 4.6.21 |
| description | String | Brief summary of the error | 4.6.21 |
| details | String | Detailed error information | 4.6.21 |
| elaboration | String | Reserved field, defaults to null | 4.6.21 |
| opaque | LinkedHashMap | Reserved field, defaults to null | 4.6.21 |
| cause | ErrorCode | Root cause: the source error that triggered the current error. If there is no original error, this field is null | 4.6.21 |
| Name | Type | Description | Starting Version |
|---|---|---|---|
| uuid | String | Resource UUID, uniquely identifies the resource | 4.6.21 |
| name | String | Resource name | 4.6.21 |
| nqn | String | NVMe Qualified Name | 4.6.21 |
| state | String | State | 4.6.21 |
| createDate | Timestamp | Creation time | 4.6.21 |
| lastOpDate | Timestamp | Last modification time | 4.6.21 |
| nvmeLuns | List | For details, see nvmeLuns. | 4.6.21 |
| Name | Type | Description | Starting Version |
|---|---|---|---|
| nvmeTargetUuid | String | NVMe device UUID | 4.6.21 |
| name | String | Resource name | 4.6.21 |
| uuid | String | Resource UUID, uniquely identifies the resource | 4.6.21 |
| wwid | String | Global unique identifier | 4.6.21 |
| vendor | String | Vendor | 4.6.21 |
| model | String | Model | 4.6.21 |
| wwn | String | The WWN. | 4.6.21 |
| serial | String | Serial number | 4.6.21 |
| type | String | Type | 4.6.21 |
| hctl | String | The hctl. | 4.6.21 |
| path | String | Path | 4.6.21 |
| state | String | State | 4.6.21 |
| size | Long | Size | 4.6.21 |
| multipathDeviceUuid | String | Multipath device UUID | 4.6.21 |
| source | String | Disk source, NVMe | 4.6.21 |
| createDate | Timestamp | Creation time | 4.6.21 |
| lastOpDate | Timestamp | Last modification time | 4.6.21 |
| nvmeLunHostRefs | List | For details, see nvmeLunHostRefs. | 4.6.21 |
| Name | Type | Description | Starting Version |
|---|---|---|---|
| nvmeLunUuid | List | NVMe disk UUID | 4.6.21 |
| hostUuid | String | Host UUID | 4.6.21 |
| path | String | Disk path | 4.6.21 |
| hctl | String | Disk HCTL | 4.6.21 |
| createDate | Timestamp | Creation time | 4.6.21 |
| lastOpDate | Timestamp | Last modification time | 4.6.21 |
SDK Examples
QueryNvmeTargetAction action = new QueryNvmeTargetAction();
action.conditions = asList();
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
QueryNvmeTargetAction.Result res = action.call();QueryNvmeTargetAction action = QueryNvmeTargetAction()
action.conditions = []
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
QueryNvmeTargetAction.Result res = action.call()AddNvmeServer
API Request
POST zstack/v1/storage-devices/nvme/serversAuthorization: OAuth the-session-uuid{
"params": {
"ip": "10.0.0.201",
"port": 4420
},
"systemTags": [],
"userTags": []
}
Note: 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 -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| Name | Type | Location | Description | Allowed Values | Starting Version |
|---|---|---|---|---|---|
| name (Optional) | String | body (included in params structure) |
Name | 4.7.21 | |
| ip | String | body (included in params structure) |
IP address | 4.7.21 | |
| port (Optional) | Integer | body (included in params structure) |
Port | 4.7.21 | |
| transport | String | body (included in params structure) |
Target transport type | 4.7.21 | |
| resourceUuid (Optional) | String | body (included in params structure) |
Resource UUID | 4.7.21 | |
| tagUuids (Optional) | List | body (included in params structure) |
Tag UUID list | 4.7.21 | |
| systemTags (Optional) | List | body | System Tag | 4.7.21 | |
| userTags (Optional) | List | body | User Tag | 4.7.21 |
API Response
{
"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"
}
}| Name | Type | Description | Starting Version |
|---|---|---|---|
| uuid | String | Resource UUID, uniquely identifies the resource | 4.7.21 |
| name | String | Resource name | 4.7.21 |
| ip | String | The IP address. | 4.7.21 |
| port | Integer | The port. | 4.7.21 |
| state | String | The resource state. | 4.7.21 |
| transport | String | The transport. | 4.7.21 |
| createDate | Timestamp | Creation time | 4.7.21 |
| lastOpDate | Timestamp | Last modification time | 4.7.21 |
| nvmeTargets | List | For details, see nvmeTargets | 4.7.21 |
| nvmeClusterRefs | List | For details, see nvmeClusterRefs | 4.7.21 |
| Name | Type | Description | Starting Version |
|---|---|---|---|
| uuid | String | Resource UUID, uniquely identifies the resource | 4.6.21 |
| name | String | Resource name | 4.6.21 |
| nqn | String | NVMe Qualified Name | 4.6.21 |
| nvmeServerUuid | String | NVMe server UUID | 4.7.21 |
| state | String | State | 4.6.21 |
| createDate | Timestamp | Creation time | 4.6.21 |
| lastOpDate | Timestamp | Last modification time | 4.6.21 |
| nvmeLuns | List | For details, see nvmeLuns | 4.6.21 |
| Name | Type | Description | Starting Version |
|---|---|---|---|
| nvmeTargetUuid | String | NVMe device UUID | 4.6.21 |
| name | String | Resource name | 4.6.21 |
| uuid | String | Resource UUID, uniquely identifies the resource | 4.6.21 |
| wwid | String | Global unique identifier | 4.6.21 |
| vendor | String | Vendor | 4.6.21 |
| model | String | Model | 4.6.21 |
| wwn | String | The WWN. | 4.6.21 |
| serial | String | Serial number | 4.6.21 |
| type | String | Type | 4.6.21 |
| hctl | String | The hctl. | 4.6.21 |
| path | String | Path | 4.6.21 |
| state | String | State | 4.6.21 |
| size | Long | Size | 4.6.21 |
| multipathDeviceUuid | String | Multipath device UUID | 4.6.21 |
| source | String | Disk source, NVMe | 4.6.21 |
| createDate | Timestamp | Creation time | 4.6.21 |
| lastOpDate | Timestamp | Last modification time | 4.6.21 |
| nvmeLunHostRefs | List | For details, see nvmeLunHostRefs | 4.6.21 |
| Name | Type | Description | Starting Version |
|---|---|---|---|
| nvmeLunUuid | String | NVMe disk UUID | 4.6.21 |
| hostUuid | String | Host UUID | 4.6.21 |
| path | String | Disk path | 4.6.21 |
| hctl | String | Disk HCTL | 4.6.21 |
| createDate | Timestamp | Creation time | 4.6.21 |
| lastOpDate | Timestamp | Last modification time | 4.6.21 |
| Name | Type | Description | Starting Version |
|---|---|---|---|
| nvmeServerUuid | String | The nvme server UUID. | 4.7.21 |
| clusterUuid | String | Cluster UUID | 4.7.21 |
| createDate | Timestamp | Creation time | 4.7.21 |
| lastOpDate | Timestamp | Last modification time | 4.7.21 |
| Name | Type | Description | Starting Version |
|---|---|---|---|
| code | String | Error code number, globally unique identifier of the error, for example SYS.1000, HOST.1001 | 0.6 |
| description | String | Brief summary of the error | 0.6 |
| details | String | Detailed error information | 0.6 |
| elaboration | String | Reserved field, defaults to null | 0.6 |
| opaque | LinkedHashMap | Reserved field, defaults to null | 0.6 |
| cause | ErrorCode | Root cause: the source error that triggered the current error. If there is no original error, this field is null | 0.6 |
SDK Examples
AddNvmeServerAction action = new AddNvmeServerAction();
action.ip = "10.0.0.201";
action.port = 4420;
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
AddNvmeServerAction.Result res = action.call();AddNvmeServerAction action = AddNvmeServerAction()
action.ip = "10.0.0.201"
action.port = 4420
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
AddNvmeServerAction.Result res = action.call()AttachNvmeServerToCluster
API Request
POST zstack/v1/clusters/{clusterUuid}/storage-devices/nvme/servers/{uuid}Authorization: OAuth the-session-uuid{
"params": {},
"systemTags": [],
"userTags": []
}
Note: 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 -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| Name | Type | Location | Description | Allowed Values | Starting Version |
|---|---|---|---|---|---|
| uuid | String | url | Resource UUID, uniquely identifies the resource | 4.7.21 | |
| clusterUuid | String | url | Cluster UUID | 4.7.21 | |
| systemTags (Optional) | List | body | System Tag | 4.7.21 | |
| userTags (Optional) | List | body | User Tag | 4.7.21 |
API Response
{
"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"
}
}| Name | Type | Description | Starting Version |
|---|---|---|---|
| uuid | String | Resource UUID, uniquely identifies the resource | 4.7.21 |
| name | String | Resource name | 4.7.21 |
| ip | String | The IP address. | 4.7.21 |
| port | Integer | The port. | 4.7.21 |
| state | String | The resource state. | 4.7.21 |
| transport | String | The transport. | 4.7.21 |
| createDate | Timestamp | Creation time | 4.7.21 |
| lastOpDate | Timestamp | Last modification time | 4.7.21 |
| nvmeTargets | List | For details, see nvmeTargets | 4.7.21 |
| nvmeClusterRefs | List | For details, see nvmeClusterRefs | 4.7.21 |
| Name | Type | Description | Starting Version |
|---|---|---|---|
| uuid | String | Resource UUID, uniquely identifies the resource | 4.6.21 |
| name | String | Resource name | 4.6.21 |
| nqn | String | NVMe Qualified Name | 4.6.21 |
| nvmeServerUuid | String | NVMe server UUID | 4.7.21 |
| state | String | State | 4.6.21 |
| createDate | Timestamp | Creation time | 4.6.21 |
| lastOpDate | Timestamp | Last modification time | 4.6.21 |
| nvmeLuns | List | For details, see nvmeLuns | 4.6.21 |
| Name | Type | Description | Starting Version |
|---|---|---|---|
| nvmeTargetUuid | String | NVMe device UUID | 4.6.21 |
| name | String | Resource name | 4.6.21 |
| uuid | String | Resource UUID, uniquely identifies the resource | 4.6.21 |
| wwid | String | Global unique identifier | 4.6.21 |
| vendor | String | Vendor | 4.6.21 |
| model | String | Model | 4.6.21 |
| wwn | String | The WWN. | 4.6.21 |
| serial | String | Serial number | 4.6.21 |
| type | String | Type | 4.6.21 |
| hctl | String | The hctl. | 4.6.21 |
| path | String | Path | 4.6.21 |
| state | String | State | 4.6.21 |
| size | Long | Size | 4.6.21 |
| multipathDeviceUuid | String | Multipath device UUID | 4.6.21 |
| source | String | Disk source, NVMe | 4.6.21 |
| createDate | Timestamp | Creation time | 4.6.21 |
| lastOpDate | Timestamp | Last modification time | 4.6.21 |
| nvmeLunHostRefs | List | For details, see nvmeLunHostRefs | 4.6.21 |
| Name | Type | Description | Starting Version |
|---|---|---|---|
| nvmeLunUuid | String | NVMe disk UUID | 4.6.21 |
| hostUuid | String | Host UUID | 4.6.21 |
| path | String | Disk path | 4.6.21 |
| hctl | String | Disk HCTL | 4.6.21 |
| createDate | Timestamp | Creation time | 4.6.21 |
| lastOpDate | Timestamp | Last modification time | 4.6.21 |
| Name | Type | Description | Starting Version |
|---|---|---|---|
| nvmeServerUuid | String | The nvme server UUID. | 4.7.21 |
| clusterUuid | String | Cluster UUID | 4.7.21 |
| createDate | Timestamp | Creation time | 4.7.21 |
| lastOpDate | Timestamp | Last modification time | 4.7.21 |
| Name | Type | Description | Starting Version |
|---|---|---|---|
| code | String | Error code number, globally unique identifier of the error, for example SYS.1000, HOST.1001 | 0.6 |
| description | String | Brief summary of the error | 0.6 |
| details | String | Detailed error information | 0.6 |
| elaboration | String | Reserved field, defaults to null | 0.6 |
| opaque | LinkedHashMap | Reserved field, defaults to null | 0.6 |
| cause | ErrorCode | Root cause: the source error that triggered the current error. If there is no original error, this field is null | 0.6 |
SDK Examples
AttachNvmeServerToClusterAction action = new AttachNvmeServerToClusterAction();
action.uuid = "28aca7875015311d814e12bb7d03dbab";
action.clusterUuid = "1f8daabbcca53e30bde1f6511f266b53";
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
AttachNvmeServerToClusterAction.Result res = action.call();AttachNvmeServerToClusterAction action = AttachNvmeServerToClusterAction()
action.uuid = "28aca7875015311d814e12bb7d03dbab"
action.clusterUuid = "1f8daabbcca53e30bde1f6511f266b53"
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
AttachNvmeServerToClusterAction.Result res = action.call()DeleteNvmeServer
API Request
DELETE zstack/v1/storage-devices/nvme/servers/{uuid}Authorization: OAuth the-session-uuidcurl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X DELETE http://localhost:8080/zstack/v1/storage-devices/nvme/servers/e8dd5c1f58893f7d946ec4e3999aed0c| Name | Type | Location | Description | Allowed Values | Starting Version |
|---|---|---|---|---|---|
| uuid | String | url | Resource UUID, uniquely identifies the resource | 4.7.21 | |
| deleteMode (Optional) | String | body | Delete mode (Permissive / Enforcing, Permissive) | 4.7.21 | |
| systemTags (Optional) | List | body | System Tag | 4.7.21 | |
| userTags (Optional) | List | body | User Tag | 4.7.21 |
API Response
{} on success, and a JSON structure containing an error field on failure, for example: {
"error": {
"code": "SYS.1001",
"description": "A message or a operation timeout",
"details": "Create VM on KVM timeout after 300s"
}
}SDK Examples
DeleteNvmeServerAction action = new DeleteNvmeServerAction();
action.uuid = "e8dd5c1f58893f7d946ec4e3999aed0c";
action.deleteMode = "Permissive";
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
DeleteNvmeServerAction.Result res = action.call();DeleteNvmeServerAction action = DeleteNvmeServerAction()
action.uuid = "e8dd5c1f58893f7d946ec4e3999aed0c"
action.deleteMode = "Permissive"
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
DeleteNvmeServerAction.Result res = action.call()DetachNvmeServerFromCluster
API Request
DELETE zstack/v1/clusters/{clusterUuid}/storage-devices/nvme/servers/{uuid}Authorization: OAuth the-session-uuidcurl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X DELETE http://localhost:8080/zstack/v1/clusters/5c5365dc4af83cae8976e50f1b44b5b0/storage-devices/nvme/servers/c44c41bd90a2380a936d0267565c60ff| Name | Type | Location | Description | Allowed Values | Starting Version |
|---|---|---|---|---|---|
| uuid | String | url | Resource UUID, uniquely identifies the resource | 4.7.21 | |
| clusterUuid | String | url | Cluster UUID | 4.7.21 | |
| systemTags (Optional) | List | body | System Tag | 4.7.21 | |
| userTags (Optional) | List | body | User Tag | 4.7.21 |
API Response
{
"inventory": {
"uuid": "ee50b8cccd27308588a83408c91eebe5",
"name": "nvme-server-10.0.0.201",
"ip": "10.0.0.201",
"port": 4420,
"state": "Enabled",
"nvmeTargets": [
{
"uuid": "6460b827029f3c0c81e90769f7d560ce",
"nqn": "nqn.2014-08.org.nvmexpress.example1",
"state": "Enabled",
"nvmeLuns": [
{
"nvmeTargetUuid": "6460b827029f3c0c81e90769f7d560ce",
"nvmeLunHostRefs": [],
"uuid": "960298ac721f380db77e602349a42f71",
"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": "ee50b8cccd27308588a83408c91eebe5",
"clusterUuid": "999ecf4771eb3f2b80ca97d88145e4e4",
"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"
}
}| Name | Type | Description | Starting Version |
|---|---|---|---|
| uuid | String | Resource UUID, uniquely identifies the resource | 4.7.21 |
| name | String | Resource name | 4.7.21 |
| ip | String | The IP address. | 4.7.21 |
| port | Integer | The port. | 4.7.21 |
| state | String | The resource state. | 4.7.21 |
| transport | String | The transport. | 4.7.21 |
| createDate | Timestamp | Creation time | 4.7.21 |
| lastOpDate | Timestamp | Last modification time | 4.7.21 |
| nvmeTargets | List | For details, see nvmeTargets | 4.7.21 |
| nvmeClusterRefs | List | For details, see nvmeClusterRefs | 4.7.21 |
| Name | Type | Description | Starting Version |
|---|---|---|---|
| uuid | String | Resource UUID, uniquely identifies the resource | 4.6.21 |
| name | String | Resource name | 4.6.21 |
| nqn | String | NVMe Qualified Name | 4.6.21 |
| nvmeServerUuid | String | NVMe server UUID | 4.7.21 |
| state | String | State | 4.6.21 |
| createDate | Timestamp | Creation time | 4.6.21 |
| lastOpDate | Timestamp | Last modification time | 4.6.21 |
| nvmeLuns | List | For details, see nvmeLuns | 4.6.21 |
| Name | Type | Description | Starting Version |
|---|---|---|---|
| nvmeTargetUuid | String | NVMe device UUID | 4.6.21 |
| name | String | Resource name | 4.6.21 |
| uuid | String | Resource UUID, uniquely identifies the resource | 4.6.21 |
| wwid | String | Global unique identifier | 4.6.21 |
| vendor | String | Vendor | 4.6.21 |
| model | String | Model | 4.6.21 |
| wwn | String | The WWN. | 4.6.21 |
| serial | String | Serial number | 4.6.21 |
| type | String | Type | 4.6.21 |
| hctl | String | The hctl. | 4.6.21 |
| path | String | Path | 4.6.21 |
| state | String | State | 4.6.21 |
| size | Long | Size | 4.6.21 |
| multipathDeviceUuid | String | Multipath device UUID | 4.6.21 |
| source | String | Disk source, NVMe | 4.6.21 |
| createDate | Timestamp | Creation time | 4.6.21 |
| lastOpDate | Timestamp | Last modification time | 4.6.21 |
| nvmeLunHostRefs | List | For details, see nvmeLunHostRefs | 4.6.21 |
| Name | Type | Description | Starting Version |
|---|---|---|---|
| nvmeLunUuid | String | NVMe disk UUID | 4.6.21 |
| hostUuid | String | Host UUID | 4.6.21 |
| path | String | Disk path | 4.6.21 |
| hctl | String | Disk HCTL | 4.6.21 |
| createDate | Timestamp | Creation time | 4.6.21 |
| lastOpDate | Timestamp | Last modification time | 4.6.21 |
| Name | Type | Description | Starting Version |
|---|---|---|---|
| nvmeServerUuid | String | The nvme server UUID. | 4.7.21 |
| clusterUuid | String | Cluster UUID | 4.7.21 |
| createDate | Timestamp | Creation time | 4.7.21 |
| lastOpDate | Timestamp | Last modification time | 4.7.21 |
| Name | Type | Description | Starting Version |
|---|---|---|---|
| code | String | Error code number, globally unique identifier of the error, for example SYS.1000, HOST.1001 | 0.6 |
| description | String | Brief summary of the error | 0.6 |
| details | String | Detailed error information | 0.6 |
| elaboration | String | Reserved field, defaults to null | 0.6 |
| opaque | LinkedHashMap | Reserved field, defaults to null | 0.6 |
| cause | ErrorCode | Root cause: the source error that triggered the current error. If there is no original error, this field is null | 0.6 |
SDK Examples
DetachNvmeServerFromClusterAction action = new DetachNvmeServerFromClusterAction();
action.uuid = "c44c41bd90a2380a936d0267565c60ff";
action.clusterUuid = "5c5365dc4af83cae8976e50f1b44b5b0";
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
DetachNvmeServerFromClusterAction.Result res = action.call();DetachNvmeServerFromClusterAction action = DetachNvmeServerFromClusterAction()
action.uuid = "c44c41bd90a2380a936d0267565c60ff"
action.clusterUuid = "5c5365dc4af83cae8976e50f1b44b5b0"
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
DetachNvmeServerFromClusterAction.Result res = action.call()QueryNvmeServer
API Request
GET zstack/v1/storage-devices/nvme/servers
GET zstack/v1/storage-devices/nvme/servers/{uuid}Authorization: OAuth the-session-uuidcurl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X GET http://localhost:8080/zstack/v1/storage-devices/nvme/serverscurl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X GET http://localhost:8080/zstack/v1/storage-devices/nvme/servers/dc4a7cc72a763b19b05aaba063a4cc29Queryable Fields
Run the CLI command tool, enter QueryNvmeServer and press Tab to view all queryable fields and resource names that can be queried across tables.
API Response
{} on success, and a JSON structure containing an error field on failure, for example: {
"error": {
"code": "SYS.1001",
"description": "A message or a operation timeout",
"details": "Create VM on KVM timeout after 300s"
}
}SDK Examples
QueryNvmeServerAction action = new QueryNvmeServerAction();
action.conditions = asList();
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
QueryNvmeServerAction.Result res = action.call();QueryNvmeServerAction action = QueryNvmeServerAction()
action.conditions = []
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
QueryNvmeServerAction.Result res = action.call()