diff options
| author | Donal Lafferty <donal.lafferty@citrix.com> | 2011-06-28 12:34:17 +0100 |
|---|---|---|
| committer | Donal Lafferty <donal.lafferty@citrix.com> | 2011-06-28 12:34:17 +0100 |
| commit | 6ca1845582334d69474f5f9d661177e77cd769fe (patch) | |
| tree | 131a4154a4f7b179fa0ab5e6ee69c2f4997b8a8f | |
| parent | 8878f6433cebcac963ed8789200f38a5ac4dfddd (diff) | |
Add test for spawn from an ISO.
| -rw-r--r-- | nova/tests/glance/stubs.py | 6 | ||||
| -rw-r--r-- | nova/tests/test_xenapi.py | 6 |
2 files changed, 12 insertions, 0 deletions
diff --git a/nova/tests/glance/stubs.py b/nova/tests/glance/stubs.py index 1e0b90d82..37fb7a9d7 100644 --- a/nova/tests/glance/stubs.py +++ b/nova/tests/glance/stubs.py @@ -32,6 +32,7 @@ class FakeGlance(object): IMAGE_RAMDISK = 3 IMAGE_RAW = 4 IMAGE_VHD = 5 + IMAGE_ISO = 6 IMAGE_FIXTURES = { IMAGE_MACHINE: { @@ -58,6 +59,11 @@ class FakeGlance(object): 'image_meta': {'name': 'fakevhd', 'size': 0, 'disk_format': 'vhd', 'container_format': 'ovf'}, + 'image_data': StringIO.StringIO('')}, + IMAGE_ISO: { + 'image_meta': {'name': 'fakeiso', 'size': 0, + 'disk_format': 'iso', + 'container_format': 'bare'}, 'image_data': StringIO.StringIO('')}} def __init__(self, host, port=None, use_ssl=False): diff --git a/nova/tests/test_xenapi.py b/nova/tests/test_xenapi.py index d9a514745..b8f53b735 100644 --- a/nova/tests/test_xenapi.py +++ b/nova/tests/test_xenapi.py @@ -446,6 +446,12 @@ class XenAPIVMTestCase(test.TestCase): os_type="windows", architecture="i386") self.check_vm_params_for_windows() + def test_spawn_iso_glance(self): + FLAGS.xenapi_image_service = 'glance' + self._test_spawn(glance_stubs.FakeGlance.IMAGE_ISO, None, None, + os_type="windows", architecture="i386") + self.check_vm_params_for_windows() + def test_spawn_glance(self): FLAGS.xenapi_image_service = 'glance' self._test_spawn(glance_stubs.FakeGlance.IMAGE_MACHINE, |
