From 4445b380cffaae4898359c878f3a1900d86e44d7 Mon Sep 17 00:00:00 2001 From: Lajos Katona Date: Wed, 22 May 2019 16:59:52 +0200 Subject: [PATCH] Add devstack plugin for placement service plugin This helps running end-to-end tests in gate, see: https://review.opendev.org/629253 Partial-Bug: #1578989 See-Also: https://review.openstack.org/502306 (nova spec) See-Also: https://review.openstack.org/508149 (neutron spec) Change-Id: I6732909a10114dbc004043b754d47d974c3fe1cb --- devstack/lib/placement | 19 +++++++++++++++++++ devstack/plugin.sh | 4 ++++ devstack/settings | 3 +++ 3 files changed, 26 insertions(+) create mode 100644 devstack/lib/placement diff --git a/devstack/lib/placement b/devstack/lib/placement new file mode 100644 index 00000000000..737c7e0d690 --- /dev/null +++ b/devstack/lib/placement @@ -0,0 +1,19 @@ +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 +} diff --git a/devstack/plugin.sh b/devstack/plugin.sh index 8f4ba695b31..6abc3e24b55 100644 --- a/devstack/plugin.sh +++ b/devstack/plugin.sh @@ -11,6 +11,7 @@ source $LIBDIR/qos source $LIBDIR/ovs source $LIBDIR/segments source $LIBDIR/trunk +source $LIBDIR/placement source $LIBDIR/log source $LIBDIR/fip_port_forwarding source $LIBDIR/uplink_status_propagation @@ -45,6 +46,9 @@ if [[ "$1" == "stack" ]]; then if is_service_enabled q-trunk neutron-trunk; then configure_trunk_extension fi + if is_service_enabled q-placement neutron-placement; then + configure_placement_extension + fi if is_service_enabled q-log neutron-log; then configure_log fi diff --git a/devstack/settings b/devstack/settings index 3955b1554be..7f655e2c09a 100644 --- a/devstack/settings +++ b/devstack/settings @@ -1,6 +1,9 @@ L2_AGENT_EXTENSIONS=${L2_AGENT_EXTENSIONS:-} L3_AGENT_EXTENSIONS=${L3_AGENT_EXTENSIONS:-} +NEUTRON_PLACEMENT_AUTH_TYPE=${NEUTRON_PLACEMENT_AUTH_TYPE:-password} +NEUTRON_PLACEMENT_USERNAME=${NEUTRON_PLACEMENT_USERNAME:-placement} + if is_neutron_legacy_enabled; then NEUTRON_CORE_PLUGIN=$Q_PLUGIN NEUTRON_AGENT=$Q_AGENT