f-88: api: ressource /floating-ips, refus et affichage sur la VM #88

Signed-off-by: GnomeZworc <nicolas.boufidjeline@g3e.fr>
This commit is contained in:
GnomeZworc 2026-10-29 21:48:12 +01:00
commit fdabd943f2
Signed by: nicolas.boufideline
GPG key ID: 4406BBBF8845D632
15 changed files with 942 additions and 12 deletions

View file

@ -46,6 +46,14 @@ type VMInterface struct {
MAC string `json:"mac"`
Primary bool `json:"primary"`
DHCPServer bool `json:"dhcp_server"`
FloatingIP *VMFloatingIP `json:"floating_ip,omitempty"`
}
type VMFloatingIP struct {
Name string `json:"name"`
IP string `json:"ip"`
State string `json:"state"`
}
type VMStorage struct {
@ -98,3 +106,20 @@ type NATGateway struct {
IP string `json:"ip,omitempty"`
Gateway string `json:"gateway,omitempty"`
}
type FloatingIPCreateRequest struct {
Name string `json:"name"`
VM string `json:"vm"`
Interface string `json:"interface"`
IP string `json:"ip"`
Gateway string `json:"gateway"`
}
type FloatingIP struct {
Name string `json:"name"`
State string `json:"state"`
VM string `json:"vm,omitempty"`
Interface string `json:"interface,omitempty"`
IP string `json:"ip,omitempty"`
Gateway string `json:"gateway,omitempty"`
}