Get Available MDEV Device Spec Candidates

GET/zstack/v1/mdev-device-specs/candidates

Headers

Authorization: OAuth the-session-uuid

Curl Example

curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X GET http://localhost:8080/zstack/v1/mdev-device-specs/candidates?vmInstanceUuid=319897b485313c7a96b0af986b91baea&types=GPU_Video_Controller

Parameter List

NameTypeLocationDescriptionAllowed ValuesStarting Version
clusterUuids (Optional)ListqueryCluster UUID 3.5.0
hostUuid (Optional)StringqueryHost UUID 3.5.0
vmInstanceUuid (Optional)StringqueryVM Instance UUID 3.5.0
vmInstanceUuids (Optional)ListqueryVM Instance UUID List 3.6.1
types (Optional)ListqueryDevice Type 3.5.0
systemTags (Optional)ListquerySystem Tags 3.5.0
userTags (Optional)ListqueryUser Tags 3.5.0

API Response

Response Example

{
  "inventories": [
    {
      "uuid": "b6051f3e98c143d1bee891ff69f8fad4",
      "name": "GRID_M60-2A",
      "specification": "{Max Resolution=1920*1080, GRID License=GRID-Virtual-Apps,3.0, Instance Number=4, Display Heads=4, Vendor=NVIDIA, Frame Rate Limit=60FPS, Name=GRID_M60-2A, RAM=2048MB}",
      "type": "GPU_Video_Controller",
      "state": "Enabled",
      "createDate": "Nov 14, 2017 10:20:57 PM",
      "lastOpDate": "Nov 14, 2017 10:20:57 PM"
    }
  ]
}
NameTypeDescriptionStarting Version
successboolean 0.6
errorErrorCodeError code. If not null, the operation failed. This field is null when the operation succeeds. See error3.5.0
inventoriesListSee inventories3.5.0

error

NameTypeDescriptionStarting Version
codeStringError code, a globally unique identifier, e.g. SYS.1000, HOST.10013.5.0
descriptionStringBrief description of the error3.5.0
detailsStringDetailed error information3.5.0
elaborationStringReserved field, defaults to null3.5.0
opaqueLinkedHashMapReserved field, defaults to null3.5.0
causeErrorCodeRoot cause, the source error that caused the current error, null if no original error3.5.0

inventories

NameTypeDescriptionStarting Version
uuidStringUUID of the resource, uniquely identifies the resource3.5.0
nameStringResource name3.5.0
descriptionStringResource description3.5.0
specificationStringSpecification details3.5.0
createDateTimestampCreate date3.5.0
lastOpDateTimestampLast modified date3.5.0
typeMdevDeviceTypeSee type3.5.0
stateMdevDeviceSpecStateSee state3.5.0

type

NameTypeDescriptionStarting Version
GPU_Video_ControllerMdevDeviceTypeGPU video controller3.5.0

state

NameTypeDescriptionStarting Version
EnabledMdevDeviceSpecStateEnabled3.5.0
DisabledMdevDeviceSpecStateDisabled3.5.0

SDK Examples

Java SDK

GetMdevDeviceSpecCandidatesAction action = new GetMdevDeviceSpecCandidatesAction();
action.vmInstanceUuid = "319897b485313c7a96b0af986b91baea";
action.types = asList("GPU_Video_Controller");
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
GetMdevDeviceSpecCandidatesAction.Result res = action.call();

Python SDK

GetMdevDeviceSpecCandidatesAction action = GetMdevDeviceSpecCandidatesAction()
action.vmInstanceUuid = "319897b485313c7a96b0af986b91baea"
action.types = [GPU_Video_Controller]
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
GetMdevDeviceSpecCandidatesAction.Result res = action.call()