Add api function to fully delete a repository.

This commit is contained in:
yackob03 2013-10-01 12:13:25 -04:00
parent 891f992bf2
commit 4b9c6d9aae
5 changed files with 37 additions and 22 deletions

View file

@ -302,3 +302,11 @@ def put_image_json(namespace, repository, image_id):
store.put_content(json_path, request.data)
generate_ancestry(namespace, repository, image_id, parent_id)
return make_response('true', 200)
def delete_registry_storage(namespace, repository):
""" Caller should have already verified proper permissions. """
repository_path = store.repository_namespace_path(namespace, repository)
logger.debug('Recursively deleting path: %s' % repository_path)
store.remove(repository_path)