Add Port Profile info to VIF objects OVS plugin

Added the Port Profile information to each VIF type in ``vif_plug_ovs``.
This information will be populated to Nova through os_vif.host_info
function.

Change-Id: I655cb35660072e9adecdc742c4540b8f680510e0
Blueprint: vif-port-profile
This commit is contained in:
Rodolfo Alonso Hernandez 2017-08-04 11:08:07 +01:00
parent 4ac9048290
commit e40b3dbb12
2 changed files with 29 additions and 4 deletions

View File

@ -0,0 +1,9 @@
---
features:
- |
In ``vif_plug_ovs``, a new field called ``supported_port_profiles`` is
added to ``HostVIFInfo`` objects. This field is a list of
``HostPortProfileInfo`` objects describing the supported port profiles for
each specific VIF type.
Currently two port profiles are supported: ``VIFPortProfileOpenVSwitch``
and ``VIFPortProfileOVSRepresentor``.

View File

@ -65,25 +65,41 @@ class OvsPlugin(plugin.PluginBase):
OvsPlugin.gen_port_name("qvo", vif.id))
def describe(self):
pp_ovs = objects.host_info.HostPortProfileInfo(
profile_object_name=
objects.vif.VIFPortProfileOpenVSwitch.__name__,
min_version="1.0",
max_version="1.0",
)
pp_ovs_representor = objects.host_info.HostPortProfileInfo(
profile_object_name=
objects.vif.VIFPortProfileOVSRepresentor.__name__,
min_version="1.0",
max_version="1.0",
)
return objects.host_info.HostPluginInfo(
plugin_name=constants.PLUGIN_NAME,
vif_info=[
objects.host_info.HostVIFInfo(
vif_object_name=objects.vif.VIFBridge.__name__,
min_version="1.0",
max_version="1.0"),
max_version="1.0",
supported_port_profiles=[pp_ovs]),
objects.host_info.HostVIFInfo(
vif_object_name=objects.vif.VIFOpenVSwitch.__name__,
min_version="1.0",
max_version="1.0"),
max_version="1.0",
supported_port_profiles=[pp_ovs]),
objects.host_info.HostVIFInfo(
vif_object_name=objects.vif.VIFVHostUser.__name__,
min_version="1.0",
max_version="1.0"),
max_version="1.0",
supported_port_profiles=[pp_ovs, pp_ovs_representor]),
objects.host_info.HostVIFInfo(
vif_object_name=objects.vif.VIFHostDevice.__name__,
min_version="1.0",
max_version="1.0"),
max_version="1.0",
supported_port_profiles=[pp_ovs, pp_ovs_representor]),
])
def _get_mtu(self, vif):