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: I9686e6177f22bb64ecbae3d47169538bee4993b1
This commit is contained in:
Takashi Kajinami 2024-09-16 23:36:23 +09:00
parent 1fd91f07f7
commit 24445b42a1
2 changed files with 38 additions and 38 deletions

View File

@ -110,27 +110,27 @@
#
class heat::keystone::auth (
String[1] $password,
$email = 'heat@localhost',
$auth_name = 'heat',
$service_name = 'heat',
$service_type = 'orchestration',
$service_description = 'OpenStack Orchestration Service',
$region = 'RegionOne',
$tenant = 'services',
$roles = ['admin'],
$system_scope = 'all',
$system_roles = [],
$configure_endpoint = true,
$configure_service = true,
$configure_user = true,
$configure_user_role = true,
$trusts_delegated_roles = ['heat_stack_owner'],
$configure_delegated_roles = false,
$public_url = 'http://127.0.0.1:8004/v1/%(tenant_id)s',
$admin_url = 'http://127.0.0.1:8004/v1/%(tenant_id)s',
$internal_url = 'http://127.0.0.1:8004/v1/%(tenant_id)s',
$heat_stack_user_role = 'heat_stack_user',
$manage_heat_stack_user_role = true,
String[1] $email = 'heat@localhost',
String[1] $auth_name = 'heat',
String[1] $service_name = 'heat',
String[1] $service_type = 'orchestration',
String[1] $service_description = 'OpenStack Orchestration Service',
String[1] $region = 'RegionOne',
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_service = true,
Boolean $configure_user = true,
Boolean $configure_user_role = true,
Array[String[1]] $trusts_delegated_roles = ['heat_stack_owner'],
Boolean $configure_delegated_roles = false,
Keystone::PublicEndpointUrl $public_url = 'http://127.0.0.1:8004/v1/%(tenant_id)s',
Keystone::EndpointUrl $admin_url = 'http://127.0.0.1:8004/v1/%(tenant_id)s',
Keystone::EndpointUrl $internal_url = 'http://127.0.0.1:8004/v1/%(tenant_id)s',
String[1] $heat_stack_user_role = 'heat_stack_user',
Boolean $manage_heat_stack_user_role = true,
) {
include heat::deps

View File

@ -84,23 +84,23 @@
#
class heat::keystone::auth_cfn (
String[1] $password,
$email = 'heat-cfn@localhost',
$auth_name = 'heat-cfn',
$service_name = 'heat-cfn',
$service_description = 'OpenStack Cloudformation Service',
$service_type = 'cloudformation',
$region = 'RegionOne',
$tenant = 'services',
$roles = ['admin'],
$system_scope = 'all',
$system_roles = [],
$configure_endpoint = true,
$configure_service = true,
$configure_user = true,
$configure_user_role = true,
$public_url = 'http://127.0.0.1:8000/v1',
$admin_url = 'http://127.0.0.1:8000/v1',
$internal_url = 'http://127.0.0.1:8000/v1',
String[1] $email = 'heat-cfn@localhost',
String[1] $auth_name = 'heat-cfn',
String[1] $service_name = 'heat-cfn',
String[1] $service_description = 'OpenStack Cloudformation Service',
String[1] $service_type = 'cloudformation',
String[1] $region = 'RegionOne',
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_service = true,
Boolean $configure_user = true,
Boolean $configure_user_role = true,
Keystone::PublicEndpointUrl $public_url = 'http://127.0.0.1:8000/v1',
Keystone::EndpointUrl $admin_url = 'http://127.0.0.1:8000/v1',
Keystone::EndpointUrl $internal_url = 'http://127.0.0.1:8000/v1',
) {
include heat::deps