From 832ced4926c87504da94ab77b6f063e28a3e800e Mon Sep 17 00:00:00 2001 From: Takashi Kajinami Date: Wed, 18 Sep 2024 16:11:24 +0900 Subject: [PATCH] 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: I5050785660166124331275bbac9d6f3f3bae62b7 --- manifests/keystone/auth.pp | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/manifests/keystone/auth.pp b/manifests/keystone/auth.pp index 6c275235..3524509d 100644 --- a/manifests/keystone/auth.pp +++ b/manifests/keystone/auth.pp @@ -100,23 +100,23 @@ # } # class trove::keystone::auth ( - $password, - $auth_name = 'trove', - $email = 'trove@localhost', - $tenant = 'services', - $roles = ['admin'], - $system_scope = 'all', - $system_roles = [], - $configure_user = true, - $configure_user_role = true, - $configure_endpoint = true, - $service_name = 'trove', - $service_type = 'database', - $service_description = 'Trove Database Service', - $region = 'RegionOne', - $public_url = 'http://127.0.0.1:8779/v1.0/%(tenant_id)s', - $admin_url = 'http://127.0.0.1:8779/v1.0/%(tenant_id)s', - $internal_url = 'http://127.0.0.1:8779/v1.0/%(tenant_id)s', + String[1] $password, + String[1] $auth_name = 'trove', + String[1] $email = 'trove@localhost', + String[1] $tenant = 'services', + Array[String[1]] $roles = ['admin'], + String[1] $system_scope = 'all', + Array[String[1]] $system_roles = [], + Boolean $configure_user = true, + Boolean $configure_user_role = true, + Boolean $configure_endpoint = true, + String[1] $service_name = 'trove', + String[1] $service_type = 'database', + String[1] $service_description = 'Trove Database Service', + String[1] $region = 'RegionOne', + Keystone::PublicEndpointUrl $public_url = 'http://127.0.0.1:8779/v1.0/%(tenant_id)s', + Keystone::EndpointUrl $admin_url = 'http://127.0.0.1:8779/v1.0/%(tenant_id)s', + Keystone::EndpointUrl $internal_url = 'http://127.0.0.1:8779/v1.0/%(tenant_id)s', ) { include trove::deps