X-Git-Url: https://gerrit.fd.io/r/gitweb?p=govpp.git;a=blobdiff_plain;f=internal%2Ftestbinapi%2Fbinapi2001%2Fbond%2Fbond_rpc.ba.go;fp=internal%2Ftestbinapi%2Fbinapi2001%2Fbond%2Fbond_rpc.ba.go;h=d9625d9b12f7a7bc83fece8d4fe2a740a97f7a05;hp=e59e0b0c35f52c6f95da2683ea55e42124f45903;hb=4102c72bce694babd94a481b1201d33895a6f9c5;hpb=a4112fac7b86fe09650d2bb57969fe46404edd7d diff --git a/internal/testbinapi/binapi2001/bond/bond_rpc.ba.go b/internal/testbinapi/binapi2001/bond/bond_rpc.ba.go index e59e0b0..d9625d9 100644 --- a/internal/testbinapi/binapi2001/bond/bond_rpc.ba.go +++ b/internal/testbinapi/binapi2001/bond/bond_rpc.ba.go @@ -5,12 +5,13 @@ package bond 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 bond. +// RPCService defines RPC service bond. type RPCService interface { BondCreate(ctx context.Context, in *BondCreate) (*BondCreateReply, error) BondDelete(ctx context.Context, in *BondDelete) (*BondDeleteReply, error) @@ -35,7 +36,7 @@ func (c *serviceClient) BondCreate(ctx context.Context, in *BondCreate) (*BondCr if err != nil { return nil, err } - return out, nil + return out, api.RetvalToVPPApiError(out.Retval) } func (c *serviceClient) BondDelete(ctx context.Context, in *BondDelete) (*BondDeleteReply, error) { @@ -44,7 +45,7 @@ func (c *serviceClient) BondDelete(ctx context.Context, in *BondDelete) (*BondDe if err != nil { return nil, err } - return out, nil + return out, api.RetvalToVPPApiError(out.Retval) } func (c *serviceClient) BondDetachSlave(ctx context.Context, in *BondDetachSlave) (*BondDetachSlaveReply, error) { @@ -53,7 +54,7 @@ func (c *serviceClient) BondDetachSlave(ctx context.Context, in *BondDetachSlave if err != nil { return nil, err } - return out, nil + return out, api.RetvalToVPPApiError(out.Retval) } func (c *serviceClient) BondEnslave(ctx context.Context, in *BondEnslave) (*BondEnslaveReply, error) { @@ -62,7 +63,7 @@ func (c *serviceClient) BondEnslave(ctx context.Context, in *BondEnslave) (*Bond if err != nil { return nil, err } - return out, nil + return out, api.RetvalToVPPApiError(out.Retval) } func (c *serviceClient) SwInterfaceBondDump(ctx context.Context, in *SwInterfaceBondDump) (RPCService_SwInterfaceBondDumpClient, error) { @@ -98,6 +99,10 @@ func (c *serviceClient_SwInterfaceBondDumpClient) Recv() (*SwInterfaceBondDetail case *SwInterfaceBondDetails: 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) @@ -110,7 +115,7 @@ func (c *serviceClient) SwInterfaceSetBondWeight(ctx context.Context, in *SwInte if err != nil { return nil, err } - return out, nil + return out, api.RetvalToVPPApiError(out.Retval) } func (c *serviceClient) SwInterfaceSlaveDump(ctx context.Context, in *SwInterfaceSlaveDump) (RPCService_SwInterfaceSlaveDumpClient, error) { @@ -146,6 +151,10 @@ func (c *serviceClient_SwInterfaceSlaveDumpClient) Recv() (*SwInterfaceSlaveDeta case *SwInterfaceSlaveDetails: 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)