replace validate_legacy with proper data types
the validate_legacy function is marked for deprecation in v9.0.0 from puppetlabs-stdlib. Change-Id: I6a4e4fe824713a08839ab49f151415a9186a9a5a
This commit is contained in:
@@ -53,11 +53,11 @@
|
|||||||
# Defaults to 'Default'
|
# Defaults to 'Default'
|
||||||
#
|
#
|
||||||
class aodh::api (
|
class aodh::api (
|
||||||
$manage_service = true,
|
Boolean $manage_service = true,
|
||||||
$enabled = true,
|
Boolean $enabled = true,
|
||||||
$package_ensure = 'present',
|
$package_ensure = 'present',
|
||||||
$service_name = $::aodh::params::api_service_name,
|
$service_name = $::aodh::params::api_service_name,
|
||||||
$sync_db = false,
|
Boolean $sync_db = false,
|
||||||
$auth_strategy = 'keystone',
|
$auth_strategy = 'keystone',
|
||||||
$enable_proxy_headers_parsing = $facts['os_service_default'],
|
$enable_proxy_headers_parsing = $facts['os_service_default'],
|
||||||
$max_request_body_size = $facts['os_service_default'],
|
$max_request_body_size = $facts['os_service_default'],
|
||||||
@@ -70,10 +70,6 @@ class aodh::api (
|
|||||||
include aodh::params
|
include aodh::params
|
||||||
include aodh::policy
|
include aodh::policy
|
||||||
|
|
||||||
validate_legacy(Boolean, 'validate_bool', $manage_service)
|
|
||||||
validate_legacy(Boolean, 'validate_bool', $enabled)
|
|
||||||
validate_legacy(Boolean, 'validate_bool', $sync_db)
|
|
||||||
|
|
||||||
if $auth_strategy == 'keystone' {
|
if $auth_strategy == 'keystone' {
|
||||||
include aodh::keystone::authtoken
|
include aodh::keystone::authtoken
|
||||||
}
|
}
|
||||||
|
@@ -24,15 +24,12 @@
|
|||||||
# or Puppet catalog compilation will fail with duplicate resources.
|
# or Puppet catalog compilation will fail with duplicate resources.
|
||||||
#
|
#
|
||||||
class aodh::config (
|
class aodh::config (
|
||||||
$aodh_config = {},
|
Hash $aodh_config = {},
|
||||||
$aodh_api_paste_ini = {},
|
Hash $aodh_api_paste_ini = {},
|
||||||
) {
|
) {
|
||||||
|
|
||||||
include aodh::deps
|
include aodh::deps
|
||||||
|
|
||||||
validate_legacy(Hash, 'validate_hash', $aodh_config)
|
|
||||||
validate_legacy(Hash, 'validate_hash', $aodh_api_paste_ini)
|
|
||||||
|
|
||||||
create_resources('aodh_config', $aodh_config)
|
create_resources('aodh_config', $aodh_config)
|
||||||
create_resources('aodh_api_paste_ini', $aodh_api_paste_ini)
|
create_resources('aodh_api_paste_ini', $aodh_api_paste_ini)
|
||||||
}
|
}
|
||||||
|
@@ -34,7 +34,7 @@
|
|||||||
# Defaults to 'utf8_general_ci'
|
# Defaults to 'utf8_general_ci'
|
||||||
#
|
#
|
||||||
class aodh::db::mysql(
|
class aodh::db::mysql(
|
||||||
$password,
|
String[1] $password,
|
||||||
$dbname = 'aodh',
|
$dbname = 'aodh',
|
||||||
$user = 'aodh',
|
$user = 'aodh',
|
||||||
$host = '127.0.0.1',
|
$host = '127.0.0.1',
|
||||||
@@ -45,8 +45,6 @@ class aodh::db::mysql(
|
|||||||
|
|
||||||
include aodh::deps
|
include aodh::deps
|
||||||
|
|
||||||
validate_legacy(String, 'validate_string', $password)
|
|
||||||
|
|
||||||
openstacklib::db::mysql { 'aodh':
|
openstacklib::db::mysql { 'aodh':
|
||||||
user => $user,
|
user => $user,
|
||||||
password => $password,
|
password => $password,
|
||||||
|
@@ -31,8 +31,8 @@
|
|||||||
# Defaults to $facts['os_service_default'].
|
# Defaults to $facts['os_service_default'].
|
||||||
#
|
#
|
||||||
class aodh::evaluator (
|
class aodh::evaluator (
|
||||||
$manage_service = true,
|
Boolean $manage_service = true,
|
||||||
$enabled = true,
|
Boolean $enabled = true,
|
||||||
$package_ensure = 'present',
|
$package_ensure = 'present',
|
||||||
$workers = $facts['os_workers'],
|
$workers = $facts['os_workers'],
|
||||||
$evaluation_interval = $facts['os_service_default'],
|
$evaluation_interval = $facts['os_service_default'],
|
||||||
@@ -43,9 +43,6 @@ class aodh::evaluator (
|
|||||||
include aodh::deps
|
include aodh::deps
|
||||||
include aodh::params
|
include aodh::params
|
||||||
|
|
||||||
validate_legacy(Boolean, 'validate_bool', $manage_service)
|
|
||||||
validate_legacy(Boolean, 'validate_bool', $enabled)
|
|
||||||
|
|
||||||
aodh_config {
|
aodh_config {
|
||||||
'evaluator/evaluation_interval': value => $evaluation_interval;
|
'evaluator/evaluation_interval': value => $evaluation_interval;
|
||||||
'DEFAULT/event_alarm_cache_ttl': value => $event_alarm_cache_ttl;
|
'DEFAULT/event_alarm_cache_ttl': value => $event_alarm_cache_ttl;
|
||||||
|
@@ -31,8 +31,8 @@
|
|||||||
# Defaults to $facts['os_service_default'].
|
# Defaults to $facts['os_service_default'].
|
||||||
#
|
#
|
||||||
class aodh::listener (
|
class aodh::listener (
|
||||||
$manage_service = true,
|
Boolean $manage_service = true,
|
||||||
$enabled = true,
|
Boolean $enabled = true,
|
||||||
$package_ensure = 'present',
|
$package_ensure = 'present',
|
||||||
$workers = $facts['os_workers'],
|
$workers = $facts['os_workers'],
|
||||||
$event_alarm_topic = $facts['os_service_default'],
|
$event_alarm_topic = $facts['os_service_default'],
|
||||||
@@ -43,9 +43,6 @@ class aodh::listener (
|
|||||||
include aodh::deps
|
include aodh::deps
|
||||||
include aodh::params
|
include aodh::params
|
||||||
|
|
||||||
validate_legacy(Boolean, 'validate_bool', $manage_service)
|
|
||||||
validate_legacy(Boolean, 'validate_bool', $enabled)
|
|
||||||
|
|
||||||
aodh_config {
|
aodh_config {
|
||||||
'listener/workers': value => $workers;
|
'listener/workers': value => $workers;
|
||||||
'listener/event_alarm_topic': value => $event_alarm_topic;
|
'listener/event_alarm_topic': value => $event_alarm_topic;
|
||||||
|
@@ -28,8 +28,8 @@
|
|||||||
# Defaults to $facts['os_service_default']
|
# Defaults to $facts['os_service_default']
|
||||||
#
|
#
|
||||||
class aodh::notifier (
|
class aodh::notifier (
|
||||||
$manage_service = true,
|
Boolean $manage_service = true,
|
||||||
$enabled = true,
|
Boolean $enabled = true,
|
||||||
$package_ensure = 'present',
|
$package_ensure = 'present',
|
||||||
$workers = $facts['os_workers'],
|
$workers = $facts['os_workers'],
|
||||||
$batch_size = $facts['os_service_default'],
|
$batch_size = $facts['os_service_default'],
|
||||||
@@ -39,9 +39,6 @@ class aodh::notifier (
|
|||||||
include aodh::deps
|
include aodh::deps
|
||||||
include aodh::params
|
include aodh::params
|
||||||
|
|
||||||
validate_legacy(Boolean, 'validate_bool', $manage_service)
|
|
||||||
validate_legacy(Boolean, 'validate_bool', $enabled)
|
|
||||||
|
|
||||||
aodh_config {
|
aodh_config {
|
||||||
'notifier/workers': value => $workers;
|
'notifier/workers': value => $workers;
|
||||||
'notifier/batch_size': value => $batch_size;
|
'notifier/batch_size': value => $batch_size;
|
||||||
|
@@ -48,7 +48,7 @@
|
|||||||
class aodh::policy (
|
class aodh::policy (
|
||||||
$enforce_scope = $facts['os_service_default'],
|
$enforce_scope = $facts['os_service_default'],
|
||||||
$enforce_new_defaults = $facts['os_service_default'],
|
$enforce_new_defaults = $facts['os_service_default'],
|
||||||
$policies = {},
|
Hash $policies = {},
|
||||||
$policy_path = '/etc/aodh/policy.yaml',
|
$policy_path = '/etc/aodh/policy.yaml',
|
||||||
$policy_default_rule = $facts['os_service_default'],
|
$policy_default_rule = $facts['os_service_default'],
|
||||||
$policy_dirs = $facts['os_service_default'],
|
$policy_dirs = $facts['os_service_default'],
|
||||||
@@ -58,8 +58,6 @@ class aodh::policy (
|
|||||||
include aodh::deps
|
include aodh::deps
|
||||||
include aodh::params
|
include aodh::params
|
||||||
|
|
||||||
validate_legacy(Hash, 'validate_hash', $policies)
|
|
||||||
|
|
||||||
$policy_parameters = {
|
$policy_parameters = {
|
||||||
policies => $policies,
|
policies => $policies,
|
||||||
policy_path => $policy_path,
|
policy_path => $policy_path,
|
||||||
|
Reference in New Issue
Block a user