# Path: os_vif/objects/base.py
# class VersionedObject(ovo_base.VersionedObject):
# class VersionedObjectPrintableMixin(object):
#     OBJ_PROJECT_NAMESPACE = 'os_vif'
#     def __str__(self):
# 
# Path: os_vif/objects/fields.py
# class VIFDirectMode(fields.Enum):
# class VIFDirectModeField(fields.BaseEnumField):
# class VIFVHostUserMode(fields.Enum):
# class VIFVHostUserModeField(fields.BaseEnumField):
# class ListOfIPAddressField(fields.AutoTypedField):
# class VIFHostDeviceDevType(fields.Enum):
# class VIFHostDeviceDevTypeField(fields.BaseEnumField):
#     VEPA = 'vepa'
#     PASSTHROUGH = 'passthrough'
#     BRIDGE = 'bridge'
#     ALL = (VEPA, PASSTHROUGH, BRIDGE)
#     AUTO_TYPE = VIFDirectMode()
#     CLIENT = "client"
#     SERVER = "server"
#     ALL = (CLIENT, SERVER)
#     AUTO_TYPE = VIFVHostUserMode()
#     AUTO_TYPE = fields.List(fields.IPAddress())
#     ETHERNET = 'ethernet'
#     GENERIC = 'generic'
#     ALL = (ETHERNET, GENERIC)
#     AUTO_TYPE = VIFHostDeviceDevType()
#     def __init__(self):
#     def __init__(self):
#     def __init__(self):


from debtcollector import removals
from oslo_utils import versionutils
from oslo_versionedobjects import base
from oslo_versionedobjects import fields
from os_vif.objects import base as osv_base
from os_vif.objects import fields as osv_fields

    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.

# Path: os_vif/objects/base.py
# class VersionedObject(ovo_base.VersionedObject):
# class VersionedObjectPrintableMixin(object):
#     OBJ_PROJECT_NAMESPACE = 'os_vif'
#     def __str__(self):
# 
# Path: os_vif/objects/fields.py
# class VIFDirectMode(fields.Enum):
# class VIFDirectModeField(fields.BaseEnumField):
# class VIFVHostUserMode(fields.Enum):
# class VIFVHostUserModeField(fields.BaseEnumField):
# class ListOfIPAddressField(fields.AutoTypedField):
# class VIFHostDeviceDevType(fields.Enum):
# class VIFHostDeviceDevTypeField(fields.BaseEnumField):
#     VEPA = 'vepa'
#     PASSTHROUGH = 'passthrough'
#     BRIDGE = 'bridge'
#     ALL = (VEPA, PASSTHROUGH, BRIDGE)
#     AUTO_TYPE = VIFDirectMode()
#     CLIENT = "client"
#     SERVER = "server"
#     ALL = (CLIENT, SERVER)
#     AUTO_TYPE = VIFVHostUserMode()
#     AUTO_TYPE = fields.List(fields.IPAddress())
#     ETHERNET = 'ethernet'
#     GENERIC = 'generic'
#     ALL = (ETHERNET, GENERIC)
#     AUTO_TYPE = VIFHostDeviceDevType()
#     def __init__(self):
#     def __init__(self):
#     def __init__(self):


# Path: os_vif/objects/vif.py
from debtcollector import removals
from oslo_utils import versionutils
from oslo_versionedobjects import base
from oslo_versionedobjects import fields
from os_vif.objects import base as osv_base
from os_vif.objects import fields as osv_fields


    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(),