Fix bugs with refactoring

This commit is contained in:
Joshua Boniface 2019-07-05 00:44:40 -04:00
parent 80ea54d40f
commit d755a80fe8
2 changed files with 2 additions and 3 deletions

View File

@ -1144,7 +1144,7 @@ def ceph_status():
zk_conn = pvc_common.startZKConnection(zk_host)
retcode, retdata = pvc_ceph.get_status(zk_conn)
if retdata:
if retcode:
pvc_ceph.format_status(retdata)
retdata = ''
cleanup(retcode, retdata, zk_conn)

View File

@ -112,14 +112,13 @@ def get_status(zk_conn):
'primary_node': primary_node,
'ceph_status': ceph_status
}
return status_data
return True, status_data
def format_status(status_data):
click.echo('{bold}Ceph cluster status (primary node {end}{blue}{primary}{end}{bold}){end}\n'.format(bold=ansiprint.bold(), end=ansiprint.end(), blue=ansiprint.blue(), primary=status_data['primary_node']))
click.echo(status_data['ceph_status'])
click.echo('')
#
# OSD functions
#