diff --git a/nova/tests/virt/vmwareapi/test_imagecache.py b/nova/tests/virt/vmwareapi/test_imagecache.py index fd4090f3e2..732aa6f899 100644 --- a/nova/tests/virt/vmwareapi/test_imagecache.py +++ b/nova/tests/virt/vmwareapi/test_imagecache.py @@ -61,13 +61,11 @@ class ImageCacheManagerTestCase(test.NoDBTestCase): ) as (_get_timestamp, _file_delete): self.exists = False self._imagecache.timestamp_cleanup( - 'fake-dc-ref', 'fake-ds-browser', 'fake-ds-ref', - 'fake-ds-name', 'fake-ds-path') + 'fake-dc-ref', 'fake-ds-browser', 'fake-ds-path') self.assertEqual(0, _file_delete.call_count) self.exists = True self._imagecache.timestamp_cleanup( - 'fake-dc-ref', 'fake-ds-browser', 'fake-ds-ref', - 'fake-ds-name', 'fake-ds-path') + 'fake-dc-ref', 'fake-ds-browser', 'fake-ds-path') _file_delete.assert_called_once_with(self._session, 'fake-ds-path/ts-2012-11-22-12-00-00', 'fake-dc-ref') @@ -169,8 +167,7 @@ class ImageCacheManagerTestCase(test.NoDBTestCase): def fake_file_delete(session, path, dc_ref): self.assertEqual('fake-ds-path/fake-image-3', path) - def fake_timestamp_cleanup(dc_ref, ds_browser, - ds_ref, ds_name, path): + def fake_timestamp_cleanup(dc_ref, ds_browser, path): self.assertEqual('fake-ds-path/fake-image-4', path) with contextlib.nested( diff --git a/nova/virt/vmwareapi/imagecache.py b/nova/virt/vmwareapi/imagecache.py index 146e594bff..617c78833b 100644 --- a/nova/virt/vmwareapi/imagecache.py +++ b/nova/virt/vmwareapi/imagecache.py @@ -80,8 +80,7 @@ class ImageCacheManager(imagecache.ImageCacheManager): """Returns the timestamp folder.""" return '%s/%s' % (ds_path, image_id) - def timestamp_cleanup(self, dc_ref, ds_browser, - ds_ref, ds_name, ds_path): + def timestamp_cleanup(self, dc_ref, ds_browser, ds_path): ts = self._get_timestamp(ds_browser, ds_path) if ts: ts_path = '%s/%s' % (ds_path, ts) @@ -163,7 +162,6 @@ class ImageCacheManager(imagecache.ImageCacheManager): with lockutils.lock(path, lock_file_prefix='nova-vmware-ts', external=True): self.timestamp_cleanup(dc_info.ref, ds_browser, - datastore['ref'], datastore['name'], path) def update(self, context, instances, datastores_info): diff --git a/nova/virt/vmwareapi/vmops.py b/nova/virt/vmwareapi/vmops.py index 3413d9bb6a..14cb8e2f6b 100755 --- a/nova/virt/vmwareapi/vmops.py +++ b/nova/virt/vmwareapi/vmops.py @@ -315,7 +315,7 @@ class VMwareVMOps(object): with lockutils.lock(path, lock_file_prefix='nova-vmware-ts', external=True): self._imagecache.timestamp_cleanup(dc_info.ref, ds_browser, - data_store_ref, data_store_name, path) + path) # Check if the image exists in the datastore cache. If not the # image will be uploaded and cached.