def delete(self, namespace, repository, tag): """ Delete the specified repository tag. """ repo_ref = registry_model.lookup_repository(namespace, repository) if repo_ref is None: raise NotFound() registry_model.delete_tag(repo_ref, tag) username = get_authenticated_user().username log_action( "delete_tag", namespace, {"username": username, "repo": repository, "namespace": namespace, "tag": tag}, repo_name=repository, ) return "", 204
def delete(self, namespace, repository, tag): """ Delete the specified repository tag. """ repo_ref = registry_model.lookup_repository(namespace, repository) if repo_ref is None: raise NotFound() registry_model.delete_tag(repo_ref, tag) username = get_authenticated_user().username log_action('delete_tag', namespace, { 'username': username, 'repo': repository, 'namespace': namespace, 'tag': tag }, repo_name=repository) return '', 204
def delete_tag(namespace_name, repo_name, tag): permission = ModifyRepositoryPermission(namespace_name, repo_name) repository_ref = registry_model.lookup_repository(namespace_name, repo_name, kind_filter="image") if permission.can() and repository_ref is not None: if not registry_model.delete_tag(repository_ref, tag): abort(404) track_and_log("delete_tag", repository_ref, tag=tag) return make_response("Deleted", 200) abort(403)
def delete_tag(repository, tag, perform_gc=True, expect_gc=True): repo_ref = RepositoryReference.for_repo_obj(repository) registry_model.delete_tag(repo_ref, tag) if perform_gc: assert gc_now(repository) == expect_gc
def delete_tag(repository, tag, perform_gc=True, expect_gc=True): repo_ref = RepositoryReference.for_repo_obj(repository) registry_model.delete_tag(repo_ref, tag) if perform_gc: assert model.gc.garbage_collect_repo(repository) == expect_gc
def _delete_tag(namespace, repo, tag): repo_ref = registry_model.lookup_repository(namespace, repo) registry_model.delete_tag(repo_ref, tag)