diff options
| author | Donal Lafferty <donal.lafferty@citrix.com> | 2011-08-14 04:25:46 +0000 |
|---|---|---|
| committer | Tarmac <> | 2011-08-14 04:25:46 +0000 |
| commit | 1fe628fbe1f9964ac4536ce1c859d84d9cd8cb08 (patch) | |
| tree | b8c3d4fbe3e9225c9acdcc777fea6663b9111bab /nova/tests | |
| parent | eede601db836643a0fbc6689fb9ee9db15a822bc (diff) | |
| parent | d2aa9ddcb26b1217de55fc5cd6c886059e781cda (diff) | |
Added ability too boot VM from install ISO. System detects an image of type iso. Images is streamed to a VDI and mounted to the VM. Blank disk allocated to VM based on instance type.
Currently available for XenServer.
Diffstat (limited to 'nova/tests')
| -rw-r--r-- | nova/tests/glance/stubs.py | 6 | ||||
| -rw-r--r-- | nova/tests/test_xenapi.py | 5 |
2 files changed, 11 insertions, 0 deletions
diff --git a/nova/tests/glance/stubs.py b/nova/tests/glance/stubs.py index d51b19ccd..f2a19f22d 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, auth_tok=None): diff --git a/nova/tests/test_xenapi.py b/nova/tests/test_xenapi.py index 1deb5a780..2f0559366 100644 --- a/nova/tests/test_xenapi.py +++ b/nova/tests/test_xenapi.py @@ -519,6 +519,11 @@ class XenAPIVMTestCase(test.TestCase): os_type="windows", architecture="i386") self.check_vm_params_for_windows() + def test_spawn_iso_glance(self): + 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): self._test_spawn(glance_stubs.FakeGlance.IMAGE_MACHINE, glance_stubs.FakeGlance.IMAGE_KERNEL, |
