]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commit
Add driver filter and evaluator for scheduler
authorAnthony Lee <anthony.mic.lee@hp.com>
Mon, 8 Dec 2014 14:52:18 +0000 (06:52 -0800)
committerAnthony Lee <anthony.mic.lee@hp.com>
Tue, 6 Jan 2015 23:28:47 +0000 (23:28 +0000)
commit59bf887ea92c191a37a6a8000fd61162c89bb079
treed8b4e7e1aba3c24acd4f61bf091d1962a7b2ea38
parent48eb05aa841557bd697786c38b73fea420fba1bb
Add driver filter and evaluator for scheduler

This patch adds a new filter for the cinder scheduler that
can interpret two new properties provided by backends,
'filter_function' and 'goodness_function'.  A driver can rely
on cinder.conf entries to define these properties for a backend
or the driver can generate them some other way.  An evaluator is
used by the filter to parse the properties.  The 'goodness_function'
property  is used to weigh qualified backends in case multiple ones
pass the filter. More details can be found in the spec:
https://review.openstack.org/#/c/129330/

Implements: blueprint filtering-weighing-with-driver-supplied-functions
DocImpact:  New optional backend properties in cinder.conf.
            New filter and weigher available for scheduler.
Change-Id: I38408ab49b6ed869c1faae746ee64a3bae86be58
cinder/exception.py
cinder/scheduler/evaluator/__init__.py [new file with mode: 0644]
cinder/scheduler/evaluator/evaluator.py [new file with mode: 0644]
cinder/scheduler/filters/driver_filter.py [new file with mode: 0644]
cinder/scheduler/weights/goodness.py [new file with mode: 0644]
cinder/tests/scheduler/test_goodness_weigher.py [new file with mode: 0644]
cinder/tests/scheduler/test_host_filters.py
cinder/tests/test_evaluator.py [new file with mode: 0644]
requirements.txt
setup.cfg