summaryrefslogtreecommitdiffstats
path: root/test/vpp_papi_provider.py
diff options
context:
space:
mode:
authorJan <jgelety@cisco.com>2016-10-26 15:44:27 +0200
committerDamjan Marion <dmarion.lists@gmail.com>2016-11-11 18:06:15 +0000
commit49c0fcabada485d4f0e4bf9e2d5e26b79bbcc645 (patch)
treeae72c84823e34a34b791736db1df9baf79a9127b /test/vpp_papi_provider.py
parentfa1456a38da80ee0a354ea14a65df7c3b10f605e (diff)
Add single-loop test variant to L2BD and L2XC tests
- create single-loop version of tests - update doc strings - add possibility to log CLI string for logging level "info" Change-Id: Ibc9e5650b8a33d2ed168a8440c2ae03227be60bb Signed-off-by: Jan <jgelety@cisco.com>
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()