Store cmd execute result into cmd_result variable

Change-Id: Ie4dc39c231e026109b28b79c609c272d46df959e
Closes-Bug: #1532203
This commit is contained in:
Tatyana Leontovich 2016-01-08 16:15:25 +02:00
parent 133131ba4d
commit b92e7f53f3
1 changed files with 4 additions and 6 deletions

View File

@ -219,13 +219,11 @@ def update_rpm_packages(func):
cmd=cmd
)
update_command = 'yum clean expire-cache; yum update -y -d3'
SSHManager().execute(
ip=SSHManager().admin_ip,
cmd=update_command
)
cmd_result = SSHManager().execute(ip=SSHManager().admin_ip,
cmd=update_command)
logger.debug('Result of "yum update" command on master node: '
'{0}'.format(result))
assert_equal(int(result['exit_code']), 0,
'{0}'.format(cmd_result))
assert_equal(int(cmd_result['exit_code']), 0,
'Packages update failed, '
'inspect logs for details')