Restore VFIO MDEV Sliced PCI Devices

PUT/zstack/v1/pci-devices/{pciDeviceUuid}/actions

Headers

Authorization: OAuth the-session-uuid

Body

{
  "ungenerateMdevDevices": {},
  "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 '{"ungenerateMdevDevices":{}}' http://localhost:8080/zstack/v1/pci-devices/772a0f2d8aaa3626964e080122a48c25/actions

Parameter List

NameTypeLocationDescriptionAllowed ValuesStarting Version
pciDeviceUuidStringurlSliced PCI device UUID 3.5.0
systemTags (Optional)ListbodySystem tags 3.5.0
userTags (Optional)ListbodyUser tags 3.5.0

API Response

This API returns an empty JSON structure {} on success. On error, the returned JSON contains an error field, for example:

{
  "error": {
    "code": "SYS.1001",
    "description": "A message or a operation timeout",
    "details": "Create VM on KVM timeout after 300s"
  }
}

SDK Examples

Java SDK

UngenerateMdevDevicesAction action = new UngenerateMdevDevicesAction();
action.pciDeviceUuid = "772a0f2d8aaa3626964e080122a48c25";
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
UngenerateMdevDevicesAction.Result res = action.call();

Python SDK

UngenerateMdevDevicesAction action = UngenerateMdevDevicesAction()
action.pciDeviceUuid = "772a0f2d8aaa3626964e080122a48c25"
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
UngenerateMdevDevicesAction.Result res = action.call()