11 changed files with 378 additions and 0 deletions
@ -0,0 +1,32 @@
|
||||
# == Class designate::producer_task::delayed_notify |
||||
# |
||||
# Configure delayed_notify producer task in designate-producer |
||||
# |
||||
# == Parameters |
||||
# |
||||
# [*interval*] |
||||
# (optional) Run interval in seconds. |
||||
# Defaults to $::os_service_default |
||||
# |
||||
# [*per_page*] |
||||
# (optional) Default amount of results returned per page. |
||||
# Defaults to $::os_service_default |
||||
# |
||||
# [*batch_size*] |
||||
# (optional) How many zones to receive NOTIFY on each run. |
||||
# Defaults to $::os_service_default |
||||
# |
||||
class designate::producer_task::delayed_notify ( |
||||
$interval = $::os_service_default, |
||||
$per_page = $::os_service_default, |
||||
$batch_size = $::os_service_default, |
||||
) { |
||||
|
||||
include designate::deps |
||||
|
||||
designate_config { |
||||
'producer_task:delayed_notify/interval': value => $interval; |
||||
'producer_task:delayed_notify/per_page': value => $per_page; |
||||
'producer_task:delayed_notify/batch_size': value => $batch_size; |
||||
} |
||||
} |
@ -0,0 +1,26 @@
|
||||
# == Class designate::producer_task::periodic_exists |
||||
# |
||||
# Configure periodic_exists producer task in designate-producer |
||||
# |
||||
# == Parameters |
||||
# |
||||
# [*interval*] |
||||
# (optional) Run interval in seconds. |
||||
# Defaults to $::os_service_default |
||||
# |
||||
# [*per_page*] |
||||
# (optional) Default amount of results returned per page. |
||||
# Defaults to $::os_service_default |
||||
# |
||||
class designate::producer_task::periodic_exists ( |
||||
$interval = $::os_service_default, |
||||
$per_page = $::os_service_default, |
||||
) { |
||||
|
||||
include designate::deps |
||||
|
||||
designate_config { |
||||
'producer_task:periodic_exists/interval': value => $interval; |
||||
'producer_task:periodic_exists/per_page': value => $per_page; |
||||
} |
||||
} |
@ -0,0 +1,26 @@
|
||||
# == Class designate::producer_task::periodic_secondary_refresh |
||||
# |
||||
# Configure periodic_secondary_refresh producer task in designate-producer |
||||
# |
||||
# == Parameters |
||||
# |
||||
# [*interval*] |
||||
# (optional) Run interval in seconds. |
||||
# Defaults to $::os_service_default |
||||
# |
||||
# [*per_page*] |
||||
# (optional) Default amount of results returned per page. |
||||
# Defaults to $::os_service_default |
||||
# |
||||
class designate::producer_task::periodic_secondary_refresh ( |
||||
$interval = $::os_service_default, |
||||
$per_page = $::os_service_default, |
||||
) { |
||||
|
||||
include designate::deps |
||||
|
||||
designate_config { |
||||
'producer_task:periodic_secondary_refresh/interval': value => $interval; |
||||
'producer_task:periodic_secondary_refresh/per_page': value => $per_page; |
||||
} |
||||
} |
@ -0,0 +1,26 @@
|
||||
# == Class designate::producer_task::worker_periodic_recovery |
||||
# |
||||
# Configure worker_periodic_recovery producer task in designate-producer |
||||
# |
||||
# == Parameters |
||||
# |
||||
# [*interval*] |
||||
# (optional) Run interval in seconds. |
||||
# Defaults to $::os_service_default |
||||
# |
||||
# [*per_page*] |
||||
# (optional) Default amount of results returned per page. |
||||
# Defaults to $::os_service_default |
||||
# |
||||
class designate::producer_task::worker_periodic_recovery ( |
||||
$interval = $::os_service_default, |
||||
$per_page = $::os_service_default, |
||||
) { |
||||
|
||||
include designate::deps |
||||
|
||||
designate_config { |
||||
'producer_task:worker_periodic_recovery/interval': value => $interval; |
||||
'producer_task:worker_periodic_recovery/per_page': value => $per_page; |
||||
} |
||||
} |
@ -0,0 +1,39 @@
|
||||
# == Class designate::producer_task::zone_purge |
||||
# |
||||
# Configure zone_purge producer task in designate-producer |
||||
# |
||||
# == Parameters |
||||
# |
||||
# [*interval*] |
||||
# (optional) Run interval in seconds. |
||||
# Defaults to $::os_service_default |
||||
# |
||||
# [*per_page*] |
||||
# (optional) Default amount of results returned per page. |
||||
# Defaults to $::os_service_default |
||||
# |
||||
# [*time_threshold*] |
||||
# (optional) How old deleted zones should be (deleted_at) to be purged, in |
||||
# seconds. |
||||
# Defaults to $::os_service_default |
||||
# |
||||
# [*batch_size*] |
||||
# (optional) How many zones to receive NOTIFY on each run. |
||||
# Defaults to $::os_service_default |
||||
# |
||||
class designate::producer_task::zone_purge ( |
||||
$interval = $::os_service_default, |
||||
$per_page = $::os_service_default, |
||||
$time_threshold = $::os_service_default, |
||||
$batch_size = $::os_service_default, |
||||
) { |
||||
|
||||
include designate::deps |
||||
|
||||
designate_config { |
||||
'producer_task:zone_purge/interval': value => $interval; |
||||
'producer_task:zone_purge/per_page': value => $per_page; |
||||
'producer_task:zone_purge/time_threshold': value => $time_threshold; |
||||
'producer_task:zone_purge/batch_size': value => $batch_size; |
||||
} |
||||
} |
@ -0,0 +1,10 @@
|
||||
--- |
||||
features: |
||||
- | |
||||
The following classses have been added. |
||||
|
||||
- ``designate::producer_task::delayed_notify`` |
||||
- ``designate::producer_task::periodic_exists`` |
||||
- ``designate::producer_task::periodic_secondary_refresh`` |
||||
- ``designate::producer_task::worker_periodic_recovery`` |
||||
- ``designate::producer_task::zone_purge`` |
@ -0,0 +1,45 @@
|
||||
# |
||||
# Unit tests for designate::producer_task::delayed_notify |
||||
# |
||||
require 'spec_helper' |
||||
|
||||
|
||||
describe 'designate::producer_task::delayed_notify' do |
||||
|
||||
shared_examples 'designate::producer_task::delayed_notify' do |
||||
context 'with default parameters' do |
||||
it 'configures the defaut values' do |
||||
is_expected.to contain_designate_config('producer_task:delayed_notify/interval').with_value('<SERVICE DEFAULT>') |
||||
is_expected.to contain_designate_config('producer_task:delayed_notify/per_page').with_value('<SERVICE DEFAULT>') |
||||
is_expected.to contain_designate_config('producer_task:delayed_notify/batch_size').with_value('<SERVICE DEFAULT>') |
||||
end |
||||
end |
||||
|
||||
context 'with parameters set' do |
||||
let :params do |
||||
{ |
||||
:interval => 5, |
||||
:per_page => 100, |
||||
:batch_size => 101, |
||||
} |
||||
end |
||||
it 'configures the overridden values' do |
||||
is_expected.to contain_designate_config('producer_task:delayed_notify/interval').with_value(5) |
||||
is_expected.to contain_designate_config('producer_task:delayed_notify/per_page').with_value(100) |
||||
is_expected.to contain_designate_config('producer_task:delayed_notify/batch_size').with_value(101) |
||||
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 'designate::producer_task::delayed_notify' |
||||
end |
||||
end |
||||
end |
@ -0,0 +1,42 @@
|
||||
# |
||||
# Unit tests for designate::producer_task::periodic_exists |
||||
# |
||||
require 'spec_helper' |
||||
|
||||
|
||||
describe 'designate::producer_task::periodic_exists' do |
||||
|
||||
shared_examples 'designate::producer_task::periodic_exists' do |
||||
context 'with default parameters' do |
||||
it 'configures the defaut values' do |
||||
is_expected.to contain_designate_config('producer_task:periodic_exists/interval').with_value('<SERVICE DEFAULT>') |
||||
is_expected.to contain_designate_config('producer_task:periodic_exists/per_page').with_value('<SERVICE DEFAULT>') |
||||
end |
||||
end |
||||
|
||||
context 'with parameters set' do |
||||
let :params do |
||||
{ |
||||
:interval => 3600, |
||||
:per_page => 100, |
||||
} |
||||
end |
||||
it 'configures the overridden values' do |
||||
is_expected.to contain_designate_config('producer_task:periodic_exists/interval').with_value(3600) |
||||
is_expected.to contain_designate_config('producer_task:periodic_exists/per_page').with_value(100) |
||||
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 'designate::producer_task::periodic_exists' |
||||
end |
||||
end |
||||
end |
@ -0,0 +1,42 @@
|
||||
# |
||||
# Unit tests for designate::producer_task::periodic_secondary_refresh |
||||
# |
||||
require 'spec_helper' |
||||
|
||||
|
||||
describe 'designate::producer_task::periodic_secondary_refresh' do |
||||
|
||||
shared_examples 'designate::producer_task::periodic_secondary_refresh' do |
||||
context 'with default parameters' do |
||||
it 'configures the defaut values' do |
||||
is_expected.to contain_designate_config('producer_task:periodic_secondary_refresh/interval').with_value('<SERVICE DEFAULT>') |
||||
is_expected.to contain_designate_config('producer_task:periodic_secondary_refresh/per_page').with_value('<SERVICE DEFAULT>') |
||||
end |
||||
end |
||||
|
||||
context 'with parameters set' do |
||||
let :params do |
||||
{ |
||||
:interval => 3600, |
||||
:per_page => 100, |
||||
} |
||||
end |
||||
it 'configures the overridden values' do |
||||
is_expected.to contain_designate_config('producer_task:periodic_secondary_refresh/interval').with_value(3600) |
||||
is_expected.to contain_designate_config('producer_task:periodic_secondary_refresh/per_page').with_value(100) |
||||
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 'designate::producer_task::periodic_secondary_refresh' |
||||
end |
||||
end |
||||
end |
@ -0,0 +1,42 @@
|
||||
# |
||||
# Unit tests for designate::producer_task::worker_periodic_recovery |
||||
# |
||||
require 'spec_helper' |
||||
|
||||
|
||||
describe 'designate::producer_task::worker_periodic_recovery' do |
||||
|
||||
shared_examples 'designate::producer_task::worker_periodic_recovery' do |
||||
context 'with default parameters' do |
||||
it 'configures the defaut values' do |
||||
is_expected.to contain_designate_config('producer_task:worker_periodic_recovery/interval').with_value('<SERVICE DEFAULT>') |
||||
is_expected.to contain_designate_config('producer_task:worker_periodic_recovery/per_page').with_value('<SERVICE DEFAULT>') |
||||
end |
||||
end |
||||
|
||||
context 'with parameters set' do |
||||
let :params do |
||||
{ |
||||
:interval => 100, |
||||
:per_page => 120, |
||||
} |
||||
end |
||||
it 'configures the overridden values' do |
||||
is_expected.to contain_designate_config('producer_task:worker_periodic_recovery/interval').with_value(100) |
||||
is_expected.to contain_designate_config('producer_task:worker_periodic_recovery/per_page').with_value(120) |
||||
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 'designate::producer_task::worker_periodic_recovery' |
||||
end |
||||
end |
||||
end |
@ -0,0 +1,48 @@
|
||||
# |
||||
# Unit tests for designate::producer_task::zone_purge |
||||
# |
||||
require 'spec_helper' |
||||
|
||||
|
||||
describe 'designate::producer_task::zone_purge' do |
||||
|
||||
shared_examples 'designate::producer_task::zone_purge' do |
||||
context 'with default parameters' do |
||||
it 'configures the defaut values' do |
||||
is_expected.to contain_designate_config('producer_task:zone_purge/interval').with_value('<SERVICE DEFAULT>') |
||||
is_expected.to contain_designate_config('producer_task:zone_purge/per_page').with_value('<SERVICE DEFAULT>') |
||||
is_expected.to contain_designate_config('producer_task:zone_purge/time_threshold').with_value('<SERVICE DEFAULT>') |
||||
is_expected.to contain_designate_config('producer_task:zone_purge/batch_size').with_value('<SERVICE DEFAULT>') |
||||
end |
||||
end |
||||
|
||||
context 'with parameters set' do |
||||
let :params do |
||||
{ |
||||
:interval => 3600, |
||||
:per_page => 100, |
||||
:time_threshold => 604800, |
||||
:batch_size => 101, |
||||
} |
||||
end |
||||
it 'configures the overridden values' do |
||||
is_expected.to contain_designate_config('producer_task:zone_purge/interval').with_value(3600) |
||||
is_expected.to contain_designate_config('producer_task:zone_purge/per_page').with_value(100) |
||||
is_expected.to contain_designate_config('producer_task:zone_purge/time_threshold').with_value(604800) |
||||
is_expected.to contain_designate_config('producer_task:zone_purge/batch_size').with_value(101) |
||||
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 'designate::producer_task::zone_purge' |
||||
end |
||||
end |
||||
end |
Loading…
Reference in new issue