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:
parent
4eb3399e82
commit
43bbdcdb1f
@ -57,7 +57,8 @@ Install Manila UI with all dependencies in your virtual environment::
|
||||
|
||||
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
|
||||
@ -89,16 +90,13 @@ _`Configuration`
|
||||
----------------
|
||||
|
||||
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::
|
||||
|
||||
* enable_replication
|
||||
* enable_migration
|
||||
* enable_public_share_type_creation
|
||||
|
||||
Note that there is a separate list of configurations for "admin" and
|
||||
"project" dashboards.
|
||||
|
||||
Contributing
|
||||
------------
|
||||
|
||||
|
@ -26,7 +26,8 @@ if is_service_enabled horizon && is_service_enabled manila && is_service_enabled
|
||||
elif [[ "$1" == "stack" && "$2" == "post-config" ]]; then
|
||||
# Configure after the other layer 1 and 2 services have been configured
|
||||
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
|
||||
# no-op
|
||||
:
|
||||
|
@ -16,10 +16,3 @@ PANEL_DASHBOARD = 'admin'
|
||||
PANEL_GROUP = 'admin'
|
||||
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,
|
||||
}
|
@ -27,9 +27,3 @@ ADD_EXCEPTIONS = {
|
||||
'not_found': exceptions.NOT_FOUND,
|
||||
'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,
|
||||
}
|
0
manila_ui/local/enabled/__init__.py
Normal file
0
manila_ui/local/enabled/__init__.py
Normal file
20
manila_ui/local/local_settings.d/_90_manila_shares.py
Normal file
20
manila_ui/local/local_settings.d/_90_manila_shares.py
Normal 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,
|
||||
}
|
@ -15,14 +15,14 @@ from horizon.test.settings import * # noqa
|
||||
from openstack_dashboard.test.settings import * # noqa
|
||||
|
||||
# Load the pluggable dashboard settings
|
||||
import manila_ui.enabled
|
||||
import manila_ui.local.enabled
|
||||
import openstack_dashboard.enabled
|
||||
from openstack_dashboard.utils import settings
|
||||
|
||||
MANILA_UI_APPS = list(INSTALLED_APPS) + ['manila_ui.dashboards']
|
||||
settings.update_dashboards(
|
||||
[
|
||||
manila_ui.enabled,
|
||||
manila_ui.local.enabled,
|
||||
openstack_dashboard.enabled,
|
||||
],
|
||||
HORIZON_CONFIG,
|
||||
|
Loading…
Reference in New Issue
Block a user