diff --git a/Authors b/Authors index afcc2bd7..4df82141 100644 --- a/Authors +++ b/Authors @@ -43,6 +43,7 @@ David Subiros Dean Troyer Deepak Garg Derek Higgins +Devdeep Singh Devendra Modium Devin Carlen Donal Lafferty diff --git a/nova/flags.py b/nova/flags.py index 6fc3100f..ea6176e9 100644 --- a/nova/flags.py +++ b/nova/flags.py @@ -445,6 +445,12 @@ global_opts = [ cfg.ListOpt('isolated_hosts', default=[], help='Host reserved for specific images'), + cfg.BoolOpt('cache_images', + default=True, + help='Cache glance images locally'), + cfg.BoolOpt('use_cow_images', + default=True, + help='Whether to use cow images') ] FLAGS.register_opts(global_opts) diff --git a/nova/tests/test_xenapi.py b/nova/tests/test_xenapi.py index ec10defe..6fc7fdf7 100644 --- a/nova/tests/test_xenapi.py +++ b/nova/tests/test_xenapi.py @@ -399,7 +399,14 @@ class XenAPIVMTestCase(test.TestCase): def _check_vdis(self, start_list, end_list): for vdi_ref in end_list: if not vdi_ref in start_list: - self.fail('Found unexpected VDI:%s' % vdi_ref) + vdi_rec = xenapi_fake.get_record('VDI', vdi_ref) + # If the cache is turned on then the base disk will be + # there even after the cleanup + if 'other_config' in vdi_rec: + if vdi_rec['other_config']['image-id'] is None: + self.fail('Found unexpected VDI:%s' % vdi_ref) + else: + self.fail('Found unexpected VDI:%s' % vdi_ref) def _test_spawn(self, image_ref, kernel_id, ramdisk_id, instance_type_id="3", os_type="linux", diff --git a/nova/tests/xenapi/stubs.py b/nova/tests/xenapi/stubs.py index 2dfece00..27e2acd9 100644 --- a/nova/tests/xenapi/stubs.py +++ b/nova/tests/xenapi/stubs.py @@ -46,7 +46,7 @@ def stubout_instance_snapshot(stubs): def fake_wait_for_vhd_coalesce(*args): #TODO(sirp): Should we actually fake out the data here - return "fakeparent" + return "fakeparent", "fakebase" stubs.Set(vm_utils, '_wait_for_vhd_coalesce', fake_wait_for_vhd_coalesce)