From 7f6d9283b85bb743d3224981c031d331f5e9608a Mon Sep 17 00:00:00 2001 From: Slawek Kaplonski Date: Wed, 27 Oct 2021 16:40:30 +0200 Subject: [PATCH] Rehome functions to enable Neutron's placement 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: Ib86071881f16de1b69c0f9b1b19b6df8b7e66a07 --- lib/neutron-legacy | 4 ++++ lib/neutron_plugins/services/placement | 21 +++++++++++++++++++++ 2 files changed, 25 insertions(+) create mode 100644 lib/neutron_plugins/services/placement diff --git a/lib/neutron-legacy b/lib/neutron-legacy index 7b20a96ed7..b41dfcae42 100644 --- a/lib/neutron-legacy +++ b/lib/neutron-legacy @@ -277,6 +277,7 @@ source $TOP_DIR/lib/neutron_plugins/services/metering source $TOP_DIR/lib/neutron_plugins/services/l3 # Additional Neutron service plugins +source $TOP_DIR/lib/neutron_plugins/services/placement source $TOP_DIR/lib/neutron_plugins/services/trunk # Use security group or not @@ -374,6 +375,9 @@ function configure_mutnauq { fi # Configure Neutron's advanced services + if is_service_enabled q-placement neutron-placement; then + configure_placement_extension + fi if is_service_enabled q-trunk neutron-trunk; then configure_trunk_extension fi diff --git a/lib/neutron_plugins/services/placement b/lib/neutron_plugins/services/placement new file mode 100644 index 0000000000..3ec185bae6 --- /dev/null +++ b/lib/neutron_plugins/services/placement @@ -0,0 +1,21 @@ +#!/bin/bash + +function configure_placement_service_plugin { + neutron_service_plugin_class_add "placement" +} + +function configure_placement_neutron { + iniset $NEUTRON_CONF placement auth_type "$NEUTRON_PLACEMENT_AUTH_TYPE" + iniset $NEUTRON_CONF placement auth_url "$KEYSTONE_SERVICE_URI" + iniset $NEUTRON_CONF placement username "$NEUTRON_PLACEMENT_USERNAME" + iniset $NEUTRON_CONF placement password "$SERVICE_PASSWORD" + iniset $NEUTRON_CONF placement user_domain_name "$SERVICE_DOMAIN_NAME" + iniset $NEUTRON_CONF placement project_name "$SERVICE_TENANT_NAME" + iniset $NEUTRON_CONF placement project_domain_name "$SERVICE_DOMAIN_NAME" + iniset $NEUTRON_CONF placement region_name "$REGION_NAME" +} + +function configure_placement_extension { + configure_placement_service_plugin + configure_placement_neutron +}