Update generated binapi to v22.02 & makefile changes
[govpp.git] / internal / testbinapi / binapi2001 / qos / qos_rpc.ba.go
index ed5909c..2334c62 100644 (file)
@@ -5,12 +5,13 @@ package qos
 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  qos.
+// RPCService defines RPC service qos.
 type RPCService interface {
        QosEgressMapDelete(ctx context.Context, in *QosEgressMapDelete) (*QosEgressMapDeleteReply, error)
        QosEgressMapDump(ctx context.Context, in *QosEgressMapDump) (RPCService_QosEgressMapDumpClient, error)
@@ -37,7 +38,7 @@ func (c *serviceClient) QosEgressMapDelete(ctx context.Context, in *QosEgressMap
        if err != nil {
                return nil, err
        }
-       return out, nil
+       return out, api.RetvalToVPPApiError(out.Retval)
 }
 
 func (c *serviceClient) QosEgressMapDump(ctx context.Context, in *QosEgressMapDump) (RPCService_QosEgressMapDumpClient, error) {
@@ -73,6 +74,10 @@ func (c *serviceClient_QosEgressMapDumpClient) Recv() (*QosEgressMapDetails, err
        case *QosEgressMapDetails:
                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)
@@ -85,7 +90,7 @@ func (c *serviceClient) QosEgressMapUpdate(ctx context.Context, in *QosEgressMap
        if err != nil {
                return nil, err
        }
-       return out, nil
+       return out, api.RetvalToVPPApiError(out.Retval)
 }
 
 func (c *serviceClient) QosMarkDump(ctx context.Context, in *QosMarkDump) (RPCService_QosMarkDumpClient, error) {
@@ -121,6 +126,10 @@ func (c *serviceClient_QosMarkDumpClient) Recv() (*QosMarkDetails, error) {
        case *QosMarkDetails:
                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)
@@ -133,7 +142,7 @@ func (c *serviceClient) QosMarkEnableDisable(ctx context.Context, in *QosMarkEna
        if err != nil {
                return nil, err
        }
-       return out, nil
+       return out, api.RetvalToVPPApiError(out.Retval)
 }
 
 func (c *serviceClient) QosRecordDump(ctx context.Context, in *QosRecordDump) (RPCService_QosRecordDumpClient, error) {
@@ -169,6 +178,10 @@ func (c *serviceClient_QosRecordDumpClient) Recv() (*QosRecordDetails, error) {
        case *QosRecordDetails:
                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)
@@ -181,7 +194,7 @@ func (c *serviceClient) QosRecordEnableDisable(ctx context.Context, in *QosRecor
        if err != nil {
                return nil, err
        }
-       return out, nil
+       return out, api.RetvalToVPPApiError(out.Retval)
 }
 
 func (c *serviceClient) QosStoreDump(ctx context.Context, in *QosStoreDump) (RPCService_QosStoreDumpClient, error) {
@@ -217,6 +230,10 @@ func (c *serviceClient_QosStoreDumpClient) Recv() (*QosStoreDetails, error) {
        case *QosStoreDetails:
                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)
@@ -229,5 +246,5 @@ func (c *serviceClient) QosStoreEnableDisable(ctx context.Context, in *QosStoreE
        if err != nil {
                return nil, err
        }
-       return out, nil
+       return out, api.RetvalToVPPApiError(out.Retval)
 }