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
12
data/interfaces/common.py
Normal file
12
data/interfaces/common.py
Normal file
|
@ -0,0 +1,12 @@
|
|||
from image import Repository
|
||||
from data import model
|
||||
|
||||
def repository_for_repo(repo):
|
||||
""" Returns a Repository object representing the repo data model instance given. """
|
||||
return Repository(
|
||||
id=repo.id,
|
||||
name=repo.name,
|
||||
namespace_name=repo.namespace_user.username,
|
||||
description=repo.description,
|
||||
is_public=model.repository.is_repository_public(repo)
|
||||
)
|
Reference in a new issue