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

* 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
This commit is contained in:
Alexander Weaver
2022-07-08 16:23:18 -05:00
committed by GitHub
parent 05cdef5004
commit fce283d73e
12 changed files with 195 additions and 3 deletions
+20 -1
View File
@@ -2785,6 +2785,7 @@
"type": "object"
},
"alertGroups": {
"description": "AlertGroups alert groups",
"items": {
"$ref": "#/definitions/alertGroup"
},
@@ -3113,6 +3114,7 @@
"type": "array"
},
"postableSilence": {
"description": "PostableSilence postable silence",
"properties": {
"comment": {
"description": "comment",
@@ -3150,7 +3152,6 @@
"type": "object"
},
"receiver": {
"description": "Receiver receiver",
"properties": {
"name": {
"description": "name",
@@ -3718,6 +3719,24 @@
}
},
"/api/v1/provisioning/policies": {
"delete": {
"consumes": [
"application/json"
],
"operationId": "RouteResetPolicyTree",
"responses": {
"202": {
"description": "Ack",
"schema": {
"$ref": "#/definitions/Ack"
}
}
},
"summary": "Clears the notification policy tree.",
"tags": [
"provisioning"
]
},
"get": {
"operationId": "RouteGetPolicyTree",
"responses": {