Use $::os_service_defualt instead of redefining the same default
This change removes the redundant re-definitions of default values about some parameters in scheduler, so that we can ensure the default values defined in nova itself is always used. Change-Id: Iad6de5a4ad75d206f407d3150876779da9993a88
This commit is contained in:
parent
8ab07ef0a5
commit
6069dc1656
|
@ -6,11 +6,15 @@
|
|||
#
|
||||
# [*scheduler_host_subset_size*]
|
||||
# (optional) defines the subset size that a host is chosen from
|
||||
# Defaults to '1'
|
||||
# Defaults to $::os_service_default
|
||||
#
|
||||
# [*max_io_ops_per_host*]
|
||||
# (optional) Ignore hosts that have too many builds/resizes/snaps/migrations
|
||||
# Defaults to '8'
|
||||
# Defaults to $::os_service_default
|
||||
#
|
||||
# [*max_instances_per_host*]
|
||||
# (optional) Ignore hosts that have too many instances
|
||||
# Defaults to $::os_service_default
|
||||
#
|
||||
# [*isolated_images*]
|
||||
# (optional) An array of images to run on isolated host
|
||||
|
@ -20,10 +24,6 @@
|
|||
# (optional) An array of hosts reserved for specific images
|
||||
# Defaults to $::os_service_default
|
||||
#
|
||||
# [*max_instances_per_host*]
|
||||
# (optional) Ignore hosts that have too many instances
|
||||
# Defaults to '50'
|
||||
#
|
||||
# [*scheduler_available_filters*]
|
||||
# (optional) An array with filter classes available to the scheduler.
|
||||
# Example: ['first.filter.class', 'second.filter.class']
|
||||
|
@ -114,9 +114,9 @@
|
|||
#
|
||||
|
||||
class nova::scheduler::filter (
|
||||
$scheduler_host_subset_size = '1',
|
||||
$max_io_ops_per_host = '8',
|
||||
$max_instances_per_host = '50',
|
||||
$scheduler_host_subset_size = $::os_service_default,
|
||||
$max_io_ops_per_host = $::os_service_default,
|
||||
$max_instances_per_host = $::os_service_default,
|
||||
$isolated_images = $::os_service_default,
|
||||
$isolated_hosts = $::os_service_default,
|
||||
$scheduler_available_filters = ['nova.scheduler.filters.all_filters'],
|
||||
|
|
|
@ -9,9 +9,9 @@ describe 'nova::scheduler::filter' do
|
|||
shared_examples 'nova::scheduler::filter' do
|
||||
|
||||
context 'with default parameters' do
|
||||
it { is_expected.to contain_nova_config('filter_scheduler/host_subset_size').with_value('1') }
|
||||
it { is_expected.to contain_nova_config('filter_scheduler/max_io_ops_per_host').with_value('8') }
|
||||
it { is_expected.to contain_nova_config('filter_scheduler/max_instances_per_host').with_value('50') }
|
||||
it { is_expected.to contain_nova_config('filter_scheduler/host_subset_size').with_value('<SERVICE DEFAULT>') }
|
||||
it { is_expected.to contain_nova_config('filter_scheduler/max_io_ops_per_host').with_value('<SERVICE DEFAULT>') }
|
||||
it { is_expected.to contain_nova_config('filter_scheduler/max_instances_per_host').with_value('<SERVICE DEFAULT>') }
|
||||
it { is_expected.to contain_nova_config('filter_scheduler/available_filters').with_value(['nova.scheduler.filters.all_filters']) }
|
||||
it { is_expected.to contain_nova_config('filter_scheduler/weight_classes').with_value('nova.scheduler.weights.all_weighers') }
|
||||
it { is_expected.to contain_nova_config('filter_scheduler/isolated_images').with_value('<SERVICE DEFAULT>') }
|
||||
|
|
Loading…
Reference in New Issue