X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=resources%2Flibraries%2Fpython%2FPapiExecutor.py;h=1971e62d9582bd7aade379800c84d2400b229dc3;hb=refs%2Fchanges%2F03%2F18203%2F9;hp=928144e058a784e476f58aa3fbf943e6b1540693;hpb=2251c68ea3d862b08df030231a1ddf618a2cec2b;p=csit.git diff --git a/resources/libraries/python/PapiExecutor.py b/resources/libraries/python/PapiExecutor.py index 928144e058..1971e62d95 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): @@ -337,7 +341,7 @@ class PapiExecutor(object): api_data_processed = self._process_api_data(api_data) json_data = json.dumps(api_data_processed) - cmd = "python {fw_dir}/{papi_provider} --json_data '{json}'".format( + cmd = "{fw_dir}/{papi_provider} --json_data '{json}'".format( fw_dir=Constants.REMOTE_FW_DIR, papi_provider=Constants.RESOURCES_PAPI_PROVIDER, json=json_data)