Fix issue in V1 registry code with accessing locations under HEAD
Fixes #1922
This commit is contained in:
parent
95b7b47501
commit
0b7bb6d6c6
3 changed files with 7 additions and 17 deletions
|
@ -22,14 +22,6 @@ class DockerRegistryV1DataInterface(object):
|
|||
Interface that represents all data store interactions required by a Docker Registry v1.
|
||||
"""
|
||||
|
||||
@abstractmethod
|
||||
def placement_locations_docker_v1(self, namespace_name, repo_name, image_id):
|
||||
"""
|
||||
Returns all the placements for the image with the given V1 Docker ID, found under the given
|
||||
repository or None if no image was found.
|
||||
"""
|
||||
pass
|
||||
|
||||
@abstractmethod
|
||||
def placement_locations_and_path_docker_v1(self, namespace_name, repo_name, image_id):
|
||||
"""
|
||||
|
@ -233,12 +225,6 @@ class PreOCIModel(DockerRegistryV1DataInterface):
|
|||
PreOCIModel implements the data model for the v1 Docker Registry protocol using a database schema
|
||||
before it was changed to support the OCI specification.
|
||||
"""
|
||||
def placement_locations_docker_v1(self, namespace_name, repo_name, image_id):
|
||||
repo_image = model.image.get_repo_image_and_storage(namespace_name, repo_name, image_id)
|
||||
if repo_image is None or repo_image.storage is None:
|
||||
return None
|
||||
return repo_image.storage.locations
|
||||
|
||||
def placement_locations_and_path_docker_v1(self, namespace_name, repo_name, image_id):
|
||||
repo_image = model.image.get_repo_image_extended(namespace_name, repo_name, image_id)
|
||||
if not repo_image or repo_image.storage is None:
|
||||
|
|
Reference in a new issue