From 1bfd671cee30d104cebd2856e0dda84b9e5c7d57 Mon Sep 17 00:00:00 2001 From: George Postolache Date: Mon, 4 May 2020 11:01:11 +0300 Subject: [PATCH] Fix pylint error for storage_helper modified is_cepth_healthy to return both status and output Change-Id: Iebb903bdc3d3720ae537f3f68e539a347b06693e Signed-off-by: George Postolache --- automated-pytest-suite/keywords/storage_helper.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/automated-pytest-suite/keywords/storage_helper.py b/automated-pytest-suite/keywords/storage_helper.py index 3e9bf92..6cb77ef 100644 --- a/automated-pytest-suite/keywords/storage_helper.py +++ b/automated-pytest-suite/keywords/storage_helper.py @@ -49,21 +49,21 @@ def is_ceph_healthy(con_ssh=None): rtn_code, out = con_ssh.exec_cmd('ceph -s') if rtn_code > 0: LOG.warning('ceph -s failed to execute.') - return False + return (False, out) health_state = re.findall('health: (.*)\n', out) if not health_state: LOG.warning('Unable to determine ceph health state') - return False + return (False, out) health_state = health_state[0] if health_ok in health_state: LOG.info('CEPH cluster is healthy') - return True + return (True, out) msg = 'CEPH unhealthy. State: {}'.format(health_state) LOG.warning(msg) - return False + return (False, out) def get_ceph_osd_count(fail_ok=False, con_ssh=None):