From faed11d2a1c9a9bb06ba855d5b551b231dd6bf82 Mon Sep 17 00:00:00 2001 From: Slawek Kaplonski Date: Thu, 18 Nov 2021 10:36:57 +0100 Subject: [PATCH] Add missing ml2, L2 and L3 agent functions to devstack Previously those functions were defined in the neutron's devstack plugin but with [1] we moved qos related code into devstack and we missed about moving them too. This is follow up patch to fix that issue. [1] https://review.opendev.org/c/openstack/devstack/+/815686 Change-Id: Icf459a2f8c6ae3c3cb29b16ba0b92766af41af30 --- lib/neutron-legacy | 9 +++++++++ lib/neutron_plugins/ml2 | 4 ++++ lib/neutron_plugins/services/l3 | 9 +++++++++ 3 files changed, 22 insertions(+) diff --git a/lib/neutron-legacy b/lib/neutron-legacy index a3f6f0788d..a5a608df72 100644 --- a/lib/neutron-legacy +++ b/lib/neutron-legacy @@ -1039,6 +1039,15 @@ function _ssh_check_neutron { test_with_retry "$testcmd" "server $ip didn't become ssh-able" $timeout_sec } +function plugin_agent_add_l2_agent_extension { + local l2_agent_extension=$1 + if [[ -z "$L2_AGENT_EXTENSIONS" ]]; then + L2_AGENT_EXTENSIONS=$l2_agent_extension + elif [[ ! ,${L2_AGENT_EXTENSIONS}, =~ ,${l2_agent_extension}, ]]; then + L2_AGENT_EXTENSIONS+=",$l2_agent_extension" + fi +} + # Restore xtrace $_XTRACE_NEUTRON diff --git a/lib/neutron_plugins/ml2 b/lib/neutron_plugins/ml2 index e1f868f0a7..f00feac6b4 100644 --- a/lib/neutron_plugins/ml2 +++ b/lib/neutron_plugins/ml2 @@ -156,5 +156,9 @@ function has_neutron_plugin_security_group { return 0 } +function configure_qos_ml2 { + neutron_ml2_extension_driver_add "qos" +} + # Restore xtrace $_XTRACE_NEUTRON_ML2 diff --git a/lib/neutron_plugins/services/l3 b/lib/neutron_plugins/services/l3 index 98b96ac06c..72f7a32b26 100644 --- a/lib/neutron_plugins/services/l3 +++ b/lib/neutron_plugins/services/l3 @@ -427,3 +427,12 @@ function is_networking_extension_supported { EXT_LIST=$(openstack --os-cloud devstack-admin --os-region "$REGION_NAME" extension list --network -c Alias -f value) [[ $EXT_LIST =~ $extension ]] && return 0 } + +function plugin_agent_add_l3_agent_extension { + local l3_agent_extension=$1 + if [[ -z "$L3_AGENT_EXTENSIONS" ]]; then + L3_AGENT_EXTENSIONS=$l3_agent_extension + elif [[ ! ,${L3_AGENT_EXTENSIONS}, =~ ,${l3_agent_extension}, ]]; then + L3_AGENT_EXTENSIONS+=",$l3_agent_extension" + fi +}