Add new image_filter_project_id param for dashboard
A new parameter MURANO_IMAGE_FILTER_PROJECT_ID was added to the dashboard configuration in review: https://review.openstack.org/#/c/504833/ This commit adds a new class parameter 'image_filter_project_id' to the dashboard class to set this parameter. Change-Id: I0055c8941f14e5b6c3338689ec15f6b260b31229
This commit is contained in:
parent
fe3ac89624
commit
f509a5fa17
@ -49,18 +49,23 @@
|
||||
# (Optional) Log handler.
|
||||
# Defaults to 'file'
|
||||
#
|
||||
# [*image_filter_project_id*]
|
||||
# (Optional) Filter image list by project ID
|
||||
# Defaults to 'undef'
|
||||
#
|
||||
class murano::dashboard(
|
||||
$package_ensure = 'present',
|
||||
$dashboard_name = undef,
|
||||
$repo_url = undef,
|
||||
$enable_glare = false,
|
||||
$collect_static_script = '/usr/share/openstack-dashboard/manage.py',
|
||||
$metadata_dir = '/var/cache/murano-dashboard',
|
||||
$max_file_size = '5',
|
||||
$dashboard_debug_level = 'DEBUG',
|
||||
$client_debug_level = 'ERROR',
|
||||
$log_handler = 'file',
|
||||
$sync_db = true,
|
||||
$package_ensure = 'present',
|
||||
$dashboard_name = undef,
|
||||
$repo_url = undef,
|
||||
$enable_glare = false,
|
||||
$collect_static_script = '/usr/share/openstack-dashboard/manage.py',
|
||||
$metadata_dir = '/var/cache/murano-dashboard',
|
||||
$max_file_size = '5',
|
||||
$dashboard_debug_level = 'DEBUG',
|
||||
$client_debug_level = 'ERROR',
|
||||
$log_handler = 'file',
|
||||
$sync_db = true,
|
||||
$image_filter_project_id = undef,
|
||||
) {
|
||||
|
||||
include ::murano::deps
|
||||
|
@ -0,0 +1,3 @@
|
||||
---
|
||||
features:
|
||||
- Add dashboard parameter for filtering images by a given project ID.
|
@ -8,14 +8,15 @@ describe 'murano::dashboard' do
|
||||
end
|
||||
|
||||
let :dashboard_params do {
|
||||
:dashboard_name => 'Application Catalog',
|
||||
:repo_url => 'http://storage.apps.openstack.com',
|
||||
:enable_glare => true,
|
||||
:collect_static_script => '/bin/openstack-dashboard/manage.py',
|
||||
:metadata_dir => '/tmp/muranodashboard-cache',
|
||||
:max_file_size => '5',
|
||||
:sync_db => false,
|
||||
:log_handler => 'console',
|
||||
:dashboard_name => 'Application Catalog',
|
||||
:repo_url => 'http://storage.apps.openstack.com',
|
||||
:enable_glare => true,
|
||||
:collect_static_script => '/bin/openstack-dashboard/manage.py',
|
||||
:metadata_dir => '/tmp/muranodashboard-cache',
|
||||
:max_file_size => '5',
|
||||
:sync_db => false,
|
||||
:log_handler => 'console',
|
||||
:image_filter_project_id => '00000000-0000-0000-0000-000000000000',
|
||||
}
|
||||
end
|
||||
|
||||
@ -61,6 +62,7 @@ describe 'murano::dashboard' do
|
||||
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_not contain_concat__fragment('murano_dashboard_section').with_content(/MURANO_DASHBOARD_NAME = /)}
|
||||
it { is_expected.to_not contain_concat__fragment('murano_dashboard_section').with_content(/MURANO_IMAGE_FILTER_PROJECT_ID = /)}
|
||||
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\/murano-dashboard'/)}
|
||||
it { is_expected.to contain_concat__fragment('murano_dashboard_section').with_content(/LOGGING\['loggers'\]\['muranodashboard'\] = \{'handlers': 'file', 'level': 'DEBUG'\}/)}
|
||||
@ -119,6 +121,7 @@ describe 'murano::dashboard' do
|
||||
it { is_expected.to contain_concat__fragment('murano_dashboard_section').with_content(/LOGGING\['loggers'\]\['muranodashboard'\] = \{'handlers': 'console', 'level': 'DEBUG'\}/)}
|
||||
it { is_expected.to contain_concat__fragment('murano_dashboard_section').with_content(/LOGGING\['loggers'\]\['muranoclient'\] = \{'handlers': 'console', 'level': 'ERROR'\}/)}
|
||||
it { is_expected.to contain_concat__fragment('murano_dashboard_section').with_content(/MURANO_USE_GLARE = True/)}
|
||||
it { is_expected.to contain_concat__fragment('murano_dashboard_section').with_content(/MURANO_IMAGE_FILTER_PROJECT_ID = '00000000-0000-0000-0000-000000000000'/)}
|
||||
|
||||
it { is_expected.to contain_exec('clean_horizon_config').with({
|
||||
:command => 'sed -e \'/^## MURANO_CONFIG_BEGIN/,/^## MURANO_CONFIG_END ##/ d\' -i /etc/openstack-dashboard/local_settings.py',
|
||||
|
@ -10,4 +10,5 @@ MURANO_USE_GLARE = True
|
||||
<% else %>
|
||||
MURANO_USE_GLARE = False
|
||||
<% end %>
|
||||
<% if @image_filter_project_id != nil %>MURANO_IMAGE_FILTER_PROJECT_ID = '<%= @image_filter_project_id %>'<% end %>
|
||||
## MURANO_CONFIG_END ##
|
||||
|
Loading…
Reference in New Issue
Block a user