Fix Docker Auth and our V2 registry paths to support library (i.e. namespace-less) repositories.

This support is placed behind a feature flag.
This commit is contained in:
Joseph Schorr 2016-01-21 15:40:51 -05:00
parent 06b0f756bd
commit e4ffaff869
37 changed files with 270 additions and 148 deletions

View file

@ -11,7 +11,7 @@ from auth.auth_context import get_authenticated_user
from util.names import TAG_ERROR, TAG_REGEX
@resource('/v1/repository/<repopath:repository>/tag/')
@resource('/v1/repository/<apirepopath:repository>/tag/')
@path_param('repository', 'The full path of the repository. e.g. namespace/name')
class ListRepositoryTags(RepositoryParamResource):
""" Resource for listing full repository tag history, alive *and dead*. """
@ -60,7 +60,7 @@ class ListRepositoryTags(RepositoryParamResource):
}
@resource('/v1/repository/<repopath:repository>/tag/<tag>')
@resource('/v1/repository/<apirepopath:repository>/tag/<tag>')
@path_param('repository', 'The full path of the repository. e.g. namespace/name')
@path_param('tag', 'The name of the tag')
class RepositoryTag(RepositoryParamResource):
@ -128,7 +128,7 @@ class RepositoryTag(RepositoryParamResource):
return 'Deleted', 204
@resource('/v1/repository/<repopath:repository>/tag/<tag>/images')
@resource('/v1/repository/<apirepopath:repository>/tag/<tag>/images')
@path_param('repository', 'The full path of the repository. e.g. namespace/name')
@path_param('tag', 'The name of the tag')
class RepositoryTagImages(RepositoryParamResource):
@ -179,7 +179,7 @@ class RepositoryTagImages(RepositoryParamResource):
@resource('/v1/repository/<repopath:repository>/tag/<tag>/revert')
@resource('/v1/repository/<apirepopath:repository>/tag/<tag>/revert')
@path_param('repository', 'The full path of the repository. e.g. namespace/name')
@path_param('tag', 'The name of the tag')
class RevertTag(RepositoryParamResource):