Skip to main content
Resource Center/Hardware/Host Operations/PCI Device Operations
GETPCI Device OperationsSince 2.4SynchronousAuth Required

GetPciDeviceCandidatesForNewCreateVm

GetPciDeviceCandidatesForNewCreateVm

Execution Availability

Try It Out

Submit a mock request using the current auth context and example-driven inputs.

Query Parameters

Request Inputs

Query Parameters

  • hostUuidString

    Optional. The host UUID.

  • clusterUuidsList

    Optional. The cluster UUIDs.

  • typesList

    Optional. The types.

  • systemTagsList

    Optional. The system tags.

  • userTagsList

    Optional. The user tags.

Responses

200 OK

On success, this API returns the following response structure.

  • successbooleanRequired

    操作是否成功。

  • errorErrorCodeRequired

    The error code. If not null, the operation fails, or vice versa. For more information, see error.

    • codeStringRequired

      The error code, which is a numbered or alphanumeric code that specifies an error. For example, SYS.1000, HOST.1001.

    • descriptionStringRequired

      The brief description of the error.

    • detailsStringRequired

      The details about the error.

    • elaborationStringRequired

      The reserved field. Default value: null.

    • opaqueLinkedHashMapRequired

      The reserved field. Default value: null.

    • causeErrorCodeRequired

      The root error, which is the associated root cause of the current error. If no root error exists, this parameter is null.

  • inventoriesListRequired

    See inventories.

    • uuidStringRequired

      The resource UUID.

    • nameStringRequired

      The resource name.

    • descriptionStringRequired

      The detailed description of the resource.

    • hostUuidStringRequired

      The host UUID.

    • parentUuidStringRequired

      The UUID of the physical PCI device.

    • vmInstanceUuidStringRequired

      The VM instance UUID.

    • pciSpecUuidStringRequired

      The UUID of the PCI device specification.

    • vendorIdStringRequired

      The vendor ID.

    • deviceIdStringRequired

      The device ID.

    • subvendorIdStringRequired

      The sub-vendor ID.

    • subdeviceIdStringRequired

      The sub-device ID.

    • pciDeviceAddressStringRequired

      The PCI device address.

    • createDateTimestampRequired

      The creation date.

    • lastOpDateTimestampRequired

      The last operation date.

    • typePciDeviceTypeRequired

      See type.

      • GPU_Video_ControllerPciDeviceTypeRequired

        The GPU video controller.

      • GPU_Audio_ControllerPciDeviceTypeRequired

        The GPU audio controller.

      • GPU_3D_ControllerPciDeviceTypeRequired

        The GPU 3D controller.

      • Moxa_DevicePciDeviceTypeRequired

        The MOXA card.

      • GenericPciDeviceTypeRequired

        The general device.

    • statePciDeviceStateRequired

      See state.

      • EnabledPciDeviceStateRequired

        The PCI device is enabled.

      • DisabledPciDeviceStateRequired

        The PCI device is disabled.

    • statusPciDeviceStatusRequired

      See status.

      • ActivePciDeviceStatusRequired

        The PCI device is active.

      • AttachedPciDeviceStatusRequired

        The PCI device is attached.

      • SystemPciDeviceStatusRequired

        The PCI device is managed by the system.

    • virtStatusPciDeviceVirtStatusRequired

      See virtStatus.

      • UNVIRTUALIZABLEPciDeviceVirtStatusRequired

        Cannot be virtualized.

      • SRIOV_VIRTUALIZABLEPciDeviceVirtStatusRequired

        Supports SR-IOV.

      • VFIO_MDEV_VIRTUALIZABLEPciDeviceVirtStatusRequired

        Supports VFIO MDEV.

      • SRIOV_VIRTUALIZEDPciDeviceVirtStatusRequired

        Has been virtualized by SR-IOV.

      • VFIO_MDEV_VIRTUALIZEDPciDeviceVirtStatusRequired

        Has been virtualized by VFIO MDEV.

      • SRIOV_VIRTUALPciDeviceVirtStatusRequired

        The SR-IOV device.

      • UNKNOWNPciDeviceVirtStatusRequired

        The status is unknown.

    • metaDataPciDeviceMetaDataRequired

      See metaData.

      • metaDataStringRequired

        元数据。

      • metaDataEntriesListRequired

        See metaDataEntries.

        • keyStringRequired

          The key.

        • valueStringRequired

          The value.

        • opPciDeviceMetaDataOperatorRequired

          See op.

          • EqualPciDeviceMetaDataOperatorRequired

            The equal operator.

          • UnequalPciDeviceMetaDataOperatorRequired

            The not equal operator.

    • matchedPciDeviceOfferingRefListRequired

      See matchedPciDeviceOfferingRef.

      • pciDeviceUuidStringRequired

        No description provided.

      • pciDeviceOfferingUuidStringRequired

        No description provided.

    • mdevSpecRefsListRequired

      See mdevSpecRefs.

      • pciDeviceUuidStringRequired

        The PCI device UUID.

      • mdevSpecUuidStringRequired

        The UUID of the MDEV device specification.

      • effectiveBooleanRequired

        Whether the current MDEV device specification is used to segment the PCI device.

      • createDateTimestampRequired

        The creation date.

      • lastOpDateTimestampRequired

        The last operation date.

  • errorErrorCodeRequired

    See error.

    • codeStringRequired

      The error code, which is a numbered or alphanumeric code that specifies an error. For example, SYS.1000, HOST.1001.

    • descriptionStringRequired

      The brief description of the error.

    • detailsStringRequired

      The details about the error.

    • elaborationStringRequired

      The reserved field. Default value: null.

    • opaqueLinkedHashMapRequired

      The reserved field. Default value: null.

    • causeErrorCodeRequired

      The root error, which is the associated root cause of the current error. If no root error exists, this parameter is null.

Endpoint

GET/zstack/v1/pci-device/candidate-pci-devices-for-new-create-vm

/zstack/v1/pci-device/candidate-pci-devices-for-new-create-vm

Operation ID

GetPciDeviceCandidatesForNewCreateVm

Permalink

Request Example

curl -X GET 'http://{host}/zstack/v1/pci-device/candidate-pci-devices-for-new-create-vm?hostUuid=<hostUuid>&clusterUuids=<clusterUuids>&types=<types>&systemTags=<systemTags>&userTags=<userTags>' -H 'Authorization: OAuth {sessionUuid}'

Response Example

200
{ "inventories": [ { "uuid": "1d2d54391e4d303cbf12543508b208ba", "hostUuid": "d98a93185af134fda630723444fd49d4", "status": "Attached", "type": "GPU_Video_Controller", "vendorId": "10de", "deviceId": "0e0f", "subvendorId": "10de", "subdeviceId": "118b", "pciDeviceAddress": "0000:06:00.1" } ] }

Change History

This API has no change history records yet.

View all change history