Add randomize_allocation_candidates param
Adds the randomize_allocation_candidates parameter in the placement section. Change-Id: I585da30513b17aab823035bb796373d78b52f5f4
This commit is contained in:
parent
9638d69a97
commit
2de53b9202
@ -11,10 +11,16 @@
|
||||
# [*sync_db*]
|
||||
# (Optional) Run db sync on the node.
|
||||
# Defaults to true
|
||||
|
||||
#
|
||||
# [*randomize_allocation_candidates*]
|
||||
# (Optional) Randomize the results of the returned
|
||||
# allocation candidates.
|
||||
# Defaults to $::os_service_default
|
||||
#
|
||||
class placement(
|
||||
$ensure_package = 'present',
|
||||
$sync_db = true,
|
||||
$randomize_allocation_candidates = $::os_service_default,
|
||||
) inherits placement::params {
|
||||
|
||||
include ::placement::deps
|
||||
@ -36,4 +42,7 @@ class placement(
|
||||
tag => ['openstack', 'placement-package'],
|
||||
}
|
||||
|
||||
placement_config {
|
||||
'placement/randomize_allocation_candidates': value => $randomize_allocation_candidates;
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,4 @@
|
||||
---
|
||||
features:
|
||||
- |
|
||||
Added placement::randomize_allocation_candidates parameter.
|
@ -20,6 +20,8 @@ describe 'placement' do
|
||||
:require => 'Package[python-placement]',
|
||||
:tag => ['openstack', 'placement-package'],
|
||||
)}
|
||||
|
||||
it { should contain_placement_config('placement/randomize_allocation_candidates').with_value('<SERVICE DEFAULT>') }
|
||||
end
|
||||
|
||||
context 'with overridden parameters' do
|
||||
@ -27,6 +29,7 @@ describe 'placement' do
|
||||
{
|
||||
:ensure_package => 'absent',
|
||||
:sync_db => false,
|
||||
:randomize_allocation_candidates => true,
|
||||
}
|
||||
end
|
||||
|
||||
@ -47,6 +50,8 @@ describe 'placement' do
|
||||
:require => 'Package[python-placement]',
|
||||
:tag => ['openstack', 'placement-package'],
|
||||
)}
|
||||
|
||||
it { should contain_placement_config('placement/randomize_allocation_candidates').with_value(true) }
|
||||
end
|
||||
end
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user