Files
puppet-oslo/manifests/key_manager/barbican.pp
Takashi Kajinami bdf0c6f1b4 key_manager: Add service user options for Barbican key manager
This change introduces some parameters to set up the service user token
feature for Barbican key manager, which was implemented during the Xena
cycle[1].

This basically replicates the implementation in puppet-keystone class.
We should not make this dependent on puppet-keystone to avoid circular
dependency between puppet-oslo and puppet-keystone.

[1] 162039467ad0dfc5e25a16b75d9072d607690702

Change-Id: I6d94318929cf4bcfc61180494110d0e5812356c0
2021-09-23 22:07:01 +09:00

69 lines
2.4 KiB
Puppet

# == Define: oslo::key_manager::barbican
#
# Setup and configure Barbican Key Manager options
#
# === Parameters
#
# [*config*]
# (Optional) The resource type used to apply configuration parameters.
# Defaults to $name
#
# [*barbican_endpoint*]
# (Optional) Use this endpoint to connect to Barbican.
# Defaults to $::os_service_default
#
# [*barbican_api_version*]
# (Optional) Version of the Barbican API.
# Defaults to $::os_service_default
#
# [*auth_endpoint*]
# (Optional) Use this endpoint to connect to Keystone.
# Defaults to $::os_service_default
#
# [*retry_delay*]
# (Optional) Number of seconds to wait before retrying poll for key creation
# completion.
# Defaults to $::os_service_default
#
# [*number_of_retries*]
# (Optional) Number of times to retry poll fo key creation completion.
# Defaults to $::os_service_default
#
# [*barbican_endpoint_type*]
# (Optional) Specifies the type of endpoint.
# Defaults to $::os_service_default
#
# [*barbican_region_name*]
# (Optional) Specifies the region of the chosen endpoint.
# Defaults to $::os_service_default
#
# [*send_service_user_token*]
# (Optional) The service uses service token feature when this is set as true.
# Defaults to $::os_service_default
#
define oslo::key_manager::barbican (
$config = $name,
$barbican_endpoint = $::os_service_default,
$barbican_api_version = $::os_service_default,
$auth_endpoint = $::os_service_default,
$retry_delay = $::os_service_default,
$number_of_retries = $::os_service_default,
$barbican_endpoint_type = $::os_service_default,
$barbican_region_name = $::os_service_default,
$send_service_user_token = $::os_service_default,
) {
$barbican_options = {
'barbican/barbican_endpoint' => { value => $barbican_endpoint },
'barbican/barbican_api_version' => { value => $barbican_api_version },
'barbican/auth_endpoint' => { value => $auth_endpoint },
'barbican/retry_delay' => { value => $retry_delay },
'barbican/number_of_retries' => { value => $number_of_retries },
'barbican/barbican_endpoint_type' => { value => $barbican_endpoint_type },
'barbican/barbican_region_name' => { value => $barbican_region_name },
'barbican/send_service_user_token' => { value => $send_service_user_token },
}
create_resources($config, $barbican_options)
}