Move auth_token configurations to quantum.conf
keystone auth_token middleware now allows quantum to have auth_token
configuration in quantum.conf. auth_token middleware supports
auth_token configuration both in api-paste.ini and quantum.conf,
so we can apply this change at any timing.
Change-Id: Ie5dd63e6c6938d2c8118e0f6090ef057c21a772a
diff --git a/lib/quantum b/lib/quantum
index d5733b3..da4d6f6 100644
--- a/lib/quantum
+++ b/lib/quantum
@@ -507,7 +507,11 @@
iniset $QUANTUM_CONF DEFAULT allow_overlapping_ips $Q_ALLOW_OVERLAPPING_IP
iniset $QUANTUM_CONF DEFAULT auth_strategy $Q_AUTH_STRATEGY
- _quantum_setup_keystone $Q_API_PASTE_FILE filter:authtoken
+ _quantum_setup_keystone $QUANTUM_CONF keystone_authtoken
+ # Comment out keystone authtoken configuration in api-paste.ini
+ # It is required to avoid any breakage in Quantum where the sample
+ # api-paste.ini has authtoken configurations.
+ _quantum_commentout_keystone_authtoken $Q_API_PASTE_FILE filter:authtoken
# Configure plugin
quantum_plugin_configure_service
@@ -573,6 +577,21 @@
rm -f $QUANTUM_AUTH_CACHE_DIR/*
}
+function _quantum_commentout_keystone_authtoken() {
+ local conf_file=$1
+ local section=$2
+
+ inicomment $conf_file $section auth_host
+ inicomment $conf_file $section auth_port
+ inicomment $conf_file $section auth_protocol
+ inicomment $conf_file $section auth_url
+
+ inicomment $conf_file $section admin_tenant_name
+ inicomment $conf_file $section admin_user
+ inicomment $conf_file $section admin_password
+ inicomment $conf_file $section signing_dir
+}
+
function _quantum_setup_interface_driver() {
quantum_plugin_setup_interface_driver $1
}