Include openstacklib defaults manifest.

This provides a mechanism for setting default across all modules.

Change-Id: Ie7e3ab180b8f55db698f14f269d5f50b4512b187
Related-Bug: 1599113
This commit is contained in:
Sofer Athlan-Guyot 2016-07-07 12:01:08 +02:00
parent 089c5a241c
commit a5e15bbf4a
19 changed files with 95 additions and 71 deletions

View File

@ -1,6 +1,7 @@
# == Class: swift::params
#
class swift::params {
include ::openstacklib::defaults
case $::osfamily {
'Debian': {
$package_name = 'swift'

View File

@ -26,8 +26,10 @@ describe 'swift::bench' do
end
let :facts do
{ :operatingsystem => 'Ubuntu',
:osfamily => 'Debian' }
OSDefaults.get_facts({
:operatingsystem => 'Ubuntu',
:osfamily => 'Debian'
})
end
let :params do

View File

@ -29,7 +29,7 @@ describe 'swift::client' do
context 'on Debian platform' do
let :facts do
{ :osfamily => 'Debian' }
OSDefaults.get_facts({ :osfamily => 'Debian' })
end
it_configures 'swift client'
@ -37,7 +37,7 @@ describe 'swift::client' do
context 'on RedHat platform' do
let :facts do
{ :osfamily => 'RedHat' }
OSDefaults.get_facts({ :osfamily => 'RedHat' })
end
it_configures 'swift client'

View File

@ -21,7 +21,7 @@ describe 'swift::dispersion' do
end
let :facts do
{ :osfamily => 'Debian' }
OSDefaults.get_facts({ :osfamily => 'Debian' })
end
let :params do

View File

@ -62,8 +62,10 @@ describe 'swift::objectexpirer' do
context 'on Debian platforms' do
let :facts do
{ :operatingsystem => 'Ubuntu',
:osfamily => 'Debian' }
OSDefaults.get_facts({
:operatingsystem => 'Ubuntu',
:osfamily => 'Debian',
})
end
let :platform_params do
@ -101,8 +103,10 @@ describe 'swift::objectexpirer' do
context 'on RedHat platforms' do
let :facts do
{ :osfamily => 'RedHat',
:operatingsystem => 'RedHat' }
OSDefaults.get_facts({
:osfamily => 'RedHat',
:operatingsystem => 'RedHat',
})
end
let :platform_params do

View File

@ -3,9 +3,7 @@ require 'spec_helper'
describe 'swift::proxy::ceilometer' do
let :facts do
{
:osfamily => 'Debian'
}
OSDefaults.get_facts({ :osfamily => 'Debian' })
end
let :pre_condition do

View File

@ -10,10 +10,11 @@ describe 'swift::proxy' do
# set os so memcache will not fail
let :facts do
{:operatingsystem => 'Ubuntu',
OSDefaults.get_facts({
:operatingsystem => 'Ubuntu',
:osfamily => 'Debian',
:processorcount => 1
}
:processorcount => 1,
})
end
describe 'with proper dependencies' do
@ -322,9 +323,11 @@ node_timeout = 20
context 'on Debian platforms' do
let :facts do
{ :operatingsystem => 'Ubuntu',
OSDefaults.get_facts({
:operatingsystem => 'Ubuntu',
:osfamily => 'Debian',
:concat_basedir => '/var/lib/puppet/concat' }
:concat_basedir => '/var/lib/puppet/concat',
})
end
let :platform_params do
@ -350,9 +353,11 @@ node_timeout = 20
context 'on RedHat platforms' do
let :facts do
{ :osfamily => 'RedHat',
OSDefaults.get_facts({
:osfamily => 'RedHat',
:operatingsystem => 'RedHat',
:concat_basedir => '/var/lib/puppet/concat' }
:concat_basedir => '/var/lib/puppet/concat',
})
end
let :platform_params do

View File

@ -3,8 +3,10 @@ require 'spec_helper'
describe 'swift::proxy::swift3' do
let :facts do
{ :osfamily => 'Debian',
:operatingsystem => 'Ubuntu' }
OSDefaults.get_facts({
:osfamily => 'Debian',
:operatingsystem => 'Ubuntu',
})
end
let :pre_condition do

View File

@ -2,11 +2,11 @@ require 'spec_helper'
describe 'swift::ringbuilder' do
let :facts do
{
OSDefaults.get_facts({
:operatingsystem => 'Ubuntu',
:osfamily => 'Debian',
:processorcount => 1
}
:processorcount => 1,
})
end
describe 'when swift class is not included' do
it 'should fail' do

View File

@ -13,10 +13,10 @@ describe 'swift::ringserver' do
end
let :facts do
{
OSDefaults.get_facts({
:operatingsystem => 'Ubuntu',
:osfamily => 'Debian'
}
:osfamily => 'Debian',
})
end
let :params do
@ -51,10 +51,10 @@ describe 'swift::ringserver' do
end
let :facts do
{
OSDefaults.get_facts({
:operatingsystem => 'Ubuntu',
:osfamily => 'Debian'
}
:osfamily => 'Debian',
})
end

View File

@ -10,10 +10,10 @@ describe 'swift' do
end
let :facts do
{
OSDefaults.get_facts({
:operatingsystem => 'Ubuntu',
:osfamily => 'Debian'
}
:osfamily => 'Debian',
})
end
describe 'when no swift hash is specified' do

View File

@ -69,9 +69,10 @@ describe 'swift::storage::account' do
context 'on Debian platforms' do
let :facts do
{:operatingsystem => 'Ubuntu',
:osfamily => 'Debian' }
OSDefaults.get_facts({
:operatingsystem => 'Ubuntu',
:osfamily => 'Debian',
})
end
let :platform_params do
@ -109,8 +110,10 @@ describe 'swift::storage::account' do
context 'on RedHat platforms' do
let :facts do
{ :osfamily => 'RedHat',
:operatingsystem => 'RedHat' }
OSDefaults.get_facts({
:osfamily => 'RedHat',
:operatingsystem => 'RedHat',
})
end
let :platform_params do

View File

@ -3,10 +3,10 @@ require 'spec_helper'
describe 'swift::storage::all' do
let :facts do
{
OSDefaults.get_facts({
:operatingsystem => 'Ubuntu',
:osfamily => 'Debian'
}
:osfamily => 'Debian',
})
end
let :pre_condition do
@ -125,10 +125,10 @@ describe 'swift::storage::all' do
describe "when installed on Debian" do
let :facts do
{
OSDefaults.get_facts({
:operatingsystem => 'Debian',
:osfamily => 'Debian'
}
:osfamily => 'Debian',
})
end
[{ :storage_local_net_ip => '127.0.0.1' },

View File

@ -69,9 +69,10 @@ describe 'swift::storage::container' do
context 'on Debian platforms' do
let :facts do
{:operatingsystem => 'Ubuntu',
:osfamily => 'Debian' }
OSDefaults.get_facts({
:osfamily => 'Debian',
:operatingsystem => 'Ubuntu',
})
end
let :platform_params do
@ -111,8 +112,10 @@ describe 'swift::storage::container' do
context 'on RedHat platforms' do
let :facts do
{ :osfamily => 'RedHat',
:operatingsystem => 'RedHat' }
OSDefaults.get_facts({
:osfamily => 'RedHat',
:operatingsystem => 'RedHat',
})
end
let :platform_params do

View File

@ -70,9 +70,10 @@ describe 'swift::storage::object' do
context 'on Debian platforms' do
let :facts do
{:operatingsystem => 'Ubuntu',
:osfamily => 'Debian' }
OSDefaults.get_facts({
:operatingsystem => 'Ubuntu',
:osfamily => 'Debian',
})
end
let :platform_params do
@ -112,8 +113,10 @@ describe 'swift::storage::object' do
context 'on RedHat platforms' do
let :facts do
{ :osfamily => 'RedHat',
:operatingsystem => 'RedHat' }
OSDefaults.get_facts({
:osfamily => 'RedHat',
:operatingsystem => 'RedHat',
})
end
let :platform_params do

View File

@ -2,10 +2,10 @@ require 'spec_helper'
describe 'swift::storage' do
let :facts do
{
OSDefaults.get_facts({
:operatingsystem => 'Ubuntu',
:osfamily => 'Debian'
}
:osfamily => 'Debian',
})
end
describe 'when required classes are specified' do

View File

@ -7,10 +7,10 @@ describe 'swift::storage::generic' do
end
let :facts do
{
OSDefaults.get_facts({
:operatingsystem => 'Ubuntu',
:osfamily => 'Debian'
}
:osfamily => 'Debian',
})
end
let :pre_condition do
@ -100,8 +100,10 @@ describe 'swift::storage::generic' do
context 'on Debian platforms' do
let :facts do
{ :operatingsystem => 'Ubuntu',
:osfamily => 'Debian' }
OSDefaults.get_facts({
:operatingsystem => 'Ubuntu',
:osfamily => 'Debian',
})
end
let :platform_params do
@ -145,8 +147,10 @@ describe 'swift::storage::generic' do
context 'on Redhat platforms' do
let :facts do
{ :operatingsystem => 'Redhat',
:osfamily => 'Redhat' }
OSDefaults.get_facts({
:operatingsystem => 'Redhat',
:osfamily => 'Redhat',
})
end
let :platform_params do

View File

@ -1,11 +1,11 @@
describe 'swift::storage::node' do
let :facts do
{
OSDefaults.get_facts({
:operatingsystem => 'Ubuntu',
:osfamily => 'Debian',
:processorcount => 1
}
:processorcount => 1,
})
end
let :params do

View File

@ -2,12 +2,11 @@ require 'spec_helper'
describe 'swift::storage::server' do
let :facts do
{
OSDefaults.get_facts({
:operatingsystem => 'Ubuntu',
:osfamily => 'Debian',
:processorcount => 1
}
:processorcount => 1,
})
end
let :pre_condition do