diff options
author | Sage Weil <sage@newdream.net> | 2021-12-02 16:22:48 +0100 |
---|---|---|
committer | Sage Weil <sage@newdream.net> | 2021-12-03 03:15:47 +0100 |
commit | 1ac480df45058e103a2f4954950b8a4edb23610a (patch) | |
tree | 19d886c14671be28c416b29a55ba9ce1e71de7ad /src/pybind/mgr/mds_autoscaler | |
parent | mgr: stop issuing events that no modules consume (diff) | |
download | ceph-1ac480df45058e103a2f4954950b8a4edb23610a.tar.xz ceph-1ac480df45058e103a2f4954950b8a4edb23610a.zip |
pybind/mgr: introduce NotifyType enum
Note that we don't annotate the dashboard NotificationQueue because it is
used internally by the dashboard with other events.
Signed-off-by: Sage Weil <sage@newdream.net>
Diffstat (limited to 'src/pybind/mgr/mds_autoscaler')
-rw-r--r-- | src/pybind/mgr/mds_autoscaler/module.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/pybind/mgr/mds_autoscaler/module.py b/src/pybind/mgr/mds_autoscaler/module.py index 006d8547c95..66b026bd706 100644 --- a/src/pybind/mgr/mds_autoscaler/module.py +++ b/src/pybind/mgr/mds_autoscaler/module.py @@ -4,7 +4,7 @@ Automatically scale MDSs based on status of the file-system using the FSMap import logging from typing import Any, Optional -from mgr_module import MgrModule +from mgr_module import MgrModule, NotifyType from ceph.deployment.service_spec import ServiceSpec import orchestrator import copy @@ -84,8 +84,8 @@ class MDSAutoscaler(orchestrator.OrchestratorClientMixin, MgrModule): self.log.exception(f"fs {fs_name}: exception while updating service: {e}") pass - def notify(self, notify_type: str, notify_id: str) -> None: - if notify_type != 'fs_map': + def notify(self, notify_type: NotifyType, notify_id: str) -> None: + if notify_type != NotifyType.fs_map: return fs_map = self.get('fs_map') if not fs_map: |