Have blob uploads be checked against configurable max layer size

This commit is contained in:
Joseph Schorr 2017-02-27 13:32:09 -05:00
parent dd35677712
commit dd7f254f96
4 changed files with 32 additions and 1 deletions

View file

@ -112,6 +112,12 @@ class TagInvalid(V2RegistryException):
'manifest tag did not match URI',
detail)
class LayerTooLarge(V2RegistryException):
def __init__(self, detail=None):
super(LayerTooLarge, self).__init__('BLOB_UPLOAD_INVALID',
'Uploaded layer is larger than allowed by this registry',
detail)
class Unauthorized(V2RegistryException):
def __init__(self, detail=None, repository=None, scopes=None):