From ffde837ea6016be7f0cf361f16bb59fb841470ae Mon Sep 17 00:00:00 2001 From: Timur Sufiev Date: Tue, 19 Apr 2016 20:39:19 +0300 Subject: [PATCH] Reorganize Murano-specific Horizon settings In M release Horizon settings.py file gained a new degree of granularity with the introduction of local_settings.d directory where each Horizon plugin could place its own config snippet (which is still a traditional Django settings.py module). See https://review.openstack.org/#/c/243974/ for the reference. Now it's time to reuse this feature. This patch add the new settings file. The old settings will be remove in next patch. Co-Authored-By: zhurong DocImpact Change-Id: Iaab76f2e8e908093248921ce36a0ff2e9df66722 Closes-Bug: #1585552 --- muranodashboard/local/enabled/_50_murano.py | 24 +++++++++++++++++ .../local/local_settings.d/_50_murano.py | 27 +++++++++++++++++++ ...e-dashboard-settings-11733b5c1003154b.yaml | 4 +++ 3 files changed, 55 insertions(+) create mode 100644 muranodashboard/local/enabled/_50_murano.py create mode 100644 muranodashboard/local/local_settings.d/_50_murano.py create mode 100644 releasenotes/notes/reorganize-dashboard-settings-11733b5c1003154b.yaml diff --git a/muranodashboard/local/enabled/_50_murano.py b/muranodashboard/local/enabled/_50_murano.py new file mode 100644 index 000000000..6201b3cdd --- /dev/null +++ b/muranodashboard/local/enabled/_50_murano.py @@ -0,0 +1,24 @@ +from muranodashboard import exceptions + +# The name of the dashboard to be added to HORIZON['dashboards']. Required. +DASHBOARD = 'murano' + +# If set to True, this dashboard will not be added to the settings. +DISABLED = False + +ADD_INSTALLED_APPS = [ + 'muranodashboard', +] + +ADD_EXCEPTIONS = { + 'recoverable': exceptions.RECOVERABLE, + 'not_found': exceptions.NOT_FOUND, + 'unauthorized': exceptions.UNAUTHORIZED, +} + +ADD_JS_FILES = [ + 'muranodashboard/js/upload_form.js', + 'muranodashboard/js/import_bundle_form.js', + 'muranodashboard/js/murano.service.js', + 'muranodashboard/js/more-less.js', +] diff --git a/muranodashboard/local/local_settings.d/_50_murano.py b/muranodashboard/local/local_settings.d/_50_murano.py new file mode 100644 index 000000000..41475fe7c --- /dev/null +++ b/muranodashboard/local/local_settings.d/_50_murano.py @@ -0,0 +1,27 @@ +# MURANO_API_URL = "http://localhost:8082" + +# Set to True to use Glance Artifact Repository to store murano packages +MURANO_USE_GLARE = False + +# Sets the Glance API endpoint to interact with Artifact Repo. +# If left commented the one from keystone will be used +# GLANCE_API_URL = 'http://ubuntu1:9292' + +MURANO_REPO_URL = 'http://apps.openstack.org/api/v1/murano_repo/liberty/' + +# Overrides the default dashboard name (Murano) that is displayed +# in the main accordion navigation +# MURANO_DASHBOARD_NAME = "Murano" + +# Specify a maximum number of limit packages. +# PACKAGES_LIMIT = 100 + +# Set default session backend from browser cookies to database to +# avoid issues with forms during creating applications. +DATABASES = { + 'default': { + 'ENGINE': 'django.db.backends.sqlite3', + 'NAME': 'murano-dashboard.sqlite', + } +} +SESSION_ENGINE = 'django.contrib.sessions.backends.db' diff --git a/releasenotes/notes/reorganize-dashboard-settings-11733b5c1003154b.yaml b/releasenotes/notes/reorganize-dashboard-settings-11733b5c1003154b.yaml new file mode 100644 index 000000000..b37bbafa6 --- /dev/null +++ b/releasenotes/notes/reorganize-dashboard-settings-11733b5c1003154b.yaml @@ -0,0 +1,4 @@ +--- +features: + - murano-dashboard now use local_settings.d dir for + its own config snippet from Horizon.