aboutsummaryrefslogtreecommitdiffstats
path: root/resources/libraries/python/PapiExecutor.py
diff options
context:
space:
mode:
authorTibor Frank <tifrank@cisco.com>2019-03-07 09:27:46 +0100
committerTibor Frank <tifrank@cisco.com>2019-03-07 09:30:32 +0100
commit86af0b9a49b5513e328359241a11a1ca44075bc5 (patch)
tree6fd0b93444772ea75ae1c879810780aee88dd21f /resources/libraries/python/PapiExecutor.py
parent4096508ece27f9576d5aab3ed06acfb93925e2d4 (diff)
Papi: Rename methods argument
The argument name 'csit_papi_command' must be unique enough as it cannot be repeated in kwargs. - PapiExecutor.add(self, csit_papi_command, **kwargs) - PapiHistory.add_to_papi_history(node, csit_papi_command, papi=True, **kwargs) Change-Id: I243a20d6f03befb149891c37a88e0e6359ea2940 Signed-off-by: Tibor Frank <tifrank@cisco.com>
Diffstat (limited to 'resources/libraries/python/PapiExecutor.py')
-rw-r--r--resources/libraries/python/PapiExecutor.py14
1 files changed, 9 insertions, 5 deletions
diff --git a/resources/libraries/python/PapiExecutor.py b/resources/libraries/python/PapiExecutor.py
index 928144e058..a51cb76654 100644
--- a/resources/libraries/python/PapiExecutor.py
+++ b/resources/libraries/python/PapiExecutor.py
@@ -136,18 +136,22 @@ class PapiExecutor(object):
self._api_command_list = list()
return self
- def add(self, command, **kwargs):
+ def add(self, csit_papi_command, **kwargs):
"""Add next command to internal command list; return self.
- :param command: VPP API command.
+ The argument name 'csit_papi_command' must be unique enough as it cannot
+ be repeated in kwargs.
+
+ :param csit_papi_command: VPP API command.
:param kwargs: Optional key-value arguments.
- :type command: str
+ :type csit_papi_command: str
:type kwargs: dict
:returns: self, so that method chaining is possible.
:rtype: PapiExecutor
"""
- PapiHistory.add_to_papi_history(self._node, command, **kwargs)
- self._api_command_list.append(dict(api_name=command, api_args=kwargs))
+ PapiHistory.add_to_papi_history(self._node, csit_papi_command, **kwargs)
+ self._api_command_list.append(dict(api_name=csit_papi_command,
+ api_args=kwargs))
return self
def execute(self, process_reply=True, ignore_errors=False, timeout=120):