示例#1
0
class VIFHostDevice(VIFBase):
    """A hostdev-style VIF.

    Hostdev-style VIFs provide a guest with direct access to an SR-IOV Virtual
    Function (VF). Contrast this with :class:`~ovs_vif.objects.vif.VIFDirect`,
    which includes a software layer between the VF and the guest.

    For libvirt drivers, this maps to type='hostdev'
    """

    # Version 1.0: Initial release
    VERSION = '1.0'

    fields = {
        #: The type of the host device.
        #:
        #: Valid values are ``ethernet`` and ``generic``.
        #:
        #: - ``ethernet`` is ``<interface type='hostdev'>``
        #: - ``generic`` is ``<hostdev mode='subsystem' type='pci'>``
        'dev_type': osv_fields.VIFHostDeviceDevTypeField(),

        #: The PCI address of the host device.
        'dev_address': fields.PCIAddressField(),
    }
示例#2
0
文件: vif.py 项目: przemeklal/os-vif
class VIFHostDevice(VIFBase):
    # For libvirt drivers, this maps to type='hostdev'

    VERSION = '1.0'

    fields = {

        # The type of the host device.
        # Valid values are ethernet and generic.
        # Ethernet is <interface type='hostdev'>
        # Generic is <hostdev mode='subsystem' type='pci'>
        'dev_type': osv_fields.VIFHostDeviceDevTypeField(),

        # The PCI address of the host device
        'dev_address': fields.PCIAddressField(),
    }