]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/prometheus: raise at seeing unknown status
authorKefu Chai <kchai@redhat.com>
Fri, 26 Feb 2021 04:15:03 +0000 (12:15 +0800)
committerKefu Chai <kchai@redhat.com>
Fri, 26 Feb 2021 06:03:34 +0000 (14:03 +0800)
Signed-off-by: Kefu Chai <kchai@redhat.com>
src/pybind/mgr/prometheus/module.py

index 0f4048391f5b0ec2760cc44acc271a49e60368f9..2cfedf152e7e121f8eb0089657a24fa49fa6b40d 100644 (file)
@@ -62,6 +62,7 @@ def health_status_to_number(status):
         return 1
     elif status == 'HEALTH_ERR':
         return 2
+    raise ValueError(f'unknown status "{status}"')
 
 
 DF_CLUSTER = ['total_bytes', 'total_used_bytes', 'total_used_raw_bytes']