authtoken: Make password required

The password parameter is not really optional. This makes it
a required parameter to give more sensible validation error.

Change-Id: I90371da9cdd1b968a691b3e342e7eec7d0390520
This commit is contained in:
Takashi Kajinami 2023-07-12 21:56:41 +09:00
parent fea62d44e9
commit a11551d2f5

View File

@ -4,14 +4,13 @@
#
# === Parameters
#
# [*password*]
# (Required) Password to create for the service user
#
# [*username*]
# (Optional) The name of the service user
# Defaults to 'gnocchi'
#
# [*password*]
# (Optional) Password to create for the service user
# Defaults to $facts['os_service_default']
#
# [*auth_url*]
# (Optional) The URL to use for authentication.
# Defaults to 'http://localhost:5000'
@ -196,8 +195,8 @@
# authtoken class. Values set here override the individual parameters above.
#
class gnocchi::keystone::authtoken(
String[1] $password,
$username = 'gnocchi',
$password = $facts['os_service_default'],
$auth_url = 'http://localhost:5000',
$project_name = 'services',
$user_domain_name = 'Default',
@ -238,10 +237,6 @@ class gnocchi::keystone::authtoken(
include gnocchi::deps
if is_service_default($password) {
fail('Please set password for Gnocchi service user')
}
keystone::resource::authtoken {
'gnocchi_config':
* => $params;