f-28: add vpc cidr field
Signed-off-by: GnomeZworc <nicolas.boufidjeline@g3e.fr>
This commit is contained in:
parent
2504b435a3
commit
76a840b80a
8 changed files with 98 additions and 17 deletions
|
|
@ -35,8 +35,9 @@ func (s *Server) getVpc(w http.ResponseWriter, _ *http.Request, name string) {
|
|||
json.NewEncoder(w).Encode(ErrorResponse{Error: "vpc not found"})
|
||||
return
|
||||
}
|
||||
cidr, _ := kv.GetFromDB(s.db, "vpc/"+name+"/cidr")
|
||||
w.WriteHeader(http.StatusOK)
|
||||
json.NewEncoder(w).Encode(VPC{Name: name, State: state})
|
||||
json.NewEncoder(w).Encode(VPC{Name: name, State: state, CIDR: cidr})
|
||||
}
|
||||
|
||||
func (s *Server) deleteVpc(w http.ResponseWriter, _ *http.Request, name string) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue