Moves OPENSTACK_MANILA_SETTINGS TO local_settings.d/

The enabled/ directory allows toggling of panels and plugins
while the local_settings.d/ allows overriding of settings.
We had OPENSTACK_MANILA_SETTINGS dict under enabled/ and for this
reason the settings overriden there were not taking effect.
This patch set moves OPENSTACK_MANILA_SETTINGS under local_settings.d/

Change-Id: Ie4cd49216f1a4a93c5fe1358c97682f8e4044b43
Closes-Bug: #1641624
This commit is contained in:
Victoria Martinez de la Cruz 2016-11-14 19:01:09 -03:00
parent 4eb3399e82
commit 43bbdcdb1f
8 changed files with 27 additions and 21 deletions

View File

@ -57,7 +57,8 @@ Install Manila UI with all dependencies in your virtual environment::
And enable it in Horizon:: And enable it in Horizon::
cp ../manila-ui/manila_ui/enabled/_90_manila_*.py openstack_dashboard/local/enabled cp ../manila-ui/manila_ui/local/enabled/_90_manila_*.py openstack_dashboard/local/enabled
cp ../manila-ui/manila_ui/local/local_settings.d/_90_manila_*.py openstack_dashboard/local/local_settings.d
Starting the app Starting the app
@ -89,16 +90,13 @@ _`Configuration`
---------------- ----------------
It is possible to enable or disable some Manila UI features. To do so, It is possible to enable or disable some Manila UI features. To do so,
look for files located in "manila_ui/enabled" directory, look for files located in "manila_ui/local/local_settings.d/" directory,
where you can redefine the values of the OPENSTACK_MANILA_FEATURES dict:: where you can redefine the values of the OPENSTACK_MANILA_FEATURES dict::
* enable_replication * enable_replication
* enable_migration * enable_migration
* enable_public_share_type_creation * enable_public_share_type_creation
Note that there is a separate list of configurations for "admin" and
"project" dashboards.
Contributing Contributing
------------ ------------

View File

@ -26,7 +26,8 @@ if is_service_enabled horizon && is_service_enabled manila && is_service_enabled
elif [[ "$1" == "stack" && "$2" == "post-config" ]]; then elif [[ "$1" == "stack" && "$2" == "post-config" ]]; then
# Configure after the other layer 1 and 2 services have been configured # Configure after the other layer 1 and 2 services have been configured
echo_summary "Configuring Manila UI" echo_summary "Configuring Manila UI"
cp -a ${MANILA_UI_DIR}/manila_ui/enabled/* ${DEST}/horizon/openstack_dashboard/local/enabled/ cp -a ${MANILA_UI_DIR}/manila_ui/local/enabled/* ${DEST}/horizon/openstack_dashboard/local/enabled/
cp -a ${MANILA_UI_DIR}/manila_ui/local/local_settings.d/* ${DEST}/horizon/openstack_dashboard/local/local_settings.d/
elif [[ "$1" == "stack" && "$2" == "extra" ]]; then elif [[ "$1" == "stack" && "$2" == "extra" ]]; then
# no-op # no-op
: :

View File

@ -16,10 +16,3 @@ PANEL_DASHBOARD = 'admin'
PANEL_GROUP = 'admin' PANEL_GROUP = 'admin'
PANEL = 'shares' PANEL = 'shares'
ADD_PANEL = 'manila_ui.dashboards.admin.shares.panel.Shares' ADD_PANEL = 'manila_ui.dashboards.admin.shares.panel.Shares'
# The OPENSTACK_MANILA_FEATURES settings can be used to enable or disable
# various services provided by manila.
OPENSTACK_MANILA_FEATURES = {
'enable_replication': True,
'enable_migration': True,
}

View File

@ -27,9 +27,3 @@ ADD_EXCEPTIONS = {
'not_found': exceptions.NOT_FOUND, 'not_found': exceptions.NOT_FOUND,
'unauthorized': exceptions.UNAUTHORIZED, 'unauthorized': exceptions.UNAUTHORIZED,
} }
# The OPENSTACK_MANILA_FEATURES settings can be used to enable or disable
# various services provided by manila.
OPENSTACK_MANILA_FEATURES = {
'enable_replication': True,
}

View File

View File

@ -0,0 +1,20 @@
# Copyright 2016 Red Hat Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
# The OPENSTACK_MANILA_FEATURES settings can be used to enable or disable
# the UI for the various services provided by Manila.
OPENSTACK_MANILA_FEATURES = {
'enable_replication': True,
'enable_migration': True,
}

View File

@ -15,14 +15,14 @@ from horizon.test.settings import * # noqa
from openstack_dashboard.test.settings import * # noqa from openstack_dashboard.test.settings import * # noqa
# Load the pluggable dashboard settings # Load the pluggable dashboard settings
import manila_ui.enabled import manila_ui.local.enabled
import openstack_dashboard.enabled import openstack_dashboard.enabled
from openstack_dashboard.utils import settings from openstack_dashboard.utils import settings
MANILA_UI_APPS = list(INSTALLED_APPS) + ['manila_ui.dashboards'] MANILA_UI_APPS = list(INSTALLED_APPS) + ['manila_ui.dashboards']
settings.update_dashboards( settings.update_dashboards(
[ [
manila_ui.enabled, manila_ui.local.enabled,
openstack_dashboard.enabled, openstack_dashboard.enabled,
], ],
HORIZON_CONFIG, HORIZON_CONFIG,