gso: Add gso feature arc
[vpp.git] / test / vpp_papi_provider.py
index bc27352..d80f2ed 100644 (file)
@@ -334,17 +334,28 @@ class VppPapiProvider(object):
         self.hook.after_api(api_fn.__name__, api_args)
         return reply
 
-    def cli(self, cli):
+    def cli_return_response(self, cli):
         """ Execute a CLI, calling the before/after hooks appropriately.
+        Return the reply without examining it
 
         :param cli: CLI to execute
-        :returns: CLI output
+        :returns: response object
 
         """
         self.hook.before_cli(cli)
         cli += '\n'
         r = self.papi.cli_inband(cmd=cli)
         self.hook.after_cli(cli)
+        return r
+
+    def cli(self, cli):
+        """ Execute a CLI, calling the before/after hooks appropriately.
+
+        :param cli: CLI to execute
+        :returns: CLI output
+
+        """
+        r = self.cli_return_response(cli)
         if r.retval == -156:
             raise CliSyntaxError(r.reply)
         if r.retval != 0:
@@ -401,16 +412,6 @@ class VppPapiProvider(object):
                          'learn_limit': learn_limit,
                          'pid': os.getpid(), })
 
-    def ip6_add_del_address_using_prefix(self, sw_if_index, address,
-                                         prefix_length, prefix_group,
-                                         is_add=1):
-        return self.api(self.papi.ip6_add_del_address_using_prefix,
-                        {'sw_if_index': sw_if_index,
-                         'prefix_group': prefix_group,
-                         'address': address,
-                         'prefix_length': prefix_length,
-                         'is_add': is_add})
-
     def sw_interface_set_mac_address(self, sw_if_index, mac):
         return self.api(self.papi.sw_interface_set_mac_address,
                         {'sw_if_index': sw_if_index,
@@ -2049,3 +2050,10 @@ class VppPapiProvider(object):
                             'sw_if_index': sw_if_index,
                             'is_enable': is_enable,
                         })
+
+    def feature_gso_enable_disable(self, sw_if_index, enable_disable=1):
+        return self.api(self.papi.feature_gso_enable_disable,
+                        {
+                            'sw_if_index': sw_if_index,
+                            'enable_disable': enable_disable,
+                        })