aboutsummaryrefslogtreecommitdiffstats
path: root/test/vpp_papi_provider.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/vpp_papi_provider.py')
-rw-r--r--test/vpp_papi_provider.py14
1 files changed, 12 insertions, 2 deletions
diff --git a/test/vpp_papi_provider.py b/test/vpp_papi_provider.py
index 10445de625c..5721b6b92ad 100644
--- a/test/vpp_papi_provider.py
+++ b/test/vpp_papi_provider.py
@@ -69,7 +69,8 @@ class VppPapiProvider(object):
return reply
def cli(self, cli):
- """Execute a CLI, calling the before/after hooks appropriately
+ """
+ Execute a CLI, calling the before/after hooks appropriately.
:param cli: CLI to execute
:returns: CLI output
@@ -79,9 +80,18 @@ class VppPapiProvider(object):
cli += '\n'
r = vpp_papi.cli_inband(len(cli), cli)
self.hook.after_cli(cli)
- if(hasattr(r, 'reply')):
+ if hasattr(r, 'reply'):
return r.reply[0].decode().rstrip('\x00')
+ def ppcli(self, cli):
+ """
+ Helping method to print CLI command in case of info logging level.
+
+ :param cli: CLI to execute
+ :returns: CLI output
+ """
+ return cli + "\n" + self.cli(cli)
+
def show_version(self):
""" """
return vpp_papi.show_version()