db60df827d
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.
12 lines
373 B
Python
12 lines
373 B
Python
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)
|
|
)
|