diff options
| author | Jenkins <jenkins@review.openstack.org> | 2012-01-10 16:04:34 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2012-01-10 16:04:34 +0000 |
| commit | 799801f856a0f3e7788e89ecdca02828fd64e6ad (patch) | |
| tree | 26e6d10d30da1f9056b6ac943cd0b037d723bd7d /nova/tests | |
| parent | fa43949c05ff4e5165baa2f0a0f1555e94bcf212 (diff) | |
| parent | 162ab4f48e573662824872da56aecbef05ba94f0 (diff) | |
Merge "Use instance_properties in resize."
Diffstat (limited to 'nova/tests')
| -rw-r--r-- | nova/tests/scheduler/test_chance_scheduler.py | 4 | ||||
| -rw-r--r-- | nova/tests/scheduler/test_distributed_scheduler.py | 4 | ||||
| -rw-r--r-- | nova/tests/test_compute.py | 6 |
3 files changed, 8 insertions, 6 deletions
diff --git a/nova/tests/scheduler/test_chance_scheduler.py b/nova/tests/scheduler/test_chance_scheduler.py index 8d4c73adb..0bb3927a2 100644 --- a/nova/tests/scheduler/test_chance_scheduler.py +++ b/nova/tests/scheduler/test_chance_scheduler.py @@ -30,7 +30,7 @@ class ChanceSchedulerTestCase(test.TestCase): sched = chance.ChanceScheduler() hosts = ['host1', 'host2', 'host3'] - request_spec = dict(original_host='host2', + request_spec = dict(instance_properties=dict(host='host2'), avoid_original_host=True) filtered = sched._filter_hosts(request_spec, hosts) @@ -43,7 +43,7 @@ class ChanceSchedulerTestCase(test.TestCase): sched = chance.ChanceScheduler() hosts = ['host1', 'host2', 'host3'] - request_spec = dict(original_host='host2', + request_spec = dict(instance_properties=dict(host='host2'), avoid_original_host=False) filtered = sched._filter_hosts(request_spec, hosts) diff --git a/nova/tests/scheduler/test_distributed_scheduler.py b/nova/tests/scheduler/test_distributed_scheduler.py index 047c8c51a..36d2ddc5b 100644 --- a/nova/tests/scheduler/test_distributed_scheduler.py +++ b/nova/tests/scheduler/test_distributed_scheduler.py @@ -313,7 +313,7 @@ class DistributedSchedulerTestCase(test.TestCase): _fake_choose_host_filters) hosts = [('host1', '1info'), ('host2', '2info'), ('host3', '3info')] - request_spec = dict(original_host='host2', + request_spec = dict(instance_properties=dict(host='host2'), avoid_original_host=True) filtered = sched._filter_hosts('compute', request_spec, hosts, {}) @@ -333,7 +333,7 @@ class DistributedSchedulerTestCase(test.TestCase): _fake_choose_host_filters) hosts = [('host1', '1info'), ('host2', '2info'), ('host3', '3info')] - request_spec = dict(original_host='host2', + request_spec = dict(instance_properties=dict(host='host2'), avoid_original_host=False) filtered = sched._filter_hosts('compute', request_spec, hosts, {}) diff --git a/nova/tests/test_compute.py b/nova/tests/test_compute.py index a225abc9d..f2098de56 100644 --- a/nova/tests/test_compute.py +++ b/nova/tests/test_compute.py @@ -2062,7 +2062,8 @@ class ComputeAPITestCase(BaseTestCase): def test_resize_request_spec(self): def _fake_cast(context, args): request_spec = args['args']['request_spec'] - self.assertEqual(request_spec['original_host'], 'host2') + instance_properties = request_spec['instance_properties'] + self.assertEqual(instance_properties['host'], 'host2') self.assertEqual(request_spec['avoid_original_host'], True) self.stubs.Set(self.compute_api, '_cast_scheduler_message', @@ -2080,7 +2081,8 @@ class ComputeAPITestCase(BaseTestCase): def test_resize_request_spec_noavoid(self): def _fake_cast(context, args): request_spec = args['args']['request_spec'] - self.assertEqual(request_spec['original_host'], 'host2') + instance_properties = request_spec['instance_properties'] + self.assertEqual(instance_properties['host'], 'host2') self.assertEqual(request_spec['avoid_original_host'], False) self.stubs.Set(self.compute_api, '_cast_scheduler_message', |
