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

    Despite the confusing name, direct-style VIFs utilize macvtap which is a
    device driver that inserts a software layer between a guest and an SR-IOV
    Virtual Function (VF). Contrast this with
    :class:`~os_vif.objects.vif.VIFHostDevice`, which allows the guest to
    directly connect to the VF.

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

    # Version 1.0: Initial release
    VERSION = '1.0'

    fields = {
        #: Name of the device to create.
        'vif_name': fields.StringField(),

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

        #: Port connection mode.
        'mode': osv_fields.VIFDirectModeField(),

        #: The VLAN device name to use.
        'vlan_name': fields.StringField(),
    }
示例#2
0
文件: vif.py 项目: przemeklal/os-vif
class VIFDirect(VIFBase):
    # For libvirt drivers, this maps to type='direct'

    VERSION = '1.0'

    fields = {
        # Name of the device to create
        'vif_name': fields.StringField(),

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

        # Port connection mode
        'mode': osv_fields.VIFDirectModeField(),

        # The VLAN device name to use
        'vlan_name': fields.StringField(),
    }
示例#3
0
class VIFDirect(VIFBase):
    """A direct-style VIF.

    Despite the confusing name, direct-style VIFs utilize macvtap which is a
    device driver that inserts a software layer between a guest and an SR-IOV
    Virtual Function (VF). Contrast this with
    :class:`~os_vif.objects.vif.VIFHostDevice`, which allows the guest to
    directly connect to the VF.

    The connection to the device may operate in one of a number of different
    modes, :term:`VEPA` (either :term:`802.1Qbg` or :term:`802.1Qbh`),
    passthrough (exclusive assignment of the host NIC) or bridge (ethernet
    layer bridging of traffic). The passthrough mode would be used when there
    is a network device which needs to have a MAC address or VLAN
    configuration. For passthrough of network devices without MAC/VLAN
    configuration, :class:`~os_vif.objects.vif.VIFHostDevice` should be used
    instead.

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

    # Version 1.0: Initial release
    VERSION = '1.0'

    fields = {
        #: Name of the device to create.
        'vif_name': fields.StringField(),

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

        #: Port connection mode.
        'mode': osv_fields.VIFDirectModeField(),

        #: The VLAN device name to use.
        'vlan_name': fields.StringField(),
    }