summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEd Leafe <ed@leafe.com>2011-08-19 18:37:39 +0000
committerTarmac <>2011-08-19 18:37:39 +0000
commit1bcdf2f32d02e52c61c7b6d0f90d0354612d511e (patch)
tree8762776c4fb8fe7be94eb30261893f151b460b14
parentba079e5ccfa6b5f9fdfa036842f3e5ba51df4b75 (diff)
parentce5c95424148649cbd4faca1d5c85c0d6209e3d4 (diff)
downloadnova-1bcdf2f32d02e52c61c7b6d0f90d0354612d511e.tar.gz
nova-1bcdf2f32d02e52c61c7b6d0f90d0354612d511e.tar.xz
nova-1bcdf2f32d02e52c61c7b6d0f90d0354612d511e.zip
Removes the incorrect hard-coded filter path.
-rw-r--r--nova/compute/api.py3
-rw-r--r--nova/scheduler/abstract_scheduler.py3
-rw-r--r--nova/scheduler/host_filter.py4
3 files changed, 4 insertions, 6 deletions
diff --git a/nova/compute/api.py b/nova/compute/api.py
index b3932c644..efc9da79b 100644
--- a/nova/compute/api.py
+++ b/nova/compute/api.py
@@ -411,12 +411,11 @@ class API(base.Base):
LOG.debug(_("Casting to scheduler for %(pid)s/%(uid)s's"
" (all-at-once)") % locals())
- filter_class = 'nova.scheduler.host_filter.InstanceTypeFilter'
request_spec = {
'image': image,
'instance_properties': base_options,
'instance_type': instance_type,
- 'filter': filter_class,
+ 'filter': None,
'blob': zone_blob,
'num_instances': num_instances,
}
diff --git a/nova/scheduler/abstract_scheduler.py b/nova/scheduler/abstract_scheduler.py
index 77db67773..e8c343a4b 100644
--- a/nova/scheduler/abstract_scheduler.py
+++ b/nova/scheduler/abstract_scheduler.py
@@ -62,12 +62,13 @@ class AbstractScheduler(driver.Scheduler):
host = build_plan_item['hostname']
base_options = request_spec['instance_properties']
image = request_spec['image']
+ instance_type = request_spec.get('instance_type')
# TODO(sandy): I guess someone needs to add block_device_mapping
# support at some point? Also, OS API has no concept of security
# groups.
instance = compute_api.API().create_db_entry_for_new_instance(context,
- image, base_options, None, [])
+ instance_type, image, base_options, None, [])
instance_id = instance['id']
kwargs['instance_id'] = instance_id
diff --git a/nova/scheduler/host_filter.py b/nova/scheduler/host_filter.py
index 4bc5158cc..826a99b0a 100644
--- a/nova/scheduler/host_filter.py
+++ b/nova/scheduler/host_filter.py
@@ -58,8 +58,6 @@ def choose_host_filter(filter_name=None):
if not filter_name:
filter_name = FLAGS.default_host_filter
for filter_class in _get_filters():
- host_match = "%s.%s" % (filter_class.__module__, filter_class.__name__)
- if (host_match.startswith("nova.scheduler.filters") and
- (host_match.split(".")[-1] == filter_name)):
+ if filter_class.__name__ == filter_name:
return filter_class()
raise exception.SchedulerHostFilterNotFound(filter_name=filter_name)