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