os-vif: add new port profiles to enable fast path vhostuser
The 6WIND fast path technology provides connectivity for vhostuser ports in traditional networks (including ovs, linuxbridge, calico). This patch defines new port profiles to model fast path vhostuser vifs in order to provide os-vif plugin with enough information for plug/unplug ports. Signed-off-by: Francesco Santoro <francesco.santoro@6wind.com> Change-Id: Ibae8e2ae145b2b9ad2b4955825638dee9b56f0aa
This commit is contained in:
parent
56746802ee
commit
a43f9b15e0
@ -97,6 +97,24 @@ VIFPortProfile8021Qbh
|
||||
This profile provides the metadata required to associate a VIF
|
||||
with a VEPA host device supporting the 801.1Qbg spec.
|
||||
|
||||
VIFPortProfileFPOpenVSwitch
|
||||
---------------------------
|
||||
|
||||
This profile provides the metadata required to associate a fast path
|
||||
vhostuser VIF with an openvswitch port.
|
||||
|
||||
VIFPortProfileFPBridge
|
||||
----------------------
|
||||
|
||||
This profile provides the metadata required to associate a fast path
|
||||
vhostuser VIF with a linuxbridge port.
|
||||
|
||||
VIFPortProfileFPTap
|
||||
-------------------
|
||||
|
||||
This profile provides the metadata required to associate a fast path
|
||||
vhostuser VIF with a calico port.
|
||||
|
||||
|
||||
VIF network objects
|
||||
===================
|
||||
|
@ -180,6 +180,45 @@ class VIFPortProfileOpenVSwitch(VIFPortProfileBase):
|
||||
}
|
||||
|
||||
|
||||
@base.VersionedObjectRegistry.register
|
||||
class VIFPortProfileFPOpenVSwitch(VIFPortProfileOpenVSwitch):
|
||||
# Port profile info for OpenVSwitch networks using fastpath
|
||||
|
||||
VERSION = '1.0'
|
||||
|
||||
fields = {
|
||||
# Name of the bridge (managed by fast path) to connect to
|
||||
'bridge_name': fields.StringField(),
|
||||
|
||||
# Whether the OpenVSwitch network is using hybrid plug
|
||||
'hybrid_plug': fields.BooleanField(default=False),
|
||||
}
|
||||
|
||||
|
||||
@base.VersionedObjectRegistry.register
|
||||
class VIFPortProfileFPBridge(VIFPortProfileBase):
|
||||
# Port profile info for LinuxBridge networks using fastpath
|
||||
|
||||
VERSION = '1.0'
|
||||
|
||||
fields = {
|
||||
# Name of the bridge (managed by fast path) to connect to
|
||||
'bridge_name': fields.StringField(),
|
||||
}
|
||||
|
||||
|
||||
@base.VersionedObjectRegistry.register
|
||||
class VIFPortProfileFPTap(VIFPortProfileBase):
|
||||
# Port profile info for Calico networks using fastpath
|
||||
|
||||
VERSION = '1.0'
|
||||
|
||||
fields = {
|
||||
# The mac address of the host vhostuser port
|
||||
'mac_address': fields.MACAddressField(nullable=True),
|
||||
}
|
||||
|
||||
|
||||
@base.VersionedObjectRegistry.register
|
||||
class VIFPortProfile8021Qbg(VIFPortProfileBase):
|
||||
# Port profile info for VEPA 802.1qbg networks
|
||||
|
@ -94,6 +94,34 @@ class TestVIFS(base.TestCase):
|
||||
mode=objects.fields.VIFVHostUserMode.CLIENT,
|
||||
vif_name="vhu123")
|
||||
|
||||
def test_vif_vhost_user_fp_ovs(self):
|
||||
prof = objects.vif.VIFPortProfileFPOpenVSwitch(
|
||||
interface_id="07bd6cea-fb37-4594-b769-90fc51854ee8",
|
||||
profile_id="fishfood",
|
||||
bridge_name="br-int",
|
||||
hybrid_plug=False)
|
||||
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,
|
||||
path="/some/socket.path",
|
||||
mode=objects.fields.VIFVHostUserMode.CLIENT,
|
||||
vif_name="tap123",
|
||||
port_profile=prof)
|
||||
|
||||
def test_vif_vhost_user_fp_tap(self):
|
||||
prof = objects.vif.VIFPortProfileFPTap(mac_address="fa:16:3e:4c:2c:30")
|
||||
self._test_vif(objects.vif.VIFVHostUser,
|
||||
path="/some/socket.path",
|
||||
mode=objects.fields.VIFVHostUserMode.CLIENT,
|
||||
vif_name="tap123",
|
||||
port_profile=prof)
|
||||
|
||||
def test_vif_host_dev_plain(self):
|
||||
self._test_vif(
|
||||
objects.vif.VIFHostDevice,
|
||||
@ -129,6 +157,9 @@ object_data = {
|
||||
'VIFPortProfile8021Qbh': '1.0-4b945f07d2666ab00a48d1dc225669b1',
|
||||
'VIFPortProfileBase': '1.0-77509ea1ea0dd750d5864b9bd87d3f9d',
|
||||
'VIFPortProfileOpenVSwitch': '1.0-533126c2a16b1a40ddf38c33e7b1f1c5',
|
||||
'VIFPortProfileFPOpenVSwitch': '1.0-9fc1799cb0adcd469481653b0420dc5e',
|
||||
'VIFPortProfileFPBridge': '1.0-d50872b3cddd245ffebef6053dfbe27a',
|
||||
'VIFPortProfileFPTap': '1.0-11670d8dbabd772ff0da26961adadc5a',
|
||||
'VIFVHostUser': '1.1-1f95b43be1f884f090ca1f4d79adfd35',
|
||||
}
|
||||
|
||||
|
@ -0,0 +1,7 @@
|
||||
---
|
||||
features:
|
||||
- New port profiles have been added to describe vhostuser fast path VIFs.
|
||||
In particular fast path vhostuser ports can be used with ovs,
|
||||
linuxbridge and calico networks.
|
||||
Thus for each kind of network a dedicated port profile class has been
|
||||
defined.
|
Loading…
Reference in New Issue
Block a user