diff --git a/charms_ceph/broker.py b/charms_ceph/broker.py index 90b536f..71f85f4 100644 --- a/charms_ceph/broker.py +++ b/charms_ceph/broker.py @@ -907,7 +907,7 @@ def process_requests_v1(reqs): log(msg, level=ERROR) return {'exit-code': 1, 'stderr': msg} - if type(ret) == dict and 'exit-code' in ret: + if isinstance(ret, dict) and 'exit-code' in ret: return ret return {'exit-code': 0} diff --git a/charms_ceph/utils.py b/charms_ceph/utils.py index 41eff9b..94bfb9e 100644 --- a/charms_ceph/utils.py +++ b/charms_ceph/utils.py @@ -3231,6 +3231,7 @@ UPGRADE_PATHS = collections.OrderedDict([ ('nautilus', 'octopus'), ('octopus', 'pacific'), ('pacific', 'quincy'), + ('quincy', 'reef'), ]) # Map UCA codenames to Ceph codenames @@ -3254,7 +3255,7 @@ UCA_CODENAME_MAP = { 'yoga': 'quincy', 'zed': 'quincy', 'antelope': 'quincy', - 'bobcat': 'quincy', + 'bobcat': 'reef', } diff --git a/unit_tests/test_utils.py b/unit_tests/test_utils.py index 944e66e..13738dc 100644 --- a/unit_tests/test_utils.py +++ b/unit_tests/test_utils.py @@ -1085,6 +1085,7 @@ class CephTestCase(unittest.TestCase): 'nautilus -> octopus', 'octopus -> pacific', 'pacific -> quincy', + 'quincy -> reef', ]) self.assertEqual(utils.pretty_print_upgrade_paths(), expected)