From c08e11097a4b9d93ba7b260e9dc543ed121c3ddc Mon Sep 17 00:00:00 2001 From: Manuel Buil Date: Tue, 4 Dec 2018 12:07:13 +0100 Subject: [PATCH] Use the new services names for sfc Since Rocky, sfc and flow_classifier can be used instead of -networking_sfc.services.sfc.plugin.SfcPlugin -networking_sfc.services.sfc.plugin.FlowClassifierPlugin which looks better Change-Id: Ie94db64abf6cba1ba76c3c3e9b614b8b0be38d0b Signed-off-by: Manuel Buil --- doc/source/app-opendaylight.rst | 4 +-- doc/source/app-openvswitch-sfc.rst | 4 +-- ...daylight-sfc-support-8b249b8f8efbc087.yaml | 29 +++++++++++++++++++ tasks/providers/opendaylight_config.yml | 2 +- tasks/providers/setup_ovs_opendaylight.yml | 2 +- templates/neutron.conf.j2 | 2 +- .../plugins/ml2/openvswitch_agent.ini.j2 | 2 +- tests/neutron-overrides-odl-sfc.yml | 4 +-- tests/neutron-overrides-ovs-sfc.yml | 4 +-- vars/main.yml | 4 +-- 10 files changed, 43 insertions(+), 14 deletions(-) create mode 100644 releasenotes/notes/neutron-opendaylight-sfc-support-8b249b8f8efbc087.yaml diff --git a/doc/source/app-opendaylight.rst b/doc/source/app-opendaylight.rst index 40801c01..36fed877 100644 --- a/doc/source/app-opendaylight.rst +++ b/doc/source/app-opendaylight.rst @@ -115,8 +115,8 @@ The following config needs to be added to the above described neutron_plugin_base: - router - metering - - networking_sfc.services.flowclassifier.plugin.FlowClassifierPlugin - - networking_sfc.services.sfc.plugin.SfcPlugin + - flow_classifier + - sfc When using this configuration, networking-sfc will be deployed and SFC features will be activated in ODL. A SFC topology could be then set up through the diff --git a/doc/source/app-openvswitch-sfc.rst b/doc/source/app-openvswitch-sfc.rst index f6aca09a..e37954b1 100644 --- a/doc/source/app-openvswitch-sfc.rst +++ b/doc/source/app-openvswitch-sfc.rst @@ -55,8 +55,8 @@ Set the following user variables in your neutron_plugin_base: - router - metering - - networking_sfc.services.flowclassifier.plugin.FlowClassifierPlugin - - networking_sfc.services.sfc.plugin.SfcPlugin + - flow_classifier + - sfc # Typically this would be defined by the os-neutron-install # playbook. The provider_networks library would parse the diff --git a/releasenotes/notes/neutron-opendaylight-sfc-support-8b249b8f8efbc087.yaml b/releasenotes/notes/neutron-opendaylight-sfc-support-8b249b8f8efbc087.yaml new file mode 100644 index 00000000..c09bec89 --- /dev/null +++ b/releasenotes/notes/neutron-opendaylight-sfc-support-8b249b8f8efbc087.yaml @@ -0,0 +1,29 @@ +--- +features: + - | + The Neutron Service Function Chaining Extension (SFC) can optionally be deployed and + configured by defining the following service plugins: + + * ``flow_classifier`` + * ``sfc`` + + .. code-block:: yaml + + neutron_plugin_base: + - router + - metering + - flow_classifier + - sfc + + For more information about SFC in Neutron, refer to the following: + + * `Service Function Chaining Extension for OpenStack Networking + `_ + +upgrade: + - | + The plugin names for the classifier and sfc changed: + + * networking_sfc.services.flowclassifier.plugin.FlowClassifierPlugin => flow_classifier + + * networking_sfc.services.sfc.plugin.SfcPlugin => sfc diff --git a/tasks/providers/opendaylight_config.yml b/tasks/providers/opendaylight_config.yml index bf8461be..7d4e3785 100644 --- a/tasks/providers/opendaylight_config.yml +++ b/tasks/providers/opendaylight_config.yml @@ -17,7 +17,7 @@ set_fact: neutron_optional_combined_pip_packages: |- {% set packages = neutron_optional_opendaylight_pip_packages %} - {% if 'networking_sfc.services.sfc.plugin.SfcPlugin' in neutron_plugin_base %} + {% if 'sfc' in neutron_plugin_base %} {% set _ = packages.extend(neutron_optional_sfc_pip_packages) %} {% endif %} {{ packages }} diff --git a/tasks/providers/setup_ovs_opendaylight.yml b/tasks/providers/setup_ovs_opendaylight.yml index dee1c1d4..e0885dc3 100644 --- a/tasks/providers/setup_ovs_opendaylight.yml +++ b/tasks/providers/setup_ovs_opendaylight.yml @@ -48,5 +48,5 @@ - name: Set the of-tunnel to true command: "ovs-vsctl set Open_vSwitch . external_ids:of-tunnel=true" when: - - neutron_plugin_base == 'networking_sfc.services.sfc.plugin.SfcPlugin' + - neutron_plugin_base == 'sfc' diff --git a/templates/neutron.conf.j2 b/templates/neutron.conf.j2 index da058cb3..0e415bff 100644 --- a/templates/neutron.conf.j2 +++ b/templates/neutron.conf.j2 @@ -263,7 +263,7 @@ transport_url = {{ neutron_oslomsg_notify_transport }}://{% for host in neutron_ [oslo_concurrency] lock_path = {{ neutron_lock_path }} -{% if neutron_services['neutron-server']['group'] in group_names and 'networking_sfc.services.sfc.plugin.SfcPlugin' in neutron_plugin_base %} +{% if neutron_services['neutron-server']['group'] in group_names and 'sfc' in neutron_plugin_base %} # ODL-SFC [sfc] drivers = {{ (neutron_plugin_type == 'ml2.opendaylight') | ternary('odl_v2', 'ovs') }} diff --git a/templates/plugins/ml2/openvswitch_agent.ini.j2 b/templates/plugins/ml2/openvswitch_agent.ini.j2 index 761816b3..64873805 100644 --- a/templates/plugins/ml2/openvswitch_agent.ini.j2 +++ b/templates/plugins/ml2/openvswitch_agent.ini.j2 @@ -19,7 +19,7 @@ enable_distributed_routing = {{ neutron_plugins[neutron_plugin_type].router_dist {% if 'qos' in neutron_plugin_base %} {% set _ = ovs_agent_extensions.append("qos") %} {% endif %} -{% if 'networking_sfc.services.sfc.plugin.SfcPlugin' in neutron_plugin_base %} +{% if 'sfc' in neutron_plugin_base %} {% set _ = ovs_agent_extensions.append("sfc") %} {% endif %} extensions = {{ ovs_agent_extensions | join(',') }} diff --git a/tests/neutron-overrides-odl-sfc.yml b/tests/neutron-overrides-odl-sfc.yml index ec0958e0..c8dd002d 100644 --- a/tests/neutron-overrides-odl-sfc.yml +++ b/tests/neutron-overrides-odl-sfc.yml @@ -28,8 +28,8 @@ neutron_opendaylight_conf_ini_overrides: neutron_plugin_base: - router - metering - - networking_sfc.services.flowclassifier.plugin.FlowClassifierPlugin - - networking_sfc.services.sfc.plugin.SfcPlugin + - sfc + - flow_classifier tempest_run: yes diff --git a/tests/neutron-overrides-ovs-sfc.yml b/tests/neutron-overrides-ovs-sfc.yml index 58d37589..79e9bd94 100644 --- a/tests/neutron-overrides-ovs-sfc.yml +++ b/tests/neutron-overrides-ovs-sfc.yml @@ -24,8 +24,8 @@ group: "physical_host" neutron_plugin_base: - router - metering - - networking_sfc.services.flowclassifier.plugin.FlowClassifierPlugin - - networking_sfc.services.sfc.plugin.SfcPlugin + - sfc + - flow_classifier tempest_run: yes diff --git a/vars/main.yml b/vars/main.yml index 40e8341f..08f12b90 100644 --- a/vars/main.yml +++ b/vars/main.yml @@ -191,7 +191,7 @@ neutron_tunnel_types: "{{ neutron_ml2_drivers_type.split(',') | difference(_neut # OpenDaylight opendaylight_extra_features: |- {%- set features = ['odl-netvirt-openstack'] -%} - {%- if 'networking_sfc.services.sfc.plugin.SfcPlugin' in neutron_plugin_base -%} + {%- if 'sfc' in neutron_plugin_base -%} {%- set features = ['odl-netvirt-sfc'] -%} {%- endif -%} {{ features }} @@ -285,7 +285,7 @@ neutron_port_forwarding: "{{ ('port_forwarding' in neutron_plugin_base) | ternar ### Service Function Chaining ### -neutron_sfc: "{{ ('networking_sfc.services.sfc.plugin.SfcPlugin' in neutron_plugin_base) | ternary('True', 'False') }}" +neutron_sfc: "{{ ('sfc' in neutron_plugin_base) | ternary('True', 'False') }}" ### ### Services info