Compare commits
5 Commits
28946838fe
...
cdb3ed20a2
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
cdb3ed20a2 | ||
|
|
27a1642fbf | ||
|
|
1b0a394ca8 | ||
|
|
2eb2a93e5f | ||
|
|
2be2e81f0a |
215
ActionsGPT-shema.yaml
Normal file
215
ActionsGPT-shema.yaml
Normal file
@ -0,0 +1,215 @@
|
|||||||
|
openapi: 3.1.0
|
||||||
|
info:
|
||||||
|
title: Proxmox Cluster Extended API
|
||||||
|
version: "1.2"
|
||||||
|
servers:
|
||||||
|
- url: https://pve.lawek.com/api2/json
|
||||||
|
paths:
|
||||||
|
/cluster/status:
|
||||||
|
get:
|
||||||
|
operationId: getClusterStatus
|
||||||
|
summary: Récupère le statut du cluster Proxmox
|
||||||
|
responses:
|
||||||
|
"200":
|
||||||
|
description: Statut du cluster retourné avec succès
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
data:
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
type: object
|
||||||
|
/nodes:
|
||||||
|
get:
|
||||||
|
operationId: listNodes
|
||||||
|
summary: Liste tous les nœuds du cluster
|
||||||
|
responses:
|
||||||
|
"200":
|
||||||
|
description: Liste des nœuds
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
data:
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
node:
|
||||||
|
type: string
|
||||||
|
status:
|
||||||
|
type: string
|
||||||
|
uptime:
|
||||||
|
type: integer
|
||||||
|
maxcpu:
|
||||||
|
type: integer
|
||||||
|
maxmem:
|
||||||
|
type: integer
|
||||||
|
/nodes/{node}/status:
|
||||||
|
get:
|
||||||
|
operationId: getNodeStatus
|
||||||
|
summary: Récupère les informations d’un nœud spécifique
|
||||||
|
parameters:
|
||||||
|
- name: node
|
||||||
|
in: path
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
responses:
|
||||||
|
"200":
|
||||||
|
description: Statut du nœud
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
data:
|
||||||
|
type: object
|
||||||
|
/cluster/resources:
|
||||||
|
get:
|
||||||
|
operationId: getClusterResources
|
||||||
|
summary: Récupère les ressources du cluster (VMs, containers, etc.)
|
||||||
|
responses:
|
||||||
|
"200":
|
||||||
|
description: Ressources du cluster retournées avec succès
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
data:
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
type: object
|
||||||
|
/cluster/replication:
|
||||||
|
get:
|
||||||
|
operationId: listReplicationJobs
|
||||||
|
summary: Liste les jobs de réplication
|
||||||
|
responses:
|
||||||
|
"200":
|
||||||
|
description: Liste des jobs de réplication
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
data:
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
type: object
|
||||||
|
/nodes/{node}/lxc:
|
||||||
|
get:
|
||||||
|
operationId: listLxcContainers
|
||||||
|
summary: Liste les conteneurs LXC sur un nœud donné
|
||||||
|
parameters:
|
||||||
|
- name: node
|
||||||
|
in: path
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
responses:
|
||||||
|
"200":
|
||||||
|
description: Liste des conteneurs LXC
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
data:
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
type: object
|
||||||
|
/nodes/{node}/qemu:
|
||||||
|
get:
|
||||||
|
operationId: listQemuVMs
|
||||||
|
summary: Liste les machines virtuelles QEMU sur un nœud donné
|
||||||
|
parameters:
|
||||||
|
- name: node
|
||||||
|
in: path
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
responses:
|
||||||
|
"200":
|
||||||
|
description: Liste des VMs QEMU
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
data:
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
type: object
|
||||||
|
/cluster/ceph/status:
|
||||||
|
get:
|
||||||
|
operationId: getCephStatus
|
||||||
|
summary: Récupère le statut de Ceph dans le cluster
|
||||||
|
responses:
|
||||||
|
"200":
|
||||||
|
description: Statut Ceph retourné avec succès
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
data:
|
||||||
|
type: object
|
||||||
|
/nodes/{node}/lxc/{vmid}/migrate:
|
||||||
|
post:
|
||||||
|
operationId: migrateLxcContainer
|
||||||
|
summary: Migre un conteneur LXC vers un autre noeud
|
||||||
|
description: Démarre la migration d'un conteneur LXC depuis un noeud source vers un noeud cible. Utilise "1" ou "0" pour
|
||||||
|
les champs boolean comme online et restart.
|
||||||
|
parameters:
|
||||||
|
- name: node
|
||||||
|
in: path
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
- name: vmid
|
||||||
|
in: path
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
type: integer
|
||||||
|
requestBody:
|
||||||
|
required: true
|
||||||
|
content:
|
||||||
|
application/x-www-form-urlencoded:
|
||||||
|
schema:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
target:
|
||||||
|
type: string
|
||||||
|
description: Nom du noeud cible
|
||||||
|
online:
|
||||||
|
type: string
|
||||||
|
enum:
|
||||||
|
- "1"
|
||||||
|
- "0"
|
||||||
|
description: 1 pour une migration a chaud, 0 sinon
|
||||||
|
restart:
|
||||||
|
type: string
|
||||||
|
enum:
|
||||||
|
- "1"
|
||||||
|
- "0"
|
||||||
|
description: 1 pour forcer le redemarrage, 0 sinon
|
||||||
|
timeout:
|
||||||
|
type: integer
|
||||||
|
description: Delai d'attente avant expiration (en secondes)
|
||||||
|
required:
|
||||||
|
- target
|
||||||
|
responses:
|
||||||
|
"200":
|
||||||
|
description: Migration lancee avec succes
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
data:
|
||||||
|
type: string
|
||||||
|
description: Identifiant de la tache (UPID)
|
||||||
@ -15,28 +15,3 @@ provider "proxmox" {
|
|||||||
pm_api_token_secret = "21d623eb-d6c2-4e03-9a28-5c823c643fc4"
|
pm_api_token_secret = "21d623eb-d6c2-4e03-9a28-5c823c643fc4"
|
||||||
#pm_tls_insecure = true
|
#pm_tls_insecure = true
|
||||||
}
|
}
|
||||||
|
|
||||||
resource "proxmox_lxc" "test_ct" {
|
|
||||||
hostname = "test-lxc"
|
|
||||||
target_node = "pve3"
|
|
||||||
ostemplate = "cephfs:vztmpl/debian-12-standard_12.7-1_amd64.tar.zst"
|
|
||||||
password = "DebianTest123"
|
|
||||||
cores = 1
|
|
||||||
memory = 512
|
|
||||||
swap = 512
|
|
||||||
unprivileged = true
|
|
||||||
start = true
|
|
||||||
tags = "terraform,test"
|
|
||||||
|
|
||||||
network {
|
|
||||||
name = "eth0"
|
|
||||||
bridge = "vmbr0"
|
|
||||||
ip = "dhcp"
|
|
||||||
gw = ""
|
|
||||||
}
|
|
||||||
|
|
||||||
rootfs {
|
|
||||||
storage = "main-pool"
|
|
||||||
size = "4G"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Loading…
x
Reference in New Issue
Block a user