aboutsummaryrefslogtreecommitdiffstats
path: root/binapi/ip6_nd
diff options
context:
space:
mode:
Diffstat (limited to 'binapi/ip6_nd')
-rw-r--r--binapi/ip6_nd/ip6_nd.ba.go4
-rw-r--r--binapi/ip6_nd/ip6_nd_rest.ba.go129
-rw-r--r--binapi/ip6_nd/ip6_nd_rpc.ba.go12
3 files changed, 8 insertions, 137 deletions
diff --git a/binapi/ip6_nd/ip6_nd.ba.go b/binapi/ip6_nd/ip6_nd.ba.go
index a5f308e..9149861 100644
--- a/binapi/ip6_nd/ip6_nd.ba.go
+++ b/binapi/ip6_nd/ip6_nd.ba.go
@@ -1,7 +1,7 @@
// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
// versions:
-// binapi-generator: v0.4.0-dev
-// VPP: 20.05-release
+// binapi-generator: v0.4.0
+// VPP: 20.05.1-release
// source: /usr/share/vpp/api/core/ip6_nd.api.json
// Package ip6_nd contains generated bindings for API file ip6_nd.api.
diff --git a/binapi/ip6_nd/ip6_nd_rest.ba.go b/binapi/ip6_nd/ip6_nd_rest.ba.go
deleted file mode 100644
index 2bd060d..0000000
--- a/binapi/ip6_nd/ip6_nd_rest.ba.go
+++ /dev/null
@@ -1,129 +0,0 @@
-// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
-
-package ip6_nd
-
-import (
- "encoding/json"
- "io/ioutil"
- "net/http"
-)
-
-func RESTHandler(rpc RPCService) http.Handler {
- mux := http.NewServeMux()
- mux.HandleFunc("/ip6nd_proxy_add_del", func(w http.ResponseWriter, req *http.Request) {
- var request = new(IP6ndProxyAddDel)
- b, err := ioutil.ReadAll(req.Body)
- if err != nil {
- http.Error(w, "read body failed", http.StatusBadRequest)
- return
- }
- if err := json.Unmarshal(b, request); err != nil {
- http.Error(w, "unmarshal data failed", http.StatusBadRequest)
- return
- }
- reply, err := rpc.IP6ndProxyAddDel(req.Context(), request)
- if err != nil {
- http.Error(w, "request failed: "+err.Error(), http.StatusInternalServerError)
- return
- }
- rep, err := json.MarshalIndent(reply, "", " ")
- if err != nil {
- http.Error(w, "marshal failed: "+err.Error(), http.StatusInternalServerError)
- return
- }
- w.Write(rep)
- })
- mux.HandleFunc("/ip6nd_send_router_solicitation", func(w http.ResponseWriter, req *http.Request) {
- var request = new(IP6ndSendRouterSolicitation)
- b, err := ioutil.ReadAll(req.Body)
- if err != nil {
- http.Error(w, "read body failed", http.StatusBadRequest)
- return
- }
- if err := json.Unmarshal(b, request); err != nil {
- http.Error(w, "unmarshal data failed", http.StatusBadRequest)
- return
- }
- reply, err := rpc.IP6ndSendRouterSolicitation(req.Context(), request)
- if err != nil {
- http.Error(w, "request failed: "+err.Error(), http.StatusInternalServerError)
- return
- }
- rep, err := json.MarshalIndent(reply, "", " ")
- if err != nil {
- http.Error(w, "marshal failed: "+err.Error(), http.StatusInternalServerError)
- return
- }
- w.Write(rep)
- })
- mux.HandleFunc("/sw_interface_ip6nd_ra_config", func(w http.ResponseWriter, req *http.Request) {
- var request = new(SwInterfaceIP6ndRaConfig)
- b, err := ioutil.ReadAll(req.Body)
- if err != nil {
- http.Error(w, "read body failed", http.StatusBadRequest)
- return
- }
- if err := json.Unmarshal(b, request); err != nil {
- http.Error(w, "unmarshal data failed", http.StatusBadRequest)
- return
- }
- reply, err := rpc.SwInterfaceIP6ndRaConfig(req.Context(), request)
- if err != nil {
- http.Error(w, "request failed: "+err.Error(), http.StatusInternalServerError)
- return
- }
- rep, err := json.MarshalIndent(reply, "", " ")
- if err != nil {
- http.Error(w, "marshal failed: "+err.Error(), http.StatusInternalServerError)
- return
- }
- w.Write(rep)
- })
- mux.HandleFunc("/sw_interface_ip6nd_ra_prefix", func(w http.ResponseWriter, req *http.Request) {
- var request = new(SwInterfaceIP6ndRaPrefix)
- b, err := ioutil.ReadAll(req.Body)
- if err != nil {
- http.Error(w, "read body failed", http.StatusBadRequest)
- return
- }
- if err := json.Unmarshal(b, request); err != nil {
- http.Error(w, "unmarshal data failed", http.StatusBadRequest)
- return
- }
- reply, err := rpc.SwInterfaceIP6ndRaPrefix(req.Context(), request)
- if err != nil {
- http.Error(w, "request failed: "+err.Error(), http.StatusInternalServerError)
- return
- }
- rep, err := json.MarshalIndent(reply, "", " ")
- if err != nil {
- http.Error(w, "marshal failed: "+err.Error(), http.StatusInternalServerError)
- return
- }
- w.Write(rep)
- })
- mux.HandleFunc("/want_ip6_ra_events", func(w http.ResponseWriter, req *http.Request) {
- var request = new(WantIP6RaEvents)
- b, err := ioutil.ReadAll(req.Body)
- if err != nil {
- http.Error(w, "read body failed", http.StatusBadRequest)
- return
- }
- if err := json.Unmarshal(b, request); err != nil {
- http.Error(w, "unmarshal data failed", http.StatusBadRequest)
- return
- }
- reply, err := rpc.WantIP6RaEvents(req.Context(), request)
- if err != nil {
- http.Error(w, "request failed: "+err.Error(), http.StatusInternalServerError)
- return
- }
- rep, err := json.MarshalIndent(reply, "", " ")
- if err != nil {
- http.Error(w, "marshal failed: "+err.Error(), http.StatusInternalServerError)
- return
- }
- w.Write(rep)
- })
- return http.HandlerFunc(mux.ServeHTTP)
-}
diff --git a/binapi/ip6_nd/ip6_nd_rpc.ba.go b/binapi/ip6_nd/ip6_nd_rpc.ba.go
index 49e75cc..24e345f 100644
--- a/binapi/ip6_nd/ip6_nd_rpc.ba.go
+++ b/binapi/ip6_nd/ip6_nd_rpc.ba.go
@@ -11,7 +11,7 @@ import (
vpe "git.fd.io/govpp.git/binapi/vpe"
)
-// RPCService defines RPC service ip6_nd.
+// RPCService defines RPC service ip6_nd.
type RPCService interface {
IP6ndProxyAddDel(ctx context.Context, in *IP6ndProxyAddDel) (*IP6ndProxyAddDelReply, error)
IP6ndProxyDump(ctx context.Context, in *IP6ndProxyDump) (RPCService_IP6ndProxyDumpClient, error)
@@ -35,7 +35,7 @@ func (c *serviceClient) IP6ndProxyAddDel(ctx context.Context, in *IP6ndProxyAddD
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) IP6ndProxyDump(ctx context.Context, in *IP6ndProxyDump) (RPCService_IP6ndProxyDumpClient, error) {
@@ -83,7 +83,7 @@ func (c *serviceClient) IP6ndSendRouterSolicitation(ctx context.Context, in *IP6
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) SwInterfaceIP6ndRaConfig(ctx context.Context, in *SwInterfaceIP6ndRaConfig) (*SwInterfaceIP6ndRaConfigReply, error) {
@@ -92,7 +92,7 @@ func (c *serviceClient) SwInterfaceIP6ndRaConfig(ctx context.Context, in *SwInte
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) SwInterfaceIP6ndRaPrefix(ctx context.Context, in *SwInterfaceIP6ndRaPrefix) (*SwInterfaceIP6ndRaPrefixReply, error) {
@@ -101,7 +101,7 @@ func (c *serviceClient) SwInterfaceIP6ndRaPrefix(ctx context.Context, in *SwInte
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) WantIP6RaEvents(ctx context.Context, in *WantIP6RaEvents) (*WantIP6RaEventsReply, error) {
@@ -110,5 +110,5 @@ func (c *serviceClient) WantIP6RaEvents(ctx context.Context, in *WantIP6RaEvents
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}