Switch Heat to $::os_service_default - part 2

Switching to os_service_default fact below classes:
heat
heat::api
heat::api_cfn
heat::api_cloudwatch
heat::engine

Change-Id: Iff0275b701f2096f6f927ff962ef06c673827b4e
This commit is contained in:
Mykyta Karpin 2015-11-25 13:14:56 +02:00
parent 5b938affec
commit 811f7ce4b0
10 changed files with 132 additions and 167 deletions

View File

@ -18,15 +18,15 @@
# [*bind_host*]
# (Optional) Address to bind the server. Useful when
# selecting a particular network interface.
# Defaults to '0.0.0.0'.
# Defaults to $::os_service_default.
#
# [*bind_port*]
# (Optional) The port on which the server will listen.
# Defaults to '8004'.
# Defaults to $::os_service_default.
#
# [*workers*]
# (Optional) The number of workers to spawn.
# Defaults to '0'.
# Defaults to $::os_service_default.
#
# [*use_ssl*]
# (Optional) Whether to use ssl or not.
@ -35,12 +35,12 @@
# [*cert_file*]
# (Optional) Location of the SSL certificate file to use for SSL mode.
# Required when $use_ssl is set to 'true'.
# Defaults to 'false'.
# Defaults to $::os_service_default.
#
# [*key_file*]
# (Optional) Location of the SSL key file to use for enabling SSL mode.
# Required when $use_ssl is set to 'true'.
# Defaults to 'false'.
# Defaults to $::os_service_default.
#
# === Deprecated Parameters
#
@ -50,12 +50,12 @@ class heat::api (
$package_ensure = 'present',
$manage_service = true,
$enabled = true,
$bind_host = '0.0.0.0',
$bind_port = '8004',
$workers = '0',
$bind_host = $::os_service_default,
$bind_port = $::os_service_default,
$workers = $::os_service_default,
$use_ssl = false,
$cert_file = false,
$key_file = false,
$cert_file = $::os_service_default,
$key_file = $::os_service_default,
) {
include ::heat
@ -64,10 +64,10 @@ class heat::api (
include ::heat::policy
if $use_ssl {
if !$cert_file {
if is_service_default($cert_file) {
fail('The cert_file parameter is required when use_ssl is set to true')
}
if !$key_file {
if is_service_default($key_file) {
fail('The key_file parameter is required when use_ssl is set to true')
}
}
@ -96,22 +96,11 @@ class heat::api (
}
heat_config {
'heat_api/bind_host' : value => $bind_host;
'heat_api/bind_port' : value => $bind_port;
'heat_api/workers' : value => $workers;
}
# SSL Options
if $use_ssl {
heat_config {
'heat_api/cert_file' : value => $cert_file;
'heat_api/key_file' : value => $key_file;
}
} else {
heat_config {
'heat_api/cert_file' : ensure => absent;
'heat_api/key_file' : ensure => absent;
}
'heat_api/bind_host': value => $bind_host;
'heat_api/bind_port': value => $bind_port;
'heat_api/workers': value => $workers;
'heat_api/cert_file': value => $cert_file;
'heat_api/key_file': value => $key_file;
}
}

View File

@ -21,15 +21,15 @@
# [*bind_host*]
# (Optional) Address to bind the server. Useful when
# selecting a particular network interface.
# Defaults to '0.0.0.0'.
# Defaults to $::os_service_default.
#
# [*bind_port*]
# (Optional) The port on which the server will listen.
# Defaults to '8000'.
# Defaults to $::os_service_default.
#
# [*workers*]
# (Optional) The number of workers to spawn.
# Defaults to '0'.
# Defaults to $::os_service_default.
#
# [*use_ssl*]
# (Optional) Whether to use ssl or not.
@ -38,12 +38,12 @@
# [*cert_file*]
# (Optional) Location of the SSL certificate file to use for SSL mode.
# Required when $use_ssl is set to 'true'.
# Defaults to 'false'.
# Defaults to $::os_service_default.
#
# [*key_file*]
# (Optional) Location of the SSL key file to use for enabling SSL mode.
# Required when $use_ssl is set to 'true'.
# Defaults to 'false'.
# Defaults to $::os_service_default.
#
# == Deprecated Parameters
#
@ -53,12 +53,12 @@ class heat::api_cfn (
$package_ensure = 'present',
$manage_service = true,
$enabled = true,
$bind_host = '0.0.0.0',
$bind_port = '8000',
$workers = '0',
$bind_host = $::os_service_default,
$bind_port = $::os_service_default,
$workers = $::os_service_default,
$use_ssl = false,
$cert_file = false,
$key_file = false,
$cert_file = $::os_service_default,
$key_file = $::os_service_default,
) {
include ::heat
@ -67,10 +67,10 @@ class heat::api_cfn (
include ::heat::policy
if $use_ssl {
if !$cert_file {
if is_service_default($cert_file) {
fail('The cert_file parameter is required when use_ssl is set to true')
}
if !$key_file {
if is_service_default($key_file) {
fail('The key_file parameter is required when use_ssl is set to true')
}
}
@ -99,22 +99,11 @@ class heat::api_cfn (
}
heat_config {
'heat_api_cfn/bind_host' : value => $bind_host;
'heat_api_cfn/bind_port' : value => $bind_port;
'heat_api_cfn/workers' : value => $workers;
}
# SSL Options
if $use_ssl {
heat_config {
'heat_api_cfn/cert_file' : value => $cert_file;
'heat_api_cfn/key_file' : value => $key_file;
}
} else {
heat_config {
'heat_api_cfn/cert_file' : ensure => absent;
'heat_api_cfn/key_file' : ensure => absent;
}
'heat_api_cfn/bind_host': value => $bind_host;
'heat_api_cfn/bind_port': value => $bind_port;
'heat_api_cfn/workers': value => $workers;
'heat_api_cfn/cert_file': value => $cert_file;
'heat_api_cfn/key_file': value => $key_file;
}
}

View File

@ -20,15 +20,15 @@
# [*bind_host*]
# (Optional) Address to bind the server. Useful when
# selecting a particular network interface.
# Defaults to '0.0.0.0'.
# Defaults to $::os_service_default.
#
# [*bind_port*]
# (Optional) The port on which the server will listen.
# Defaults to '8003'.
# Defaults to $::os_service_default.
#
# [*workers*]
# (Optional) The number of workers to spawn.
# Defaults to '0'.
# Defaults to $::os_service_default.
#
# [*use_ssl*]
# (Optional) Whether to use ssl or not.
@ -37,12 +37,12 @@
# [*cert_file*]
# (Optional) Location of the SSL certificate file to use for SSL mode.
# Required when $use_ssl is set to 'true'.
# Defaults to 'false'.
# Defaults to $::os_service_default.
#
# [*key_file*]
# (Optional) Location of the SSL key file to use for enabling SSL mode.
# Required when $use_ssl is set to 'true'.
# Defaults to 'false'.
# Defaults to $::os_service_default.
#
# == Deprecated Parameters
#
@ -52,12 +52,12 @@ class heat::api_cloudwatch (
$package_ensure = 'present',
$manage_service = true,
$enabled = true,
$bind_host = '0.0.0.0',
$bind_port = '8003',
$workers = '0',
$bind_host = $::os_service_default,
$bind_port = $::os_service_default,
$workers = $::os_service_default,
$use_ssl = false,
$cert_file = false,
$key_file = false,
$cert_file = $::os_service_default,
$key_file = $::os_service_default,
) {
include ::heat
@ -66,10 +66,10 @@ class heat::api_cloudwatch (
include ::heat::policy
if $use_ssl {
if !$cert_file {
if is_service_default($cert_file) {
fail('The cert_file parameter is required when use_ssl is set to true')
}
if !$key_file {
if is_service_default($key_file) {
fail('The key_file parameter is required when use_ssl is set to true')
}
}
@ -98,22 +98,11 @@ class heat::api_cloudwatch (
}
heat_config {
'heat_api_cloudwatch/bind_host' : value => $bind_host;
'heat_api_cloudwatch/bind_port' : value => $bind_port;
'heat_api_cloudwatch/workers' : value => $workers;
}
# SSL Options
if $use_ssl {
heat_config {
'heat_api_cloudwatch/cert_file' : value => $cert_file;
'heat_api_cloudwatch/key_file' : value => $key_file;
}
} else {
heat_config {
'heat_api_cloudwatch/cert_file' : ensure => absent;
'heat_api_cloudwatch/key_file' : ensure => absent;
}
'heat_api_cloudwatch/bind_host': value => $bind_host;
'heat_api_cloudwatch/bind_port': value => $bind_port;
'heat_api_cloudwatch/workers': value => $workers;
'heat_api_cloudwatch/cert_file': value => $cert_file;
'heat_api_cloudwatch/key_file': value => $key_file;
}
}

View File

@ -25,7 +25,7 @@
# this to a different value you should also set
# heat::keystone::auth::heat_stack_user_role if you want the
# correct role created.
# Defaults to 'heat_stack_user'
# Defaults to $::os_service_default.
#
# [*heat_metadata_server_url*]
# (optional) URL of the Heat metadata server
@ -42,12 +42,12 @@
# [*engine_life_check_timeout*]
# (optional) RPC timeout (in seconds) for the engine liveness check that is
# used for stack locking
# Defaults to '2'
# Defaults to $::os_service_default.
#
# [*deferred_auth_method*]
# (optional) Select deferred auth method.
# Can be "password" or "trusts".
# Defaults to 'trusts'
# Defaults to $::os_service_default.
#
# [*default_software_config_transport*]
# (optional) Template default for how the server should receive the metadata
@ -59,7 +59,7 @@
# will create and populate a Swift TempURL with metadata for polling (requires
# object-store endpoint which supports TempURL). (string value)
# Allowed values: POLL_SERVER_CFN, POLL_SERVER_HEAT, POLL_TEMP_URL
# Defaults to 'POLL_SERVER_CFN'
# Defaults to $::os_service_default.
#
# [*default_deployment_signal_transport*]
# (optional) Template default for how the server should signal to heat with
@ -69,7 +69,7 @@
# TempURL). HEAT_SIGNAL will allow calls to the Heat API resource-signal using
# endpoint which supports the provided keystone credentials (string value)
# Allowed values: CFN_SIGNAL, TEMP_URL_SIGNAL, HEAT_SIGNAL
# Defaults to 'CFN_SIGNAL'
# Defaults to $::os_service_default.
# [*trusts_delegated_roles*]
# (optional) Array of trustor roles to be delegated to heat.
@ -94,14 +94,14 @@ class heat::engine (
$package_ensure = 'present',
$manage_service = true,
$enabled = true,
$heat_stack_user_role = 'heat_stack_user',
$heat_stack_user_role = $::os_service_default,
$heat_metadata_server_url = 'http://127.0.0.1:8000',
$heat_waitcondition_server_url = 'http://127.0.0.1:8000/v1/waitcondition',
$heat_watch_server_url = 'http://127.0.0.1:8003',
$engine_life_check_timeout = '2',
$deferred_auth_method = 'trusts',
$default_software_config_transport = 'POLL_SERVER_CFN',
$default_deployment_signal_transport = 'CFN_SIGNAL',
$engine_life_check_timeout = $::os_service_default,
$deferred_auth_method = $::os_service_default,
$default_software_config_transport = $::os_service_default,
$default_deployment_signal_transport = $::os_service_default,
$trusts_delegated_roles = ['heat_stack_owner'],
$instance_connection_is_secure = $::os_service_default,
$instance_connection_https_validate_certificates = $::os_service_default,

View File

@ -23,7 +23,7 @@
#
# [*rpc_backend*]
# (Optional) Use these options to configure the message system.
# Defaults to 'rabbit'
# Defaults to $::os_service_default.
#
# [*rpc_response_timeout*]
# (Optional) Configure the timeout (in seconds) for rpc responses
@ -31,16 +31,16 @@
#
# [*rabbit_host*]
# (Optional) IP or hostname of the rabbit server.
# Defaults to '127.0.0.1'
# Defaults to $::os_service_default.
#
# [*rabbit_port*]
# (Optional) Port of the rabbit server.
# Defaults to 5672.
# Defaults to $::os_service_default.
#
# [*rabbit_hosts*]
# (Optional) Array of host:port (used with HA queues).
# If defined, will remove rabbit_host & rabbit_port parameters from config
# Defaults to undef.
# Defaults to $::os_service_default.
#
# [*rabbit_userid*]
# (Optional) User to connect to the rabbit server.
@ -48,7 +48,7 @@
#
# [*rabbit_password*]
# (Optional) Password to connect to the rabbit_server.
# Defaults to empty.
# Defaults to $::os_service_default.
#
# [*rabbit_virtual_host*]
# (Optional) Virtual_host to use.
@ -56,7 +56,7 @@
#
# [*rabbit_ha_queues*]
# (optional) Use HA queues in RabbitMQ (x-ha-policy: all).
# Defaults to undef
# Defaults to $::os_service_default.
#
# [*rabbit_heartbeat_timeout_threshold*]
# (optional) Number of seconds after which the RabbitMQ broker is considered
@ -75,7 +75,7 @@
#
# [*rabbit_use_ssl*]
# (Optional) Connect over SSL for RabbitMQ.
# Defaults to false
# Defaults to $::os_service_default.
#
# [*kombu_ssl_ca_certs*]
# (Optional) SSL certification authority file (valid only if SSL enabled).
@ -97,7 +97,7 @@
#
# [*amqp_durable_queues*]
# (Optional) Use durable queues in amqp.
# Defaults to false
# Defaults to $::os_service_default.
#
# [*max_template_size*]
# (Optional) Maximum raw byte size of any template.
@ -260,23 +260,23 @@ class heat(
$keystone_tenant = 'services',
$keystone_password = false,
$keystone_ec2_uri = 'http://127.0.0.1:5000/v2.0/ec2tokens',
$rpc_backend = 'rabbit',
$rpc_backend = $::os_service_default,
$rpc_response_timeout = $::os_service_default,
$rabbit_host = '127.0.0.1',
$rabbit_port = 5672,
$rabbit_hosts = undef,
$rabbit_host = $::os_service_default,
$rabbit_port = $::os_service_default,
$rabbit_hosts = $::os_service_default,
$rabbit_userid = $::os_service_default,
$rabbit_password = '',
$rabbit_password = $::os_service_default,
$rabbit_virtual_host = $::os_service_default,
$rabbit_ha_queues = undef,
$rabbit_ha_queues = $::os_service_default,
$rabbit_heartbeat_timeout_threshold = 0,
$rabbit_heartbeat_rate = $::os_service_default,
$rabbit_use_ssl = false,
$rabbit_use_ssl = $::os_service_default,
$kombu_ssl_ca_certs = $::os_service_default,
$kombu_ssl_certfile = $::os_service_default,
$kombu_ssl_keyfile = $::os_service_default,
$kombu_ssl_version = $::os_service_default,
$amqp_durable_queues = false,
$amqp_durable_queues = $::os_service_default,
$use_syslog = undef,
$use_stderr = undef,
$log_facility = undef,
@ -322,14 +322,16 @@ class heat(
include ::heat::deps
include ::heat::params
if (!is_service_default($kombu_ssl_ca_certs)) and !$rabbit_use_ssl {
fail('The kombu_ssl_ca_certs parameter requires rabbit_use_ssl to be set to true')
}
if (!is_service_default($kombu_ssl_certfile)) and !$rabbit_use_ssl {
fail('The kombu_ssl_certfile parameter requires rabbit_use_ssl to be set to true')
}
if (!is_service_default($kombu_ssl_keyfile)) and !$rabbit_use_ssl {
fail('The kombu_ssl_keyfile parameter requires rabbit_use_ssl to be set to true')
if !$rabbit_use_ssl or is_service_default(rabbit_use_ssl) {
if !is_service_default($kombu_ssl_ca_certs) {
fail('The kombu_ssl_ca_certs parameter requires rabbit_use_ssl to be set to true')
}
if !is_service_default($kombu_ssl_certfile) {
fail('The kombu_ssl_certfile parameter requires rabbit_use_ssl to be set to true')
}
if !is_service_default($kombu_ssl_keyfile) {
fail('The kombu_ssl_keyfile parameter requires rabbit_use_ssl to be set to true')
}
}
if ((!is_service_default($kombu_ssl_certfile)) and is_service_default($kombu_ssl_keyfile))
or ((!is_service_default($kombu_ssl_keyfile)) and is_service_default($kombu_ssl_certfile)) {
@ -345,32 +347,34 @@ class heat(
tag => ['openstack', 'heat-package'],
}
if $rpc_backend == 'rabbit' {
if $rpc_backend == 'rabbit' or is_service_default($rpc_backend) {
if $rabbit_hosts {
heat_config { 'oslo_messaging_rabbit/rabbit_host': ensure => absent }
heat_config { 'oslo_messaging_rabbit/rabbit_port': ensure => absent }
heat_config { 'oslo_messaging_rabbit/rabbit_hosts':
value => join($rabbit_hosts, ',')
if ! is_service_default($rabbit_hosts) and $rabbit_hosts {
heat_config {
'oslo_messaging_rabbit/rabbit_hosts': value => join(any2array($rabbit_hosts), ',');
'oslo_messaging_rabbit/rabbit_host': ensure => absent;
'oslo_messaging_rabbit/rabbit_port': ensure => absent;
}
} else {
heat_config { 'oslo_messaging_rabbit/rabbit_host': value => $rabbit_host }
heat_config { 'oslo_messaging_rabbit/rabbit_port': value => $rabbit_port }
heat_config { 'oslo_messaging_rabbit/rabbit_hosts':
value => "${rabbit_host}:${rabbit_port}"
}
}
if $rabbit_ha_queues == undef {
if size($rabbit_hosts) > 1 {
heat_config { 'oslo_messaging_rabbit/rabbit_ha_queues': value => true }
if size($rabbit_hosts) > 1 and is_service_default($rabbit_ha_queues) {
heat_config {
'oslo_messaging_rabbit/rabbit_ha_queues': value => true;
}
} else {
heat_config { 'oslo_messaging_rabbit/rabbit_ha_queues': value => false }
heat_config {
'oslo_messaging_rabbit/rabbit_ha_queues': value => $rabbit_ha_queues;
}
}
} else {
heat_config { 'oslo_messaging_rabbit/rabbit_ha_queues': value => $rabbit_ha_queues }
heat_config {
'oslo_messaging_rabbit/rabbit_host': value => $rabbit_host;
'oslo_messaging_rabbit/rabbit_port': value => $rabbit_port;
'oslo_messaging_rabbit/rabbit_hosts': ensure => absent;
'oslo_messaging_rabbit/rabbit_ha_queues': value => $rabbit_ha_queues;
}
}
if $rabbit_heartbeat_timeout_threshold == 0 {
warning('Default value for rabbit_heartbeat_timeout_threshold parameter is different from OpenStack project defaults')
}
heat_config {
'oslo_messaging_rabbit/rabbit_userid': value => $rabbit_userid;
'oslo_messaging_rabbit/rabbit_password': value => $rabbit_password, secret => true;

View File

@ -52,13 +52,11 @@ describe 'heat::api_cfn' do
let :params do
{
:use_ssl => false,
:cert_file => false,
:key_file => false
}
end
it { is_expected.to contain_heat_config('heat_api_cfn/cert_file').with_ensure('absent') }
it { is_expected.to contain_heat_config('heat_api_cfn/key_file').with_ensure('absent') }
it { is_expected.to contain_heat_config('heat_api_cfn/cert_file').with_value('<SERVICE DEFAULT>') }
it { is_expected.to contain_heat_config('heat_api_cfn/key_file').with_value('<SERVICE DEFAULT>') }
end
[{:enabled => true}, {:enabled => false}].each do |param_hash|

View File

@ -52,13 +52,11 @@ describe 'heat::api_cloudwatch' do
let :params do
{
:use_ssl => false,
:cert_file => false,
:key_file => false
}
end
it { is_expected.to contain_heat_config('heat_api_cloudwatch/cert_file').with_ensure('absent') }
it { is_expected.to contain_heat_config('heat_api_cloudwatch/key_file').with_ensure('absent') }
it { is_expected.to contain_heat_config('heat_api_cloudwatch/cert_file').with_value('<SERVICE DEFAULT>') }
it { is_expected.to contain_heat_config('heat_api_cloudwatch/key_file').with_value('<SERVICE DEFAULT>') }
end
[{:enabled => true}, {:enabled => false}].each do |param_hash|

View File

@ -7,7 +7,7 @@ describe 'heat::api' do
:manage_service => true,
:bind_host => '127.0.0.1',
:bind_port => '1234',
:workers => '0' }
:workers => '<SERVICE DEFAULT>' }
end
shared_examples_for 'heat-api' do
@ -52,13 +52,11 @@ describe 'heat::api' do
let :params do
{
:use_ssl => false,
:cert_file => false,
:key_file => false
}
end
it { is_expected.to contain_heat_config('heat_api/cert_file').with_ensure('absent') }
it { is_expected.to contain_heat_config('heat_api/key_file').with_ensure('absent') }
it { is_expected.to contain_heat_config('heat_api/cert_file').with_value('<SERVICE DEFAULT>') }
it { is_expected.to contain_heat_config('heat_api/key_file').with_value('<SERVICE DEFAULT>') }
end

View File

@ -5,15 +5,15 @@ describe 'heat::engine' do
let :default_params do
{ :enabled => true,
:manage_service => true,
:heat_stack_user_role => 'heat_stack_user',
:heat_stack_user_role => '<SERVICE DEFAULT>',
:heat_metadata_server_url => 'http://127.0.0.1:8000',
:heat_waitcondition_server_url => 'http://127.0.0.1:8000/v1/waitcondition',
:heat_watch_server_url => 'http://128.0.0.1:8003',
:engine_life_check_timeout => '2',
:engine_life_check_timeout => '<SERVICE DEFAULT>',
:trusts_delegated_roles => ['heat_stack_owner'],
:deferred_auth_method => 'trusts',
:default_software_config_transport => 'POLL_SERVER_CFN',
:default_deployment_signal_transport => 'CFN_SIGNAL',
:deferred_auth_method => '<SERVICE DEFAULT>',
:default_software_config_transport => '<SERVICE DEFAULT>',
:default_deployment_signal_transport => '<SERVICE DEFAULT>',
}
end

View File

@ -9,10 +9,10 @@ describe 'heat' do
:debug => 'False',
:use_stderr => 'True',
:log_dir => '/var/log/heat',
:rabbit_host => '127.0.0.1',
:rabbit_host => '<SERVICE DEFAULT>',
:rabbit_port => 5672,
:rabbit_userid => '<SERVICE DEFAULT>',
:rabbit_password => '',
:rabbit_password => '<SERVICE DEFAULT>',
:rabbit_virtual_host => '<SERVICE DEFAULT>',
:database_connection => 'mysql+pymysql://user@host/database',
:database_idle_timeout => 3600,
@ -115,7 +115,7 @@ describe 'heat' do
is_expected.to contain_heat_config('oslo_messaging_rabbit/rabbit_password').with_value( params[:rabbit_password] )
is_expected.to contain_heat_config('oslo_messaging_rabbit/rabbit_password').with_secret( true )
is_expected.to contain_heat_config('oslo_messaging_rabbit/rabbit_virtual_host').with_value( params[:rabbit_virtual_host] )
is_expected.to contain_heat_config('oslo_messaging_rabbit/rabbit_use_ssl').with_value(false)
is_expected.to contain_heat_config('oslo_messaging_rabbit/rabbit_use_ssl').with_value('<SERVICE DEFAULT>')
is_expected.to contain_heat_config('oslo_messaging_rabbit/kombu_ssl_ca_certs').with_value('<SERVICE DEFAULT>')
is_expected.to contain_heat_config('oslo_messaging_rabbit/kombu_ssl_certfile').with_value('<SERVICE DEFAULT>')
is_expected.to contain_heat_config('oslo_messaging_rabbit/kombu_ssl_keyfile').with_value('<SERVICE DEFAULT>')
@ -125,10 +125,10 @@ describe 'heat' do
end
it { is_expected.to contain_heat_config('oslo_messaging_rabbit/rabbit_host').with_value( params[:rabbit_host] ) }
it { is_expected.to contain_heat_config('oslo_messaging_rabbit/rabbit_port').with_value( params[:rabbit_port] ) }
it { is_expected.to contain_heat_config('oslo_messaging_rabbit/rabbit_hosts').with_value( "#{params[:rabbit_host]}:#{params[:rabbit_port]}" ) }
it { is_expected.to contain_heat_config('oslo_messaging_rabbit/rabbit_ha_queues').with_value('false') }
it { is_expected.to contain_heat_config('oslo_messaging_rabbit/rabbit_hosts').with_ensure('absent') }
it { is_expected.to contain_heat_config('oslo_messaging_rabbit/rabbit_ha_queues').with_value('<SERVICE DEFAULT>') }
it { is_expected.to contain_heat_config('DEFAULT/rpc_response_timeout').with_value('<SERVICE DEFAULT>') }
it { is_expected.to contain_heat_config('oslo_messaging_rabbit/amqp_durable_queues').with_value(false) }
it { is_expected.to contain_heat_config('oslo_messaging_rabbit/amqp_durable_queues').with_value('<SERVICE DEFAULT>') }
end
shared_examples_for 'rabbit without HA support (without backward compatibility)' do
@ -137,7 +137,7 @@ describe 'heat' do
is_expected.to contain_heat_config('oslo_messaging_rabbit/rabbit_password').with_secret( true )
is_expected.to contain_heat_config('oslo_messaging_rabbit/rabbit_password').with_value( params[:rabbit_password] )
is_expected.to contain_heat_config('oslo_messaging_rabbit/rabbit_virtual_host').with_value( params[:rabbit_virtual_host] )
is_expected.to contain_heat_config('oslo_messaging_rabbit/rabbit_use_ssl').with_value(false)
is_expected.to contain_heat_config('oslo_messaging_rabbit/rabbit_use_ssl').with_value('<SERVICE DEFAULT>')
is_expected.to contain_heat_config('oslo_messaging_rabbit/kombu_ssl_ca_certs').with_value('<SERVICE DEFAULT>')
is_expected.to contain_heat_config('oslo_messaging_rabbit/kombu_ssl_certfile').with_value('<SERVICE DEFAULT>')
is_expected.to contain_heat_config('oslo_messaging_rabbit/kombu_ssl_keyfile').with_value('<SERVICE DEFAULT>')
@ -148,8 +148,8 @@ describe 'heat' do
it { is_expected.to contain_heat_config('oslo_messaging_rabbit/rabbit_host').with_ensure('absent') }
it { is_expected.to contain_heat_config('oslo_messaging_rabbit/rabbit_port').with_ensure('absent') }
it { is_expected.to contain_heat_config('oslo_messaging_rabbit/rabbit_hosts').with_value( params[:rabbit_hosts].join(',') ) }
it { is_expected.to contain_heat_config('oslo_messaging_rabbit/rabbit_ha_queues').with_value('false') }
it { is_expected.to contain_heat_config('oslo_messaging_rabbit/amqp_durable_queues').with_value(false) }
it { is_expected.to contain_heat_config('oslo_messaging_rabbit/rabbit_ha_queues').with_value('<SERVICE DEFAULT>') }
it { is_expected.to contain_heat_config('oslo_messaging_rabbit/amqp_durable_queues').with_value('<SERVICE DEFAULT>') }
end
shared_examples_for 'rabbit with HA support' do
@ -158,7 +158,7 @@ describe 'heat' do
is_expected.to contain_heat_config('oslo_messaging_rabbit/rabbit_password').with_value( params[:rabbit_password] )
is_expected.to contain_heat_config('oslo_messaging_rabbit/rabbit_password').with_secret( true )
is_expected.to contain_heat_config('oslo_messaging_rabbit/rabbit_virtual_host').with_value( params[:rabbit_virtual_host] )
is_expected.to contain_heat_config('oslo_messaging_rabbit/rabbit_use_ssl').with_value(false)
is_expected.to contain_heat_config('oslo_messaging_rabbit/rabbit_use_ssl').with_value('<SERVICE DEFAULT>')
is_expected.to contain_heat_config('oslo_messaging_rabbit/kombu_ssl_ca_certs').with_value('<SERVICE DEFAULT>')
is_expected.to contain_heat_config('oslo_messaging_rabbit/kombu_ssl_certfile').with_value('<SERVICE DEFAULT>')
is_expected.to contain_heat_config('oslo_messaging_rabbit/kombu_ssl_keyfile').with_value('<SERVICE DEFAULT>')
@ -189,7 +189,7 @@ describe 'heat' do
is_expected.to contain_heat_config('oslo_messaging_rabbit/rabbit_password').with_value( params[:rabbit_password] )
is_expected.to contain_heat_config('oslo_messaging_rabbit/rabbit_password').with_secret( true )
is_expected.to contain_heat_config('oslo_messaging_rabbit/rabbit_virtual_host').with_value( params[:rabbit_virtual_host] )
is_expected.to contain_heat_config('oslo_messaging_rabbit/rabbit_use_ssl').with_value(false)
is_expected.to contain_heat_config('oslo_messaging_rabbit/rabbit_use_ssl').with_value('<SERVICE DEFAULT>')
is_expected.to contain_heat_config('oslo_messaging_rabbit/kombu_ssl_ca_certs').with_value('<SERVICE DEFAULT>')
is_expected.to contain_heat_config('oslo_messaging_rabbit/kombu_ssl_certfile').with_value('<SERVICE DEFAULT>')
is_expected.to contain_heat_config('oslo_messaging_rabbit/kombu_ssl_keyfile').with_value('<SERVICE DEFAULT>')