replace validate_legacy with proper data types
the validate_legacy function is marked for deprecation in v9.0.0 from puppetlabs-stdlib. Change-Id: Ic85570b69ab3aa538d3fd4dd365a4c18717447c5
This commit is contained in:
@@ -122,8 +122,8 @@
|
||||
# Defaults to undef
|
||||
#
|
||||
class octavia::api (
|
||||
$enabled = true,
|
||||
$manage_service = true,
|
||||
Boolean $enabled = true,
|
||||
Boolean $manage_service = true,
|
||||
$service_name = $::octavia::params::api_service_name,
|
||||
$host = '0.0.0.0',
|
||||
$port = '9876',
|
||||
@@ -133,7 +133,7 @@ class octavia::api (
|
||||
$api_v1_enabled = $facts['os_service_default'],
|
||||
$api_v2_enabled = $facts['os_service_default'],
|
||||
$allow_tls_terminated_listeners = $facts['os_service_default'],
|
||||
$sync_db = false,
|
||||
Boolean $sync_db = false,
|
||||
$enable_proxy_headers_parsing = $facts['os_service_default'],
|
||||
$default_provider_driver = $facts['os_service_default'],
|
||||
$enabled_provider_drivers = $facts['os_service_default'],
|
||||
@@ -156,10 +156,6 @@ class octavia::api (
|
||||
include octavia::policy
|
||||
include octavia::db
|
||||
|
||||
validate_legacy(Boolean, 'validate_bool', $manage_service)
|
||||
validate_legacy(Boolean, 'validate_bool', $enabled)
|
||||
validate_legacy(Boolean, 'validate_bool', $sync_db)
|
||||
|
||||
if $provider_drivers != undef {
|
||||
warning('The provider_drivers parameter is deprecated. \
|
||||
Use the enabled_provider_drivers parameter instead.')
|
||||
|
||||
@@ -21,12 +21,10 @@
|
||||
# or Puppet catalog compilation will fail with duplicate resources.
|
||||
#
|
||||
class octavia::config (
|
||||
$octavia_config = {},
|
||||
Hash $octavia_config = {},
|
||||
) {
|
||||
|
||||
include octavia::deps
|
||||
|
||||
validate_legacy(Hash, 'validate_hash', $octavia_config)
|
||||
|
||||
create_resources('octavia_config', $octavia_config)
|
||||
}
|
||||
|
||||
@@ -256,7 +256,7 @@
|
||||
# Defaults to undef
|
||||
#
|
||||
class octavia::controller (
|
||||
$heartbeat_key,
|
||||
String[1] $heartbeat_key,
|
||||
$amp_active_retries = $facts['os_service_default'],
|
||||
$amp_active_wait_sec = $facts['os_service_default'],
|
||||
$amp_flavor_id = '65',
|
||||
@@ -274,7 +274,7 @@ class octavia::controller (
|
||||
$amphora_delete_retries = $facts['os_service_default'],
|
||||
$amphora_delete_retry_interval = $facts['os_service_default'],
|
||||
$event_notifications = $facts['os_service_default'],
|
||||
$enable_ssh_access = true,
|
||||
Boolean $enable_ssh_access = true,
|
||||
$amp_ssh_key_name = 'octavia-ssh-key',
|
||||
$timeout_client_data = $facts['os_service_default'],
|
||||
$timeout_member_connect = $facts['os_service_default'],
|
||||
@@ -318,9 +318,6 @@ class octavia::controller (
|
||||
include octavia::deps
|
||||
include octavia::db
|
||||
|
||||
validate_legacy(String, 'validate_string', $heartbeat_key)
|
||||
validate_legacy(Boolean, 'validate_bool', $enable_ssh_access)
|
||||
|
||||
if ! is_service_default($loadbalancer_topology) and
|
||||
! ($loadbalancer_topology in ['SINGLE', 'ACTIVE_STANDBY']) {
|
||||
fail('load balancer topology must be one of SINGLE or ACTIVE_STANDBY')
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
# Defaults to 'utf8_general_ci'
|
||||
#
|
||||
class octavia::db::mysql(
|
||||
$password,
|
||||
String[1] $password,
|
||||
$dbname = 'octavia',
|
||||
$persistence_dbname = undef,
|
||||
$user = 'octavia',
|
||||
@@ -50,8 +50,6 @@ class octavia::db::mysql(
|
||||
|
||||
include octavia::deps
|
||||
|
||||
validate_legacy(String, 'validate_string', $password)
|
||||
|
||||
::openstacklib::db::mysql { 'octavia':
|
||||
user => $user,
|
||||
password => $password,
|
||||
|
||||
@@ -69,8 +69,8 @@
|
||||
# Defaults to $facts['os_service_default']
|
||||
#
|
||||
class octavia::driver_agent (
|
||||
$manage_service = true,
|
||||
$enabled = true,
|
||||
Boolean $manage_service = true,
|
||||
Boolean $enabled = true,
|
||||
$package_ensure = 'present',
|
||||
$status_socket_path = $facts['os_service_default'],
|
||||
$stats_socket_path = $facts['os_service_default'],
|
||||
@@ -89,9 +89,6 @@ class octavia::driver_agent (
|
||||
include octavia::deps
|
||||
include octavia::params
|
||||
|
||||
validate_legacy(Boolean, 'validate_bool', $manage_service)
|
||||
validate_legacy(Boolean, 'validate_bool', $enabled)
|
||||
|
||||
package { 'octavia-driver-agent':
|
||||
ensure => $package_ensure,
|
||||
name => $::octavia::params::driver_agent_package_name,
|
||||
|
||||
@@ -58,29 +58,26 @@
|
||||
# Defaults to undef
|
||||
#
|
||||
class octavia::health_manager (
|
||||
$manage_service = true,
|
||||
$enabled = true,
|
||||
$package_ensure = 'present',
|
||||
$ip = $facts['os_service_default'],
|
||||
$port = $facts['os_service_default'],
|
||||
$health_update_threads = $facts['os_workers'],
|
||||
$stats_update_threads = $facts['os_workers'],
|
||||
$failover_threads = $facts['os_service_default'],
|
||||
$heartbeat_timeout = $facts['os_service_default'],
|
||||
$health_check_interval = $facts['os_service_default'],
|
||||
$sock_rlimit = $facts['os_service_default'],
|
||||
$failover_threshold = $facts['os_service_default'],
|
||||
Boolean $manage_service = true,
|
||||
Boolean $enabled = true,
|
||||
$package_ensure = 'present',
|
||||
$ip = $facts['os_service_default'],
|
||||
$port = $facts['os_service_default'],
|
||||
$health_update_threads = $facts['os_workers'],
|
||||
$stats_update_threads = $facts['os_workers'],
|
||||
$failover_threads = $facts['os_service_default'],
|
||||
$heartbeat_timeout = $facts['os_service_default'],
|
||||
$health_check_interval = $facts['os_service_default'],
|
||||
$sock_rlimit = $facts['os_service_default'],
|
||||
$failover_threshold = $facts['os_service_default'],
|
||||
# DEPRECATED PARAMETERS
|
||||
$workers = undef,
|
||||
$workers = undef,
|
||||
) {
|
||||
|
||||
include octavia::deps
|
||||
include octavia::params
|
||||
include octavia::controller
|
||||
|
||||
validate_legacy(Boolean, 'validate_bool', $manage_service)
|
||||
validate_legacy(Boolean, 'validate_bool', $enabled)
|
||||
|
||||
package { 'octavia-health-manager':
|
||||
ensure => $package_ensure,
|
||||
name => $::octavia::params::health_manager_package_name,
|
||||
|
||||
@@ -39,8 +39,8 @@
|
||||
# Defaults to $facts['os_service_default']
|
||||
#
|
||||
class octavia::housekeeping (
|
||||
$manage_service = true,
|
||||
$enabled = true,
|
||||
Boolean $manage_service = true,
|
||||
Boolean $enabled = true,
|
||||
$package_ensure = 'present',
|
||||
$cleanup_interval = $facts['os_service_default'],
|
||||
$amphora_expiry_age = $facts['os_service_default'],
|
||||
@@ -53,9 +53,6 @@ class octavia::housekeeping (
|
||||
include octavia::deps
|
||||
include octavia::params
|
||||
|
||||
validate_legacy(Boolean, 'validate_bool', $manage_service)
|
||||
validate_legacy(Boolean, 'validate_bool', $enabled)
|
||||
|
||||
package { 'octavia-housekeeping':
|
||||
ensure => $package_ensure,
|
||||
name => $::octavia::params::housekeeping_package_name,
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
class octavia::policy (
|
||||
$enforce_scope = $facts['os_service_default'],
|
||||
$enforce_new_defaults = $facts['os_service_default'],
|
||||
$policies = {},
|
||||
Hash $policies = {},
|
||||
$policy_path = '/etc/octavia/policy.yaml',
|
||||
$policy_default_rule = $facts['os_service_default'],
|
||||
$policy_dirs = $facts['os_service_default'],
|
||||
@@ -58,8 +58,6 @@ class octavia::policy (
|
||||
include octavia::deps
|
||||
include octavia::params
|
||||
|
||||
validate_legacy(Hash, 'validate_hash', $policies)
|
||||
|
||||
$policy_parameters = {
|
||||
policies => $policies,
|
||||
policy_path => $policy_path,
|
||||
|
||||
@@ -52,29 +52,23 @@
|
||||
# Defaults to 'services'
|
||||
#
|
||||
class octavia::worker (
|
||||
$manage_service = true,
|
||||
$enabled = true,
|
||||
$package_ensure = 'present',
|
||||
$workers = $facts['os_workers'],
|
||||
$manage_nova_flavor = true,
|
||||
$nova_flavor_config = {},
|
||||
$key_path = '/etc/octavia/.ssh/octavia_ssh_key',
|
||||
$manage_keygen = false,
|
||||
$ssh_key_type = 'rsa',
|
||||
$ssh_key_bits = 2048,
|
||||
$amp_project_name = 'services',
|
||||
Boolean $manage_service = true,
|
||||
Boolean $enabled = true,
|
||||
$package_ensure = 'present',
|
||||
$workers = $facts['os_workers'],
|
||||
Boolean $manage_nova_flavor = true,
|
||||
Hash $nova_flavor_config = {},
|
||||
$key_path = '/etc/octavia/.ssh/octavia_ssh_key',
|
||||
Boolean $manage_keygen = false,
|
||||
$ssh_key_type = 'rsa',
|
||||
$ssh_key_bits = 2048,
|
||||
$amp_project_name = 'services',
|
||||
) {
|
||||
|
||||
include octavia::deps
|
||||
include octavia::params
|
||||
include octavia::controller
|
||||
|
||||
validate_legacy(Boolean, 'validate_bool', $manage_service)
|
||||
validate_legacy(Boolean, 'validate_bool', $enabled)
|
||||
validate_legacy(Boolean, 'validate_bool', $manage_nova_flavor)
|
||||
validate_legacy(Hash, 'validate_hash', $nova_flavor_config)
|
||||
validate_legacy(Boolean, 'validate_bool', $manage_keygen)
|
||||
|
||||
if ! $::octavia::controller::amp_flavor_id {
|
||||
if $manage_nova_flavor {
|
||||
fail('When managing Nova flavor, octavia::controller::amp_flavor_id is required.')
|
||||
|
||||
Reference in New Issue
Block a user