Add validations for keystone resource parameters

The underlying implementation already have type validations. Inherit
these and make a few adjustment so that validation failures are raised
from the external interface layer instead of the internal interface.

Change-Id: I1978f44f7d7f8e068b78137013c8ff69286cd9db
This commit is contained in:
Takashi Kajinami
2024-09-21 22:08:42 +09:00
parent 4345c14d13
commit fa8477d90c

View File

@@ -82,25 +82,25 @@
# Defaults to 'rating'.
#
class cloudkitty::keystone::auth (
$password,
$auth_name = 'cloudkitty',
$email = 'cloudkitty@localhost',
$tenant = 'services',
$roles = ['admin'],
$system_scope = 'all',
$system_roles = [],
$configure_endpoint = true,
$configure_user = true,
$configure_user_role = true,
$service_name = 'cloudkitty',
$service_description = 'OpenStack Rating Service',
$service_type = 'rating',
$region = 'RegionOne',
$public_url = 'http://127.0.0.1:8889',
$admin_url = 'http://127.0.0.1:8889',
$internal_url = 'http://127.0.0.1:8889',
Boolean $manage_rating_role = true,
$rating_role = 'rating',
String[1] $password,
String[1] $auth_name = 'cloudkitty',
String[1] $email = 'cloudkitty@localhost',
String[1] $tenant = 'services',
Array[String[1]] $roles = ['admin'],
String[1] $system_scope = 'all',
Array[String[1]] $system_roles = [],
Boolean $configure_endpoint = true,
Boolean $configure_user = true,
Boolean $configure_user_role = true,
String[1] $service_name = 'cloudkitty',
String[1] $service_description = 'OpenStack Rating Service',
String[1] $service_type = 'rating',
String[1] $region = 'RegionOne',
Keystone::PublicEndpointUrl $public_url = 'http://127.0.0.1:8889',
Keystone::EndpointUrl $admin_url = 'http://127.0.0.1:8889',
Keystone::EndpointUrl $internal_url = 'http://127.0.0.1:8889',
Boolean $manage_rating_role = true,
String[1] $rating_role = 'rating',
) {
include cloudkitty::deps