diff options
| author | William Wolf <throughnothing@gmail.com> | 2011-08-19 14:55:38 -0400 |
|---|---|---|
| committer | William Wolf <throughnothing@gmail.com> | 2011-08-19 14:55:38 -0400 |
| commit | 70cfff2a9ee4e34705a342157c8711552f89d764 (patch) | |
| tree | bfd0990b5b1df398cc5509796064c8392c3f068f | |
| parent | ba9c7ded1da97094743a1c27d8f0665378ad726f (diff) | |
| parent | 1bcdf2f32d02e52c61c7b6d0f90d0354612d511e (diff) | |
| download | nova-70cfff2a9ee4e34705a342157c8711552f89d764.tar.gz nova-70cfff2a9ee4e34705a342157c8711552f89d764.tar.xz nova-70cfff2a9ee4e34705a342157c8711552f89d764.zip | |
merge from trunk
| -rw-r--r-- | nova/compute/api.py | 3 | ||||
| -rw-r--r-- | nova/scheduler/abstract_scheduler.py | 3 | ||||
| -rw-r--r-- | nova/scheduler/host_filter.py | 4 |
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) |
