diff --git a/releasenotes/notes/port-profile-info-ovs-63b46a3eafc11de2.yaml b/releasenotes/notes/port-profile-info-ovs-63b46a3eafc11de2.yaml new file mode 100644 index 00000000..2815c3d1 --- /dev/null +++ b/releasenotes/notes/port-profile-info-ovs-63b46a3eafc11de2.yaml @@ -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``. diff --git a/vif_plug_ovs/ovs.py b/vif_plug_ovs/ovs.py index 9dc87e5d..dbf462ec 100644 --- a/vif_plug_ovs/ovs.py +++ b/vif_plug_ovs/ovs.py @@ -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):