Implement V2 interfaces and remaining V1 interfaces
Also adds some tests to registry tests for V1 stuff. Note: All *registry* tests currently pass, but as verbs are not yet converted, the verb tests in registry_tests.py currently fail.
This commit is contained in:
parent
d67991987b
commit
db60df827d
21 changed files with 588 additions and 338 deletions
|
@ -3,7 +3,7 @@ from uuid import uuid4
|
|||
from data.model import (tag, _basequery, BlobDoesNotExist, InvalidBlobUpload, db_transaction,
|
||||
storage as storage_model, InvalidImageException)
|
||||
from data.database import (Repository, Namespace, ImageStorage, Image, ImageStoragePlacement,
|
||||
BlobUpload)
|
||||
BlobUpload, ImageStorageLocation)
|
||||
|
||||
|
||||
def get_repo_blob_by_digest(namespace, repo_name, blob_digest):
|
||||
|
@ -63,7 +63,9 @@ def get_blob_upload(namespace, repo_name, upload_uuid):
|
|||
"""
|
||||
try:
|
||||
return (BlobUpload
|
||||
.select()
|
||||
.select(BlobUpload, ImageStorageLocation)
|
||||
.join(ImageStorageLocation)
|
||||
.switch(BlobUpload)
|
||||
.join(Repository)
|
||||
.join(Namespace, on=(Namespace.id == Repository.namespace_user))
|
||||
.where(Repository.name == repo_name, Namespace.username == namespace,
|
||||
|
|
Reference in a new issue