admin api: implement PreviewClusterLayoutChanges

This commit is contained in:
Alex Auvolat
2025-03-06 17:26:28 +01:00
parent e4881e62f1
commit 913e6da41b
5 changed files with 116 additions and 0 deletions
+57
View File
@@ -950,6 +950,30 @@
}
}
},
"/v2/PreviewClusterLayoutChanges": {
"post": {
"tags": [
"Cluster layout"
],
"description": "\nComputes a new layout taking into account the staged parameters, and returns it with detailed statistics. The new layout is not applied in the cluster.\n\n*Note: do not try to parse the `message` field of the response, it is given as an array of string specifically because its format is not stable.*\n ",
"operationId": "PreviewClusterLayoutChanges",
"responses": {
"200": {
"description": "Information about the new layout",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/PreviewClusterLayoutChangesResponse"
}
}
}
},
"500": {
"description": "Internal server error"
}
}
}
},
"/v2/PurgeBlocks": {
"post": {
"tags": [
@@ -2992,6 +3016,39 @@
}
}
},
"PreviewClusterLayoutChangesResponse": {
"oneOf": [
{
"type": "object",
"required": [
"error"
],
"properties": {
"error": {
"type": "string"
}
}
},
{
"type": "object",
"required": [
"message",
"newLayout"
],
"properties": {
"message": {
"type": "array",
"items": {
"type": "string"
}
},
"newLayout": {
"$ref": "#/components/schemas/GetClusterLayoutResponse"
}
}
}
]
},
"RemoveBucketAliasRequest": {
"allOf": [
{