keystone v3 is the default API version in horizon now,
so there is no need to specify it in local_settings.py explicitly.
This commit also makes minor changes in lib/horizon
_horizon_config_set().
* Do not insert a blank line after each setting.
* Use the local variable $file to specify the target file
consistently.
Change-Id: I5faea3e1f357726a256d2b48fc1afeabfead4998
| ... | ... |
@@ -43,8 +43,8 @@ function _horizon_config_set {
|
| 43 | 43 |
local value=$4 |
| 44 | 44 |
|
| 45 | 45 |
if [ -z "$section" ]; then |
| 46 |
- sed -e "/^$option/d" -i $local_settings |
|
| 47 |
- echo -e "\n$option=$value" >> $file |
|
| 46 |
+ sed -e "/^$option/d" -i $file |
|
| 47 |
+ echo "$option = $value" >> $file |
|
| 48 | 48 |
elif grep -q "^$section" $file; then |
| 49 | 49 |
local line |
| 50 | 50 |
line=$(sed -ne "/^$section/,/^}/ { /^ *'$option':/ p; }" $file)
|
| ... | ... |
@@ -84,6 +84,9 @@ function configure_horizon {
|
| 84 | 84 |
local local_settings=$HORIZON_DIR/openstack_dashboard/local/local_settings.py |
| 85 | 85 |
cp $HORIZON_SETTINGS $local_settings |
| 86 | 86 |
|
| 87 |
+ # Ensure local_setting.py file ends with EOL (newline) |
|
| 88 |
+ echo >> $local_settings |
|
| 89 |
+ |
|
| 87 | 90 |
_horizon_config_set $local_settings "" WEBROOT \"$HORIZON_APACHE_ROOT/\" |
| 88 | 91 |
|
| 89 | 92 |
_horizon_config_set $local_settings "" COMPRESS_OFFLINE True |
| ... | ... |
@@ -91,7 +94,6 @@ function configure_horizon {
|
| 91 | 91 |
|
| 92 | 92 |
_horizon_config_set $local_settings "" OPENSTACK_HOST \"${KEYSTONE_SERVICE_HOST}\"
|
| 93 | 93 |
|
| 94 |
- _horizon_config_set $local_settings "" OPENSTACK_API_VERSIONS {\"identity\":3}
|
|
| 95 | 94 |
_horizon_config_set $local_settings "" OPENSTACK_KEYSTONE_URL "\"${KEYSTONE_SERVICE_URI}/v3\""
|
| 96 | 95 |
|
| 97 | 96 |
# note(trebskit): if HOST_IP points at non-localhost ip address, horizon cannot be accessed |