Use Puppet boolean for better consistency
Change-Id: Ibb8eb6ff11f235e7ddc93c97575fa7af6ed67f5b
This commit is contained in:
@@ -168,7 +168,7 @@ class openstack::controller (
|
|||||||
$vnc_enabled = true,
|
$vnc_enabled = true,
|
||||||
$vncproxy_host = false,
|
$vncproxy_host = false,
|
||||||
# General
|
# General
|
||||||
$verbose = 'False',
|
$verbose = false,
|
||||||
# cinder
|
# cinder
|
||||||
# if the cinder management components should be installed
|
# if the cinder management components should be installed
|
||||||
$cinder = true,
|
$cinder = true,
|
||||||
|
@@ -22,8 +22,8 @@
|
|||||||
# [swift_store_user] The Swift service user account. Defaults to false.
|
# [swift_store_user] The Swift service user account. Defaults to false.
|
||||||
# [swift_store_key] The Swift service user password Defaults to false.
|
# [swift_store_key] The Swift service user password Defaults to false.
|
||||||
# [swift_store_auth_addres] The URL where the Swift auth service lives. Defaults to "http://${keystone_host}:5000/v2.0/"
|
# [swift_store_auth_addres] The URL where the Swift auth service lives. Defaults to "http://${keystone_host}:5000/v2.0/"
|
||||||
# [verbose] Log verbosely. Optional. Defaults to 'False'
|
# [verbose] Log verbosely. Optional. Defaults to false.
|
||||||
# [debug] Log at a debug-level. Optional. Defaults to 'False'
|
# [debug] Log at a debug-level. Optional. Defaults to false.
|
||||||
# [enabled] Used to indicate if the service should be active (true) or passive (false).
|
# [enabled] Used to indicate if the service should be active (true) or passive (false).
|
||||||
# Optional. Defaults to true
|
# Optional. Defaults to true
|
||||||
#
|
#
|
||||||
@@ -48,8 +48,8 @@ class openstack::glance (
|
|||||||
$swift_store_user = false,
|
$swift_store_user = false,
|
||||||
$swift_store_key = false,
|
$swift_store_key = false,
|
||||||
$swift_store_auth_address = 'http://127.0.0.1:5000/v2.0/',
|
$swift_store_auth_address = 'http://127.0.0.1:5000/v2.0/',
|
||||||
$verbose = 'False',
|
$verbose = false,
|
||||||
$debug = 'False',
|
$debug = false,
|
||||||
$enabled = true
|
$enabled = true
|
||||||
) {
|
) {
|
||||||
|
|
||||||
@@ -103,7 +103,7 @@ class openstack::glance (
|
|||||||
swift_store_user => $swift_store_user,
|
swift_store_user => $swift_store_user,
|
||||||
swift_store_key => $swift_store_key,
|
swift_store_key => $swift_store_key,
|
||||||
swift_store_auth_address => $swift_store_auth_address,
|
swift_store_auth_address => $swift_store_auth_address,
|
||||||
swift_store_create_container_on_put => 'True',
|
swift_store_create_container_on_put => true,
|
||||||
}
|
}
|
||||||
} elsif($backend == 'file') {
|
} elsif($backend == 'file') {
|
||||||
# Configure file storage backend
|
# Configure file storage backend
|
||||||
|
@@ -18,8 +18,8 @@
|
|||||||
# [keystone_db_user] Name of keystone db user. Optional. Defaults to 'keystone'
|
# [keystone_db_user] Name of keystone db user. Optional. Defaults to 'keystone'
|
||||||
# [keystone_db_dbname] Name of keystone DB. Optional. Defaults to 'keystone'
|
# [keystone_db_dbname] Name of keystone DB. Optional. Defaults to 'keystone'
|
||||||
# [keystone_admin_tenant] Name of keystone admin tenant. Optional. Defaults to 'admin'
|
# [keystone_admin_tenant] Name of keystone admin tenant. Optional. Defaults to 'admin'
|
||||||
# [verbose] Log verbosely. Optional. Defaults to 'False'
|
# [verbose] Log verbosely. Optional. Defaults to false.
|
||||||
# [debug] Log at a debug-level. Optional. Defaults to 'False'
|
# [debug] Log at a debug-level. Optional. Defaults to false.
|
||||||
# [bind_host] Address that keystone binds to. Optional. Defaults to '0.0.0.0'
|
# [bind_host] Address that keystone binds to. Optional. Defaults to '0.0.0.0'
|
||||||
# [internal_address] Internal address for keystone. Optional. Defaults to $public_address
|
# [internal_address] Internal address for keystone. Optional. Defaults to $public_address
|
||||||
# [admin_address] Keystone admin address. Optional. Defaults to $internal_address
|
# [admin_address] Keystone admin address. Optional. Defaults to $internal_address
|
||||||
@@ -60,8 +60,8 @@ class openstack::keystone (
|
|||||||
$db_user = 'keystone',
|
$db_user = 'keystone',
|
||||||
$db_name = 'keystone',
|
$db_name = 'keystone',
|
||||||
$admin_tenant = 'admin',
|
$admin_tenant = 'admin',
|
||||||
$verbose = 'False',
|
$verbose = false,
|
||||||
$debug = 'False',
|
$debug = false,
|
||||||
$bind_host = '0.0.0.0',
|
$bind_host = '0.0.0.0',
|
||||||
$region = 'RegionOne',
|
$region = 'RegionOne',
|
||||||
$internal_address = false,
|
$internal_address = false,
|
||||||
|
@@ -143,7 +143,7 @@ class openstack::nova::controller (
|
|||||||
if $quantum == false {
|
if $quantum == false {
|
||||||
# Configure nova-network
|
# Configure nova-network
|
||||||
if $multi_host {
|
if $multi_host {
|
||||||
nova_config { 'DEFAULT/multi_host': value => 'True' }
|
nova_config { 'DEFAULT/multi_host': value => true }
|
||||||
$enable_network_service = false
|
$enable_network_service = false
|
||||||
} else {
|
} else {
|
||||||
if $enabled {
|
if $enabled {
|
||||||
@@ -190,7 +190,7 @@ class openstack::nova::controller (
|
|||||||
}
|
}
|
||||||
|
|
||||||
if $auto_assign_floating_ip {
|
if $auto_assign_floating_ip {
|
||||||
nova_config { 'DEFAULT/auto_assign_floating_ip': value => 'True' }
|
nova_config { 'DEFAULT/auto_assign_floating_ip': value => true }
|
||||||
}
|
}
|
||||||
|
|
||||||
# a bunch of nova services that require no configuration
|
# a bunch of nova services that require no configuration
|
||||||
|
@@ -75,24 +75,24 @@ class openstack::provision(
|
|||||||
|
|
||||||
keystone_tenant { $tenant_name:
|
keystone_tenant { $tenant_name:
|
||||||
ensure => present,
|
ensure => present,
|
||||||
enabled => 'True',
|
enabled => true,
|
||||||
description => 'default tenant',
|
description => 'default tenant',
|
||||||
}
|
}
|
||||||
keystone_user { $username:
|
keystone_user { $username:
|
||||||
ensure => present,
|
ensure => present,
|
||||||
enabled => 'True',
|
enabled => true,
|
||||||
tenant => $tenant_name,
|
tenant => $tenant_name,
|
||||||
password => $password,
|
password => $password,
|
||||||
}
|
}
|
||||||
|
|
||||||
keystone_tenant { $alt_tenant_name:
|
keystone_tenant { $alt_tenant_name:
|
||||||
ensure => present,
|
ensure => present,
|
||||||
enabled => 'True',
|
enabled => true,
|
||||||
description => 'alt tenant',
|
description => 'alt tenant',
|
||||||
}
|
}
|
||||||
keystone_user { $alt_username:
|
keystone_user { $alt_username:
|
||||||
ensure => present,
|
ensure => present,
|
||||||
enabled => 'True',
|
enabled => true,
|
||||||
tenant => $alt_tenant_name,
|
tenant => $alt_tenant_name,
|
||||||
password => $alt_password,
|
password => $alt_password,
|
||||||
}
|
}
|
||||||
@@ -111,7 +111,7 @@ class openstack::provision(
|
|||||||
|
|
||||||
quantum_network { $public_network_name:
|
quantum_network { $public_network_name:
|
||||||
ensure => present,
|
ensure => present,
|
||||||
router_external => 'True',
|
router_external => true,
|
||||||
tenant_name => $admin_tenant_name,
|
tenant_name => $admin_tenant_name,
|
||||||
}
|
}
|
||||||
quantum_subnet { $public_subnet_name:
|
quantum_subnet { $public_subnet_name:
|
||||||
|
@@ -33,7 +33,7 @@ describe 'openstack::auth_file' do
|
|||||||
:keystone_admin_token => 'keystone',
|
:keystone_admin_token => 'keystone',
|
||||||
:admin_user => 'nova',
|
:admin_user => 'nova',
|
||||||
:admin_tenant => 'nova',
|
:admin_tenant => 'nova',
|
||||||
:use_no_cache => 'false',
|
:use_no_cache => false,
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@@ -184,8 +184,8 @@ describe 'openstack::controller' do
|
|||||||
)
|
)
|
||||||
|
|
||||||
should contain_class('keystone').with(
|
should contain_class('keystone').with(
|
||||||
:verbose => 'False',
|
:verbose => false,
|
||||||
:debug => 'False',
|
:debug => false,
|
||||||
:catalog_type => 'sql',
|
:catalog_type => 'sql',
|
||||||
:enabled => true,
|
:enabled => true,
|
||||||
:admin_token => 'keystone_admin_token',
|
:admin_token => 'keystone_admin_token',
|
||||||
@@ -265,8 +265,8 @@ describe 'openstack::controller' do
|
|||||||
it 'should contain enabled glance with defaults' do
|
it 'should contain enabled glance with defaults' do
|
||||||
|
|
||||||
should contain_class('glance::api').with(
|
should contain_class('glance::api').with(
|
||||||
:verbose => 'False',
|
:verbose => false,
|
||||||
:debug => 'False',
|
:debug => false,
|
||||||
:auth_type => 'keystone',
|
:auth_type => 'keystone',
|
||||||
:auth_host => '127.0.0.1',
|
:auth_host => '127.0.0.1',
|
||||||
:auth_port => '35357',
|
:auth_port => '35357',
|
||||||
@@ -278,8 +278,8 @@ describe 'openstack::controller' do
|
|||||||
)
|
)
|
||||||
|
|
||||||
should contain_class('glance::registry').with(
|
should contain_class('glance::registry').with(
|
||||||
:verbose => 'False',
|
:verbose => false,
|
||||||
:debug => 'False',
|
:debug => false,
|
||||||
:auth_type => 'keystone',
|
:auth_type => 'keystone',
|
||||||
:auth_host => '127.0.0.1',
|
:auth_host => '127.0.0.1',
|
||||||
:auth_port => '35357',
|
:auth_port => '35357',
|
||||||
@@ -313,7 +313,7 @@ describe 'openstack::controller' do
|
|||||||
|
|
||||||
let :params do
|
let :params do
|
||||||
default_params.merge(
|
default_params.merge(
|
||||||
:verbose => 'False',
|
:verbose => false,
|
||||||
:glance_user_password => 'glance_pass2',
|
:glance_user_password => 'glance_pass2',
|
||||||
:glance_db_password => 'glance_pass3',
|
:glance_db_password => 'glance_pass3',
|
||||||
:db_host => '127.0.0.2',
|
:db_host => '127.0.0.2',
|
||||||
@@ -325,8 +325,8 @@ describe 'openstack::controller' do
|
|||||||
|
|
||||||
it 'should override params for glance' do
|
it 'should override params for glance' do
|
||||||
should contain_class('glance::api').with(
|
should contain_class('glance::api').with(
|
||||||
:verbose => 'False',
|
:verbose => false,
|
||||||
:debug => 'False',
|
:debug => false,
|
||||||
:auth_type => 'keystone',
|
:auth_type => 'keystone',
|
||||||
:auth_host => '127.0.0.1',
|
:auth_host => '127.0.0.1',
|
||||||
:auth_port => '35357',
|
:auth_port => '35357',
|
||||||
@@ -337,8 +337,8 @@ describe 'openstack::controller' do
|
|||||||
)
|
)
|
||||||
|
|
||||||
should contain_class('glance::registry').with(
|
should contain_class('glance::registry').with(
|
||||||
:verbose => 'False',
|
:verbose => false,
|
||||||
:debug => 'False',
|
:debug => false,
|
||||||
:auth_type => 'keystone',
|
:auth_type => 'keystone',
|
||||||
:auth_host => '127.0.0.1',
|
:auth_host => '127.0.0.1',
|
||||||
:auth_port => '35357',
|
:auth_port => '35357',
|
||||||
@@ -382,7 +382,7 @@ describe 'openstack::controller' do
|
|||||||
:rabbit_virtual_host => '/',
|
:rabbit_virtual_host => '/',
|
||||||
:image_service => 'nova.image.glance.GlanceImageService',
|
:image_service => 'nova.image.glance.GlanceImageService',
|
||||||
:glance_api_servers => '10.0.0.1:9292',
|
:glance_api_servers => '10.0.0.1:9292',
|
||||||
:verbose => 'False'
|
:verbose => false
|
||||||
)
|
)
|
||||||
should contain_class('nova::api').with(
|
should contain_class('nova::api').with(
|
||||||
:enabled => true,
|
:enabled => true,
|
||||||
@@ -405,9 +405,9 @@ describe 'openstack::controller' do
|
|||||||
end
|
end
|
||||||
context 'when auto assign floating ip is assigned' do
|
context 'when auto assign floating ip is assigned' do
|
||||||
let :params do
|
let :params do
|
||||||
default_params.merge(:auto_assign_floating_ip => 'true')
|
default_params.merge(:auto_assign_floating_ip => true)
|
||||||
end
|
end
|
||||||
it { should contain_nova_config('DEFAULT/auto_assign_floating_ip').with(:value => 'True')}
|
it { should contain_nova_config('DEFAULT/auto_assign_floating_ip').with(:value => true)}
|
||||||
end
|
end
|
||||||
context 'when not enabled' do
|
context 'when not enabled' do
|
||||||
let :params do
|
let :params do
|
||||||
@@ -465,7 +465,7 @@ describe 'openstack::controller' do
|
|||||||
end
|
end
|
||||||
it 'should configure cinder using defaults' do
|
it 'should configure cinder using defaults' do
|
||||||
should contain_class('cinder').with(
|
should contain_class('cinder').with(
|
||||||
:verbose => 'False',
|
:verbose => false,
|
||||||
:sql_connection => 'mysql://cinder:cinder_pass@127.0.0.1/cinder?charset=utf8',
|
:sql_connection => 'mysql://cinder:cinder_pass@127.0.0.1/cinder?charset=utf8',
|
||||||
:rabbit_password => 'rabbit_pw'
|
:rabbit_password => 'rabbit_pw'
|
||||||
)
|
)
|
||||||
@@ -477,7 +477,7 @@ describe 'openstack::controller' do
|
|||||||
context 'when overriding config' do
|
context 'when overriding config' do
|
||||||
let :params do
|
let :params do
|
||||||
default_params.merge(
|
default_params.merge(
|
||||||
:verbose => 'True',
|
:verbose => true,
|
||||||
:rabbit_user => 'rabbituser',
|
:rabbit_user => 'rabbituser',
|
||||||
:rabbit_password => 'rabbit_pw2',
|
:rabbit_password => 'rabbit_pw2',
|
||||||
:cinder_user_password => 'foo',
|
:cinder_user_password => 'foo',
|
||||||
@@ -489,7 +489,7 @@ describe 'openstack::controller' do
|
|||||||
end
|
end
|
||||||
it 'should configure cinder using defaults' do
|
it 'should configure cinder using defaults' do
|
||||||
should contain_class('cinder').with(
|
should contain_class('cinder').with(
|
||||||
:verbose => 'True',
|
:verbose => true,
|
||||||
:sql_connection => 'mysql://baz:bar@127.0.0.2/blah?charset=utf8',
|
:sql_connection => 'mysql://baz:bar@127.0.0.2/blah?charset=utf8',
|
||||||
:rabbit_password => 'rabbit_pw2',
|
:rabbit_password => 'rabbit_pw2',
|
||||||
:rabbit_userid => 'rabbituser'
|
:rabbit_userid => 'rabbituser'
|
||||||
@@ -576,7 +576,7 @@ describe 'openstack::controller' do
|
|||||||
let :params do
|
let :params do
|
||||||
default_params.merge(:quantum => false, :multi_host => true)
|
default_params.merge(:quantum => false, :multi_host => true)
|
||||||
end
|
end
|
||||||
it { should contain_nova_config('DEFAULT/multi_host').with(:value => 'True')}
|
it { should contain_nova_config('DEFAULT/multi_host').with(:value => true)}
|
||||||
it {should contain_class('nova::network').with(
|
it {should contain_class('nova::network').with(
|
||||||
:create_networks => true,
|
:create_networks => true,
|
||||||
:enabled => false,
|
:enabled => false,
|
||||||
|
@@ -20,8 +20,8 @@ describe 'openstack::glance' do
|
|||||||
describe 'with only required parameters' do
|
describe 'with only required parameters' do
|
||||||
it 'should configure with applicable defaults' do
|
it 'should configure with applicable defaults' do
|
||||||
should contain_class('glance::api').with(
|
should contain_class('glance::api').with(
|
||||||
:verbose => 'False',
|
:verbose => false,
|
||||||
:debug => 'False',
|
:debug => false,
|
||||||
:auth_type => 'keystone',
|
:auth_type => 'keystone',
|
||||||
:auth_port => '35357',
|
:auth_port => '35357',
|
||||||
:auth_host => '127.0.1.1',
|
:auth_host => '127.0.1.1',
|
||||||
@@ -33,8 +33,8 @@ describe 'openstack::glance' do
|
|||||||
:enabled => true
|
:enabled => true
|
||||||
)
|
)
|
||||||
should contain_class('glance::registry').with(
|
should contain_class('glance::registry').with(
|
||||||
:verbose => 'False',
|
:verbose => false,
|
||||||
:debug => 'False',
|
:debug => false,
|
||||||
:auth_host => '127.0.1.1',
|
:auth_host => '127.0.1.1',
|
||||||
:auth_port => '35357',
|
:auth_port => '35357',
|
||||||
:auth_type => 'keystone',
|
:auth_type => 'keystone',
|
||||||
@@ -83,7 +83,7 @@ describe 'openstack::glance' do
|
|||||||
:swift_store_user => 'dan',
|
:swift_store_user => 'dan',
|
||||||
:swift_store_key => '123',
|
:swift_store_key => '123',
|
||||||
:swift_store_auth_address => 'http://127.0.0.1:5000/v2.0/',
|
:swift_store_auth_address => 'http://127.0.0.1:5000/v2.0/',
|
||||||
:swift_store_create_container_on_put => 'True'
|
:swift_store_create_container_on_put => true
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@@ -31,8 +31,8 @@ describe 'openstack::keystone' do
|
|||||||
|
|
||||||
it 'should configure keystone and all default endpoints' do
|
it 'should configure keystone and all default endpoints' do
|
||||||
should contain_class('keystone').with(
|
should contain_class('keystone').with(
|
||||||
:verbose => 'False',
|
:verbose => false,
|
||||||
:debug => 'False',
|
:debug => false,
|
||||||
:bind_host => '0.0.0.0',
|
:bind_host => '0.0.0.0',
|
||||||
:idle_timeout => '200',
|
:idle_timeout => '200',
|
||||||
:catalog_type => 'sql',
|
:catalog_type => 'sql',
|
||||||
|
Reference in New Issue
Block a user