Merge "Add support for VIFPortProfileOVSRepresentor"

This commit is contained in:
Jenkins 2017-07-19 15:53:56 +00:00 committed by Gerrit Code Review
commit 18f3f70234
4 changed files with 42 additions and 0 deletions

View File

@ -109,6 +109,14 @@ VIFPortProfileFPOpenVSwitch
This profile provides the metadata required to associate a fast path :term:`vhost-user`
VIF with an :term:`Open vSwitch` port.
VIFPortProfileOVSRepresentor
----------------------------
This profile provides the metadata required to associate a VIF with a
:term:`VF` representor and :term:`Open vSwitch` port. If `representor_name` is
specified, it indicates a desire to rename the representor to the given name
on plugging.
VIFPortProfileFPBridge
----------------------

View File

@ -195,6 +195,21 @@ class VIFPortProfileFPOpenVSwitch(VIFPortProfileOpenVSwitch):
}
@base.VersionedObjectRegistry.register
class VIFPortProfileOVSRepresentor(VIFPortProfileOpenVSwitch):
# Port profile info for OpenVSwitch networks using a representor
VERSION = '1.0'
fields = {
# Name to set on the representor (if set)
'representor_name': fields.StringField(nullable=True),
# The PCI address of the Virtual Function
'representor_address': fields.PCIAddressField(nullable=True),
}
@base.VersionedObjectRegistry.register
class VIFPortProfileFPBridge(VIFPortProfileBase):
# Port profile info for LinuxBridge networks using fastpath

View File

@ -106,6 +106,18 @@ class TestVIFS(base.TestCase):
vif_name="tap123",
port_profile=prof)
def test_vif_vhost_user_ovs_representor(self):
prof = objects.vif.VIFPortProfileOVSRepresentor(
interface_id="07bd6cea-fb37-4594-b769-90fc51854ee8",
profile_id="fishfood",
representor_name="tap123",
representor_address="0002:24:12.3")
self._test_vif(objects.vif.VIFVHostUser,
path="/some/socket.path",
mode=objects.fields.VIFVHostUserMode.CLIENT,
vif_name="tap123",
port_profile=prof)
def test_vif_vhost_user_fp_lb(self):
prof = objects.vif.VIFPortProfileFPBridge(bridge_name="brq456")
self._test_vif(objects.vif.VIFVHostUser,
@ -161,6 +173,7 @@ object_data = {
'VIFPortProfileFPBridge': '1.0-d50872b3cddd245ffebef6053dfbe27a',
'VIFPortProfileFPTap': '1.0-11670d8dbabd772ff0da26961adadc5a',
'VIFVHostUser': '1.1-1f95b43be1f884f090ca1f4d79adfd35',
'VIFPortProfileOVSRepresentor': '1.0-d1b67d954bcab8378c8064771d62ecd5',
}

View File

@ -0,0 +1,6 @@
---
features:
- A new port profile has been added to describe VF representors on OVS-based
switches, as featured in Linux kernel 4.8 and later. This port profile can
currently be used with Agilio OVS networks. It is intended to be flexible
enough to be used by multiple vendors.