aboutsummaryrefslogtreecommitdiffstats
path: root/binapi/ioam_vxlan_gpe
diff options
context:
space:
mode:
Diffstat (limited to 'binapi/ioam_vxlan_gpe')
-rw-r--r--binapi/ioam_vxlan_gpe/ioam_vxlan_gpe.ba.go4
-rw-r--r--binapi/ioam_vxlan_gpe/ioam_vxlan_gpe_rest.ba.go152
-rw-r--r--binapi/ioam_vxlan_gpe/ioam_vxlan_gpe_rpc.ba.go14
3 files changed, 9 insertions, 161 deletions
diff --git a/binapi/ioam_vxlan_gpe/ioam_vxlan_gpe.ba.go b/binapi/ioam_vxlan_gpe/ioam_vxlan_gpe.ba.go
index 7d1bb35..226071f 100644
--- a/binapi/ioam_vxlan_gpe/ioam_vxlan_gpe.ba.go
+++ b/binapi/ioam_vxlan_gpe/ioam_vxlan_gpe.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/plugins/ioam_vxlan_gpe.api.json
// Package ioam_vxlan_gpe contains generated bindings for API file ioam_vxlan_gpe.api.
diff --git a/binapi/ioam_vxlan_gpe/ioam_vxlan_gpe_rest.ba.go b/binapi/ioam_vxlan_gpe/ioam_vxlan_gpe_rest.ba.go
deleted file mode 100644
index bc34d36..0000000
--- a/binapi/ioam_vxlan_gpe/ioam_vxlan_gpe_rest.ba.go
+++ /dev/null
@@ -1,152 +0,0 @@
-// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
-
-package ioam_vxlan_gpe
-
-import (
- "encoding/json"
- "io/ioutil"
- "net/http"
-)
-
-func RESTHandler(rpc RPCService) http.Handler {
- mux := http.NewServeMux()
- mux.HandleFunc("/vxlan_gpe_ioam_disable", func(w http.ResponseWriter, req *http.Request) {
- var request = new(VxlanGpeIoamDisable)
- 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.VxlanGpeIoamDisable(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("/vxlan_gpe_ioam_enable", func(w http.ResponseWriter, req *http.Request) {
- var request = new(VxlanGpeIoamEnable)
- 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.VxlanGpeIoamEnable(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("/vxlan_gpe_ioam_transit_disable", func(w http.ResponseWriter, req *http.Request) {
- var request = new(VxlanGpeIoamTransitDisable)
- 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.VxlanGpeIoamTransitDisable(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("/vxlan_gpe_ioam_transit_enable", func(w http.ResponseWriter, req *http.Request) {
- var request = new(VxlanGpeIoamTransitEnable)
- 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.VxlanGpeIoamTransitEnable(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("/vxlan_gpe_ioam_vni_disable", func(w http.ResponseWriter, req *http.Request) {
- var request = new(VxlanGpeIoamVniDisable)
- 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.VxlanGpeIoamVniDisable(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("/vxlan_gpe_ioam_vni_enable", func(w http.ResponseWriter, req *http.Request) {
- var request = new(VxlanGpeIoamVniEnable)
- 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.VxlanGpeIoamVniEnable(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/ioam_vxlan_gpe/ioam_vxlan_gpe_rpc.ba.go b/binapi/ioam_vxlan_gpe/ioam_vxlan_gpe_rpc.ba.go
index eca5d4c..19bdbb2 100644
--- a/binapi/ioam_vxlan_gpe/ioam_vxlan_gpe_rpc.ba.go
+++ b/binapi/ioam_vxlan_gpe/ioam_vxlan_gpe_rpc.ba.go
@@ -8,7 +8,7 @@ import (
api "git.fd.io/govpp.git/api"
)
-// RPCService defines RPC service ioam_vxlan_gpe.
+// RPCService defines RPC service ioam_vxlan_gpe.
type RPCService interface {
VxlanGpeIoamDisable(ctx context.Context, in *VxlanGpeIoamDisable) (*VxlanGpeIoamDisableReply, error)
VxlanGpeIoamEnable(ctx context.Context, in *VxlanGpeIoamEnable) (*VxlanGpeIoamEnableReply, error)
@@ -32,7 +32,7 @@ func (c *serviceClient) VxlanGpeIoamDisable(ctx context.Context, in *VxlanGpeIoa
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) VxlanGpeIoamEnable(ctx context.Context, in *VxlanGpeIoamEnable) (*VxlanGpeIoamEnableReply, error) {
@@ -41,7 +41,7 @@ func (c *serviceClient) VxlanGpeIoamEnable(ctx context.Context, in *VxlanGpeIoam
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) VxlanGpeIoamTransitDisable(ctx context.Context, in *VxlanGpeIoamTransitDisable) (*VxlanGpeIoamTransitDisableReply, error) {
@@ -50,7 +50,7 @@ func (c *serviceClient) VxlanGpeIoamTransitDisable(ctx context.Context, in *Vxla
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) VxlanGpeIoamTransitEnable(ctx context.Context, in *VxlanGpeIoamTransitEnable) (*VxlanGpeIoamTransitEnableReply, error) {
@@ -59,7 +59,7 @@ func (c *serviceClient) VxlanGpeIoamTransitEnable(ctx context.Context, in *Vxlan
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) VxlanGpeIoamVniDisable(ctx context.Context, in *VxlanGpeIoamVniDisable) (*VxlanGpeIoamVniDisableReply, error) {
@@ -68,7 +68,7 @@ func (c *serviceClient) VxlanGpeIoamVniDisable(ctx context.Context, in *VxlanGpe
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) VxlanGpeIoamVniEnable(ctx context.Context, in *VxlanGpeIoamVniEnable) (*VxlanGpeIoamVniEnableReply, error) {
@@ -77,5 +77,5 @@ func (c *serviceClient) VxlanGpeIoamVniEnable(ctx context.Context, in *VxlanGpeI
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}