Update swagger documentation

This commit is contained in:
Joshua Boniface 2020-12-01 04:45:01 -05:00
parent 0f8e5c6536
commit 0820cb3c5b
1 changed files with 156 additions and 0 deletions

View File

@ -10,6 +10,9 @@
}, },
"type": "object" "type": "object"
}, },
"Cluster Data": {
"type": "object"
},
"ClusterStatus": { "ClusterStatus": {
"properties": { "properties": {
"health": { "health": {
@ -156,6 +159,10 @@
}, },
"VMMetadata": { "VMMetadata": {
"properties": { "properties": {
"migration_method": {
"description": "The preferred migration method (live, shutdown, none)",
"type": "string"
},
"name": { "name": {
"description": "The name of the VM", "description": "The name of the VM",
"type": "string" "type": "string"
@ -671,6 +678,10 @@
} }
}, },
"type": "object" "type": "object"
},
"volume_count": {
"description": "The number of volumes in the pool",
"type": "integer"
} }
}, },
"type": "object" "type": "object"
@ -954,6 +965,10 @@
"description": "Internal provisioner template ID", "description": "Internal provisioner template ID",
"type": "integer" "type": "integer"
}, },
"migration_method": {
"description": "The preferred migration method (live, shutdown, none)",
"type": "string"
},
"name": { "name": {
"description": "Template name", "description": "Template name",
"type": "string" "type": "string"
@ -1158,6 +1173,10 @@
"description": "Whether the VM has been migrated, either \"no\" or \"from <last_node>\"", "description": "Whether the VM has been migrated, either \"no\" or \"from <last_node>\"",
"type": "string" "type": "string"
}, },
"migration_method": {
"description": "The preferred migration method (live, shutdown, none)",
"type": "string"
},
"name": { "name": {
"description": "The name of the VM", "description": "The name of the VM",
"type": "string" "type": "string"
@ -1198,6 +1217,10 @@
"description": "The PVC network type", "description": "The PVC network type",
"type": "string" "type": "string"
}, },
"vni": {
"description": "The VNI (PVC network) of the network bridge",
"type": "integer"
},
"wr_bytes": { "wr_bytes": {
"description": "The number of write bytes on the interface", "description": "The number of write bytes on the interface",
"type": "integer" "type": "integer"
@ -1397,9 +1420,38 @@
] ]
} }
}, },
"/api/v1/backup": {
"get": {
"description": "",
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/Cluster Data"
}
},
"400": {
"description": "Bad request"
}
},
"summary": "Back up the Zookeeper data of a cluster in JSON format",
"tags": [
"root"
]
}
},
"/api/v1/initialize": { "/api/v1/initialize": {
"post": { "post": {
"description": "Note: Normally used only once during cluster bootstrap; checks for the existence of the \"/primary_node\" key before proceeding and returns 400 if found", "description": "Note: Normally used only once during cluster bootstrap; checks for the existence of the \"/primary_node\" key before proceeding and returns 400 if found",
"parameters": [
{
"description": "A confirmation string to ensure that the API consumer really means it",
"in": "query",
"name": "yes-i-really-mean-it",
"required": true,
"type": "string"
}
],
"responses": { "responses": {
"200": { "200": {
"description": "OK", "description": "OK",
@ -3933,6 +3985,13 @@
"name": "node_autostart", "name": "node_autostart",
"required": false, "required": false,
"type": "boolean" "type": "boolean"
},
{
"description": "The preferred migration method (live, shutdown, none)",
"in": "query",
"name": "migration_method",
"required": false,
"type": "string"
} }
], ],
"responses": { "responses": {
@ -4056,6 +4115,13 @@
"name": "node_autostart", "name": "node_autostart",
"required": false, "required": false,
"type": "boolean" "type": "boolean"
},
{
"description": "The preferred migration method (live, shutdown, none)",
"in": "query",
"name": "migration_method",
"required": false,
"type": "string"
} }
], ],
"responses": { "responses": {
@ -4127,6 +4193,12 @@
"in": "query", "in": "query",
"name": "node_autostart", "name": "node_autostart",
"type": "boolean" "type": "boolean"
},
{
"description": "The preferred migration method (live, shutdown, none)",
"in": "query",
"name": "migration_method",
"type": "string"
} }
], ],
"responses": { "responses": {
@ -4319,6 +4391,51 @@
] ]
} }
}, },
"/api/v1/restore": {
"post": {
"description": "",
"parameters": [
{
"description": "A confirmation string to ensure that the API consumer really means it",
"in": "query",
"name": "yes-i-really-mean-it",
"required": true,
"type": "string"
},
{
"description": "The raw JSON cluster backup data",
"in": "query",
"name": "cluster_data",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/Message"
}
},
"400": {
"description": "Bad request",
"schema": {
"$ref": "#/definitions/Message"
}
},
"500": {
"description": "Restore error or code failure",
"schema": {
"$ref": "#/definitions/Message"
}
}
},
"summary": "Restore a backup over the cluster; destroys the existing data",
"tags": [
"root"
]
}
},
"/api/v1/status": { "/api/v1/status": {
"get": { "get": {
"description": "", "description": "",
@ -5463,6 +5580,19 @@
"name": "autostart", "name": "autostart",
"required": false, "required": false,
"type": "boolean" "type": "boolean"
},
{
"default": "none",
"description": "The preferred migration method (live, shutdown, none)",
"enum": [
"live",
"shutdown",
"none"
],
"in": "query",
"name": "migration_method",
"required": false,
"type": "string"
} }
], ],
"responses": { "responses": {
@ -5587,6 +5717,19 @@
"name": "autostart", "name": "autostart",
"required": false, "required": false,
"type": "boolean" "type": "boolean"
},
{
"default": "none",
"description": "The preferred migration method (live, shutdown, none)",
"enum": [
"live",
"shutdown",
"none"
],
"in": "query",
"name": "migration_method",
"required": false,
"type": "string"
} }
], ],
"responses": { "responses": {
@ -5758,6 +5901,19 @@
"name": "profile", "name": "profile",
"required": false, "required": false,
"type": "string" "type": "string"
},
{
"default": "none",
"description": "The preferred migration method (live, shutdown, none)",
"enum": [
"live",
"shutdown",
"none"
],
"in": "query",
"name": "migration_method",
"required": false,
"type": "string"
} }
], ],
"responses": { "responses": {