Alerting: Add method to reset notification policy tree back to the default (#51934) (#52004)

* Define route and run codegen

* Wire up HTTP layer

* Update API layer and test fakes

* Implement reset of policy tree

* Implement service layer test and authorization bindings

* API layer testing

* Be more specific when injecting settings

(cherry picked from commit fce283d73e)

Co-authored-by: Alexander Weaver <weaver.alex.d@gmail.com>
This commit is contained in:
Grot (@grafanabot)
2022-07-08 16:39:49 -05:00
committed by GitHub
co-authored by Alexander Weaver
parent 08f72f214e
commit 7e5a7fc7fc
12 changed files with 191 additions and 3 deletions
@@ -2196,6 +2196,25 @@
}
}
}
},
"delete": {
"consumes": [
"application/json"
],
"tags": [
"provisioning",
"stable"
],
"summary": "Clears the notification policy tree.",
"operationId": "RouteResetPolicyTree",
"responses": {
"202": {
"description": "Ack",
"schema": {
"$ref": "#/definitions/Ack"
}
}
}
}
},
"/api/v1/provisioning/templates": {
@@ -6130,6 +6149,7 @@
"x-go-package": "github.com/prometheus/alertmanager/api/v2/models"
},
"postableSilence": {
"description": "PostableSilence postable silence",
"type": "object",
"required": [
"comment",