From 27c1ada3ae5fe85d97d8072e7013cc24585ec69a Mon Sep 17 00:00:00 2001 From: Takashi Kajinami Date: Mon, 16 Sep 2024 23:46:00 +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: I9caa6e0247646c9a97c1d1a87a282503d2750241 --- manifests/keystone/auth.pp | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/manifests/keystone/auth.pp b/manifests/keystone/auth.pp index aabee4d..69f1ef1 100644 --- a/manifests/keystone/auth.pp +++ b/manifests/keystone/auth.pp @@ -78,24 +78,24 @@ # Defaults to 'http://127.0.0.1:8778' # class placement::keystone::auth ( - $password, - $ensure = 'present', - $auth_name = 'placement', - $email = 'placement@localhost', - $tenant = 'services', - $roles = ['admin'], - $system_scope = 'all', - $system_roles = [], - $configure_endpoint = true, - $configure_user = true, - $configure_user_role = true, - $service_name = 'placement', - $service_description = 'OpenStack Placement Service', - $service_type = 'placement', - $region = 'RegionOne', - $public_url = 'http://127.0.0.1:8778', - $admin_url = 'http://127.0.0.1:8778', - $internal_url = 'http://127.0.0.1:8778', + String[1] $password, + String[1] $ensure = 'present', + String[1] $auth_name = 'placement', + String[1] $email = 'placement@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 = 'placement', + String[1] $service_description = 'OpenStack Placement Service', + String[1] $service_type = 'placement', + String[1] $region = 'RegionOne', + Keystone::PublicEndpointUrl $public_url = 'http://127.0.0.1:8778', + Keystone::EndpointUrl $admin_url = 'http://127.0.0.1:8778', + Keystone::EndpointUrl $internal_url = 'http://127.0.0.1:8778', ) { include placement::deps