5122269147
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
18 lines
686 B
Python
18 lines
686 B
Python
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
|
# not use this file except in compliance with the License. You may obtain
|
|
# a copy of the License at
|
|
#
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
#
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
# License for the specific language governing permissions and limitations
|
|
# under the License.
|
|
|
|
|
|
def API():
|
|
# Needed to prevent circular import...
|
|
import nova.image.api
|
|
return nova.image.api.API()
|