From 66d50cdbd744cfacfa90905333e3b7dd9cb1ba90 Mon Sep 17 00:00:00 2001 From: Oleg Bondarev Date: Wed, 17 Nov 2021 12:43:09 +0300 Subject: [PATCH] Add devstack plugin support for Local IP This adds ability to configure local_ip service plugin and local_ip OVS agent extension. Needed to enable corresponding API/CLI and scenario tests. Related-Bug: #1930200 Change-Id: Ia9269b7a73aef116cf8c5bc6ca0a1cca9deaa056 --- devstack/lib/local_ip | 9 +++++++++ devstack/plugin.sh | 7 +++++++ 2 files changed, 16 insertions(+) create mode 100644 devstack/lib/local_ip diff --git a/devstack/lib/local_ip b/devstack/lib/local_ip new file mode 100644 index 00000000000..f8cc39aa8ef --- /dev/null +++ b/devstack/lib/local_ip @@ -0,0 +1,9 @@ +function configure_local_ip { + neutron_service_plugin_class_add "local_ip" + plugin_agent_add_l2_agent_extension "local_ip" +} + +function configure_local_ip_static { + configure_local_ip + iniset /$NEUTRON_CORE_PLUGIN_CONF local_ip static_nat True +} diff --git a/devstack/plugin.sh b/devstack/plugin.sh index 7d51ad0e3be..3eb24c65208 100644 --- a/devstack/plugin.sh +++ b/devstack/plugin.sh @@ -16,6 +16,7 @@ source $LIBDIR/uplink_status_propagation source $LIBDIR/tag_ports_during_bulk_creation source $LIBDIR/octavia source $LIBDIR/loki +source $LIBDIR/local_ip # source the OVS/OVN compilation helper methods source $TOP_DIR/lib/neutron_plugins/ovs_source @@ -73,6 +74,12 @@ if [[ "$1" == "stack" ]]; then configure_ovs_distributed_dhcp fi fi + if is_service_enabled neutron-local-ip; then + configure_local_ip + fi + if is_service_enabled neutron-local-ip-static; then + configure_local_ip_static + fi if is_service_enabled q-agt neutron-agent; then configure_l2_agent fi