Query Ethernet VF

GET/zstack/v1/pci-device/ethernet-vfs
GET/zstack/v1/pci-device/ethernet-vfs/{uuid}

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/pci-device/ethernet-vfs
curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X GET http://localhost:8080/zstack/v1/pci-device/ethernet-vfs/bd26758dc3713723bfcd652b8c714e1e

Queryable Fields

Run the CLI command tool, enter QueryEthernetVF and press Tab to view all queryable fields and resource names that support cross-table queries.

API Response

Response Example

{
  "inventories": [
    {
      "interfaceName": "eth0",
      "vfStatus": "Available",
      "hostUuid": "e21879b9f8c63800a211852d183d6650",
      "parentUuid": "da87312aa5ab3ddbb05c61a3564bc5e4",
      "type": "Ethernet_Controller",
      "vendorId": "10de",
      "deviceId": "0e0f",
      "subvendorId": "10de",
      "subdeviceId": "118b",
      "pciDeviceAddress": "0000:06:00.1"
    }
  ]
}
NameTypeDescriptionStarting Version
successboolean 4.2.0
errorErrorCodeError code. If not null, the operation failed. This field is null when the operation succeeds. See error4.2.0
inventoriesListSee inventories4.2.0

error

NameTypeDescriptionStarting Version
codeStringError code, a globally unique identifier of the error, e.g. SYS.1000, HOST.10014.2.0
descriptionStringBrief description of the error4.2.0
detailsStringDetailed error information4.2.0
elaborationStringReserved field, defaults to null4.2.0
opaqueLinkedHashMapReserved field, defaults to null4.2.0
causeErrorCodeRoot cause, the source error that caused the current error, null if no original error4.2.0

inventories

NameTypeDescriptionStarting Version
hostDevUuidStringHost UUID4.2.0
interfaceNameStringPhysical NIC name4.2.0
vmUuidStringVirtual Machine UUID4.2.0
l3NetworkUuidStringDistributed Port Group UUID4.2.0
uuidStringUUID of the resource, uniquely identifies the resource4.2.0
nameStringResource name4.2.0
descriptionStringResource description4.2.0
hostUuidStringHost UUID4.2.0
parentUuidString 4.2.0
vmInstanceUuidStringVirtual Machine UUID4.2.0
pciSpecUuidString 4.2.0
vendorIdString 4.2.0
deviceIdString 4.2.0
subvendorIdString 4.2.0
subdeviceIdString 4.2.0
pciDeviceAddressString 4.2.0
iommuGroupString 4.2.0
createDateTimestampCreate date4.2.0
lastOpDateTimestampLast update date4.2.0
vfStatusEthernetVfStatusSee vfStatus4.2.0
typePciDeviceTypeSee type4.2.0
statePciDeviceStateSee state4.2.0
statusPciDeviceStatusSee status4.2.0
virtStatusPciDeviceVirtStatusSee virtStatus4.2.0
chooserPciDeviceChooserSee chooser4.2.0
metaDataPciDeviceMetaDataSee metaData4.2.0
matchedPciDeviceOfferingRefListSee matchedPciDeviceOfferingRef4.2.0
mdevSpecRefsListSee mdevSpecRefs4.2.0

vfStatus

NameTypeDescriptionStarting Version
AvailableEthernetVfStatusAvailable4.2.0
ReservedEthernetVfStatusReserved4.2.0
AttachedEthernetVfStatusIn use4.2.0
ReleasingEthernetVfStatusReleasing4.2.0

type

NameTypeDescriptionStarting Version
GPU_Video_ControllerPciDeviceTypeGPU video controller2.1
GPU_Audio_ControllerPciDeviceTypeGPU audio controller2.1
GPU_3D_ControllerPciDeviceTypeGPU 3D controller2.1
Moxa_DevicePciDeviceTypeMOXA card2.1
GenericPciDeviceTypeGeneric device2.1

state

NameTypeDescriptionStarting Version
EnabledPciDeviceStateEnabled2.1
DisabledPciDeviceStateDisabled2.1

status

NameTypeDescriptionStarting Version
ActivePciDeviceStatusReady2.1
AttachedPciDeviceStatusAttached2.1
SystemPciDeviceStatusSystem2.1

virtStatus

NameTypeDescriptionStarting Version
UNVIRTUALIZABLEPciDeviceVirtStatusNot virtualizable3.5.0
SRIOV_VIRTUALIZABLEPciDeviceVirtStatusSR-IOV virtualizable3.5.0
VFIO_MDEV_VIRTUALIZABLEPciDeviceVirtStatusVFIO_MDEV virtualizable3.5.0
SRIOV_VIRTUALIZEDPciDeviceVirtStatusSR-IOV virtualized3.5.0
VFIO_MDEV_VIRTUALIZEDPciDeviceVirtStatusVFIO_MDEV virtualized3.5.0
SRIOV_VIRTUALPciDeviceVirtStatusSR-IOV virtual device3.5.0
UNKNOWNPciDeviceVirtStatusUnknown3.5.0

chooser

NameTypeDescriptionStarting Version
NonePciDeviceChooser 4.8.0
DevicePciDeviceChooser 4.8.0
SpecPciDeviceChooser 4.8.0

metaData

NameTypeDescriptionStarting Version
metaDataString 2.1
metaDataEntriesListSee metaDataEntries2.1

metaDataEntries

NameTypeDescriptionStarting Version
keyStringKey2.1
valueStringValue2.1
opPciDeviceMetaDataOperatorSee op2.1

op

NameTypeDescriptionStarting Version
EqualPciDeviceMetaDataOperatorEqual2.1
UnequalPciDeviceMetaDataOperatorNot equal2.1

matchedPciDeviceOfferingRef

NameTypeDescriptionStarting Version
pciDeviceUuidString 2.1
pciDeviceOfferingUuidString 2.1

mdevSpecRefs

NameTypeDescriptionStarting Version
pciDeviceUuidStringPCI device UUID3.5.0
mdevSpecUuidStringMDEV device spec UUID3.5.0
effectiveBooleanWhether the current MDEV spec is used to split this PCI device3.5.0
createDateTimestampCreate date3.5.0
lastOpDateTimestampLast update date3.5.0

SDK Examples

Java SDK

QueryEthernetVFAction action = new QueryEthernetVFAction();
action.conditions = asList();
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
QueryEthernetVFAction.Result res = action.call();

Python SDK

QueryEthernetVFAction action = QueryEthernetVFAction()
action.conditions = []
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
QueryEthernetVFAction.Result res = action.call()