mirror of
https://github.com/yusing/godoxy.git
synced 2026-03-26 11:01:07 +01:00
feat(proxmox): add LXC container control endpoints
Add start, stop, and restart endpoints for LXC containers via the Proxmox API: - POST /api/v1/proxmox/lxc/:node/:vmid/start - POST /api/v1/proxmox/lxc/:node/:vmid/stop - POST /api/v1/proxmox/lxc/:node/:vmid/restart
This commit is contained in:
@@ -310,6 +310,168 @@
|
||||
"operationId": "journalctl"
|
||||
}
|
||||
},
|
||||
"/api/v1/proxmox/lxc/:node/:vmid/restart": {
|
||||
"post": {
|
||||
"description": "Restart LXC container by node and vmid",
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"proxmox"
|
||||
],
|
||||
"summary": "Restart LXC container",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"name": "node",
|
||||
"in": "path",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"name": "vmid",
|
||||
"in": "path",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/SuccessResponse"
|
||||
}
|
||||
},
|
||||
"400": {
|
||||
"description": "Invalid request",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/ErrorResponse"
|
||||
}
|
||||
},
|
||||
"404": {
|
||||
"description": "Node not found",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/ErrorResponse"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal Server Error",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/ErrorResponse"
|
||||
}
|
||||
}
|
||||
},
|
||||
"x-id": "lxcRestart",
|
||||
"operationId": "lxcRestart"
|
||||
}
|
||||
},
|
||||
"/api/v1/proxmox/lxc/:node/:vmid/start": {
|
||||
"post": {
|
||||
"description": "Start LXC container by node and vmid",
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"proxmox"
|
||||
],
|
||||
"summary": "Start LXC container",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"name": "node",
|
||||
"in": "path",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"name": "vmid",
|
||||
"in": "path",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/SuccessResponse"
|
||||
}
|
||||
},
|
||||
"400": {
|
||||
"description": "Invalid request",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/ErrorResponse"
|
||||
}
|
||||
},
|
||||
"404": {
|
||||
"description": "Node not found",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/ErrorResponse"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal Server Error",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/ErrorResponse"
|
||||
}
|
||||
}
|
||||
},
|
||||
"x-id": "lxcStart",
|
||||
"operationId": "lxcStart"
|
||||
}
|
||||
},
|
||||
"/api/v1/proxmox/lxc/:node/:vmid/stop": {
|
||||
"post": {
|
||||
"description": "Stop LXC container by node and vmid",
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"proxmox"
|
||||
],
|
||||
"summary": "Stop LXC container",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"name": "node",
|
||||
"in": "path",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"name": "vmid",
|
||||
"in": "path",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/SuccessResponse"
|
||||
}
|
||||
},
|
||||
"400": {
|
||||
"description": "Invalid request",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/ErrorResponse"
|
||||
}
|
||||
},
|
||||
"404": {
|
||||
"description": "Node not found",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/ErrorResponse"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal Server Error",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/ErrorResponse"
|
||||
}
|
||||
}
|
||||
},
|
||||
"x-id": "lxcStop",
|
||||
"operationId": "lxcStop"
|
||||
}
|
||||
},
|
||||
"/api/v1/proxmox/stats/{node}/{vmid}": {
|
||||
"get": {
|
||||
"description": "Get proxmox stats in format of \"STATUS|CPU%%|MEM USAGE/LIMIT|MEM%%|NET I/O|BLOCK I/O\"",
|
||||
|
||||
Reference in New Issue
Block a user