summaryrefslogtreecommitdiffstats
path: root/internal/testbinapi/binapi2001/bfd/bfd_rpc.ba.go
diff options
context:
space:
mode:
authorNathan Skrzypczak <nathan.skrzypczak@gmail.com>2022-04-27 18:39:03 +0200
committerNathan Skrzypczak <nathan.skrzypczak@gmail.com>2022-05-30 18:49:13 +0200
commit4102c72bce694babd94a481b1201d33895a6f9c5 (patch)
tree1b11238ca4706008c88712f26942dd74ab9c14a6 /internal/testbinapi/binapi2001/bfd/bfd_rpc.ba.go
parenta4112fac7b86fe09650d2bb57969fe46404edd7d (diff)
Update generated binapi to v22.02 & makefile changes
This patch does some small updates to the Makefile. * `make gen-binapi-from-code` is removed, and moves to `gen-binapi-local` * `make build` is patched to build cmd & examples * `make binapi-generator` to build the api-generator without other binaries, as they typically require its output to build. * `make gen-binapi-local` runs the locally built binapi-generator to update the local bindings. It expects ${VPP_DIR} to be set and to point to a local vpp repository checked out with the right version * `make gen-binapi-internal` runs the locally built binapi-generator to update the bindings in `internal/testbinapi/binapi2001` Regarding VPP, notable changes when moving to v22.02 are : - ControlPing moved from vpe to memclnt - CliInband went from vpe to vlib Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com> Change-Id: Ie5cd2d5ded7ecaffd9abc3ca675df40be272b1fa
Diffstat (limited to 'internal/testbinapi/binapi2001/bfd/bfd_rpc.ba.go')
-rw-r--r--internal/testbinapi/binapi2001/bfd/bfd_rpc.ba.go37
1 files changed, 23 insertions, 14 deletions
diff --git a/internal/testbinapi/binapi2001/bfd/bfd_rpc.ba.go b/internal/testbinapi/binapi2001/bfd/bfd_rpc.ba.go
index 214b2a3..a9a9472 100644
--- a/internal/testbinapi/binapi2001/bfd/bfd_rpc.ba.go
+++ b/internal/testbinapi/binapi2001/bfd/bfd_rpc.ba.go
@@ -5,12 +5,13 @@ package bfd
import (
"context"
"fmt"
+ "io"
+
api "git.fd.io/govpp.git/api"
vpe "git.fd.io/govpp.git/internal/testbinapi/binapi2001/vpe"
- "io"
)
-// RPCService defines RPC service bfd.
+// RPCService defines RPC service bfd.
type RPCService interface {
BfdAuthDelKey(ctx context.Context, in *BfdAuthDelKey) (*BfdAuthDelKeyReply, error)
BfdAuthKeysDump(ctx context.Context, in *BfdAuthKeysDump) (RPCService_BfdAuthKeysDumpClient, error)
@@ -42,7 +43,7 @@ func (c *serviceClient) BfdAuthDelKey(ctx context.Context, in *BfdAuthDelKey) (*
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) BfdAuthKeysDump(ctx context.Context, in *BfdAuthKeysDump) (RPCService_BfdAuthKeysDumpClient, error) {
@@ -78,6 +79,10 @@ func (c *serviceClient_BfdAuthKeysDumpClient) Recv() (*BfdAuthKeysDetails, error
case *BfdAuthKeysDetails:
return m, nil
case *vpe.ControlPingReply:
+ err = c.Stream.Close()
+ if err != nil {
+ return nil, err
+ }
return nil, io.EOF
default:
return nil, fmt.Errorf("unexpected message: %T %v", m, m)
@@ -90,7 +95,7 @@ func (c *serviceClient) BfdAuthSetKey(ctx context.Context, in *BfdAuthSetKey) (*
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) BfdUDPAdd(ctx context.Context, in *BfdUDPAdd) (*BfdUDPAddReply, error) {
@@ -99,7 +104,7 @@ func (c *serviceClient) BfdUDPAdd(ctx context.Context, in *BfdUDPAdd) (*BfdUDPAd
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) BfdUDPAuthActivate(ctx context.Context, in *BfdUDPAuthActivate) (*BfdUDPAuthActivateReply, error) {
@@ -108,7 +113,7 @@ func (c *serviceClient) BfdUDPAuthActivate(ctx context.Context, in *BfdUDPAuthAc
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) BfdUDPAuthDeactivate(ctx context.Context, in *BfdUDPAuthDeactivate) (*BfdUDPAuthDeactivateReply, error) {
@@ -117,7 +122,7 @@ func (c *serviceClient) BfdUDPAuthDeactivate(ctx context.Context, in *BfdUDPAuth
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) BfdUDPDel(ctx context.Context, in *BfdUDPDel) (*BfdUDPDelReply, error) {
@@ -126,7 +131,7 @@ func (c *serviceClient) BfdUDPDel(ctx context.Context, in *BfdUDPDel) (*BfdUDPDe
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) BfdUDPDelEchoSource(ctx context.Context, in *BfdUDPDelEchoSource) (*BfdUDPDelEchoSourceReply, error) {
@@ -135,7 +140,7 @@ func (c *serviceClient) BfdUDPDelEchoSource(ctx context.Context, in *BfdUDPDelEc
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) BfdUDPGetEchoSource(ctx context.Context, in *BfdUDPGetEchoSource) (*BfdUDPGetEchoSourceReply, error) {
@@ -144,7 +149,7 @@ func (c *serviceClient) BfdUDPGetEchoSource(ctx context.Context, in *BfdUDPGetEc
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) BfdUDPMod(ctx context.Context, in *BfdUDPMod) (*BfdUDPModReply, error) {
@@ -153,7 +158,7 @@ func (c *serviceClient) BfdUDPMod(ctx context.Context, in *BfdUDPMod) (*BfdUDPMo
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) BfdUDPSessionDump(ctx context.Context, in *BfdUDPSessionDump) (RPCService_BfdUDPSessionDumpClient, error) {
@@ -189,6 +194,10 @@ func (c *serviceClient_BfdUDPSessionDumpClient) Recv() (*BfdUDPSessionDetails, e
case *BfdUDPSessionDetails:
return m, nil
case *vpe.ControlPingReply:
+ err = c.Stream.Close()
+ if err != nil {
+ return nil, err
+ }
return nil, io.EOF
default:
return nil, fmt.Errorf("unexpected message: %T %v", m, m)
@@ -201,7 +210,7 @@ func (c *serviceClient) BfdUDPSessionSetFlags(ctx context.Context, in *BfdUDPSes
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) BfdUDPSetEchoSource(ctx context.Context, in *BfdUDPSetEchoSource) (*BfdUDPSetEchoSourceReply, error) {
@@ -210,7 +219,7 @@ func (c *serviceClient) BfdUDPSetEchoSource(ctx context.Context, in *BfdUDPSetEc
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) WantBfdEvents(ctx context.Context, in *WantBfdEvents) (*WantBfdEventsReply, error) {
@@ -219,5 +228,5 @@ func (c *serviceClient) WantBfdEvents(ctx context.Context, in *WantBfdEvents) (*
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}