f-41: api, vpc: champ l3vni des VPC #41

Signed-off-by: GnomeZworc <nicolas.boufidjeline@g3e.fr>
This commit is contained in:
GnomeZworc 2026-10-11 20:05:20 +02:00
commit 3dd94f35dd
Signed by: nicolas.boufideline
GPG key ID: 4406BBBF8845D632
11 changed files with 295 additions and 10 deletions

View file

@ -36,8 +36,9 @@ func (s *Server) getVpc(w http.ResponseWriter, _ *http.Request, name string) {
return
}
cidr, _ := kv.GetFromDB(s.db, "vpc/"+name+"/cidr")
l3vni, _ := kv.GetFromDB(s.db, "vpc/"+name+"/l3vni")
w.WriteHeader(http.StatusOK)
json.NewEncoder(w).Encode(VPC{Name: name, State: state, CIDR: cidr})
json.NewEncoder(w).Encode(VPC{Name: name, State: state, CIDR: cidr, L3VNI: parseL3VNI(l3vni)})
}
func (s *Server) deleteVpc(w http.ResponseWriter, _ *http.Request, name string) {