Switch ceilometer to rspec-puppet-facts
Change-Id: I5befcadb924f0896457f3db0b712f6de157e926c
This commit is contained in:
parent
af4af189ea
commit
52ebcc955d
@ -49,20 +49,16 @@ describe 'ceilometer::agent::auth' do
|
||||
|
||||
end
|
||||
|
||||
context 'on Debian platforms' do
|
||||
let :facts do
|
||||
@default_facts.merge({ :osfamily => 'Debian' })
|
||||
on_supported_os({
|
||||
:supported_os => OSDefaults.get_supported_os
|
||||
}).each do |os,facts|
|
||||
context "on #{os}" do
|
||||
let (:facts) do
|
||||
facts.merge!(OSDefaults.get_facts())
|
||||
end
|
||||
|
||||
it_behaves_like 'ceilometer-agent-auth'
|
||||
end
|
||||
|
||||
it_configures 'ceilometer-agent-auth'
|
||||
end
|
||||
|
||||
context 'on RedHat platforms' do
|
||||
let :facts do
|
||||
@default_facts.merge({ :osfamily => 'RedHat' })
|
||||
end
|
||||
|
||||
it_configures 'ceilometer-agent-auth'
|
||||
end
|
||||
|
||||
end
|
||||
|
@ -77,29 +77,27 @@ describe 'ceilometer::agent::central' do
|
||||
|
||||
end
|
||||
|
||||
context 'on Debian platforms' do
|
||||
let :facts do
|
||||
@default_facts.merge({ :osfamily => 'Debian' })
|
||||
end
|
||||
on_supported_os({
|
||||
:supported_os => OSDefaults.get_supported_os
|
||||
}).each do |os,facts|
|
||||
context "on #{os}" do
|
||||
let (:facts) do
|
||||
facts.merge!(OSDefaults.get_facts())
|
||||
end
|
||||
|
||||
let :platform_params do
|
||||
{ :agent_package_name => 'ceilometer-agent-central',
|
||||
:agent_service_name => 'ceilometer-agent-central' }
|
||||
end
|
||||
let :platform_params do
|
||||
case facts[:osfamily]
|
||||
when 'Debian'
|
||||
{ :agent_package_name => 'ceilometer-agent-central',
|
||||
:agent_service_name => 'ceilometer-agent-central' }
|
||||
when 'RedHat'
|
||||
{ :agent_package_name => 'openstack-ceilometer-central',
|
||||
:agent_service_name => 'openstack-ceilometer-central' }
|
||||
end
|
||||
end
|
||||
|
||||
it_configures 'ceilometer-agent-central'
|
||||
it_behaves_like 'ceilometer-agent-central'
|
||||
end
|
||||
end
|
||||
|
||||
context 'on RedHat platforms' do
|
||||
let :facts do
|
||||
@default_facts.merge({ :osfamily => 'RedHat' })
|
||||
end
|
||||
|
||||
let :platform_params do
|
||||
{ :agent_package_name => 'openstack-ceilometer-central',
|
||||
:agent_service_name => 'openstack-ceilometer-central' }
|
||||
end
|
||||
|
||||
it_configures 'ceilometer-agent-central'
|
||||
end
|
||||
end
|
||||
|
@ -88,44 +88,34 @@ describe 'ceilometer::agent::compute' do
|
||||
|
||||
end
|
||||
|
||||
context 'on Debian platforms' do
|
||||
let :facts do
|
||||
@default_facts.merge({ :osfamily => 'Debian' })
|
||||
end
|
||||
|
||||
let :platform_params do
|
||||
{ :agent_package_name => 'ceilometer-agent-compute',
|
||||
:agent_service_name => 'ceilometer-agent-compute' }
|
||||
end
|
||||
|
||||
context 'on Ubuntu operating systems' do
|
||||
before do
|
||||
facts.merge!( :operatingsystem => 'Ubuntu' )
|
||||
platform_params.merge!( :libvirt_group => 'libvirtd' )
|
||||
on_supported_os({
|
||||
:supported_os => OSDefaults.get_supported_os
|
||||
}).each do |os,facts|
|
||||
context "on #{os}" do
|
||||
let (:facts) do
|
||||
facts.merge!(OSDefaults.get_facts())
|
||||
end
|
||||
|
||||
it_configures 'ceilometer-agent-compute'
|
||||
end
|
||||
|
||||
context 'on other operating systems' do
|
||||
before do
|
||||
platform_params.merge!( :libvirt_group => 'libvirt' )
|
||||
let :platform_params do
|
||||
case facts[:osfamily]
|
||||
when 'Debian'
|
||||
if facts[:operatingsystem] == 'Ubuntu'
|
||||
{ :agent_package_name => 'ceilometer-agent-compute',
|
||||
:agent_service_name => 'ceilometer-agent-compute',
|
||||
:libvirt_group => 'libvirtd' }
|
||||
else
|
||||
{ :agent_package_name => 'ceilometer-agent-compute',
|
||||
:agent_service_name => 'ceilometer-agent-compute',
|
||||
:libvirt_group => 'libvirt' }
|
||||
end
|
||||
when 'RedHat'
|
||||
{ :agent_package_name => 'openstack-ceilometer-compute',
|
||||
:agent_service_name => 'openstack-ceilometer-compute' }
|
||||
end
|
||||
end
|
||||
|
||||
it_configures 'ceilometer-agent-compute'
|
||||
it_behaves_like 'ceilometer-agent-compute'
|
||||
end
|
||||
end
|
||||
|
||||
context 'on RedHat platforms' do
|
||||
let :facts do
|
||||
@default_facts.merge({ :osfamily => 'RedHat' })
|
||||
end
|
||||
|
||||
let :platform_params do
|
||||
{ :agent_package_name => 'openstack-ceilometer-compute',
|
||||
:agent_service_name => 'openstack-ceilometer-compute' }
|
||||
end
|
||||
|
||||
it_configures 'ceilometer-agent-compute'
|
||||
end
|
||||
end
|
||||
|
@ -172,94 +172,27 @@ describe 'ceilometer::agent::notification' do
|
||||
end
|
||||
end
|
||||
|
||||
context 'on Debian platforms' do
|
||||
let :facts do
|
||||
@default_facts.merge({ :osfamily => 'Debian' })
|
||||
on_supported_os({
|
||||
:supported_os => OSDefaults.get_supported_os
|
||||
}).each do |os,facts|
|
||||
context "on #{os}" do
|
||||
let (:facts) do
|
||||
facts.merge!(OSDefaults.get_facts())
|
||||
end
|
||||
|
||||
let :platform_params do
|
||||
case facts[:osfamily]
|
||||
when 'Debian'
|
||||
{ :agent_notification_package_name => 'ceilometer-agent-notification',
|
||||
:agent_notification_service_name => 'ceilometer-agent-notification' }
|
||||
when 'RedHat'
|
||||
{ :agent_notification_package_name => 'openstack-ceilometer-notification',
|
||||
:agent_notification_service_name => 'openstack-ceilometer-notification' }
|
||||
end
|
||||
end
|
||||
|
||||
it_behaves_like 'ceilometer-agent-notification'
|
||||
end
|
||||
|
||||
let :platform_params do
|
||||
{ :agent_notification_package_name => 'ceilometer-agent-notification',
|
||||
:agent_notification_service_name => 'ceilometer-agent-notification' }
|
||||
end
|
||||
|
||||
it_configures 'ceilometer-agent-notification'
|
||||
end
|
||||
|
||||
context 'on RedHat platforms' do
|
||||
let :facts do
|
||||
@default_facts.merge({ :osfamily => 'RedHat' })
|
||||
end
|
||||
|
||||
let :platform_params do
|
||||
{ :agent_notification_package_name => 'openstack-ceilometer-notification',
|
||||
:agent_notification_service_name => 'openstack-ceilometer-notification' }
|
||||
end
|
||||
|
||||
it_configures 'ceilometer-agent-notification'
|
||||
end
|
||||
|
||||
context 'on RHEL 7' do
|
||||
let :facts do
|
||||
@default_facts.merge({ :osfamily => 'RedHat',
|
||||
:operatingsystem => 'RedHat',
|
||||
:operatingsystemmajrelease => 7
|
||||
})
|
||||
end
|
||||
|
||||
let :platform_params do
|
||||
{ :agent_notification_package_name => 'openstack-ceilometer-notification',
|
||||
:agent_notification_service_name => 'openstack-ceilometer-notification' }
|
||||
end
|
||||
|
||||
it_configures 'ceilometer-agent-notification'
|
||||
end
|
||||
|
||||
context 'on CentOS 7' do
|
||||
let :facts do
|
||||
@default_facts.merge({ :osfamily => 'RedHat',
|
||||
:operatingsystem => 'CentOS',
|
||||
:operatingsystemmajrelease => 7
|
||||
})
|
||||
end
|
||||
|
||||
let :platform_params do
|
||||
{ :agent_notification_package_name => 'openstack-ceilometer-notification',
|
||||
:agent_notification_service_name => 'openstack-ceilometer-notification' }
|
||||
end
|
||||
|
||||
it_configures 'ceilometer-agent-notification'
|
||||
end
|
||||
|
||||
context 'on Scientific 7' do
|
||||
let :facts do
|
||||
@default_facts.merge({ :osfamily => 'RedHat',
|
||||
:operatingsystem => 'Scientific',
|
||||
:operatingsystemmajrelease => 7
|
||||
})
|
||||
end
|
||||
|
||||
let :platform_params do
|
||||
{ :agent_notification_package_name => 'openstack-ceilometer-notification',
|
||||
:agent_notification_service_name => 'openstack-ceilometer-notification' }
|
||||
end
|
||||
|
||||
it_configures 'ceilometer-agent-notification'
|
||||
end
|
||||
|
||||
context 'on Fedora 20' do
|
||||
let :facts do
|
||||
@default_facts.merge({ :osfamily => 'RedHat',
|
||||
:operatingsystem => 'Fedora',
|
||||
:operatingsystemrelease => 20
|
||||
})
|
||||
end
|
||||
|
||||
let :platform_params do
|
||||
{ :agent_notification_package_name => 'openstack-ceilometer-notification',
|
||||
:agent_notification_service_name => 'openstack-ceilometer-notification' }
|
||||
end
|
||||
|
||||
it_configures 'ceilometer-agent-notification'
|
||||
end
|
||||
|
||||
end
|
||||
|
@ -114,45 +114,34 @@ describe 'ceilometer::agent::polling' do
|
||||
|
||||
end
|
||||
|
||||
context 'on Debian platforms' do
|
||||
let :facts do
|
||||
@default_facts.merge({ :osfamily => 'Debian' })
|
||||
end
|
||||
|
||||
let :platform_params do
|
||||
{ :agent_package_name => 'ceilometer-polling',
|
||||
:agent_service_name => 'ceilometer-polling' }
|
||||
end
|
||||
|
||||
context 'on Ubuntu operating systems' do
|
||||
before do
|
||||
facts.merge!( :operatingsystem => 'Ubuntu' )
|
||||
platform_params.merge!( :libvirt_group => 'libvirtd' )
|
||||
on_supported_os({
|
||||
:supported_os => OSDefaults.get_supported_os
|
||||
}).each do |os,facts|
|
||||
context "on #{os}" do
|
||||
let (:facts) do
|
||||
facts.merge!(OSDefaults.get_facts())
|
||||
end
|
||||
|
||||
it_configures 'ceilometer-polling'
|
||||
end
|
||||
|
||||
context 'on other operating systems' do
|
||||
before do
|
||||
platform_params.merge!( :libvirt_group => 'libvirt' )
|
||||
let :platform_params do
|
||||
case facts[:osfamily]
|
||||
when 'Debian'
|
||||
if facts[:operatingsystem] == 'Ubuntu'
|
||||
{ :agent_package_name => 'ceilometer-polling',
|
||||
:agent_service_name => 'ceilometer-polling',
|
||||
:libvirt_group => 'libvirtd' }
|
||||
else
|
||||
{ :agent_package_name => 'ceilometer-polling',
|
||||
:agent_service_name => 'ceilometer-polling',
|
||||
:libvirt_group => 'libvirt' }
|
||||
end
|
||||
when 'RedHat'
|
||||
{ :agent_package_name => 'openstack-ceilometer-polling',
|
||||
:agent_service_name => 'openstack-ceilometer-polling' }
|
||||
end
|
||||
end
|
||||
|
||||
it_configures 'ceilometer-polling'
|
||||
it_behaves_like 'ceilometer-polling'
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
context 'on RedHat platforms' do
|
||||
let :facts do
|
||||
@default_facts.merge({ :osfamily => 'RedHat' })
|
||||
end
|
||||
|
||||
let :platform_params do
|
||||
{ :agent_package_name => 'openstack-ceilometer-polling',
|
||||
:agent_service_name => 'openstack-ceilometer-polling' }
|
||||
end
|
||||
|
||||
it_configures 'ceilometer-polling'
|
||||
end
|
||||
end
|
||||
|
@ -149,41 +149,30 @@ describe 'ceilometer::api' do
|
||||
end
|
||||
end
|
||||
|
||||
context 'on Debian platforms' do
|
||||
let :facts do
|
||||
@default_facts.merge({ :osfamily => 'Debian',
|
||||
:operatingsystem => 'Debian',
|
||||
:operatingsystemrelease => '8.0',
|
||||
:concat_basedir => '/var/lib/puppet/concat',
|
||||
:fqdn => 'some.host.tld',
|
||||
})
|
||||
on_supported_os({
|
||||
:supported_os => OSDefaults.get_supported_os
|
||||
}).each do |os,facts|
|
||||
context "on #{os}" do
|
||||
let (:facts) do
|
||||
facts.merge!(OSDefaults.get_facts({
|
||||
:concat_basedir => '/var/lib/puppet/concat',
|
||||
:fqdn => 'some.host.tld',
|
||||
}))
|
||||
end
|
||||
|
||||
let :platform_params do
|
||||
case facts[:osfamily]
|
||||
when 'Debian'
|
||||
{ :api_package_name => 'ceilometer-api',
|
||||
:api_service_name => 'ceilometer-api' }
|
||||
when 'RedHat'
|
||||
{ :api_package_name => 'openstack-ceilometer-api',
|
||||
:api_service_name => 'openstack-ceilometer-api' }
|
||||
end
|
||||
end
|
||||
|
||||
it_behaves_like 'ceilometer-api'
|
||||
end
|
||||
|
||||
let :platform_params do
|
||||
{ :api_package_name => 'ceilometer-api',
|
||||
:api_service_name => 'ceilometer-api' }
|
||||
end
|
||||
|
||||
it_configures 'ceilometer-api'
|
||||
end
|
||||
|
||||
context 'on RedHat platforms' do
|
||||
let :facts do
|
||||
@default_facts.merge({ :osfamily => 'RedHat',
|
||||
:operatingsystem => 'RedHat',
|
||||
:operatingsystemrelease => '7.1',
|
||||
:operatingsystemmajrelease => '7',
|
||||
:fqdn => 'some.host.tld',
|
||||
:concat_basedir => '/var/lib/puppet/concat',
|
||||
})
|
||||
end
|
||||
|
||||
let :platform_params do
|
||||
{ :api_package_name => 'openstack-ceilometer-api',
|
||||
:api_service_name => 'openstack-ceilometer-api' }
|
||||
end
|
||||
|
||||
it_configures 'ceilometer-api'
|
||||
end
|
||||
|
||||
end
|
||||
|
@ -15,27 +15,20 @@ describe 'ceilometer::client' do
|
||||
end
|
||||
end
|
||||
|
||||
context 'on Debian platforms' do
|
||||
let :facts do
|
||||
@default_facts.merge({ :osfamily => 'Debian' })
|
||||
end
|
||||
on_supported_os({
|
||||
:supported_os => OSDefaults.get_supported_os
|
||||
}).each do |os,facts|
|
||||
context "on #{os}" do
|
||||
let (:facts) do
|
||||
facts.merge!(OSDefaults.get_facts())
|
||||
end
|
||||
|
||||
let :platform_params do
|
||||
{ :client_package_name => 'python-ceilometerclient' }
|
||||
end
|
||||
let :platform_params do
|
||||
{ :client_package_name => 'python-ceilometerclient' }
|
||||
end
|
||||
|
||||
it_configures 'ceilometer client'
|
||||
it_behaves_like 'ceilometer client'
|
||||
end
|
||||
end
|
||||
|
||||
context 'on RedHat platforms' do
|
||||
let :facts do
|
||||
@default_facts.merge({ :osfamily => 'RedHat' })
|
||||
end
|
||||
|
||||
let :platform_params do
|
||||
{ :client_package_name => 'python-ceilometerclient' }
|
||||
end
|
||||
|
||||
it_configures 'ceilometer client'
|
||||
end
|
||||
end
|
||||
|
@ -113,29 +113,27 @@ describe 'ceilometer::collector' do
|
||||
end
|
||||
end
|
||||
|
||||
context 'on Debian platforms' do
|
||||
let :facts do
|
||||
@default_facts.merge({ :osfamily => 'Debian' })
|
||||
end
|
||||
on_supported_os({
|
||||
:supported_os => OSDefaults.get_supported_os
|
||||
}).each do |os,facts|
|
||||
context "on #{os}" do
|
||||
let (:facts) do
|
||||
facts.merge!(OSDefaults.get_facts())
|
||||
end
|
||||
|
||||
let :platform_params do
|
||||
{ :collector_package_name => 'ceilometer-collector',
|
||||
:collector_service_name => 'ceilometer-collector' }
|
||||
end
|
||||
let :platform_params do
|
||||
case facts[:osfamily]
|
||||
when 'Debian'
|
||||
{ :collector_package_name => 'ceilometer-collector',
|
||||
:collector_service_name => 'ceilometer-collector' }
|
||||
when 'RedHat'
|
||||
{ :collector_package_name => 'openstack-ceilometer-collector',
|
||||
:collector_service_name => 'openstack-ceilometer-collector' }
|
||||
end
|
||||
end
|
||||
|
||||
it_configures 'ceilometer-collector'
|
||||
it_behaves_like 'ceilometer-collector'
|
||||
end
|
||||
end
|
||||
|
||||
context 'on RedHat platforms' do
|
||||
let :facts do
|
||||
@default_facts.merge({ :osfamily => 'RedHat' })
|
||||
end
|
||||
|
||||
let :platform_params do
|
||||
{ :collector_package_name => 'openstack-ceilometer-collector',
|
||||
:collector_service_name => 'openstack-ceilometer-collector' }
|
||||
end
|
||||
|
||||
it_configures 'ceilometer-collector'
|
||||
end
|
||||
end
|
||||
|
@ -31,60 +31,48 @@ describe 'ceilometer::db::mysql' do
|
||||
:charset => params[:charset]
|
||||
)
|
||||
end
|
||||
|
||||
describe "overriding allowed_hosts param to array" do
|
||||
let :params do
|
||||
{
|
||||
:password => 'ceilometerpass',
|
||||
:allowed_hosts => ['localhost','%']
|
||||
}
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
describe "overriding allowed_hosts param to string" do
|
||||
let :params do
|
||||
{
|
||||
:password => 'ceilometerpass2',
|
||||
:allowed_hosts => '192.168.1.1'
|
||||
}
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
describe "overriding allowed_hosts param equals to host param " do
|
||||
let :params do
|
||||
{
|
||||
:password => 'ceilometerpass2',
|
||||
:allowed_hosts => 'localhost'
|
||||
}
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
context 'on Debian platforms' do
|
||||
let :facts do
|
||||
@default_facts.merge({ :osfamily => 'Debian' })
|
||||
end
|
||||
on_supported_os({
|
||||
:supported_os => OSDefaults.get_supported_os
|
||||
}).each do |os,facts|
|
||||
context "on #{os}" do
|
||||
let (:facts) do
|
||||
facts.merge!(OSDefaults.get_facts())
|
||||
end
|
||||
|
||||
it_configures 'ceilometer mysql database'
|
||||
it_behaves_like 'ceilometer mysql database'
|
||||
end
|
||||
end
|
||||
|
||||
context 'on RedHat platforms' do
|
||||
let :facts do
|
||||
@default_facts.merge({ :osfamily => 'RedHat' })
|
||||
end
|
||||
|
||||
it_configures 'ceilometer mysql database'
|
||||
end
|
||||
|
||||
describe "overriding allowed_hosts param to array" do
|
||||
let :facts do
|
||||
@default_facts.merge({ :osfamily => "Debian" })
|
||||
end
|
||||
let :params do
|
||||
{
|
||||
:password => 'ceilometerpass',
|
||||
:allowed_hosts => ['localhost','%']
|
||||
}
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
describe "overriding allowed_hosts param to string" do
|
||||
let :facts do
|
||||
@default_facts.merge({ :osfamily => 'RedHat' })
|
||||
end
|
||||
let :params do
|
||||
{
|
||||
:password => 'ceilometerpass2',
|
||||
:allowed_hosts => '192.168.1.1'
|
||||
}
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
describe "overriding allowed_hosts param equals to host param " do
|
||||
let :facts do
|
||||
@default_facts.merge({ :osfamily => 'RedHat' })
|
||||
end
|
||||
let :params do
|
||||
{
|
||||
:password => 'ceilometerpass2',
|
||||
:allowed_hosts => 'localhost'
|
||||
}
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
|
@ -91,30 +91,7 @@ describe 'ceilometer::db' do
|
||||
|
||||
end
|
||||
|
||||
context 'on Debian platforms' do
|
||||
let :facts do
|
||||
@default_facts.merge({ :osfamily => 'Debian',
|
||||
:operatingsystem => 'Debian',
|
||||
:operatingsystemrelease => 'jessie',
|
||||
})
|
||||
end
|
||||
|
||||
it_configures 'ceilometer::db'
|
||||
|
||||
context 'using pymysql driver' do
|
||||
let :params do
|
||||
{ :database_connection => 'mysql+pymysql:///ceilometer:ceilometer@localhost/ceilometer', }
|
||||
end
|
||||
|
||||
it 'install the proper backend package' do
|
||||
is_expected.to contain_package('db_backend_package').with(
|
||||
:ensure => 'present',
|
||||
:name => 'python-pymysql',
|
||||
:tag => 'openstack'
|
||||
)
|
||||
end
|
||||
end
|
||||
|
||||
shared_examples_for 'ceilometer::db on Debian' do
|
||||
context 'with sqlite backend' do
|
||||
let :params do
|
||||
{ :database_connection => 'sqlite:///var/lib/ceilometer.db', }
|
||||
@ -127,27 +104,53 @@ describe 'ceilometer::db' do
|
||||
:tag => 'openstack'
|
||||
)
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
context 'on Redhat platforms' do
|
||||
let :facts do
|
||||
@default_facts.merge({ :osfamily => 'RedHat',
|
||||
:operatingsystemrelease => '7.1',
|
||||
})
|
||||
end
|
||||
|
||||
it_configures 'ceilometer::db'
|
||||
|
||||
context 'using pymysql driver' do
|
||||
let :params do
|
||||
{ :database_connection => 'mysql+pymysql:///ceilometer:ceilometer@localhost/ceilometer', }
|
||||
{ :database_connection => 'mysql+pymysql:///ceilometer:ceilometer@localhost/ceilometer', }
|
||||
end
|
||||
|
||||
it 'install the proper backend package' do
|
||||
is_expected.to contain_package('db_backend_package').with(
|
||||
:ensure => 'present',
|
||||
:name => 'python-pymysql',
|
||||
:tag => 'openstack'
|
||||
)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
shared_examples_for 'ceilometer::db on RedHat' do
|
||||
context 'using pymysql driver' do
|
||||
let :params do
|
||||
{ :database_connection => 'mysql+pymysql:///ceilometer:ceilometer@localhost/ceilometer', }
|
||||
end
|
||||
|
||||
it { is_expected.not_to contain_package('db_backend_package') }
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
on_supported_os({
|
||||
:supported_os => OSDefaults.get_supported_os
|
||||
}).each do |os,facts|
|
||||
context "on #{os}" do
|
||||
let (:facts) do
|
||||
facts.merge!(OSDefaults.get_facts({
|
||||
:concat_basedir => '/var/lib/puppet/concat',
|
||||
:fqdn => 'some.host.tld',
|
||||
}))
|
||||
end
|
||||
|
||||
case facts[:osfamily]
|
||||
when 'Debian'
|
||||
it_behaves_like 'ceilometer::db on Debian'
|
||||
when 'RedHat'
|
||||
it_behaves_like 'ceilometer::db on RedHat'
|
||||
end
|
||||
|
||||
it_behaves_like 'ceilometer::db'
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
@ -43,7 +43,7 @@ describe 'ceilometer::db::sync' do
|
||||
}))
|
||||
end
|
||||
|
||||
it_configures 'ceilometer-dbsync'
|
||||
it_behaves_like 'ceilometer-dbsync'
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -35,20 +35,16 @@ describe 'ceilometer::dispatcher::gnocchi' do
|
||||
end
|
||||
end
|
||||
|
||||
context 'on Debian platforms' do
|
||||
let :facts do
|
||||
@default_facts.merge({ :osfamily => 'Debian' })
|
||||
on_supported_os({
|
||||
:supported_os => OSDefaults.get_supported_os
|
||||
}).each do |os,facts|
|
||||
context "on #{os}" do
|
||||
let (:facts) do
|
||||
facts.merge(OSDefaults.get_facts())
|
||||
end
|
||||
|
||||
it_behaves_like 'ceilometer-gnocchi-dispatcher'
|
||||
end
|
||||
|
||||
it_configures 'ceilometer-gnocchi-dispatcher'
|
||||
end
|
||||
|
||||
context 'on RedHat platforms' do
|
||||
let :facts do
|
||||
@default_facts.merge({ :osfamily => 'RedHat' })
|
||||
end
|
||||
|
||||
it_configures 'ceilometer-gnocchi-dispatcher'
|
||||
end
|
||||
|
||||
end
|
||||
|
@ -64,28 +64,25 @@ describe 'ceilometer::expirer' do
|
||||
|
||||
end
|
||||
|
||||
context 'on Debian platforms' do
|
||||
let :facts do
|
||||
@default_facts.merge({ :osfamily => 'Debian' })
|
||||
on_supported_os({
|
||||
:supported_os => OSDefaults.get_supported_os
|
||||
}).each do |os,facts|
|
||||
context "on #{os}" do
|
||||
let (:facts) do
|
||||
facts.merge!(OSDefaults.get_facts())
|
||||
end
|
||||
|
||||
let :platform_params do
|
||||
case facts[:osfamily]
|
||||
when 'Debian'
|
||||
{ :common_package_name => 'ceilometer-common' }
|
||||
when 'RedHat'
|
||||
{ :common_package_name => 'openstack-ceilometer-common' }
|
||||
end
|
||||
end
|
||||
|
||||
it_behaves_like 'ceilometer-expirer'
|
||||
end
|
||||
|
||||
let :platform_params do
|
||||
{ :common_package_name => 'ceilometer-common' }
|
||||
end
|
||||
|
||||
it_configures 'ceilometer-expirer'
|
||||
end
|
||||
|
||||
context 'on RedHat platforms' do
|
||||
let :facts do
|
||||
@default_facts.merge({ :osfamily => 'RedHat' })
|
||||
end
|
||||
|
||||
let :platform_params do
|
||||
{ :common_package_name => 'openstack-ceilometer-common' }
|
||||
end
|
||||
|
||||
it_configures 'ceilometer-expirer'
|
||||
end
|
||||
|
||||
end
|
||||
|
@ -375,27 +375,25 @@ describe 'ceilometer' do
|
||||
end
|
||||
end
|
||||
|
||||
context 'on Debian platforms' do
|
||||
let :facts do
|
||||
@default_facts.merge({ :osfamily => 'Debian' })
|
||||
end
|
||||
on_supported_os({
|
||||
:supported_os => OSDefaults.get_supported_os
|
||||
}).each do |os,facts|
|
||||
context "on #{os}" do
|
||||
let (:facts) do
|
||||
facts.merge!(OSDefaults.get_facts())
|
||||
end
|
||||
|
||||
let :platform_params do
|
||||
{ :common_package_name => 'ceilometer-common' }
|
||||
end
|
||||
let :platform_params do
|
||||
case facts[:osfamily]
|
||||
when 'Debian'
|
||||
{ :common_package_name => 'ceilometer-common' }
|
||||
when 'RedHat'
|
||||
{ :common_package_name => 'openstack-ceilometer-common' }
|
||||
end
|
||||
end
|
||||
|
||||
it_configures 'ceilometer'
|
||||
it_behaves_like 'ceilometer'
|
||||
end
|
||||
end
|
||||
|
||||
context 'on RedHat platforms' do
|
||||
let :facts do
|
||||
@default_facts.merge({ :osfamily => 'RedHat' })
|
||||
end
|
||||
|
||||
let :platform_params do
|
||||
{ :common_package_name => 'openstack-ceilometer-common' }
|
||||
end
|
||||
|
||||
it_configures 'ceilometer'
|
||||
end
|
||||
end
|
||||
|
@ -169,20 +169,16 @@ describe 'ceilometer::keystone::auth' do
|
||||
|
||||
end
|
||||
|
||||
context 'on Debian platforms' do
|
||||
let :facts do
|
||||
@default_facts.merge({ :osfamily => 'Debian' })
|
||||
on_supported_os({
|
||||
:supported_os => OSDefaults.get_supported_os
|
||||
}).each do |os,facts|
|
||||
context "on #{os}" do
|
||||
let (:facts) do
|
||||
facts.merge(OSDefaults.get_facts())
|
||||
end
|
||||
|
||||
it_behaves_like 'ceilometer keystone auth'
|
||||
end
|
||||
|
||||
it_configures 'ceilometer keystone auth'
|
||||
end
|
||||
|
||||
context 'on RedHat platforms' do
|
||||
let :facts do
|
||||
@default_facts.merge({ :osfamily => 'RedHat' })
|
||||
end
|
||||
|
||||
it_configures 'ceilometer keystone auth'
|
||||
end
|
||||
|
||||
end
|
||||
|
@ -138,7 +138,7 @@ describe 'ceilometer::keystone::authtoken' do
|
||||
facts.merge!(OSDefaults.get_facts())
|
||||
end
|
||||
|
||||
it_configures 'ceilometer authtoken'
|
||||
it_behaves_like 'ceilometer authtoken'
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -120,20 +120,16 @@ describe 'ceilometer::logging' do
|
||||
}
|
||||
end
|
||||
|
||||
context 'on Debian platforms' do
|
||||
let :facts do
|
||||
@default_facts.merge({ :osfamily => 'Debian' })
|
||||
on_supported_os({
|
||||
:supported_os => OSDefaults.get_supported_os
|
||||
}).each do |os,facts|
|
||||
context "on #{os}" do
|
||||
let (:facts) do
|
||||
facts.merge(OSDefaults.get_facts())
|
||||
end
|
||||
|
||||
it_behaves_like 'ceilometer-logging'
|
||||
end
|
||||
|
||||
it_configures 'ceilometer-logging'
|
||||
end
|
||||
|
||||
context 'on RedHat platforms' do
|
||||
let :facts do
|
||||
@default_facts.merge({ :osfamily => 'RedHat' })
|
||||
end
|
||||
|
||||
it_configures 'ceilometer-logging'
|
||||
end
|
||||
|
||||
end
|
||||
|
@ -32,7 +32,7 @@ describe 'ceilometer::policy' do
|
||||
facts.merge!(OSDefaults.get_facts())
|
||||
end
|
||||
|
||||
it_configures 'ceilometer policies'
|
||||
it_behaves_like 'ceilometer policies'
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -85,44 +85,37 @@ describe 'ceilometer::wsgi::apache' do
|
||||
end
|
||||
end
|
||||
|
||||
context 'on RedHat platforms' do
|
||||
let :facts do
|
||||
@default_facts.merge(global_facts.merge({
|
||||
:osfamily => 'RedHat',
|
||||
:operatingsystemrelease => '7.0'
|
||||
}))
|
||||
end
|
||||
on_supported_os({
|
||||
:supported_os => OSDefaults.get_supported_os
|
||||
}).each do |os,facts|
|
||||
context "on #{os}" do
|
||||
let (:facts) do
|
||||
facts.merge!(OSDefaults.get_facts({
|
||||
:fqdn => 'some.host.tld'
|
||||
}))
|
||||
end
|
||||
|
||||
let :platform_parameters do
|
||||
{
|
||||
:httpd_service_name => 'httpd',
|
||||
:httpd_ports_file => '/etc/httpd/conf/ports.conf',
|
||||
:wsgi_script_path => '/var/www/cgi-bin/ceilometer',
|
||||
:wsgi_script_source => '/usr/lib/python2.7/site-packages/ceilometer/api/app.wsgi'
|
||||
}
|
||||
end
|
||||
let :platform_parameters do
|
||||
case facts[:osfamily]
|
||||
when 'Debian'
|
||||
{
|
||||
:httpd_service_name => 'apache2',
|
||||
:httpd_ports_file => '/etc/apache2/ports.conf',
|
||||
:wsgi_script_path => '/usr/lib/cgi-bin/ceilometer',
|
||||
:wsgi_script_source => '/usr/lib/python2.7/dist-packages/ceilometer/api/app.wsgi'
|
||||
}
|
||||
when 'RedHat'
|
||||
{
|
||||
:httpd_service_name => 'httpd',
|
||||
:httpd_ports_file => '/etc/httpd/conf/ports.conf',
|
||||
:wsgi_script_path => '/var/www/cgi-bin/ceilometer',
|
||||
:wsgi_script_source => '/usr/lib/python2.7/site-packages/ceilometer/api/app.wsgi'
|
||||
}
|
||||
end
|
||||
end
|
||||
|
||||
it_configures 'apache serving ceilometer with mod_wsgi'
|
||||
it_behaves_like 'apache serving ceilometer with mod_wsgi'
|
||||
end
|
||||
end
|
||||
|
||||
context 'on Debian platforms' do
|
||||
let :facts do
|
||||
@default_facts.merge(global_facts.merge({
|
||||
:osfamily => 'Debian',
|
||||
:operatingsystem => 'Debian',
|
||||
:operatingsystemrelease => '7.0'
|
||||
}))
|
||||
end
|
||||
|
||||
let :platform_parameters do
|
||||
{
|
||||
:httpd_service_name => 'apache2',
|
||||
:httpd_ports_file => '/etc/apache2/ports.conf',
|
||||
:wsgi_script_path => '/usr/lib/cgi-bin/ceilometer',
|
||||
:wsgi_script_source => '/usr/lib/python2.7/dist-packages/ceilometer/api/app.wsgi'
|
||||
}
|
||||
end
|
||||
|
||||
it_configures 'apache serving ceilometer with mod_wsgi'
|
||||
end
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user