Fix incorrect default metadata_dir and api_url parameters
According to murano-dashboard package murano::dashboard points to incorrect metadata_dir by default. Also, since Murano dashboard can use Keystone to locate Murano API, murano::dashboard parameter api_url should not be set by default. Change-Id: I9e121b6097afe471ad2914b1fc02624b3b36c1ca Closes-Bug: #1518981
This commit is contained in:
parent
1fe809faaf
commit
3cf79f764b
@ -9,8 +9,9 @@
|
||||
# Defaults to 'present'
|
||||
#
|
||||
# [*api_url*]
|
||||
# (Optional) API url for murano-dashboard
|
||||
# Defaults to 'http://127.0.0.1:8082'
|
||||
# (Optional) DEPRECATED: Use murano::keystone::auth to configure keystone::endpoint for Murano API instead
|
||||
# API url for murano-dashboard
|
||||
# Defaults to 'undef'
|
||||
#
|
||||
# [*repo_url*]
|
||||
# (Optional) Application repository URL for murano-dashboard
|
||||
@ -22,7 +23,7 @@
|
||||
#
|
||||
# [*metadata_dir*]
|
||||
# (Optional) Directory to store murano dashboard metadata cache
|
||||
# Defaults to '/var/cache/muranodashboard-cache'
|
||||
# Defaults to '/var/cache/murano-dashboard'
|
||||
#
|
||||
# [*max_file_size*]
|
||||
# (Optional) Maximum allowed filesize to upload
|
||||
@ -38,17 +39,22 @@
|
||||
#
|
||||
class murano::dashboard(
|
||||
$package_ensure = 'present',
|
||||
$api_url = 'http://127.0.0.1:8082',
|
||||
$repo_url = undef,
|
||||
$collect_static_script = '/usr/share/openstack-dashboard/manage.py',
|
||||
$metadata_dir = '/var/cache/muranodashboard-cache',
|
||||
$metadata_dir = '/var/cache/murano-dashboard',
|
||||
$max_file_size = '5',
|
||||
$dashboard_debug_level = 'DEBUG',
|
||||
$client_debug_level = 'ERROR',
|
||||
# DEPRECATED PARAMETERS
|
||||
$api_url = undef,
|
||||
) {
|
||||
|
||||
include ::murano::params
|
||||
|
||||
if $api_url {
|
||||
warning('Usage of api_url is deprecated. Use murano::keystone::auth to configure keystone::endpoint for Murano API instead.')
|
||||
}
|
||||
|
||||
package { 'murano-dashboard':
|
||||
ensure => $package_ensure,
|
||||
name => $::murano::params::dashboard_package_name,
|
||||
|
@ -24,10 +24,10 @@ describe 'murano::dashboard' do
|
||||
:order => 2,
|
||||
})}
|
||||
|
||||
it { is_expected.to contain_concat__fragment('murano_dashboard_section').with_content(/MURANO_API_URL = 'http:\/\/127.0.0.1:8082'/)}
|
||||
it { is_expected.to_not contain_concat__fragment('murano_dashboard_section').with_content(/MURANO_API_URL = /)}
|
||||
it { is_expected.to_not contain_concat__fragment('murano_dashboard_section').with_content(/MURANO_REPO_URL = /)}
|
||||
it { is_expected.to contain_concat__fragment('murano_dashboard_section').with_content(/MAX_FILE_SIZE_MB = '5'/)}
|
||||
it { is_expected.to contain_concat__fragment('murano_dashboard_section').with_content(/METADATA_CACHE_DIR = '\/var\/cache\/muranodashboard-cache'/)}
|
||||
it { is_expected.to contain_concat__fragment('murano_dashboard_section').with_content(/METADATA_CACHE_DIR = '\/var\/cache\/murano-dashboard'/)}
|
||||
it { is_expected.to contain_concat__fragment('murano_dashboard_section').with_content(/LOGGING\['loggers'\]\['muranodashboard'\] = \{'handlers': \['syslog'\], 'level': 'DEBUG'\}/)}
|
||||
it { is_expected.to contain_concat__fragment('murano_dashboard_section').with_content(/LOGGING\['loggers'\]\['muranoclient'\] = \{'handlers': \['syslog'\], 'level': 'ERROR'\}/)}
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
## MURANO_CONFIG_BEGIN ##
|
||||
MURANO_API_URL = '<%= @api_url %>'
|
||||
<% if @api_url != nil %>MURANO_API_URL = '<%= @api_url %>'<% end %>
|
||||
<% if @repo_url != nil %>MURANO_REPO_URL = '<%= @repo_url %>'<% end %>
|
||||
MAX_FILE_SIZE_MB = '<%= @max_file_size %>'
|
||||
METADATA_CACHE_DIR = '<%= @metadata_dir %>'
|
||||
|
Loading…
x
Reference in New Issue
Block a user