From 53a7538a84ea2612cd86e6e98887cab7723dcbb2 Mon Sep 17 00:00:00 2001 From: David Scannell Date: Wed, 13 Feb 2013 11:18:04 -0500 Subject: 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 --- nova/scheduler/driver.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'nova/scheduler/driver.py') 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. -- cgit