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: Ibe86ec3f2b35771cf6c5d67f8fa788c292c8a737
This commit is contained in:
Takashi Kajinami 2024-09-21 22:06:34 +09:00
parent fb8848ae17
commit 336a332041

View File

@ -75,23 +75,23 @@
# Defaults to 'http://127.0.0.1:9322'
#
class watcher::keystone::auth (
$password,
$auth_name = 'watcher',
$email = 'watcher@localhost',
$tenant = 'services',
$roles = ['admin'],
$system_scope = 'all',
$system_roles = [],
$configure_endpoint = true,
$configure_user = true,
$configure_user_role = true,
$service_name = undef,
$service_description = 'Infrastructure Optimization service',
$service_type = 'infra-optim',
$region = 'RegionOne',
$public_url = 'http://127.0.0.1:9322',
$admin_url = 'http://127.0.0.1:9322',
$internal_url = 'http://127.0.0.1:9322',
String[1] $password,
String[1] $auth_name = 'watcher',
String[1] $email = 'watcher@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,
Optional[String[1]] $service_name = undef,
String[1] $service_description = 'Infrastructure Optimization service',
String[1] $service_type = 'infra-optim',
String[1] $region = 'RegionOne',
Keystone::PublicEndpointUrl $public_url = 'http://127.0.0.1:9322',
Keystone::EndpointUrl $admin_url = 'http://127.0.0.1:9322',
Keystone::EndpointUrl $internal_url = 'http://127.0.0.1:9322',
) {
include watcher::deps