Devstack: Make sure that taas ini file used by Neutron

Related-Bug: #2069581
Change-Id: I3db8987150f35c8f9d33bf8a15c15b2739f52597
This commit is contained in:
elajkat 2024-07-10 11:43:41 +02:00 committed by Lajos Katona
parent 13571dbd54
commit 749ac4557c
3 changed files with 20 additions and 9 deletions

View File

@ -1,3 +1,10 @@
- job:
name: neutron-tempest-plugin-tap-as-a-service-wsgi
parent: neutron-tempest-plugin-tap-as-a-service
vars:
devstack_localrc:
NEUTRON_DEPLOY_MOD_WSGI: true
- project: - project:
templates: templates:
- openstack-cover-jobs-neutron - openstack-cover-jobs-neutron
@ -8,6 +15,7 @@
check: check:
jobs: jobs:
- neutron-tempest-plugin-tap-as-a-service - neutron-tempest-plugin-tap-as-a-service
- neutron-tempest-plugin-tap-as-a-service-wsgi
gate: gate:
jobs: jobs:
- neutron-tempest-plugin-tap-as-a-service - neutron-tempest-plugin-tap-as-a-service

View File

@ -23,10 +23,9 @@ function install_taas {
} }
function configure_taas_plugin { function configure_taas_plugin {
cp $TAAS_PLUGIN_PATH/etc/taas_plugin.ini $TAAS_PLUGIN_CONF_FILE echo "Configuring taas"
neutron_server_config_add $TAAS_PLUGIN_CONF_FILE
neutron_service_plugin_class_add taas neutron_service_plugin_class_add taas
neutron_deploy_rootwrap_filters $TAAS_PLUGIN_PATH iniadd /$Q_PLUGIN_CONF_FILE service_providers service_provider "TAAS:TAAS:neutron_taas.services.taas.service_drivers.taas_rpc.TaasRpcDriver:default"
} }
if is_service_enabled taas; then if is_service_enabled taas; then
@ -37,13 +36,13 @@ if is_service_enabled taas; then
install_taas install_taas
elif [[ "$2" == "post-config" ]]; then elif [[ "$2" == "post-config" ]]; then
configure_taas_plugin configure_taas_plugin
if is_service_enabled q-svc neutron-api; then
neutron-db-manage --subproject tap-as-a-service upgrade head
fi
echo "Configuring taas" echo "Configuring taas"
if [ "$TAAS_SERVICE_DRIVER" ]; then if [ "$TAAS_SERVICE_DRIVER" ]; then
inicomment $TAAS_PLUGIN_CONF_FILE service_providers service_provider inicomment /$Q_PLUGIN_CONF_FILE service_providers service_provider
iniadd $TAAS_PLUGIN_CONF_FILE service_providers service_provider $TAAS_SERVICE_DRIVER iniadd /$Q_PLUGIN_CONF_FILE service_providers service_provider $TAAS_SERVICE_DRIVER
fi
if is_service_enabled q-svc neutron-api; then
neutron-db-manage --subproject tap-as-a-service upgrade head
fi fi
elif [[ "$2" == "extra" ]]; then elif [[ "$2" == "extra" ]]; then
: :

View File

@ -51,12 +51,16 @@ class TaasPlugin(taas_db.Taas_db_Mixin):
def __init__(self): def __init__(self):
LOG.debug("TAAS PLUGIN INITIALIZED") LOG.debug("TAAS PLUGIN INITIALIZATION")
self.service_type_manager = st_db.ServiceTypeManager.get_instance() self.service_type_manager = st_db.ServiceTypeManager.get_instance()
add_provider_configuration(self.service_type_manager, add_provider_configuration(self.service_type_manager,
taas_consts.TAAS) taas_consts.TAAS)
self._load_drivers() self._load_drivers()
self.driver = self._get_driver_for_provider(self.default_provider) self.driver = self._get_driver_for_provider(self.default_provider)
LOG.info(("TAAS Plugin initialized using service drivers: "
"%(service_drivers)s, default: %(default_driver)s"),
{'service_drivers': self.drivers.keys(),
'default_driver': self.default_provider})
def _load_drivers(self): def _load_drivers(self):
"""Loads plugin-drivers specified in configuration.""" """Loads plugin-drivers specified in configuration."""