Merge "Avoid direct reference of hieradata"
This commit is contained in:
commit
7a98cdce7d
@ -51,6 +51,14 @@
|
||||
# for more details.
|
||||
# Defaults to hiera('step')
|
||||
#
|
||||
# [*nova_enable_db_archive*]
|
||||
# (Optional) Wheter to enable db archiving
|
||||
# Defaults to hiera('nova_enable_db_archive', true)
|
||||
#
|
||||
# [*nova_enable_db_purge*]
|
||||
# (Optional) Wheter to enable db purging
|
||||
# Defaults to hiera('nova_enable_db_purge', true)
|
||||
#
|
||||
# [*metadata_tls_proxy_bind_ip*]
|
||||
# DEPRECATED: IP on which the TLS proxy will listen on. Required only if
|
||||
# enable_internal_tls is set.
|
||||
@ -73,6 +81,8 @@ class tripleo::profile::base::nova::api (
|
||||
$nova_api_network = hiera('nova_api_network', undef),
|
||||
$nova_metadata_network = hiera('nova_metadata_network', undef),
|
||||
$step = Integer(hiera('step')),
|
||||
$nova_enable_db_archive = hiera('nova_enable_db_archive', true),
|
||||
$nova_enable_db_purge = hiera('nova_enable_db_purge', true),
|
||||
$metadata_tls_proxy_bind_ip = undef,
|
||||
$metadata_tls_proxy_fqdn = undef,
|
||||
$metadata_tls_proxy_port = 8775,
|
||||
@ -122,9 +132,9 @@ class tripleo::profile::base::nova::api (
|
||||
}
|
||||
|
||||
if $step >= 5 {
|
||||
if hiera('nova_enable_db_archive', true) {
|
||||
if $nova_enable_db_archive {
|
||||
include nova::cron::archive_deleted_rows
|
||||
if hiera('nova_enable_db_purge', true) {
|
||||
if $nova_enable_db_purge {
|
||||
include nova::cron::purge_shadow_tables
|
||||
}
|
||||
}
|
||||
|
@ -47,6 +47,8 @@ eos
|
||||
is_expected.to_not contain_class('nova::vendordata')
|
||||
is_expected.to_not contain_class('nova::network::neutron')
|
||||
is_expected.to_not contain_class('nova::wsgi::apache_api')
|
||||
is_expected.to_not contain_class('nova::cron::archive_deleted_rows')
|
||||
is_expected.to_not contain_class('nova::cron::purge_shadow_tables')
|
||||
}
|
||||
end
|
||||
|
||||
@ -69,6 +71,8 @@ eos
|
||||
is_expected.to contain_class('nova::vendordata')
|
||||
is_expected.to contain_class('nova::network::neutron')
|
||||
is_expected.to contain_class('nova::wsgi::apache_api')
|
||||
is_expected.to_not contain_class('nova::cron::archive_deleted_rows')
|
||||
is_expected.to_not contain_class('nova::cron::purge_shadow_tables')
|
||||
}
|
||||
end
|
||||
|
||||
@ -89,6 +93,8 @@ eos
|
||||
is_expected.to_not contain_class('nova::vendordata')
|
||||
is_expected.to_not contain_class('nova::network::neutron')
|
||||
is_expected.to_not contain_class('nova::wsgi::apache_api')
|
||||
is_expected.to_not contain_class('nova::cron::archive_deleted_rows')
|
||||
is_expected.to_not contain_class('nova::cron::purge_shadow_tables')
|
||||
}
|
||||
end
|
||||
|
||||
@ -111,6 +117,8 @@ eos
|
||||
is_expected.to contain_class('nova::vendordata')
|
||||
is_expected.to contain_class('nova::network::neutron')
|
||||
is_expected.to contain_class('nova::wsgi::apache_api')
|
||||
is_expected.to_not contain_class('nova::cron::archive_deleted_rows')
|
||||
is_expected.to_not contain_class('nova::cron::purge_shadow_tables')
|
||||
}
|
||||
end
|
||||
|
||||
@ -122,6 +130,33 @@ eos
|
||||
|
||||
it {
|
||||
is_expected.to contain_class('nova::cron::archive_deleted_rows')
|
||||
is_expected.to contain_class('nova::cron::purge_shadow_tables')
|
||||
}
|
||||
end
|
||||
|
||||
context 'with step 5 and db_purge disabled' do
|
||||
let(:params) { {
|
||||
:step => 5,
|
||||
:bootstrap_node => 'other.example.com',
|
||||
:nova_enable_db_purge => false,
|
||||
} }
|
||||
|
||||
it {
|
||||
is_expected.to contain_class('nova::cron::archive_deleted_rows')
|
||||
is_expected.to_not contain_class('nova::cron::purge_shadow_tables')
|
||||
}
|
||||
end
|
||||
|
||||
context 'with step 5 and db archive disabled' do
|
||||
let(:params) { {
|
||||
:step => 5,
|
||||
:bootstrap_node => 'other.example.com',
|
||||
:nova_enable_db_archive => false,
|
||||
} }
|
||||
|
||||
it {
|
||||
is_expected.to_not contain_class('nova::cron::archive_deleted_rows')
|
||||
is_expected.to_not contain_class('nova::cron::purge_shadow_tables')
|
||||
}
|
||||
end
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user