From: Kefu Chai Date: Sun, 28 Jun 2020 12:51:18 +0000 (+0800) Subject: pybind/mgr/cephadm: drop py2 support X-Git-Tag: wip-pdonnell-testing-20200918.022351~781^2~9 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=88ff34a9c8332921284d8d6f9774a8aa1ae15a93;p=ceph-ci.git pybind/mgr/cephadm: drop py2 support Signed-off-by: Kefu Chai --- diff --git a/src/pybind/mgr/cephadm/inventory.py b/src/pybind/mgr/cephadm/inventory.py index d3ac260930d..b63aaf7beac 100644 --- a/src/pybind/mgr/cephadm/inventory.py +++ b/src/pybind/mgr/cephadm/inventory.py @@ -4,8 +4,6 @@ import json import logging from typing import TYPE_CHECKING, Dict, List, Iterator, Optional, Any, Tuple, Set -import six - import orchestrator from ceph.deployment import inventory from ceph.deployment.service_spec import ServiceSpec @@ -112,7 +110,7 @@ class SpecStore(): def load(self): # type: () -> None - for k, v in six.iteritems(self.mgr.get_store_prefix(SPEC_STORE_PREFIX)): + for k, v in self.mgr.get_store_prefix(SPEC_STORE_PREFIX).items(): service_name = k[len(SPEC_STORE_PREFIX):] try: v = json.loads(v) @@ -179,7 +177,7 @@ class HostCache(): def load(self): # type: () -> None - for k, v in six.iteritems(self.mgr.get_store_prefix(HOST_CACHE_PREFIX)): + for k, v in self.mgr.get_store_prefix(HOST_CACHE_PREFIX).items(): host = k[len(HOST_CACHE_PREFIX):] if host not in self.mgr.inventory: self.mgr.log.warning('removing stray HostCache host record %s' % (