Add cron trigger settings
Add new parameters that allow configuring cron trigger settings. Change-Id: I865ef2f6b7090d1b724f0084497362320aad90ea
This commit is contained in:
parent
5624001fbc
commit
20b0db0d1b
manifests
releasenotes/notes
spec/classes
25
manifests/cron_trigger.pp
Normal file
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.
|
34
spec/classes/mistral_cron_trigger_spec.rb
Normal file
34
spec/classes/mistral_cron_trigger_spec.rb
Normal file
@ -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
|
Loading…
x
Reference in New Issue
Block a user