diff --git a/REFERENCE.md b/REFERENCE.md index b24b5a38..9f2140a0 100644 --- a/REFERENCE.md +++ b/REFERENCE.md @@ -86,7 +86,6 @@ For more information, see lib/puppet_x/icinga2/utils.rb. * [`Icinga2::IdoCleanup`](#Icinga2--IdoCleanup): A type for the structure of settings to cleanup IDO databases * [`Icinga2::Interval`](#Icinga2--Interval): A strict type for intervals * [`Icinga2::LogFacility`](#Icinga2--LogFacility): A strict type of syslog facilities -* [`Icinga2::LogSeverity`](#Icinga2--LogSeverity): A strict type for log levels ## Classes @@ -2362,7 +2361,7 @@ Default value: `present` ##### `severity` -Data type: `Icinga2::LogSeverity` +Data type: `Icinga::LogLevel` You can set the log severity to 'information', 'notice', 'warning' or 'debug'. @@ -2607,7 +2606,7 @@ Default value: `present` ##### `severity` -Data type: `Icinga2::LogSeverity` +Data type: `Icinga::LogLevel` You can choose the log severity between information, notice, warning or debug. @@ -2643,7 +2642,7 @@ Default value: `present` ##### `severity` -Data type: `Icinga2::LogSeverity` +Data type: `Icinga::LogLevel` You can choose the log severity between information, notice, warning or debug. @@ -5714,9 +5713,3 @@ Variant[Enum[ ], Pattern[/^LOG_LOCAL[0-7]$/]] ``` -### `Icinga2::LogSeverity` - -A strict type for log levels - -Alias of `Enum['debug', 'information', 'notice', 'warning', 'critical']` - diff --git a/manifests/feature/mainlog.pp b/manifests/feature/mainlog.pp index ddad1f16..2b95da3d 100644 --- a/manifests/feature/mainlog.pp +++ b/manifests/feature/mainlog.pp @@ -12,7 +12,7 @@ # class icinga2::feature::mainlog ( Enum['absent', 'present'] $ensure = present, - Icinga2::LogSeverity $severity = 'information', + Icinga::LogLevel $severity = 'information', Stdlib::Absolutepath $path = "${icinga2::globals::log_dir}/icinga2.log", ) { if ! defined(Class['icinga2']) { diff --git a/manifests/feature/syslog.pp b/manifests/feature/syslog.pp index 1867334f..e9fba2c2 100644 --- a/manifests/feature/syslog.pp +++ b/manifests/feature/syslog.pp @@ -13,7 +13,7 @@ # class icinga2::feature::syslog ( Enum['absent', 'present'] $ensure = present, - Icinga2::LogSeverity $severity = 'warning', + Icinga::LogLevel $severity = 'warning', Optional[Icinga2::LogFacility] $facility = undef, ) { if ! defined(Class['icinga2']) { diff --git a/manifests/feature/windowseventlog.pp b/manifests/feature/windowseventlog.pp index aa5deb63..2eb5ed02 100644 --- a/manifests/feature/windowseventlog.pp +++ b/manifests/feature/windowseventlog.pp @@ -9,7 +9,7 @@ # class icinga2::feature::windowseventlog ( Enum['absent', 'present'] $ensure = present, - Icinga2::LogSeverity $severity = 'warning', + Icinga::LogLevel $severity = 'warning', ) { if ! defined(Class['icinga2']) { fail('You must include the icinga2 base class before using any icinga2 feature class!') diff --git a/spec/type_aliases/logseverity_spec.rb b/spec/type_aliases/logseverity_spec.rb deleted file mode 100644 index be9f7571..00000000 --- a/spec/type_aliases/logseverity_spec.rb +++ /dev/null @@ -1,27 +0,0 @@ -require 'spec_helper' - -if Puppet::Util::Package.versioncmp(Puppet.version, '4.5.0') >= 0 - - describe 'Icinga2::LogSeverity' do - describe 'valid handling' do - [ - 'debug', 'information', 'notice', 'warning', 'critical' - ].each do |value| - describe value.inspect do - it { is_expected.to allow_value(value) } - end - end - end - - describe 'invalid path handling' do - context 'garbage inputs' do - [nil, '', 'foo'].each do |value| - describe value.inspect do - it { is_expected.not_to allow_value(value) } - end - end - end - end - end - -end diff --git a/types/logseverity.pp b/types/logseverity.pp deleted file mode 100644 index 1a4d959d..00000000 --- a/types/logseverity.pp +++ /dev/null @@ -1,2 +0,0 @@ -# A strict type for log levels -type Icinga2::LogSeverity = Enum['debug', 'information', 'notice', 'warning', 'critical']