support for keystone v3 api - keystone::endpoint
This patch implements these parts of the blueprint: 1) Adds support for domains to keystone::endpoint Users of this resource may specify a different domain for both the user and the tenant/project, or may specify the default domain which will apply to both user and tenant. Change-Id: Ife47a7627a8a4138b022a1cbb1d42f256e5a6c63 Implements: blueprint api-v3-support
This commit is contained in:

committed by
Emilien Macchi

parent
79d69cf1ad
commit
c373965dc8
@@ -22,6 +22,20 @@
|
|||||||
# [*version*]
|
# [*version*]
|
||||||
# (optional) API version for endpoint. Appended to all endpoint urls. (Defaults to 'v2.0')
|
# (optional) API version for endpoint. Appended to all endpoint urls. (Defaults to 'v2.0')
|
||||||
#
|
#
|
||||||
|
# [*user_domain*]
|
||||||
|
# (Optional) Domain for $auth_name
|
||||||
|
# Defaults to undef (use the keystone server default domain)
|
||||||
|
#
|
||||||
|
# [*project_domain*]
|
||||||
|
# (Optional) Domain for $tenant (project)
|
||||||
|
# Defaults to undef (use the keystone server default domain)
|
||||||
|
#
|
||||||
|
# [*default_domain*]
|
||||||
|
# (Optional) Domain for $auth_name and $tenant (project)
|
||||||
|
# If keystone_user_domain is not specified, use $keystone_default_domain
|
||||||
|
# If keystone_project_domain is not specified, use $keystone_default_domain
|
||||||
|
# Defaults to undef
|
||||||
|
#
|
||||||
# === Examples
|
# === Examples
|
||||||
#
|
#
|
||||||
# class { 'keystone::endpoint':
|
# class { 'keystone::endpoint':
|
||||||
@@ -36,6 +50,9 @@ class keystone::endpoint (
|
|||||||
$admin_url = 'http://127.0.0.1:35357',
|
$admin_url = 'http://127.0.0.1:35357',
|
||||||
$version = 'v2.0',
|
$version = 'v2.0',
|
||||||
$region = 'RegionOne',
|
$region = 'RegionOne',
|
||||||
|
$user_domain = undef,
|
||||||
|
$project_domain = undef,
|
||||||
|
$default_domain = undef,
|
||||||
) {
|
) {
|
||||||
|
|
||||||
$public_url_real = "${public_url}/${version}"
|
$public_url_real = "${public_url}/${version}"
|
||||||
@@ -56,6 +73,9 @@ class keystone::endpoint (
|
|||||||
admin_url => $admin_url_real,
|
admin_url => $admin_url_real,
|
||||||
internal_url => $internal_url_real,
|
internal_url => $internal_url_real,
|
||||||
region => $region,
|
region => $region,
|
||||||
|
user_domain => $user_domain,
|
||||||
|
project_domain => $project_domain,
|
||||||
|
default_domain => $default_domain,
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -48,4 +48,19 @@ describe 'keystone::endpoint' do
|
|||||||
)
|
)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
describe 'with domain parameters' do
|
||||||
|
|
||||||
|
let :params do
|
||||||
|
{ :user_domain => 'userdomain',
|
||||||
|
:project_domain => 'projectdomain',
|
||||||
|
:default_domain => 'defaultdomain' }
|
||||||
|
end
|
||||||
|
|
||||||
|
it { is_expected.to contain_keystone__resource__service_identity('keystone').with(
|
||||||
|
:user_domain => 'userdomain',
|
||||||
|
:project_domain => 'projectdomain',
|
||||||
|
:default_domain => 'defaultdomain'
|
||||||
|
)}
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
Reference in New Issue
Block a user