summaryrefslogtreecommitdiffstats
path: root/nova/scheduler/driver.py
diff options
context:
space:
mode:
authorDavid Scannell <dscannell@gridcentric.com>2013-02-13 11:18:04 -0500
committerHans Lindgren <hanlind@kth.se>2013-02-18 15:00:18 +0100
commit53a7538a84ea2612cd86e6e98887cab7723dcbb2 (patch)
tree70d4f21d6b944ec8295dc786b7d3925ca9314db8 /nova/scheduler/driver.py
parent931515378cfb893a8d15d06b25216fe9242f53b6 (diff)
downloadnova-53a7538a84ea2612cd86e6e98887cab7723dcbb2.tar.gz
nova-53a7538a84ea2612cd86e6e98887cab7723dcbb2.tar.xz
nova-53a7538a84ea2612cd86e6e98887cab7723dcbb2.zip
Add select_hosts to scheduler manager rpc
This adds a select_hosts(...) method to the scheduler manager rpc that allows other services to query it for the best suited host instead of relying on it to proxy its messages. This can be used by extensions that need the scheduler to determine the best-fit host but want to prepare and send their own messages to that host. Change-Id: I5b4760114dfcdb0464fac8ea81f46f7532ac0580
Diffstat (limited to 'nova/scheduler/driver.py')
-rw-r--r--nova/scheduler/driver.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/nova/scheduler/driver.py b/nova/scheduler/driver.py
index 2565e4e40..1a2e8254a 100644
--- a/nova/scheduler/driver.py
+++ b/nova/scheduler/driver.py
@@ -160,6 +160,11 @@ class Scheduler(object):
msg = _("Driver must implement schedule_run_instance")
raise NotImplementedError(msg)
+ def select_hosts(self, context, request_spec, filter_properties):
+ """Must override select_hosts method for scheduler to work."""
+ msg = _("Driver must implement select_hosts")
+ raise NotImplementedError(msg)
+
def schedule_live_migration(self, context, instance, dest,
block_migration, disk_over_commit):
"""Live migration scheduling method.