Add user_domain_name and project_domain_name
- Add user_domain_name and project_domain_name set to 'Default' by default. - Change project_domain_id and user_domain_id to be os_service_default. This change is required with latest Keystone, as we need to specify domain names to authentificate against Keystone. Change-Id: Id3debd30aec0c3925c92332afe99fb092c006d1a
This commit is contained in:
parent
cf9dfe1397
commit
4b32158c1e
@ -54,6 +54,10 @@
|
||||
#
|
||||
# [*project_domain_id*]
|
||||
# (optional) Auth user project's domain ID
|
||||
# Defaults to $::os_service_default
|
||||
#
|
||||
# [*project_domain_name*]
|
||||
# (optional) Auth user project's domain name
|
||||
# Defaults to 'Default'
|
||||
#
|
||||
# [*project_name*]
|
||||
@ -62,6 +66,10 @@
|
||||
#
|
||||
# [*user_domain_id*]
|
||||
# (optional) Auth user's domain ID
|
||||
# Defaults to $::os_service_default
|
||||
#
|
||||
# [*user_domain_name*]
|
||||
# (optional) Auth user's domain name
|
||||
# Defaults to 'Default'
|
||||
#
|
||||
# [*region_name*]
|
||||
@ -329,9 +337,11 @@ class neutron::server (
|
||||
$username = 'neutron',
|
||||
$password = false,
|
||||
$region_name = $::os_service_default,
|
||||
$project_domain_id = 'Default',
|
||||
$project_domain_id = $::os_service_default,
|
||||
$project_domain_name = 'Default',
|
||||
$project_name = 'services',
|
||||
$user_domain_id = 'Default',
|
||||
$user_domain_id = $::os_service_default,
|
||||
$user_domain_name = 'Default',
|
||||
$database_connection = undef,
|
||||
$database_max_retries = undef,
|
||||
$database_idle_timeout = undef,
|
||||
@ -552,18 +562,20 @@ class neutron::server (
|
||||
}
|
||||
|
||||
neutron_config {
|
||||
'keystone_authtoken/auth_url': value => $auth_url;
|
||||
'keystone_authtoken/username': value => $username;
|
||||
'keystone_authtoken/password': value => $password, secret => true;
|
||||
'keystone_authtoken/region_name': value => $region_name;
|
||||
'keystone_authtoken/project_domain_id': value => $project_domain_id;
|
||||
'keystone_authtoken/project_name': value => $project_name_real;
|
||||
'keystone_authtoken/user_domain_id': value => $user_domain_id;
|
||||
'keystone_authtoken/admin_tenant_name': ensure => absent;
|
||||
'keystone_authtoken/admin_user': ensure => absent;
|
||||
'keystone_authtoken/admin_password': ensure => absent;
|
||||
'keystone_authtoken/auth_region': ensure => absent;
|
||||
'keystone_authtoken/identity_uri': ensure => absent;
|
||||
'keystone_authtoken/auth_url': value => $auth_url;
|
||||
'keystone_authtoken/username': value => $username;
|
||||
'keystone_authtoken/password': value => $password, secret => true;
|
||||
'keystone_authtoken/region_name': value => $region_name;
|
||||
'keystone_authtoken/project_domain_id': value => $project_domain_id;
|
||||
'keystone_authtoken/project_domain_name': value => $project_domain_name;
|
||||
'keystone_authtoken/project_name': value => $project_name_real;
|
||||
'keystone_authtoken/user_domain_id': value => $user_domain_id;
|
||||
'keystone_authtoken/user_domain_name': value => $user_domain_name;
|
||||
'keystone_authtoken/admin_tenant_name': ensure => absent;
|
||||
'keystone_authtoken/admin_user': ensure => absent;
|
||||
'keystone_authtoken/admin_password': ensure => absent;
|
||||
'keystone_authtoken/auth_region': ensure => absent;
|
||||
'keystone_authtoken/identity_uri': ensure => absent;
|
||||
}
|
||||
neutron_api_config {
|
||||
'filter:authtoken/admin_tenant_name': ensure => absent;
|
||||
|
3
releasenotes/notes/domain_name-4070c4ee0f0357f4.yaml
Normal file
3
releasenotes/notes/domain_name-4070c4ee0f0357f4.yaml
Normal file
@ -0,0 +1,3 @@
|
||||
---
|
||||
features:
|
||||
- Add user_domain_name and project_domain_name parameters.
|
@ -7,12 +7,12 @@ describe 'neutron::server' do
|
||||
end
|
||||
|
||||
let :params do
|
||||
{ :password => 'passw0rd',
|
||||
:username => 'neutron',
|
||||
:keystone_auth_type => 'password',
|
||||
:project_domain_id => 'Default',
|
||||
:project_name => 'services',
|
||||
:user_domain_id => 'Default'}
|
||||
{ :password => 'passw0rd',
|
||||
:username => 'neutron',
|
||||
:keystone_auth_type => 'password',
|
||||
:project_domain_name => 'Default',
|
||||
:project_name => 'services',
|
||||
:user_domain_name => 'Default'}
|
||||
end
|
||||
|
||||
let :default_params do
|
||||
@ -56,9 +56,11 @@ describe 'neutron::server' do
|
||||
is_expected.to contain_neutron_config('keystone_authtoken/password').with_secret( true )
|
||||
is_expected.to contain_neutron_config('keystone_authtoken/auth_uri').with_value("http://localhost:5000/");
|
||||
is_expected.to contain_neutron_config('keystone_authtoken/auth_url').with_value("http://localhost:35357/");
|
||||
is_expected.to contain_neutron_config('keystone_authtoken/project_domain_id').with_value(p[:project_domain_id]);
|
||||
is_expected.to contain_neutron_config('keystone_authtoken/project_domain_name').with_value(p[:project_domain_name]);
|
||||
is_expected.to contain_neutron_config('keystone_authtoken/project_domain_id').with_value('<SERVICE DEFAULT>');
|
||||
is_expected.to contain_neutron_config('keystone_authtoken/project_name').with_value(p[:project_name]);
|
||||
is_expected.to contain_neutron_config('keystone_authtoken/user_domain_id').with_value(p[:user_domain_id]);
|
||||
is_expected.to contain_neutron_config('keystone_authtoken/user_domain_name').with_value(p[:user_domain_name]);
|
||||
is_expected.to contain_neutron_config('keystone_authtoken/user_domain_id').with_value('<SERVICE DEFAULT>');
|
||||
is_expected.to contain_neutron_config('keystone_authtoken/admin_tenant_name').with_ensure('absent');
|
||||
is_expected.to contain_neutron_config('keystone_authtoken/admin_user').with_ensure('absent');
|
||||
is_expected.to contain_neutron_config('keystone_authtoken/admin_password').with_ensure('absent');
|
||||
@ -340,20 +342,20 @@ describe 'neutron::server' do
|
||||
end
|
||||
before do
|
||||
params.merge!({
|
||||
:auth_uri => 'https://foo.bar:5000/',
|
||||
:auth_url => 'https://foo.bar:35357/v3',
|
||||
:keystone_auth_type => 'v3password',
|
||||
:project_domain_id => 'non_default',
|
||||
:project_name => 'new_services',
|
||||
:user_domain_id => 'non_default'
|
||||
:auth_uri => 'https://foo.bar:5000/',
|
||||
:auth_url => 'https://foo.bar:35357/v3',
|
||||
:keystone_auth_type => 'v3password',
|
||||
:project_domain_name => 'non_default',
|
||||
:project_name => 'new_services',
|
||||
:user_domain_name => 'non_default'
|
||||
})
|
||||
end
|
||||
it 'configures keystone authentication params' do
|
||||
is_expected.to contain_neutron_config('keystone_authtoken/auth_uri').with_value("https://foo.bar:5000/");
|
||||
is_expected.to contain_neutron_config('keystone_authtoken/auth_url').with_value("https://foo.bar:35357/v3");
|
||||
is_expected.to contain_neutron_config('keystone_authtoken/project_domain_id').with_value("non_default");
|
||||
is_expected.to contain_neutron_config('keystone_authtoken/project_domain_name').with_value("non_default");
|
||||
is_expected.to contain_neutron_config('keystone_authtoken/project_name').with_value("new_services");
|
||||
is_expected.to contain_neutron_config('keystone_authtoken/user_domain_id').with_value("non_default");
|
||||
is_expected.to contain_neutron_config('keystone_authtoken/user_domain_name').with_value("non_default");
|
||||
end
|
||||
end
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user