log formatting typo

pep8 fixes
This commit is contained in:
Chris Behrens
2011-06-28 08:08:13 -07:00
parent 2602234e0f
commit 6fae4b4e55
2 changed files with 6 additions and 5 deletions

View File

@@ -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)

View File

@@ -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))