summaryrefslogtreecommitdiffstats
path: root/nova
diff options
context:
space:
mode:
authorJoe Gordon <jogo@cloudscaling.com>2012-08-16 15:27:37 -0500
committerJoe Gordon <jogo@cloudscaling.com>2012-08-21 10:59:39 -0700
commitd60d2001a2e58be833ee7247ea245515efa7bd94 (patch)
treecbc7225ce013f19eb3b6e51f9284d3e5f4ca95bf /nova
parent96e72e7295909cbe2ddb835283f68168cef883c1 (diff)
downloadnova-d60d2001a2e58be833ee7247ea245515efa7bd94.tar.gz
nova-d60d2001a2e58be833ee7247ea245515efa7bd94.tar.xz
nova-d60d2001a2e58be833ee7247ea245515efa7bd94.zip
Add deprecated warning to SimpleScheduler
Fixes bug 1037829 Change-Id: I83abd3b58bc7d253616ad355458214859bb4112d
Diffstat (limited to 'nova')
-rw-r--r--nova/scheduler/simple.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/nova/scheduler/simple.py b/nova/scheduler/simple.py
index 45e6dc4cb..354e7cfc1 100644
--- a/nova/scheduler/simple.py
+++ b/nova/scheduler/simple.py
@@ -23,6 +23,7 @@ Simple Scheduler - for Volumes
Note: Deprecated in Folsom. Will be removed along with nova-volumes
"""
+from nova.common import deprecated
from nova import db
from nova import exception
from nova import flags
@@ -45,8 +46,19 @@ FLAGS.register_opts(simple_scheduler_opts)
class SimpleScheduler(chance.ChanceScheduler):
"""Implements Naive Scheduler that tries to find least loaded host."""
+ def schedule_run_instance(self, context, request_spec, reservations,
+ *_args, **_kwargs):
+ deprecated.warn(_('SimpleScheduler now only covers volume scheduling '
+ 'and is deprecated in Folsom. Non-volume functionality in '
+ 'SimpleScheduler has been replaced by FilterScheduler'))
+ super(SimpleScheduler, self).schedule_run_instance(self, context,
+ request_spec, reservations, *_args, **_kwargs)
+
def schedule_create_volume(self, context, volume_id, *_args, **_kwargs):
"""Picks a host that is up and has the fewest volumes."""
+ deprecated.warn(_('nova-volume functionality is deprecated in Folsom '
+ 'and will be removed in Grizzly. Volumes are now handled '
+ 'by Cinder'))
elevated = context.elevated()
volume_ref = db.volume_get(context, volume_id)