diff options
| author | Lorin Hochstein <lorin@isi.edu> | 2011-06-24 10:52:59 -0400 |
|---|---|---|
| committer | Lorin Hochstein <lorin@isi.edu> | 2011-06-24 10:52:59 -0400 |
| commit | 101fcf7488f4f2b42102da0533c5d97c8f53dd49 (patch) | |
| tree | 6d34755f6c7c48879034b79303316ab6295e37af /nova/tests | |
| parent | 4c46c44d7c1458ccaa3919110de12dfceef406c1 (diff) | |
Edited the host filter test case for extra specs
Diffstat (limited to 'nova/tests')
| -rw-r--r-- | nova/tests/scheduler/test_host_filter.py | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/nova/tests/scheduler/test_host_filter.py b/nova/tests/scheduler/test_host_filter.py index 75a2cb21c..b1892dab4 100644 --- a/nova/tests/scheduler/test_host_filter.py +++ b/nova/tests/scheduler/test_host_filter.py @@ -77,14 +77,26 @@ class HostFilterTestCase(test.TestCase): swap=500, rxtx_quota=30000, rxtx_cap=200, - extra_specs={'gpu': 'nvidia'}) + extra_specs={'xpu_arch': 'fermi', + 'xpu_info': 'Tesla 2050'}) self.zone_manager = FakeZoneManager() states = {} for x in xrange(10): states['host%02d' % (x + 1)] = {'compute': self._host_caps(x)} self.zone_manager.service_states = states - self.zone_manager.service_states['host07']['compute']['gpu'] = 'nvidia' + + # Add some extra capabilities to some hosts + host07 = self.zone_manager.service_states['host07']['compute'] + host07['xpu_arch'] = 'fermi' + host07['xpu_info'] = 'Tesla 2050' + + host08 = self.zone_manager.service_states['host08']['compute'] + host08['xpu_arch'] = 'radeon' + + host09 = self.zone_manager.service_states['host09']['compute'] + host09['xpu_arch'] = 'fermi' + host09['xpu_info'] = 'Tesla 2150' def tearDown(self): FLAGS.default_host_filter = self.old_flag |
