upstream merge

This commit is contained in:
Lorin Hochstein
2011-06-14 13:16:05 -04:00
4 changed files with 10 additions and 10 deletions

View File

@@ -133,11 +133,11 @@ class HostFilterTestCase(test.TestCase):
raw = ['or', raw = ['or',
['and', ['and',
['<', '$compute.host_memory_free', 30], ['<', '$compute.host_memory_free', 30],
['<', '$compute.disk_available', 300] ['<', '$compute.disk_available', 300],
], ],
['and', ['and',
['>', '$compute.host_memory_free', 70], ['>', '$compute.host_memory_free', 70],
['>', '$compute.disk_available', 700] ['>', '$compute.disk_available', 700],
] ]
] ]
cooked = json.dumps(raw) cooked = json.dumps(raw)
@@ -183,12 +183,12 @@ class HostFilterTestCase(test.TestCase):
self.assertTrue(hf.filter_hosts(self.zone_manager, json.dumps([]))) self.assertTrue(hf.filter_hosts(self.zone_manager, json.dumps([])))
self.assertTrue(hf.filter_hosts(self.zone_manager, json.dumps({}))) self.assertTrue(hf.filter_hosts(self.zone_manager, json.dumps({})))
self.assertTrue(hf.filter_hosts(self.zone_manager, json.dumps( self.assertTrue(hf.filter_hosts(self.zone_manager, json.dumps(
['not', True, False, True, False] ['not', True, False, True, False],
))) )))
try: try:
hf.filter_hosts(self.zone_manager, json.dumps( hf.filter_hosts(self.zone_manager, json.dumps(
'not', True, False, True, False 'not', True, False, True, False,
)) ))
self.fail("Should give KeyError") self.fail("Should give KeyError")
except KeyError, e: except KeyError, e:

View File

@@ -44,7 +44,7 @@ class WeightedSumTestCase(test.TestCase):
hosts = [ hosts = [
FakeHost(1, 512 * MB, 100), FakeHost(1, 512 * MB, 100),
FakeHost(2, 256 * MB, 400), FakeHost(2, 256 * MB, 400),
FakeHost(3, 512 * MB, 100) FakeHost(3, 512 * MB, 100),
] ]
weighted_fns = [ weighted_fns = [
@@ -96,7 +96,7 @@ class LeastCostSchedulerTestCase(test.TestCase):
def test_noop_cost_fn(self): def test_noop_cost_fn(self):
FLAGS.least_cost_scheduler_cost_functions = [ FLAGS.least_cost_scheduler_cost_functions = [
'nova.scheduler.least_cost.noop_cost_fn' 'nova.scheduler.least_cost.noop_cost_fn',
] ]
FLAGS.noop_cost_fn_weight = 1 FLAGS.noop_cost_fn_weight = 1
@@ -110,7 +110,7 @@ class LeastCostSchedulerTestCase(test.TestCase):
def test_cost_fn_weights(self): def test_cost_fn_weights(self):
FLAGS.least_cost_scheduler_cost_functions = [ FLAGS.least_cost_scheduler_cost_functions = [
'nova.scheduler.least_cost.noop_cost_fn' 'nova.scheduler.least_cost.noop_cost_fn',
] ]
FLAGS.noop_cost_fn_weight = 2 FLAGS.noop_cost_fn_weight = 2
@@ -124,7 +124,7 @@ class LeastCostSchedulerTestCase(test.TestCase):
def test_fill_first_cost_fn(self): def test_fill_first_cost_fn(self):
FLAGS.least_cost_scheduler_cost_functions = [ FLAGS.least_cost_scheduler_cost_functions = [
'nova.scheduler.least_cost.fill_first_cost_fn' 'nova.scheduler.least_cost.fill_first_cost_fn',
] ]
FLAGS.fill_first_cost_fn_weight = 1 FLAGS.fill_first_cost_fn_weight = 1

View File

@@ -201,7 +201,7 @@ class ZoneAwareSchedulerTestCase(test.TestCase):
'instance_properties': {}, 'instance_properties': {},
'instance_type': {}, 'instance_type': {},
'filter_driver': 'nova.scheduler.host_filter.AllHostsFilter', 'filter_driver': 'nova.scheduler.host_filter.AllHostsFilter',
'blob': "Non-None blob data" 'blob': "Non-None blob data",
} }
result = sched.schedule_run_instance(None, 1, request_spec) result = sched.schedule_run_instance(None, 1, request_spec)

View File

@@ -331,7 +331,7 @@ class XenAPIVMTestCase(test.TestCase):
def check_vm_params_for_linux(self): def check_vm_params_for_linux(self):
self.assertEquals(self.vm['platform']['nx'], 'false') self.assertEquals(self.vm['platform']['nx'], 'false')
self.assertEquals(self.vm['PV_args'], 'clocksource=jiffies') self.assertEquals(self.vm['PV_args'], '')
self.assertEquals(self.vm['PV_bootloader'], 'pygrub') self.assertEquals(self.vm['PV_bootloader'], 'pygrub')
# check that these are not set # check that these are not set