Align internal image API with volume and network
First part of standardizing the nova internal image API with the API objects for volume and network. This patch creates a nova.image.api.API object that matches the signature of nova.network.api.API and nova.volume.cinder.API for CRUD operations on image records. The existing unit tests were enough to fully cover the new code paths, since much of this patch simply aligned the internal image API calls and API object with that of the other submodules. The next in this patch series will work on cleaning up the remainder of places in nova that directly call on nova.image.glance methods, as well as the untouched download/upload handling. Change-Id: I67e7c9d841e5bad82cdca8f7048eaa57f0cfbb2f Partially-implements: blueprint standardize-nova-image
This commit is contained in:
@@ -374,7 +374,7 @@ class ShelveComputeAPITestCase(test_compute.BaseTestCase):
|
||||
# sets a fake method.
|
||||
self2.images = {}
|
||||
|
||||
def fake_create(self2, ctxt, metadata):
|
||||
def fake_create(self2, ctxt, metadata, data=None):
|
||||
self.assertEqual(metadata['name'], 'vm01-shelved')
|
||||
metadata['id'] = '8b24ed3f-ee57-43bc-bc2e-fb2e9482bc42'
|
||||
return metadata
|
||||
|
||||
Reference in New Issue
Block a user