Merge "Move rabbit/kombu settings to oslo_messaging_rabbit section"

This commit is contained in:
Jenkins 2015-06-09 17:18:16 +00:00 committed by Gerrit Code Review
commit 4d0d175128
2 changed files with 53 additions and 53 deletions

View File

@ -317,52 +317,52 @@ class cinder (
}
cinder_config {
'DEFAULT/rabbit_password': value => $rabbit_password, secret => true;
'DEFAULT/rabbit_userid': value => $rabbit_userid;
'DEFAULT/rabbit_virtual_host': value => $rabbit_virtual_host;
'DEFAULT/rabbit_use_ssl': value => $rabbit_use_ssl;
'oslo_messaging_rabbit/rabbit_password': value => $rabbit_password, secret => true;
'oslo_messaging_rabbit/rabbit_userid': value => $rabbit_userid;
'oslo_messaging_rabbit/rabbit_virtual_host': value => $rabbit_virtual_host;
'oslo_messaging_rabbit/rabbit_use_ssl': value => $rabbit_use_ssl;
'DEFAULT/control_exchange': value => $control_exchange;
'DEFAULT/amqp_durable_queues': value => $amqp_durable_queues;
}
if $rabbit_hosts {
cinder_config { 'DEFAULT/rabbit_hosts': value => join($rabbit_hosts, ',') }
cinder_config { 'DEFAULT/rabbit_ha_queues': value => true }
cinder_config { 'DEFAULT/rabbit_host': ensure => absent }
cinder_config { 'DEFAULT/rabbit_port': ensure => absent }
cinder_config { 'oslo_messaging_rabbit/rabbit_hosts': value => join($rabbit_hosts, ',') }
cinder_config { 'oslo_messaging_rabbit/rabbit_ha_queues': value => true }
cinder_config { 'oslo_messaging_rabbit/rabbit_host': ensure => absent }
cinder_config { 'oslo_messaging_rabbit/rabbit_port': ensure => absent }
} else {
cinder_config { 'DEFAULT/rabbit_host': value => $rabbit_host }
cinder_config { 'DEFAULT/rabbit_port': value => $rabbit_port }
cinder_config { 'DEFAULT/rabbit_hosts': value => "${rabbit_host}:${rabbit_port}" }
cinder_config { 'DEFAULT/rabbit_ha_queues': value => false }
cinder_config { 'oslo_messaging_rabbit/rabbit_host': value => $rabbit_host }
cinder_config { 'oslo_messaging_rabbit/rabbit_port': value => $rabbit_port }
cinder_config { 'oslo_messaging_rabbit/rabbit_hosts': value => "${rabbit_host}:${rabbit_port}" }
cinder_config { 'oslo_messaging_rabbit/rabbit_ha_queues': value => false }
}
if $rabbit_use_ssl {
cinder_config { 'DEFAULT/kombu_ssl_version': value => $kombu_ssl_version }
cinder_config { 'oslo_messaging_rabbit/kombu_ssl_version': value => $kombu_ssl_version }
if $kombu_ssl_ca_certs {
cinder_config { 'DEFAULT/kombu_ssl_ca_certs': value => $kombu_ssl_ca_certs }
cinder_config { 'oslo_messaging_rabbit/kombu_ssl_ca_certs': value => $kombu_ssl_ca_certs }
} else {
cinder_config { 'DEFAULT/kombu_ssl_ca_certs': ensure => absent}
cinder_config { 'oslo_messaging_rabbit/kombu_ssl_ca_certs': ensure => absent}
}
if $kombu_ssl_certfile {
cinder_config { 'DEFAULT/kombu_ssl_certfile': value => $kombu_ssl_certfile }
cinder_config { 'oslo_messaging_rabbit/kombu_ssl_certfile': value => $kombu_ssl_certfile }
} else {
cinder_config { 'DEFAULT/kombu_ssl_certfile': ensure => absent}
cinder_config { 'oslo_messaging_rabbit/kombu_ssl_certfile': ensure => absent}
}
if $kombu_ssl_keyfile {
cinder_config { 'DEFAULT/kombu_ssl_keyfile': value => $kombu_ssl_keyfile }
cinder_config { 'oslo_messaging_rabbit/kombu_ssl_keyfile': value => $kombu_ssl_keyfile }
} else {
cinder_config { 'DEFAULT/kombu_ssl_keyfile': ensure => absent}
cinder_config { 'oslo_messaging_rabbit/kombu_ssl_keyfile': ensure => absent}
}
} else {
cinder_config {
'DEFAULT/kombu_ssl_ca_certs': ensure => absent;
'DEFAULT/kombu_ssl_certfile': ensure => absent;
'DEFAULT/kombu_ssl_keyfile': ensure => absent;
'DEFAULT/kombu_ssl_version': ensure => absent;
'oslo_messaging_rabbit/kombu_ssl_ca_certs': ensure => absent;
'oslo_messaging_rabbit/kombu_ssl_certfile': ensure => absent;
'oslo_messaging_rabbit/kombu_ssl_keyfile': ensure => absent;
'oslo_messaging_rabbit/kombu_ssl_version': ensure => absent;
}
}

View File

@ -19,13 +19,13 @@ describe 'cinder' do
it 'should contain default config' do
is_expected.to contain_cinder_config('DEFAULT/rpc_backend').with(:value => 'cinder.openstack.common.rpc.impl_kombu')
is_expected.to contain_cinder_config('DEFAULT/control_exchange').with(:value => 'openstack')
is_expected.to contain_cinder_config('DEFAULT/rabbit_password').with(:value => 'guest', :secret => true)
is_expected.to contain_cinder_config('DEFAULT/rabbit_host').with(:value => '127.0.0.1')
is_expected.to contain_cinder_config('DEFAULT/rabbit_port').with(:value => '5672')
is_expected.to contain_cinder_config('DEFAULT/rabbit_hosts').with(:value => '127.0.0.1:5672')
is_expected.to contain_cinder_config('DEFAULT/rabbit_ha_queues').with(:value => false)
is_expected.to contain_cinder_config('DEFAULT/rabbit_virtual_host').with(:value => '/')
is_expected.to contain_cinder_config('DEFAULT/rabbit_userid').with(:value => 'guest')
is_expected.to contain_cinder_config('oslo_messaging_rabbit/rabbit_password').with(:value => 'guest', :secret => true)
is_expected.to contain_cinder_config('oslo_messaging_rabbit/rabbit_host').with(:value => '127.0.0.1')
is_expected.to contain_cinder_config('oslo_messaging_rabbit/rabbit_port').with(:value => '5672')
is_expected.to contain_cinder_config('oslo_messaging_rabbit/rabbit_hosts').with(:value => '127.0.0.1:5672')
is_expected.to contain_cinder_config('oslo_messaging_rabbit/rabbit_ha_queues').with(:value => false)
is_expected.to contain_cinder_config('oslo_messaging_rabbit/rabbit_virtual_host').with(:value => '/')
is_expected.to contain_cinder_config('oslo_messaging_rabbit/rabbit_userid').with(:value => 'guest')
is_expected.to contain_cinder_config('database/connection').with(:value => 'mysql://user:password@host/database', :secret => true)
is_expected.to contain_cinder_config('database/idle_timeout').with(:value => '3600')
is_expected.to contain_cinder_config('database/min_pool_size').with(:value => '1')
@ -62,10 +62,10 @@ describe 'cinder' do
end
it 'should contain many' do
is_expected.to contain_cinder_config('DEFAULT/rabbit_host').with(:value => nil)
is_expected.to contain_cinder_config('DEFAULT/rabbit_port').with(:value => nil)
is_expected.to contain_cinder_config('DEFAULT/rabbit_hosts').with(:value => 'rabbit1:5672,rabbit2:5672')
is_expected.to contain_cinder_config('DEFAULT/rabbit_ha_queues').with(:value => true)
is_expected.to contain_cinder_config('oslo_messaging_rabbit/rabbit_host').with(:value => nil)
is_expected.to contain_cinder_config('oslo_messaging_rabbit/rabbit_port').with(:value => nil)
is_expected.to contain_cinder_config('oslo_messaging_rabbit/rabbit_hosts').with(:value => 'rabbit1:5672,rabbit2:5672')
is_expected.to contain_cinder_config('oslo_messaging_rabbit/rabbit_ha_queues').with(:value => true)
end
end
@ -75,10 +75,10 @@ describe 'cinder' do
end
it 'should contain many' do
is_expected.to contain_cinder_config('DEFAULT/rabbit_host').with(:value => nil)
is_expected.to contain_cinder_config('DEFAULT/rabbit_port').with(:value => nil)
is_expected.to contain_cinder_config('DEFAULT/rabbit_hosts').with(:value => 'rabbit1:5672')
is_expected.to contain_cinder_config('DEFAULT/rabbit_ha_queues').with(:value => true)
is_expected.to contain_cinder_config('oslo_messaging_rabbit/rabbit_host').with(:value => nil)
is_expected.to contain_cinder_config('oslo_messaging_rabbit/rabbit_port').with(:value => nil)
is_expected.to contain_cinder_config('oslo_messaging_rabbit/rabbit_hosts').with(:value => 'rabbit1:5672')
is_expected.to contain_cinder_config('oslo_messaging_rabbit/rabbit_ha_queues').with(:value => true)
end
end
@ -159,11 +159,11 @@ describe 'cinder' do
end
it do
is_expected.to contain_cinder_config('DEFAULT/rabbit_use_ssl').with_value('true')
is_expected.to contain_cinder_config('DEFAULT/kombu_ssl_ca_certs').with_value('/path/to/ssl/ca/certs')
is_expected.to contain_cinder_config('DEFAULT/kombu_ssl_certfile').with_value('/path/to/ssl/cert/file')
is_expected.to contain_cinder_config('DEFAULT/kombu_ssl_keyfile').with_value('/path/to/ssl/keyfile')
is_expected.to contain_cinder_config('DEFAULT/kombu_ssl_version').with_value('TLSv1')
is_expected.to contain_cinder_config('oslo_messaging_rabbit/rabbit_use_ssl').with_value('true')
is_expected.to contain_cinder_config('oslo_messaging_rabbit/kombu_ssl_ca_certs').with_value('/path/to/ssl/ca/certs')
is_expected.to contain_cinder_config('oslo_messaging_rabbit/kombu_ssl_certfile').with_value('/path/to/ssl/cert/file')
is_expected.to contain_cinder_config('oslo_messaging_rabbit/kombu_ssl_keyfile').with_value('/path/to/ssl/keyfile')
is_expected.to contain_cinder_config('oslo_messaging_rabbit/kombu_ssl_version').with_value('TLSv1')
end
end
@ -175,11 +175,11 @@ describe 'cinder' do
end
it do
is_expected.to contain_cinder_config('DEFAULT/rabbit_use_ssl').with_value('true')
is_expected.to contain_cinder_config('DEFAULT/kombu_ssl_ca_certs').with_ensure('absent')
is_expected.to contain_cinder_config('DEFAULT/kombu_ssl_certfile').with_ensure('absent')
is_expected.to contain_cinder_config('DEFAULT/kombu_ssl_keyfile').with_ensure('absent')
is_expected.to contain_cinder_config('DEFAULT/kombu_ssl_version').with_value('TLSv1')
is_expected.to contain_cinder_config('oslo_messaging_rabbit/rabbit_use_ssl').with_value('true')
is_expected.to contain_cinder_config('oslo_messaging_rabbit/kombu_ssl_ca_certs').with_ensure('absent')
is_expected.to contain_cinder_config('oslo_messaging_rabbit/kombu_ssl_certfile').with_ensure('absent')
is_expected.to contain_cinder_config('oslo_messaging_rabbit/kombu_ssl_keyfile').with_ensure('absent')
is_expected.to contain_cinder_config('oslo_messaging_rabbit/kombu_ssl_version').with_value('TLSv1')
end
end
@ -195,11 +195,11 @@ describe 'cinder' do
end
it do
is_expected.to contain_cinder_config('DEFAULT/rabbit_use_ssl').with_value('false')
is_expected.to contain_cinder_config('DEFAULT/kombu_ssl_ca_certs').with_ensure('absent')
is_expected.to contain_cinder_config('DEFAULT/kombu_ssl_certfile').with_ensure('absent')
is_expected.to contain_cinder_config('DEFAULT/kombu_ssl_keyfile').with_ensure('absent')
is_expected.to contain_cinder_config('DEFAULT/kombu_ssl_version').with_ensure('absent')
is_expected.to contain_cinder_config('oslo_messaging_rabbit/rabbit_use_ssl').with_value('false')
is_expected.to contain_cinder_config('oslo_messaging_rabbit/kombu_ssl_ca_certs').with_ensure('absent')
is_expected.to contain_cinder_config('oslo_messaging_rabbit/kombu_ssl_certfile').with_ensure('absent')
is_expected.to contain_cinder_config('oslo_messaging_rabbit/kombu_ssl_keyfile').with_ensure('absent')
is_expected.to contain_cinder_config('oslo_messaging_rabbit/kombu_ssl_version').with_ensure('absent')
end
end