Update Host IOMMU State

PUT/zstack/v1/pci-device/hosts/{uuid}/actions

Headers

Authorization: OAuth the-session-uuid

Body

{
  "updateHostIommuState": {
    "state": "Enabled"
  },
  "systemTags": [],
  "userTags": []
}

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

Curl Example

curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X PUT -d '{"updateHostIommuState":{"state":"Enabled"}}' \
http://localhost:8080/zstack/v1/pci-device/hosts/7619742c9ff43b898487db33e1f096a4/actions

Parameter List

Name

Type

Location

Description

Allowed Values

Starting Version

uuid

String

url

UUID of the resource, uniquely identifies the resource

 

2.1

state

String

body(inside the updateHostIommuState structure)

 

  • Enabled
  • Disabled

2.1

systemTags (Optional)

List

body

 

 

2.1

userTags (Optional)

List

body

 

 

2.1

API Response

Response Example

{
  "state": "Enabled"
}
NameTypeDescriptionStarting Version
successboolean 0.6
errorErrorCodeError code. If not null, the operation failed. This field is null when the operation succeeds. See error2.1
stateHostIommuStateTypeSee state2.1

error

NameTypeDescriptionStarting Version
codeStringError code, a globally unique identifier of the error, e.g. SYS.1000, HOST.10012.1
descriptionStringBrief description of the error2.1
detailsStringDetailed error information2.1
elaborationStringReserved field, defaults to null2.1
opaqueLinkedHashMapReserved field, defaults to null2.1
causeErrorCodeRoot cause, the source error that caused the current error, null if no original error2.1

state

NameTypeDescriptionStarting Version
nameStringResource name0.6
ordinalint 0.6

SDK Examples

Java SDK

UpdateHostIommuStateAction action = new UpdateHostIommuStateAction();
action.uuid = "7619742c9ff43b898487db33e1f096a4";
action.state = "Enabled";
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
UpdateHostIommuStateAction.Result res = action.call();

Python SDK

UpdateHostIommuStateAction action = UpdateHostIommuStateAction()
action.uuid = "7619742c9ff43b898487db33e1f096a4"
action.state = "Enabled"
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
UpdateHostIommuStateAction.Result res = action.call()