Conductor instance_get_all replaces _by_filters
Updates the Nova conductor so that it uses instance_get_all() and instance_get_all_by_host() from the Nova DB API to implement its own like named functions. This fixes a regression that occured in d22b0ca where we switched from using the DB API's instance_get_all_by_host and instance_get_all methods over to the DB APIs instance_get_all_by_filters. This caused some subtle regressions due to the fact that instance_get_all_by_filters has different defaults for deleted records. The previously used (prior to d22b0ca) instance_get_all() and instance_get_all_by_host() functions rely on the context.read_deleted and also handle the display of deleted and soft deleted records differently. Fixes LP Bug #1096972. Change-Id: Icb587ef169d1d7dd86cf6ee682e74bd4e84c37e2
This commit is contained in:
@@ -947,7 +947,7 @@ class ImageCacheManagerTestCase(test.TestCase):
|
||||
with utils.tempdir() as tmpdir:
|
||||
self.flags(instances_path=tmpdir)
|
||||
|
||||
self.stubs.Set(db, 'instance_get_all_by_filters', fake_get_all)
|
||||
self.stubs.Set(db, 'instance_get_all', fake_get_all)
|
||||
compute = importutils.import_object(CONF.compute_manager)
|
||||
self.flags(use_local=True, group='conductor')
|
||||
compute.conductor_api = conductor.API()
|
||||
|
||||
Reference in New Issue
Block a user