- logger.debug("Executing command in VAT terminal: {}".format(cmd))
- out = self._ssh.interactive_terminal_exec_command(self._tty,
- cmd,
- self.__VAT_PROMPT)
- logger.debug("VAT output: {}".format(out))
+ PapiHistory.add_to_papi_history(self._node, cmd, papi=False)
+ logger.debug("Executing command in VAT terminal: {0}".format(cmd))
+ try:
+ out = self._ssh.interactive_terminal_exec_command(self._tty, cmd,
+ self.__VAT_PROMPT)
+ self.vat_stdout = out
+ except Exception:
+ self._exec_failure = True
+ vpp_pid = get_vpp_pid(self._node)
+ if vpp_pid:
+ if isinstance(vpp_pid, int):
+ raise RuntimeError("VPP running on node {0} but VAT command"
+ " {1} execution failed.".
+ format(self._node['host'], cmd))
+ else:
+ raise RuntimeError("More instances of VPP running on node "
+ "{0}. VAT command {1} execution failed.".
+ format(self._node['host'], cmd))
+ raise RuntimeError("VPP not running on node {0}. VAT command "
+ "{1} execution failed.".
+ format(self._node['host'], cmd))
+
+ logger.debug("VAT output: {0}".format(out))