Merge "Improve help message for scheduler_available_filters"

This commit is contained in:
Jenkins 2016-12-18 23:22:11 +00:00 committed by Gerrit Code Review
commit 4561b60254
2 changed files with 19 additions and 5 deletions

View File

@ -422,10 +422,16 @@ ComputeFeaturesGroup = [
default=['all'], default=['all'],
help="A list of enabled filters that nova will accept as hints" help="A list of enabled filters that nova will accept as hints"
" to the scheduler when creating a server. A special " " to the scheduler when creating a server. A special "
"entry 'all' indicates all filters are enabled. Empty " "entry 'all' indicates all filters that are included "
"list indicates all filters are disabled. The full " "with nova are enabled. Empty list indicates all filters "
"available list of filters is in nova.conf: " "are disabled. The full list of available filters is in "
"DEFAULT.scheduler_available_filters"), "nova.conf: DEFAULT.scheduler_available_filters. If the "
"default value is overridden in nova.conf by the test "
"environment (which means that a different set of "
"filters is enabled than what is included in Nova by "
"default) then, this option must be configured to "
"contain the same filters that Nova uses in the test "
"environment."),
cfg.BoolOpt('swap_volume', cfg.BoolOpt('swap_volume',
default=False, default=False,
help='Does the test environment support in-place swapping of ' help='Does the test environment support in-place swapping of '

View File

@ -164,7 +164,15 @@ def related_bug(bug, status_code=None):
def is_scheduler_filter_enabled(filter_name): def is_scheduler_filter_enabled(filter_name):
"""Check the list of enabled compute scheduler filters from config. """ """Check the list of enabled compute scheduler filters from config.
This function checks whether the given compute scheduler filter is
available and configured in the config file. If the
scheduler_available_filters option is set to 'all' (Default value. which
means default filters are configured in nova) in tempest.conf then, this
function returns True with assumption that requested filter 'filter_name'
is one of available filter in nova ("nova.scheduler.filters.all_filters").
"""
filters = CONF.compute_feature_enabled.scheduler_available_filters filters = CONF.compute_feature_enabled.scheduler_available_filters
if len(filters) == 0: if len(filters) == 0: