Browse code

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

Akihiro MOTOKI authored on 2013/02/11 23:45:19
Showing 1 changed files
... ...
@@ -507,7 +507,11 @@ function _configure_quantum_service() {
507 507
     iniset $QUANTUM_CONF DEFAULT allow_overlapping_ips $Q_ALLOW_OVERLAPPING_IP
508 508
 
509 509
     iniset $QUANTUM_CONF DEFAULT auth_strategy $Q_AUTH_STRATEGY
510
-    _quantum_setup_keystone $Q_API_PASTE_FILE filter:authtoken
510
+    _quantum_setup_keystone $QUANTUM_CONF keystone_authtoken
511
+    # Comment out keystone authtoken configuration in api-paste.ini
512
+    # It is required to avoid any breakage in Quantum where the sample
513
+    # api-paste.ini has authtoken configurations.
514
+    _quantum_commentout_keystone_authtoken $Q_API_PASTE_FILE filter:authtoken
511 515
 
512 516
     # Configure plugin
513 517
     quantum_plugin_configure_service
... ...
@@ -573,6 +577,21 @@ function _quantum_setup_keystone() {
573 573
     rm -f $QUANTUM_AUTH_CACHE_DIR/*
574 574
 }
575 575
 
576
+function _quantum_commentout_keystone_authtoken() {
577
+    local conf_file=$1
578
+    local section=$2
579
+
580
+    inicomment $conf_file $section auth_host
581
+    inicomment $conf_file $section auth_port
582
+    inicomment $conf_file $section auth_protocol
583
+    inicomment $conf_file $section auth_url
584
+
585
+    inicomment $conf_file $section admin_tenant_name
586
+    inicomment $conf_file $section admin_user
587
+    inicomment $conf_file $section admin_password
588
+    inicomment $conf_file $section signing_dir
589
+}
590
+
576 591
 function _quantum_setup_interface_driver() {
577 592
     quantum_plugin_setup_interface_driver $1
578 593
 }