From 5dea1c46e3fc5ad1e733164f10673a783a502777 Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Sun, 28 Jun 2020 20:52:51 +0800 Subject: [PATCH] pybind/mgr/pg_autoscaler: drop py2 support Signed-off-by: Kefu Chai --- src/pybind/mgr/pg_autoscaler/module.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/pybind/mgr/pg_autoscaler/module.py b/src/pybind/mgr/pg_autoscaler/module.py index 64e2a746583..24a8e4a584c 100644 --- a/src/pybind/mgr/pg_autoscaler/module.py +++ b/src/pybind/mgr/pg_autoscaler/module.py @@ -6,7 +6,6 @@ import json import mgr_util import threading import uuid -from six import itervalues, iteritems from prettytable import PrettyTable from mgr_module import MgrModule @@ -244,7 +243,7 @@ class PgAutoscaler(MgrModule): # do we intersect an existing root? s = None - for prev in itervalues(result): + for prev in result.values(): if osds & prev.osds: s = prev break @@ -308,7 +307,7 @@ class PgAutoscaler(MgrModule): ret = [] # iterate over all pools to determine how they should be sized - for pool_name, p in iteritems(pools): + for pool_name, p in pools.items(): pool_id = p['pool'] if pool_id not in pool_stats: # race with pool deletion; skip @@ -506,7 +505,7 @@ class PgAutoscaler(MgrModule): } too_much_target_bytes = [] - for root_id, total in iteritems(total_bytes): + for root_id, total in total_bytes.items(): total_target = total_target_bytes[root_id] if total_target > 0 and total > root_map[root_id].capacity and root_map[root_id].capacity: too_much_target_bytes.append( -- 2.39.5