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*]
|
# [*sync_db*]
|
||||||
# (Optional) Run db sync on the node.
|
# (Optional) Run db sync on the node.
|
||||||
# Defaults to true
|
# Defaults to true
|
||||||
|
#
|
||||||
|
# [*randomize_allocation_candidates*]
|
||||||
|
# (Optional) Randomize the results of the returned
|
||||||
|
# allocation candidates.
|
||||||
|
# Defaults to $::os_service_default
|
||||||
|
#
|
||||||
class placement(
|
class placement(
|
||||||
$ensure_package = 'present',
|
$ensure_package = 'present',
|
||||||
$sync_db = true,
|
$sync_db = true,
|
||||||
|
$randomize_allocation_candidates = $::os_service_default,
|
||||||
) inherits placement::params {
|
) inherits placement::params {
|
||||||
|
|
||||||
include ::placement::deps
|
include ::placement::deps
|
||||||
@ -36,4 +42,7 @@ class placement(
|
|||||||
tag => ['openstack', 'placement-package'],
|
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,13 +20,16 @@ describe 'placement' do
|
|||||||
:require => 'Package[python-placement]',
|
:require => 'Package[python-placement]',
|
||||||
:tag => ['openstack', 'placement-package'],
|
:tag => ['openstack', 'placement-package'],
|
||||||
)}
|
)}
|
||||||
|
|
||||||
|
it { should contain_placement_config('placement/randomize_allocation_candidates').with_value('<SERVICE DEFAULT>') }
|
||||||
end
|
end
|
||||||
|
|
||||||
context 'with overridden parameters' do
|
context 'with overridden parameters' do
|
||||||
let :params do
|
let :params do
|
||||||
{
|
{
|
||||||
:ensure_package => 'absent',
|
:ensure_package => 'absent',
|
||||||
:sync_db => false,
|
:sync_db => false,
|
||||||
|
:randomize_allocation_candidates => true,
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -47,6 +50,8 @@ describe 'placement' do
|
|||||||
:require => 'Package[python-placement]',
|
:require => 'Package[python-placement]',
|
||||||
:tag => ['openstack', 'placement-package'],
|
:tag => ['openstack', 'placement-package'],
|
||||||
)}
|
)}
|
||||||
|
|
||||||
|
it { should contain_placement_config('placement/randomize_allocation_candidates').with_value(true) }
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user