Use boolean instead of string
Change-Id: Ie508c5f6a98277b650307a1782ce3fde9d2bca1e
This commit is contained in:
parent
3ade42f65e
commit
b04232aecb
@ -37,8 +37,8 @@
|
||||
#
|
||||
class glance::api(
|
||||
$keystone_password,
|
||||
$verbose = 'False',
|
||||
$debug = 'False',
|
||||
$verbose = false,
|
||||
$debug = false,
|
||||
$bind_host = '0.0.0.0',
|
||||
$bind_port = '9292',
|
||||
$backlog = '4096',
|
||||
|
@ -17,7 +17,7 @@ class glance::backend::swift(
|
||||
$swift_store_auth_address = '127.0.0.1:5000/v2.0/',
|
||||
$swift_store_container = 'glance',
|
||||
$swift_store_auth_version = '2',
|
||||
$swift_store_create_container_on_put = 'False'
|
||||
$swift_store_create_container_on_put = false
|
||||
) {
|
||||
|
||||
glance_api_config {
|
||||
|
@ -1,7 +1,7 @@
|
||||
class glance::registry(
|
||||
$keystone_password,
|
||||
$verbose = 'False',
|
||||
$debug = 'False',
|
||||
$verbose = false,
|
||||
$debug = false,
|
||||
$bind_host = '0.0.0.0',
|
||||
$bind_port = '9191',
|
||||
$log_file = '/var/log/glance/registry.log',
|
||||
|
@ -11,8 +11,8 @@ describe 'glance::api' do
|
||||
|
||||
let :default_params do
|
||||
{
|
||||
:verbose => 'False',
|
||||
:debug => 'False',
|
||||
:verbose => false,
|
||||
:debug => false,
|
||||
:bind_host => '0.0.0.0',
|
||||
:bind_port => '9292',
|
||||
:registry_host => '0.0.0.0',
|
||||
@ -35,8 +35,8 @@ describe 'glance::api' do
|
||||
|
||||
[{:keystone_password => 'ChangeMe'},
|
||||
{
|
||||
:verbose => 'true',
|
||||
:debug => 'true',
|
||||
:verbose => true,
|
||||
:debug => true,
|
||||
:bind_host => '127.0.0.1',
|
||||
:bind_port => '9222',
|
||||
:registry_host => '127.0.0.1',
|
||||
@ -72,8 +72,8 @@ describe 'glance::api' do
|
||||
it { should contain_service('glance-api').with(
|
||||
'ensure' => param_hash[:enabled] ? 'running': 'stopped',
|
||||
'enable' => param_hash[:enabled],
|
||||
'hasstatus' => 'true',
|
||||
'hasrestart' => 'true'
|
||||
'hasstatus' => true,
|
||||
'hasrestart' => true
|
||||
) }
|
||||
|
||||
it 'should lay down default api config' do
|
||||
|
@ -24,7 +24,7 @@ describe 'glance::backend::swift' do
|
||||
it { should contain_glance_api_config('DEFAULT/swift_store_auth_version').with_value('2') }
|
||||
it { should contain_glance_api_config('DEFAULT/swift_store_auth_address').with_value('127.0.0.1:5000/v2.0/') }
|
||||
it { should contain_glance_api_config('DEFAULT/swift_store_container').with_value('glance') }
|
||||
it { should contain_glance_api_config('DEFAULT/swift_store_create_container_on_put').with_value('False') }
|
||||
it { should contain_glance_api_config('DEFAULT/swift_store_create_container_on_put').with_value(false) }
|
||||
|
||||
describe 'when overriding datadir' do
|
||||
let :params do
|
||||
@ -33,12 +33,12 @@ describe 'glance::backend::swift' do
|
||||
:swift_store_key => 'key',
|
||||
:swift_store_auth_version => '1',
|
||||
:swift_store_auth_address => '127.0.0.2:8080/v1.0/',
|
||||
:swift_store_container => 'swift',
|
||||
:swift_store_create_container_on_put => 'True'
|
||||
:swift_store_container => 'swift',
|
||||
:swift_store_create_container_on_put => true
|
||||
}
|
||||
end
|
||||
it { should contain_glance_api_config('DEFAULT/swift_store_container').with_value('swift') }
|
||||
it { should contain_glance_api_config('DEFAULT/swift_store_create_container_on_put').with_value('True') }
|
||||
it { should contain_glance_api_config('DEFAULT/swift_store_create_container_on_put').with_value(true) }
|
||||
it { should contain_glance_api_config('DEFAULT/swift_store_auth_version').with_value('1') }
|
||||
it { should contain_glance_api_config('DEFAULT/swift_store_auth_address').with_value('127.0.0.2:8080/v1.0/') }
|
||||
end
|
||||
|
@ -10,8 +10,8 @@ describe 'glance::registry' do
|
||||
|
||||
let :default_params do
|
||||
{
|
||||
:verbose => 'False',
|
||||
:debug => 'False',
|
||||
:verbose => false,
|
||||
:debug => false,
|
||||
:bind_host => '0.0.0.0',
|
||||
:bind_port => '9191',
|
||||
:log_file => '/var/log/glance/registry.log',
|
||||
@ -31,8 +31,8 @@ describe 'glance::registry' do
|
||||
[
|
||||
{:keystone_password => 'ChangeMe'},
|
||||
{
|
||||
:verbose => 'True',
|
||||
:debug => 'True',
|
||||
:verbose => true,
|
||||
:debug => true,
|
||||
:bind_host => '127.0.0.1',
|
||||
:bind_port => '9111',
|
||||
:log_file => '/var/log/glance-registry.log',
|
||||
@ -63,8 +63,8 @@ describe 'glance::registry' do
|
||||
it { should contain_service('glance-registry').with(
|
||||
'ensure' => param_hash[:enabled] ? 'running' : 'stopped',
|
||||
'enable' => param_hash[:enabled],
|
||||
'hasstatus' => 'true',
|
||||
'hasrestart' => 'true',
|
||||
'hasstatus' => true,
|
||||
'hasrestart' => true,
|
||||
'subscribe' => 'File[/etc/glance/glance-registry.conf]',
|
||||
'require' => 'Class[Glance]'
|
||||
)}
|
||||
|
@ -27,9 +27,9 @@ describe 'glance' do
|
||||
|
||||
it { should contain_package('glance').with_ensure(param_hash[:package_ensure]) }
|
||||
it { should contain_file('/etc/glance/').with(
|
||||
'ensure' => 'directory',
|
||||
'owner' => 'glance',
|
||||
'mode' => '0770',
|
||||
'ensure' => 'directory',
|
||||
'owner' => 'glance',
|
||||
'mode' => '0770',
|
||||
'require' => 'Package[glance]'
|
||||
)}
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user