Convert V2's tag endpoints to use the new data model interface
This commit is contained in:
parent
6b5064aba4
commit
e91ba98e1b
5 changed files with 31 additions and 7 deletions
|
@ -204,7 +204,7 @@ def get_tag_manifest_digests(tags):
|
|||
return {manifest.tag_id: manifest.digest for manifest in manifests}
|
||||
|
||||
|
||||
def list_active_repo_tags(repo):
|
||||
def list_active_repo_tags(repo, start_id=None, limit=None):
|
||||
""" Returns all of the active, non-hidden tags in a repository, joined to they images
|
||||
and (if present), their manifest.
|
||||
"""
|
||||
|
@ -216,6 +216,12 @@ def list_active_repo_tags(repo):
|
|||
.switch(RepositoryTag)
|
||||
.join(TagManifest, JOIN.LEFT_OUTER))
|
||||
|
||||
if start_id is not None:
|
||||
query = query.where(RepositoryTag.id >= start_id)
|
||||
|
||||
if limit is not None:
|
||||
query = query.limit(limit)
|
||||
|
||||
return query
|
||||
|
||||
|
||||
|
|
Reference in a new issue