Rename store_tag_manifest to indicate clearly it is only to be used for testing

This commit is contained in:
Joseph Schorr 2018-08-07 14:52:59 -04:00
parent e33ccff8cb
commit e3da522d26
3 changed files with 7 additions and 8 deletions

View file

@ -549,8 +549,8 @@ def restore_tag_to_image(repo_obj, tag_name, docker_image_id):
return existing_image
def store_tag_manifest(namespace_name, repository_name, tag_name, manifest, leaf_layer_id=None,
reversion=False):
def store_tag_manifest_for_testing(namespace_name, repository_name, tag_name, manifest,
leaf_layer_id=None):
""" Stores a tag manifest for a specific tag name in the database. Returns the TagManifest
object, as well as a boolean indicating whether the TagManifest was created.
"""
@ -559,8 +559,7 @@ def store_tag_manifest(namespace_name, repository_name, tag_name, manifest, leaf
except Repository.DoesNotExist:
raise DataModelException('Invalid repository %s/%s' % (namespace_name, repository_name))
return store_tag_manifest_for_repo(repo.id, tag_name, manifest, leaf_layer_id=leaf_layer_id,
reversion=False)
return store_tag_manifest_for_repo(repo.id, tag_name, manifest, leaf_layer_id=leaf_layer_id)
def store_tag_manifest_for_repo(repository_id, tag_name, manifest, leaf_layer_id=None,