From fa8477d90c7406a893b3a9b47a4c06234b68f8c4 Mon Sep 17 00:00:00 2001 From: Takashi Kajinami Date: Sat, 21 Sep 2024 22:08:42 +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: I1978f44f7d7f8e068b78137013c8ff69286cd9db --- manifests/keystone/auth.pp | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/manifests/keystone/auth.pp b/manifests/keystone/auth.pp index a3afffc..2e2b1f3 100644 --- a/manifests/keystone/auth.pp +++ b/manifests/keystone/auth.pp @@ -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