Merge "Make heat::keystone::domain declaration flexible"
This commit is contained in:
commit
a523e152cc
|
@ -19,6 +19,10 @@ class openstack_tasks::heat::heat {
|
|||
$primary_controller = hiera('primary_controller')
|
||||
$kombu_compression = hiera('kombu_compression', $::os_service_default)
|
||||
|
||||
$heat_domain_name = pick($heat_hash['domain_name'], 'heat')
|
||||
$heat_domain_admin = pick($heat_hash['domain_admin'], 'heat_admin')
|
||||
$heat_domain_password = $heat_hash['user_password']
|
||||
|
||||
$public_auth_protocol = get_ssl_property($ssl_hash, $public_ssl_hash, 'keystone', 'public', 'protocol', 'http')
|
||||
$public_auth_address = get_ssl_property($ssl_hash, $public_ssl_hash, 'keystone', 'public', 'hostname', [$public_vip])
|
||||
$internal_auth_protocol = get_ssl_property($ssl_hash, {}, 'keystone', 'internal', 'protocol', 'http')
|
||||
|
@ -136,9 +140,9 @@ class openstack_tasks::heat::heat {
|
|||
class { '::osnailyfacter::wait_for_keystone_backends':}
|
||||
|
||||
class { '::heat::keystone::domain' :
|
||||
domain_name => 'heat',
|
||||
domain_admin => 'heat_admin',
|
||||
domain_password => $heat_hash['user_password'],
|
||||
domain_name => $heat_domain_name,
|
||||
domain_admin => $heat_domain_admin,
|
||||
domain_password => $heat_domain_password,
|
||||
domain_admin_email => 'heat_admin@localhost',
|
||||
manage_domain => true,
|
||||
}
|
||||
|
|
|
@ -72,7 +72,10 @@ describe manifest do
|
|||
heat_db_user = Noop.hiera_structure 'heat/db_user', 'heat'
|
||||
heat_db_name = Noop.hiera('heat_db_name', 'heat')
|
||||
|
||||
heat_hash = Noop.hiera_structure 'heat', {}
|
||||
heat_hash = Noop.hiera_structure 'heat', {}
|
||||
heat_domain_name = Noop.puppet_function 'pick', heat_hash['domain_name'], 'heat'
|
||||
heat_domain_admin = Noop.puppet_function 'pick', heat_hash['domain_admin'], 'heat_admin'
|
||||
heat_domain_password = heat_hash['user_password']
|
||||
|
||||
keystone_auth_uri = "#{public_auth_protocol}://#{public_auth_address}:5000/v2.0/"
|
||||
keystone_auth_url = "#{admin_auth_protocol}://#{admin_auth_address}:35357/"
|
||||
|
@ -150,6 +153,16 @@ describe manifest do
|
|||
)
|
||||
end
|
||||
|
||||
it 'should declare heat::keystone::domain class with correct parameters' do
|
||||
should contain_class('heat::keystone::domain').with(
|
||||
'domain_name' => heat_domain_name,
|
||||
'domain_admin' => heat_domain_admin,
|
||||
'domain_password' => heat_domain_password,
|
||||
'domain_admin_email' => 'heat_admin@localhost',
|
||||
'manage_domain' => true,
|
||||
)
|
||||
end
|
||||
|
||||
it 'should correctly configure authtoken parameters' do
|
||||
should contain_heat_config('keystone_authtoken/username').with(:value => user)
|
||||
should contain_heat_config('keystone_authtoken/password').with(:value => password)
|
||||
|
|
Loading…
Reference in New Issue