Change AutoConnectSSH to return error code by default 07/60507/2
authorMytnyk, Volodymyr <volodymyrx.mytnyk@intel.com>
Thu, 2 Aug 2018 08:17:48 +0000 (09:17 +0100)
committerMytnyk, Volodymyr <volodymyrx.mytnyk@intel.com>
Thu, 2 Aug 2018 10:24:36 +0000 (11:24 +0100)
commit0b7a8e5805dff72966a68c4e2c86e467cfd2640a
tree1aae3017931bbb364bcc7de4e0fb1ca06b72dbcb
parent0b7647a5a6c85a8a1762ec4482004107989c8550
Change AutoConnectSSH to return error code by default

AutoConnectSSH execute method always returns exception when remote
command returns non 0 ret code. This behavior has been introduced
by https://gerrit.opnfv.org/gerrit/#/c/58579/ changes which break
the NSB functionality. There are 200+ places where return code
(event non zoro) is expected to be returned by
AutoConnectSSH.execute() method. Right now the method returns
always exception in case of remote command return not zero which
causes the problem.

Changed execute() method to have previous behavior (raise_on_error
is always False by default) and the exception is raised only in
case if raise_on_error=True is set explicitly.

Added UT.

JIRA: YARDSTICK-1365

Change-Id: Ib067583ea5eb704b9174084b45b920c24eb307ac
Signed-off-by: Mytnyk, Volodymyr <volodymyrx.mytnyk@intel.com>
yardstick/ssh.py
yardstick/tests/unit/test_ssh.py