diff options
| author | Jenkins <jenkins@review.openstack.org> | 2013-02-20 02:47:34 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2013-02-20 02:47:34 +0000 |
| commit | 384a4ecd2563cf69a5aea5b6011ccb4beeaa95c0 (patch) | |
| tree | 320f60e77be561208e08ed0a0df41f13ff351d27 /nova/tests | |
| parent | 4bc4b25c8d155855b16b42a7f87eb2e1f1bd061b (diff) | |
| parent | 4cc266427307f4d9776207d30ceb1fbec35b3111 (diff) | |
Merge "libvirt: Fix LXC container creation"
Diffstat (limited to 'nova/tests')
| -rw-r--r-- | nova/tests/test_libvirt_blockinfo.py | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/nova/tests/test_libvirt_blockinfo.py b/nova/tests/test_libvirt_blockinfo.py index 68f1fa394..5560e63fd 100644 --- a/nova/tests/test_libvirt_blockinfo.py +++ b/nova/tests/test_libvirt_blockinfo.py @@ -178,6 +178,21 @@ class LibvirtBlockInfoTest(test.TestCase): } self.assertEqual(mapping, expect) + def test_get_disk_mapping_lxc(self): + # A simple disk mapping setup, but for lxc + + user_context = context.RequestContext(self.user_id, self.project_id) + instance_ref = db.instance_create(user_context, self.test_instance) + + mapping = blockinfo.get_disk_mapping("lxc", instance_ref, + "lxc", "lxc", + None) + expect = { + 'disk': {'bus': 'lxc', 'dev': None, 'type': 'disk'}, + 'root': {'bus': 'lxc', 'dev': None, 'type': 'disk'} + } + self.assertEqual(mapping, expect) + def test_get_disk_mapping_simple_iso(self): # A simple disk mapping setup, but with a ISO for root device |
