Merge "Handle horizon's cinder backup feature"
This commit is contained in:
commit
b07a739e97
@ -26,6 +26,7 @@ class openstack::horizon (
|
|||||||
$cache_server_port = '11211',
|
$cache_server_port = '11211',
|
||||||
$neutron = false,
|
$neutron = false,
|
||||||
$neutron_options = {},
|
$neutron_options = {},
|
||||||
|
$cinder_options = {},
|
||||||
$horizon_app_links = undef,
|
$horizon_app_links = undef,
|
||||||
$keystone_url = 'http://127.0.0.1:5000/v2.0/',
|
$keystone_url = 'http://127.0.0.1:5000/v2.0/',
|
||||||
$keystone_default_role = '_member_',
|
$keystone_default_role = '_member_',
|
||||||
@ -94,6 +95,7 @@ class openstack::horizon (
|
|||||||
allowed_hosts => '*',
|
allowed_hosts => '*',
|
||||||
secure_cookies => false,
|
secure_cookies => false,
|
||||||
log_handler => $log_handler,
|
log_handler => $log_handler,
|
||||||
|
cinder_options => $cinder_options,
|
||||||
neutron_options => $neutron_options,
|
neutron_options => $neutron_options,
|
||||||
custom_theme_path => $custom_theme_path,
|
custom_theme_path => $custom_theme_path,
|
||||||
redirect_type => 'temp', # LP#1385133
|
redirect_type => 'temp', # LP#1385133
|
||||||
|
@ -12,7 +12,8 @@ describe 'openstack::horizon' do
|
|||||||
let(:params) { {
|
let(:params) { {
|
||||||
:secret_key => 'very_secret_key',
|
:secret_key => 'very_secret_key',
|
||||||
:file_upload_max_size => '10737418235',
|
:file_upload_max_size => '10737418235',
|
||||||
:file_upload_temp_dir => upload_dir
|
:file_upload_temp_dir => upload_dir,
|
||||||
|
:cinder_options => { 'enable_backup' => false },
|
||||||
} }
|
} }
|
||||||
|
|
||||||
let :facts do
|
let :facts do
|
||||||
@ -35,6 +36,12 @@ describe 'openstack::horizon' do
|
|||||||
# )
|
# )
|
||||||
end
|
end
|
||||||
|
|
||||||
|
it 'contains horizon' do
|
||||||
|
should contain_class('horizon').with(
|
||||||
|
:cinder_options => p[:cinder_options]
|
||||||
|
)
|
||||||
|
end
|
||||||
|
|
||||||
it 'contains horizon::wsgi::apache' do
|
it 'contains horizon::wsgi::apache' do
|
||||||
if facts[:osfamily] == 'Debian'
|
if facts[:osfamily] == 'Debian'
|
||||||
custom_fragment = "\n <Directory /usr/share/openstack-dashboard/openstack_dashboard/wsgi>\n Order allow,deny\n Allow from all\n </Directory>\n\n LimitRequestBody 10737418235\n\n"
|
custom_fragment = "\n <Directory /usr/share/openstack-dashboard/openstack_dashboard/wsgi>\n Order allow,deny\n Allow from all\n </Directory>\n\n LimitRequestBody 10737418235\n\n"
|
||||||
|
@ -5,6 +5,7 @@ $horizon_hash = hiera_hash('horizon', {})
|
|||||||
$service_endpoint = hiera('service_endpoint')
|
$service_endpoint = hiera('service_endpoint')
|
||||||
$memcached_server = hiera('memcached_addresses')
|
$memcached_server = hiera('memcached_addresses')
|
||||||
$bind_address = get_network_role_property('horizon', 'ipaddr')
|
$bind_address = get_network_role_property('horizon', 'ipaddr')
|
||||||
|
$storage_hash = hiera_hash('storage_hash', {})
|
||||||
$neutron_advanced_config = hiera_hash('neutron_advanced_configuration', {})
|
$neutron_advanced_config = hiera_hash('neutron_advanced_configuration', {})
|
||||||
$public_ssl = hiera('public_ssl')
|
$public_ssl = hiera('public_ssl')
|
||||||
$ssl_no_verify = $public_ssl['horizon']
|
$ssl_no_verify = $public_ssl['horizon']
|
||||||
@ -35,6 +36,7 @@ $internal_auth_port = '5000'
|
|||||||
$keystone_api = 'v2.0'
|
$keystone_api = 'v2.0'
|
||||||
$keystone_url = "${internal_auth_protocol}://${internal_auth_address}:${internal_auth_port}/${keystone_api}"
|
$keystone_url = "${internal_auth_protocol}://${internal_auth_address}:${internal_auth_port}/${keystone_api}"
|
||||||
|
|
||||||
|
$cinder_options = {'enable_backup' => pick($storage_hash['volumes_ceph'], false)}
|
||||||
$neutron_options = {'enable_distributed_router' => $neutron_dvr}
|
$neutron_options = {'enable_distributed_router' => $neutron_dvr}
|
||||||
$hypervisor_options = {'enable_quotas' => hiera('nova_quota')}
|
$hypervisor_options = {'enable_quotas' => hiera('nova_quota')}
|
||||||
|
|
||||||
@ -70,6 +72,7 @@ class { 'openstack::horizon':
|
|||||||
use_syslog => hiera('use_syslog', true),
|
use_syslog => hiera('use_syslog', true),
|
||||||
hypervisor_options => $hypervisor_options,
|
hypervisor_options => $hypervisor_options,
|
||||||
servername => hiera('public_vip'),
|
servername => hiera('public_vip'),
|
||||||
|
cinder_options => $cinder_options,
|
||||||
neutron_options => $neutron_options,
|
neutron_options => $neutron_options,
|
||||||
overview_days_range => $overview_days_range,
|
overview_days_range => $overview_days_range,
|
||||||
file_upload_temp_dir => $file_upload_temp_dir,
|
file_upload_temp_dir => $file_upload_temp_dir,
|
||||||
|
@ -67,12 +67,18 @@ describe manifest do
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
storage_hash = Noop.hiera 'storage_hash'
|
||||||
|
let(:cinder_options) do
|
||||||
|
{ 'enable_backup' => storage_hash.fetch('volumes_ceph', false) }
|
||||||
|
end
|
||||||
|
|
||||||
###########################################################################
|
###########################################################################
|
||||||
|
|
||||||
it 'should declare openstack::horizon class' do
|
it 'should declare openstack::horizon class' do
|
||||||
should contain_class('openstack::horizon').with(
|
should contain_class('openstack::horizon').with(
|
||||||
|
'cinder_options' => cinder_options,
|
||||||
'hypervisor_options' => {'enable_quotas' => nova_quota},
|
'hypervisor_options' => {'enable_quotas' => nova_quota},
|
||||||
'bind_address' => bind_address
|
'bind_address' => bind_address
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user