docs: Clarify sections & note on filter scheduler

Right on now the Filter Scheduler page it is difficult to find where the
section is on configuring and writing your own. The page is very long.
So this adds some section headers. In addition a note is added to
clarify that when you write your own filter "all_filters" doesn't
include "write your own", both available and default settings need to be
changed.

Change-Id: I99878d3b4dc839ff87bc581e61c85e4ae2c66b2c
This commit is contained in:
Matt Fischer 2016-09-23 14:20:33 -06:00
parent 3db8995380
commit 81dff5070e

View File

@ -313,6 +313,9 @@ filtering is done in the following manner:
* If instance has a topology defined, it will be considered only for NUMA
capable hosts.
Configuring Filters
-------------------
To use filters you specify two settings:
* ``scheduler_available_filters`` - Defines filter classes made available to the
@ -333,6 +336,9 @@ would be available, and by default the |RamFilter|, |ComputeFilter|,
|ImagePropertiesFilter|, |ServerGroupAntiAffinityFilter|,
and |ServerGroupAffinityFilter| would be used.
Writing Your Own Filter
-----------------------
To create **your own filter** you must inherit from
|BaseHostFilter| and implement one method:
``host_passes``. This method should return ``True`` if a host passes the filter. It
@ -349,6 +355,10 @@ settings:
--scheduler_available_filters=myfilter.MyFilter
--scheduler_default_filters=RamFilter,ComputeFilter,MyFilter
.. note:: When writing your own filter, be sure to add it to the list of available filters
and enable it in the default filters. The "all_filters" setting only includes the
filters shipped with nova.
With these settings, nova will use the ``FilterScheduler`` for the scheduler
driver. The standard nova filters and MyFilter are available to the
FilterScheduler. The RamFilter, ComputeFilter, and MyFilter are used by