1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71
|
# == Class: cinder:scheduler::filter
#
# This class is aim to configure cinder.scheduler filter
#
# === Parameters:
#
# [*default_filters*]
# (Optional) List of filter class names to use for filtering hosts.
# Defaults to $facts['os_service_default']
#
# [*default_weighers*]
# (Optional) List of weigher class names to use for weighning hosts.
# Defaults to $facts['os_service_default']
#
# [*weight_handler*]
# (Optional) Handler to use for selecting the host/pool after weighing.
# Defaults to $facts['os_service_default']
#
# [*capacity_weight_multiplier*]
# (Optional) Multiplier used for weighing free capacity.
# Defaults to $facts['os_service_default']
#
# [*allocated_capacity_weight_multiplier*]
# (Optional) Multiplier used for weighing allocated capacity.
# Defaults to $facts['os_service_default']
#
# [*volume_number_multiplier*]
# (Optional) Multiplier used for weighing volume number..
# Defaults to $facts['os_service_default']
#
# DEPRECATED PARAMETERS
#
# [*scheduler_default_filters*]
# (Optional) List of filter class names to use for filtering hosts.
# Defaults to $facts['os_service_default']
#
class cinder::scheduler::filter (
$default_filters = $facts['os_service_default'],
$default_weighers = $facts['os_service_default'],
$weight_handler = $facts['os_service_default'],
$capacity_weight_multiplier = $facts['os_service_default'],
$allocated_capacity_weight_multiplier = $facts['os_service_default'],
$volume_number_multiplier = $facts['os_service_default'],
# DEPRECATED PARAMETERS
$scheduler_default_filters = undef,
) {
include cinder::deps
if $scheduler_default_filters != undef {
warning("The scheduler_default_filters parameter has been deprecated. \
Use the default_filters parameter instead")
$default_filters_real = $scheduler_default_filters
} else {
$default_filters_real = $default_filters
}
cinder_config {
'DEFAULT/scheduler_default_filters':
value => join(any2array($default_filters_real),',');
'DEFAULT/scheduler_default_weighers':
value => join(any2array($default_weighers),',');
'DEFAULT/scheduler_weight_handler':
value => $weight_handler;
'DEFAULT/capacity_weight_multiplier':
value => $capacity_weight_multiplier;
'DEFAULT/allocated_capacity_weight_multiplier':
value => $allocated_capacity_weight_multiplier;
'DEFAULT/volume_number_multiplier':
value => $volume_number_multiplier;
}
}
|