X-Git-Url: https://gerrit.fd.io/r/gitweb?p=govpp.git;a=blobdiff_plain;f=internal%2Ftestbinapi%2Fbinapi2001%2Flb%2Flb_rpc.ba.go;fp=internal%2Ftestbinapi%2Fbinapi2001%2Flb%2Flb_rpc.ba.go;h=43c0c4b29642105ce5ade47f3607b3a7bd3c5f03;hp=3375e9cd246c3868e34f0c6f98269d05d24d462c;hb=4102c72bce694babd94a481b1201d33895a6f9c5;hpb=a4112fac7b86fe09650d2bb57969fe46404edd7d diff --git a/internal/testbinapi/binapi2001/lb/lb_rpc.ba.go b/internal/testbinapi/binapi2001/lb/lb_rpc.ba.go index 3375e9c..43c0c4b 100644 --- a/internal/testbinapi/binapi2001/lb/lb_rpc.ba.go +++ b/internal/testbinapi/binapi2001/lb/lb_rpc.ba.go @@ -5,12 +5,13 @@ package lb 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 lb. +// RPCService defines RPC service lb. type RPCService interface { LbAddDelAs(ctx context.Context, in *LbAddDelAs) (*LbAddDelAsReply, error) LbAddDelIntfNat4(ctx context.Context, in *LbAddDelIntfNat4) (*LbAddDelIntfNat4Reply, error) @@ -36,7 +37,7 @@ func (c *serviceClient) LbAddDelAs(ctx context.Context, in *LbAddDelAs) (*LbAddD if err != nil { return nil, err } - return out, nil + return out, api.RetvalToVPPApiError(out.Retval) } func (c *serviceClient) LbAddDelIntfNat4(ctx context.Context, in *LbAddDelIntfNat4) (*LbAddDelIntfNat4Reply, error) { @@ -45,7 +46,7 @@ func (c *serviceClient) LbAddDelIntfNat4(ctx context.Context, in *LbAddDelIntfNa if err != nil { return nil, err } - return out, nil + return out, api.RetvalToVPPApiError(out.Retval) } func (c *serviceClient) LbAddDelIntfNat6(ctx context.Context, in *LbAddDelIntfNat6) (*LbAddDelIntfNat6Reply, error) { @@ -54,7 +55,7 @@ func (c *serviceClient) LbAddDelIntfNat6(ctx context.Context, in *LbAddDelIntfNa if err != nil { return nil, err } - return out, nil + return out, api.RetvalToVPPApiError(out.Retval) } func (c *serviceClient) LbAddDelVip(ctx context.Context, in *LbAddDelVip) (*LbAddDelVipReply, error) { @@ -63,7 +64,7 @@ func (c *serviceClient) LbAddDelVip(ctx context.Context, in *LbAddDelVip) (*LbAd if err != nil { return nil, err } - return out, nil + return out, api.RetvalToVPPApiError(out.Retval) } func (c *serviceClient) LbAsDump(ctx context.Context, in *LbAsDump) (RPCService_LbAsDumpClient, error) { @@ -99,6 +100,10 @@ func (c *serviceClient_LbAsDumpClient) Recv() (*LbAsDetails, error) { case *LbAsDetails: 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) @@ -111,7 +116,7 @@ func (c *serviceClient) LbConf(ctx context.Context, in *LbConf) (*LbConfReply, e if err != nil { return nil, err } - return out, nil + return out, api.RetvalToVPPApiError(out.Retval) } func (c *serviceClient) LbFlushVip(ctx context.Context, in *LbFlushVip) (*LbFlushVipReply, error) { @@ -120,7 +125,7 @@ func (c *serviceClient) LbFlushVip(ctx context.Context, in *LbFlushVip) (*LbFlus if err != nil { return nil, err } - return out, nil + return out, api.RetvalToVPPApiError(out.Retval) } func (c *serviceClient) LbVipDump(ctx context.Context, in *LbVipDump) (RPCService_LbVipDumpClient, error) { @@ -156,6 +161,10 @@ func (c *serviceClient_LbVipDumpClient) Recv() (*LbVipDetails, error) { case *LbVipDetails: 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)