diff --git a/client-cli/cli_lib/ceph.py b/client-cli/cli_lib/ceph.py index ce045a23..1518bc2d 100644 --- a/client-cli/cli_lib/ceph.py +++ b/client-cli/cli_lib/ceph.py @@ -449,7 +449,7 @@ Wr: {osd_wrops: <{osd_wrops_length}} \ ) ) - for osd_information in sorted(osd_list, key = lambda x: int(x['id'])): + for osd_information in sorted(osd_list, key=lambda x: int(x['id'])): try: # If this happens, the node hasn't checked in fully yet, so just ignore it if osd_information['stats']['node'] == '|': @@ -750,7 +750,7 @@ Wr: {pool_write_ops: <{pool_write_ops_length}} \ ) ) - for pool_information in sorted(pool_list, key = lambda x: int(x['stats']['id'])): + for pool_information in sorted(pool_list, key=lambda x: int(x['stats']['id'])): # Format the output header pool_list_output.append('{bold}\ {pool_id: <{pool_id_length}} \ diff --git a/daemon-common/ceph.py b/daemon-common/ceph.py index 04fc2ab5..7c70b76e 100644 --- a/daemon-common/ceph.py +++ b/daemon-common/ceph.py @@ -337,7 +337,7 @@ def get_list_osd(zk_conn, limit, is_fuzzy=True): else: osd_list.append(getOSDInformation(zk_conn, osd)) - return True, sorted(osd_list, key = lambda x: int(x['id'])) + return True, sorted(osd_list, key=lambda x: int(x['id'])) def format_list_osd(osd_list): osd_list_output = [] @@ -667,7 +667,7 @@ def get_list_pool(zk_conn, limit, is_fuzzy=True): else: pool_list.append(getPoolInformation(zk_conn, pool)) - return True, sorted(pool_list, key = lambda x: int(x['stats']['id'])) + return True, sorted(pool_list, key=lambda x: int(x['stats']['id'])) def format_list_pool(pool_list): pool_list_output = [] @@ -1086,7 +1086,7 @@ def get_list_volume(zk_conn, pool, limit, is_fuzzy=True): else: volume_list.append(getVolumeInformation(zk_conn, pool_name, volume_name)) - return True, sorted(volume_list, key = lambda x: str(x['name'])) + return True, sorted(volume_list, key=lambda x: str(x['name'])) def format_list_volume(volume_list): volume_list_output = [] @@ -1297,7 +1297,7 @@ def get_list_snapshot(zk_conn, pool, volume, limit, is_fuzzy=True): else: snapshot_list.append({'pool': pool_name, 'volume': volume_name, 'snapshot': snapshot_name}) - return True, sorted(snapshot_list, key = lambda x: int(x['id'])) + return True, sorted(snapshot_list, key=lambda x: int(x['id'])) def format_list_snapshot(snapshot_list): snapshot_list_output = []