Add cron trigger settings

Add new parameters that allow configuring cron trigger
settings.

Change-Id: I865ef2f6b7090d1b724f0084497362320aad90ea
This commit is contained in:
Mike Fedosin 2018-01-17 13:34:01 +03:00
parent 5624001fbc
commit 20b0db0d1b
3 changed files with 63 additions and 0 deletions

25
manifests/cron_trigger.pp Normal file

@ -0,0 +1,25 @@
# == Class: mistral::cron_trigger
#
# Configure the mistral cron_trigger
#
# === Parameters
#
# [*enabled*]
# (Optional) If this value is set to False then the subsystem of
# cron triggers is disabled.
# Disabling cron triggers increases system performance.
# (boolean value)
# Defaults to $::os_service_default.
#
#
class mistral::cron_trigger (
$enabled = $::os_service_default,
) {
include ::mistral::deps
include ::mistral::params
mistral_config {
'cron_trigger/enabled': value => $enabled;
}
}

@ -0,0 +1,4 @@
---
features:
- Add new parameters that allow configuring cron trigger
settings.

@ -0,0 +1,34 @@
require 'spec_helper'
describe 'mistral::cron_trigger' do
shared_examples_for 'mistral cron trigger' do
it 'configure cron trigger default params' do
is_expected.to contain_mistral_config('cron_trigger/enabled').with_value('<SERVICE DEFAULT>')
end
context 'with specific parameters' do
let :params do
{ :enabled => true,
}
end
it 'configure cron trigger params' do
is_expected.to contain_mistral_config('cron_trigger/enabled').with_value(true)
end
end
end
on_supported_os({
:supported_os => OSDefaults.get_supported_os
}).each do |os,facts|
context "on #{os}" do
let (:facts) do
facts.merge!(OSDefaults.get_facts())
end
it_configures 'mistral cron trigger'
end
end
end