diff options
| author | Chris Behrens <cbehrens@codestud.com> | 2011-06-28 08:08:13 -0700 |
|---|---|---|
| committer | Chris Behrens <cbehrens@codestud.com> | 2011-06-28 08:08:13 -0700 |
| commit | 9653ee5cfae198355610ff40f0820eb9071a0deb (patch) | |
| tree | 7da88d2704ccae55e9ddc39524b18dd5a4cb814b | |
| parent | c293506c435222d8154618ffda89108d3f1ef692 (diff) | |
| download | nova-9653ee5cfae198355610ff40f0820eb9071a0deb.tar.gz nova-9653ee5cfae198355610ff40f0820eb9071a0deb.tar.xz nova-9653ee5cfae198355610ff40f0820eb9071a0deb.zip | |
log formatting typo
pep8 fixes
| -rw-r--r-- | nova/scheduler/zone_aware_scheduler.py | 3 | ||||
| -rw-r--r-- | nova/tests/scheduler/test_zone_aware_scheduler.py | 8 |
2 files changed, 6 insertions, 5 deletions
diff --git a/nova/scheduler/zone_aware_scheduler.py b/nova/scheduler/zone_aware_scheduler.py index 638072ee7..2efad7bf2 100644 --- a/nova/scheduler/zone_aware_scheduler.py +++ b/nova/scheduler/zone_aware_scheduler.py @@ -181,7 +181,8 @@ class ZoneAwareScheduler(driver.Scheduler): return None num_instances = request_spec.get('num_instances', 1) - LOG.debug(_("Attemping to build %d instance(s)") % locals()) + LOG.debug(_("Attempting to build %(num_instances)d instance(s)") % + locals()) # Create build plan and provision ... build_plan = self.select(context, request_spec) diff --git a/nova/tests/scheduler/test_zone_aware_scheduler.py b/nova/tests/scheduler/test_zone_aware_scheduler.py index b2599f1b8..1e23e3ee6 100644 --- a/nova/tests/scheduler/test_zone_aware_scheduler.py +++ b/nova/tests/scheduler/test_zone_aware_scheduler.py @@ -63,13 +63,13 @@ class FakeZoneManager(zone_manager.ZoneManager): def __init__(self): self.service_states = { 'host1': { - 'compute': {'host_memory_free': 1000*1024*1024}, + 'compute': {'host_memory_free': 1073741824}, }, 'host2': { - 'compute': {'host_memory_free': 2000*1024*1024}, + 'compute': {'host_memory_free': 2147483648}, }, 'host3': { - 'compute': {'host_memory_free': 3000*1024*1024}, + 'compute': {'host_memory_free': 3221225472}, }, } @@ -158,7 +158,7 @@ class ZoneAwareSchedulerTestCase(test.TestCase): fake_context = {} build_plan = sched.select(fake_context, {'instance_type': {'memory_mb': 512}, - 'num_instances': 4 }) + 'num_instances': 4}) # 4 from local zones, 12 from remotes self.assertEqual(16, len(build_plan)) |
