diff options
| author | Chris Behrens <cbehrens@codestud.com> | 2011-06-23 06:52:19 -0700 |
|---|---|---|
| committer | Chris Behrens <cbehrens@codestud.com> | 2011-06-23 06:52:19 -0700 |
| commit | 575ea1963bef8c76597ef3a6541c5d0c13635b17 (patch) | |
| tree | 9bdcf8a9ce9cc2e640ef378f6fa50e49b46a001a /nova | |
| parent | b3c206594113ea6e9200e600490c6c991ca319d0 (diff) | |
| download | nova-575ea1963bef8c76597ef3a6541c5d0c13635b17.tar.gz nova-575ea1963bef8c76597ef3a6541c5d0c13635b17.tar.xz nova-575ea1963bef8c76597ef3a6541c5d0c13635b17.zip | |
minor fixups
Diffstat (limited to 'nova')
| -rw-r--r-- | nova/scheduler/host_filter.py | 4 | ||||
| -rw-r--r-- | nova/scheduler/zone_aware_scheduler.py | 1 |
2 files changed, 2 insertions, 3 deletions
diff --git a/nova/scheduler/host_filter.py b/nova/scheduler/host_filter.py index 818ae4a30..b336665be 100644 --- a/nova/scheduler/host_filter.py +++ b/nova/scheduler/host_filter.py @@ -305,11 +305,9 @@ class HostFilterScheduler(zone_aware_scheduler.ZoneAwareScheduler): 'instance_type': <InstanceType dict>} """ - def filter_hosts(self, topic, request_spec, hosts): + def filter_hosts(self, topic, request_spec, hosts=None): """Filter the full host list (from the ZoneManager)""" - if hosts: - return hosts filter_name = request_spec.get('filter', None) host_filter = choose_host_filter(filter_name) diff --git a/nova/scheduler/zone_aware_scheduler.py b/nova/scheduler/zone_aware_scheduler.py index d4d3d0414..70cb83e8a 100644 --- a/nova/scheduler/zone_aware_scheduler.py +++ b/nova/scheduler/zone_aware_scheduler.py @@ -302,6 +302,7 @@ class ZoneAwareScheduler(driver.Scheduler): continue if filter_func(host, services['topic'], request_spec): filtered_hosts.append((host, services['topic'])) + return filtered_hosts def weigh_hosts(self, topic, request_spec, hosts): """Derived classes may override this to provide more sophisticated |
