From aa10bf756a3e3b1a79683810c6669849ca717692 Mon Sep 17 00:00:00 2001 From: Takashi Kajinami Date: Fri, 23 Jun 2023 12:48:05 +0900 Subject: [PATCH] Validate inputs of boostrap class This ensures only valid string values are passed to the boostrap class, using the typed parameters we recently introduced to our modules. Change-Id: I093553dff189969eed9120d0475e7c636ca161fe --- manifests/bootstrap.pp | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/manifests/bootstrap.pp b/manifests/bootstrap.pp index cd891ce9a..11f614b2d 100644 --- a/manifests/bootstrap.pp +++ b/manifests/bootstrap.pp @@ -59,19 +59,19 @@ # Defaults to true # class keystone::bootstrap ( - $password, - $username = 'admin', - $email = 'admin@localhost', - $project_name = 'admin', - $service_project_name = 'services', - $role_name = 'admin', - $service_name = 'keystone', - $admin_url = 'http://127.0.0.1:5000', - $public_url = 'http://127.0.0.1:5000', - $internal_url = undef, - $region = 'RegionOne', - $interface = 'public', - Boolean $bootstrap = true, + String[1] $password, + String[1] $username = 'admin', + String[1] $email = 'admin@localhost', + String[1] $project_name = 'admin', + String[1] $service_project_name = 'services', + String[1] $role_name = 'admin', + String[1] $service_name = 'keystone', + Stdlib::HTTPUrl $admin_url = 'http://127.0.0.1:5000', + Stdlib::HTTPUrl $public_url = 'http://127.0.0.1:5000', + Optional[Stdlib::HTTPUrl] $internal_url = undef, + String[1] $region = 'RegionOne', + String[1] $interface = 'public', + Boolean $bootstrap = true, ) inherits keystone::params { include keystone::deps