Feb-26-2018, 03:55 PM
(This post was last modified: Feb-26-2018, 03:55 PM by Gribouillis.)
You only need to write this at line 25 and remove the rest of the function (this code needs to be indented at the same level as
count = 0
)healthy = all(v == 'active' for v in dic.values()) print('{} is {}healthy'.format(key1, '' if healthy else 'un')) for node, status in dic.items(): print('Node {} is {}'.format(node, 'Up' if status == 'active' else 'Down'))Also as the function does not return anything, it shouldn't be named
get_CB_cluster_status()
but rather display_CB_cluster_status()
or something like that.