From a84b2091cf2c84eb4b81e542233bf446440e02b1 Mon Sep 17 00:00:00 2001 From: elajkat Date: Wed, 17 Nov 2021 11:52:56 +0100 Subject: [PATCH] Rehome functions to enable Neutron's segments integration Those functions were part of the neutron devstack plugin but we discussed it during last PTG [1] and decided to move to the Devstack repo as plugins which are used by e.g. CI jobs which are defined outside of the neutron repository. Placement integration is used e.g. in the tempest-slow job which is defined in tempest and used by many different OpenStack projects. [1] https://etherpad.opendev.org/p/neutron-yoga-ptg#L142 Change-Id: I2c26063896ab2679cffd01227a40a3283caa3b17 --- lib/neutron | 5 +++++ lib/neutron_plugins/services/segments | 10 ++++++++++ 2 files changed, 15 insertions(+) create mode 100644 lib/neutron_plugins/services/segments diff --git a/lib/neutron b/lib/neutron index 8708bf43ca..368a1b9c55 100644 --- a/lib/neutron +++ b/lib/neutron @@ -294,6 +294,7 @@ source $TOP_DIR/lib/neutron_plugins/services/l3 source $TOP_DIR/lib/neutron_plugins/services/placement source $TOP_DIR/lib/neutron_plugins/services/trunk source $TOP_DIR/lib/neutron_plugins/services/qos +source $TOP_DIR/lib/neutron_plugins/services/segments # Use security group or not if has_neutron_plugin_security_group; then @@ -416,6 +417,10 @@ function configure_neutron { configure_l3_agent_extension_gateway_ip_qos fi fi + if is_service_enabled neutron-segments; then + configure_placement_neutron + configure_segments_extension + fi # Finally configure Neutron server and core plugin if is_service_enabled q-agt neutron-agent q-svc neutron-api; then diff --git a/lib/neutron_plugins/services/segments b/lib/neutron_plugins/services/segments new file mode 100644 index 0000000000..08936bae49 --- /dev/null +++ b/lib/neutron_plugins/services/segments @@ -0,0 +1,10 @@ +#!/bin/bash + +function configure_segments_service_plugin { + neutron_service_plugin_class_add segments +} + +function configure_segments_extension { + configure_segments_service_plugin +} +