From 4102c72bce694babd94a481b1201d33895a6f9c5 Mon Sep 17 00:00:00 2001 From: Nathan Skrzypczak Date: Wed, 27 Apr 2022 18:39:03 +0200 Subject: 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 Change-Id: Ie5cd2d5ded7ecaffd9abc3ca675df40be272b1fa --- internal/testbinapi/binapi2001/lisp/lisp_rpc.ba.go | 79 +++++++++++++++------- 1 file changed, 54 insertions(+), 25 deletions(-) (limited to 'internal/testbinapi/binapi2001/lisp/lisp_rpc.ba.go') diff --git a/internal/testbinapi/binapi2001/lisp/lisp_rpc.ba.go b/internal/testbinapi/binapi2001/lisp/lisp_rpc.ba.go index a8fbddd..5c9c632 100644 --- a/internal/testbinapi/binapi2001/lisp/lisp_rpc.ba.go +++ b/internal/testbinapi/binapi2001/lisp/lisp_rpc.ba.go @@ -5,12 +5,13 @@ package lisp 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 lisp. +// RPCService defines RPC service lisp. type RPCService interface { LispAddDelAdjacency(ctx context.Context, in *LispAddDelAdjacency) (*LispAddDelAdjacencyReply, error) LispAddDelLocalEid(ctx context.Context, in *LispAddDelLocalEid) (*LispAddDelLocalEidReply, error) @@ -58,7 +59,7 @@ func (c *serviceClient) LispAddDelAdjacency(ctx context.Context, in *LispAddDelA if err != nil { return nil, err } - return out, nil + return out, api.RetvalToVPPApiError(out.Retval) } func (c *serviceClient) LispAddDelLocalEid(ctx context.Context, in *LispAddDelLocalEid) (*LispAddDelLocalEidReply, error) { @@ -67,7 +68,7 @@ func (c *serviceClient) LispAddDelLocalEid(ctx context.Context, in *LispAddDelLo if err != nil { return nil, err } - return out, nil + return out, api.RetvalToVPPApiError(out.Retval) } func (c *serviceClient) LispAddDelLocator(ctx context.Context, in *LispAddDelLocator) (*LispAddDelLocatorReply, error) { @@ -76,7 +77,7 @@ func (c *serviceClient) LispAddDelLocator(ctx context.Context, in *LispAddDelLoc if err != nil { return nil, err } - return out, nil + return out, api.RetvalToVPPApiError(out.Retval) } func (c *serviceClient) LispAddDelLocatorSet(ctx context.Context, in *LispAddDelLocatorSet) (*LispAddDelLocatorSetReply, error) { @@ -85,7 +86,7 @@ func (c *serviceClient) LispAddDelLocatorSet(ctx context.Context, in *LispAddDel if err != nil { return nil, err } - return out, nil + return out, api.RetvalToVPPApiError(out.Retval) } func (c *serviceClient) LispAddDelMapRequestItrRlocs(ctx context.Context, in *LispAddDelMapRequestItrRlocs) (*LispAddDelMapRequestItrRlocsReply, error) { @@ -94,7 +95,7 @@ func (c *serviceClient) LispAddDelMapRequestItrRlocs(ctx context.Context, in *Li if err != nil { return nil, err } - return out, nil + return out, api.RetvalToVPPApiError(out.Retval) } func (c *serviceClient) LispAddDelMapResolver(ctx context.Context, in *LispAddDelMapResolver) (*LispAddDelMapResolverReply, error) { @@ -103,7 +104,7 @@ func (c *serviceClient) LispAddDelMapResolver(ctx context.Context, in *LispAddDe if err != nil { return nil, err } - return out, nil + return out, api.RetvalToVPPApiError(out.Retval) } func (c *serviceClient) LispAddDelMapServer(ctx context.Context, in *LispAddDelMapServer) (*LispAddDelMapServerReply, error) { @@ -112,7 +113,7 @@ func (c *serviceClient) LispAddDelMapServer(ctx context.Context, in *LispAddDelM if err != nil { return nil, err } - return out, nil + return out, api.RetvalToVPPApiError(out.Retval) } func (c *serviceClient) LispAddDelRemoteMapping(ctx context.Context, in *LispAddDelRemoteMapping) (*LispAddDelRemoteMappingReply, error) { @@ -121,7 +122,7 @@ func (c *serviceClient) LispAddDelRemoteMapping(ctx context.Context, in *LispAdd if err != nil { return nil, err } - return out, nil + return out, api.RetvalToVPPApiError(out.Retval) } func (c *serviceClient) LispAdjacenciesGet(ctx context.Context, in *LispAdjacenciesGet) (*LispAdjacenciesGetReply, error) { @@ -130,7 +131,7 @@ func (c *serviceClient) LispAdjacenciesGet(ctx context.Context, in *LispAdjacenc if err != nil { return nil, err } - return out, nil + return out, api.RetvalToVPPApiError(out.Retval) } func (c *serviceClient) LispEidTableAddDelMap(ctx context.Context, in *LispEidTableAddDelMap) (*LispEidTableAddDelMapReply, error) { @@ -139,7 +140,7 @@ func (c *serviceClient) LispEidTableAddDelMap(ctx context.Context, in *LispEidTa if err != nil { return nil, err } - return out, nil + return out, api.RetvalToVPPApiError(out.Retval) } func (c *serviceClient) LispEidTableDump(ctx context.Context, in *LispEidTableDump) (RPCService_LispEidTableDumpClient, error) { @@ -175,6 +176,10 @@ func (c *serviceClient_LispEidTableDumpClient) Recv() (*LispEidTableDetails, err case *LispEidTableDetails: 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) @@ -214,6 +219,10 @@ func (c *serviceClient_LispEidTableMapDumpClient) Recv() (*LispEidTableMapDetail case *LispEidTableMapDetails: 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) @@ -253,6 +262,10 @@ func (c *serviceClient_LispEidTableVniDumpClient) Recv() (*LispEidTableVniDetail case *LispEidTableVniDetails: 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) @@ -265,7 +278,7 @@ func (c *serviceClient) LispEnableDisable(ctx context.Context, in *LispEnableDis if err != nil { return nil, err } - return out, nil + return out, api.RetvalToVPPApiError(out.Retval) } func (c *serviceClient) LispGetMapRequestItrRlocs(ctx context.Context, in *LispGetMapRequestItrRlocs) (*LispGetMapRequestItrRlocsReply, error) { @@ -274,7 +287,7 @@ func (c *serviceClient) LispGetMapRequestItrRlocs(ctx context.Context, in *LispG if err != nil { return nil, err } - return out, nil + return out, api.RetvalToVPPApiError(out.Retval) } func (c *serviceClient) LispLocatorDump(ctx context.Context, in *LispLocatorDump) (RPCService_LispLocatorDumpClient, error) { @@ -310,6 +323,10 @@ func (c *serviceClient_LispLocatorDumpClient) Recv() (*LispLocatorDetails, error case *LispLocatorDetails: 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) @@ -349,6 +366,10 @@ func (c *serviceClient_LispLocatorSetDumpClient) Recv() (*LispLocatorSetDetails, case *LispLocatorSetDetails: 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) @@ -361,7 +382,7 @@ func (c *serviceClient) LispMapRegisterEnableDisable(ctx context.Context, in *Li if err != nil { return nil, err } - return out, nil + return out, api.RetvalToVPPApiError(out.Retval) } func (c *serviceClient) LispMapRequestMode(ctx context.Context, in *LispMapRequestMode) (*LispMapRequestModeReply, error) { @@ -370,7 +391,7 @@ func (c *serviceClient) LispMapRequestMode(ctx context.Context, in *LispMapReque if err != nil { return nil, err } - return out, nil + return out, api.RetvalToVPPApiError(out.Retval) } func (c *serviceClient) LispMapResolverDump(ctx context.Context, in *LispMapResolverDump) (RPCService_LispMapResolverDumpClient, error) { @@ -406,6 +427,10 @@ func (c *serviceClient_LispMapResolverDumpClient) Recv() (*LispMapResolverDetail case *LispMapResolverDetails: 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) @@ -445,6 +470,10 @@ func (c *serviceClient_LispMapServerDumpClient) Recv() (*LispMapServerDetails, e case *LispMapServerDetails: 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) @@ -457,7 +486,7 @@ func (c *serviceClient) LispPitrSetLocatorSet(ctx context.Context, in *LispPitrS if err != nil { return nil, err } - return out, nil + return out, api.RetvalToVPPApiError(out.Retval) } func (c *serviceClient) LispRlocProbeEnableDisable(ctx context.Context, in *LispRlocProbeEnableDisable) (*LispRlocProbeEnableDisableReply, error) { @@ -466,7 +495,7 @@ func (c *serviceClient) LispRlocProbeEnableDisable(ctx context.Context, in *Lisp if err != nil { return nil, err } - return out, nil + return out, api.RetvalToVPPApiError(out.Retval) } func (c *serviceClient) LispUsePetr(ctx context.Context, in *LispUsePetr) (*LispUsePetrReply, error) { @@ -475,7 +504,7 @@ func (c *serviceClient) LispUsePetr(ctx context.Context, in *LispUsePetr) (*Lisp if err != nil { return nil, err } - return out, nil + return out, api.RetvalToVPPApiError(out.Retval) } func (c *serviceClient) ShowLispMapRegisterState(ctx context.Context, in *ShowLispMapRegisterState) (*ShowLispMapRegisterStateReply, error) { @@ -484,7 +513,7 @@ func (c *serviceClient) ShowLispMapRegisterState(ctx context.Context, in *ShowLi if err != nil { return nil, err } - return out, nil + return out, api.RetvalToVPPApiError(out.Retval) } func (c *serviceClient) ShowLispMapRequestMode(ctx context.Context, in *ShowLispMapRequestMode) (*ShowLispMapRequestModeReply, error) { @@ -493,7 +522,7 @@ func (c *serviceClient) ShowLispMapRequestMode(ctx context.Context, in *ShowLisp if err != nil { return nil, err } - return out, nil + return out, api.RetvalToVPPApiError(out.Retval) } func (c *serviceClient) ShowLispPitr(ctx context.Context, in *ShowLispPitr) (*ShowLispPitrReply, error) { @@ -502,7 +531,7 @@ func (c *serviceClient) ShowLispPitr(ctx context.Context, in *ShowLispPitr) (*Sh if err != nil { return nil, err } - return out, nil + return out, api.RetvalToVPPApiError(out.Retval) } func (c *serviceClient) ShowLispRlocProbeState(ctx context.Context, in *ShowLispRlocProbeState) (*ShowLispRlocProbeStateReply, error) { @@ -511,7 +540,7 @@ func (c *serviceClient) ShowLispRlocProbeState(ctx context.Context, in *ShowLisp if err != nil { return nil, err } - return out, nil + return out, api.RetvalToVPPApiError(out.Retval) } func (c *serviceClient) ShowLispStatus(ctx context.Context, in *ShowLispStatus) (*ShowLispStatusReply, error) { @@ -520,7 +549,7 @@ func (c *serviceClient) ShowLispStatus(ctx context.Context, in *ShowLispStatus) if err != nil { return nil, err } - return out, nil + return out, api.RetvalToVPPApiError(out.Retval) } func (c *serviceClient) ShowLispUsePetr(ctx context.Context, in *ShowLispUsePetr) (*ShowLispUsePetrReply, error) { @@ -529,5 +558,5 @@ func (c *serviceClient) ShowLispUsePetr(ctx context.Context, in *ShowLispUsePetr if err != nil { return nil, err } - return out, nil + return out, api.RetvalToVPPApiError(out.Retval) } -- cgit 1.2.3-korg