]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/mgr_module.py: add COMMANDS class attribute to CLICommandBase
authorDavid Galloway <david.galloway@ibm.com>
Thu, 26 Mar 2026 21:51:26 +0000 (17:51 -0400)
committerDavid Galloway <david.galloway@ibm.com>
Fri, 27 Mar 2026 01:16:20 +0000 (21:16 -0400)
CLICommandBase was missing a COMMANDS dict, causing an AttributeError
when the mgr daemon tried to load the rook module. Subtypes created via
make_registry_subtype get their own COMMANDS dict, but the base class
needs one too as a fallback.

Signed-off-by: David Galloway <david.galloway@ibm.com>
src/pybind/mgr/mgr_module.py

index 7726931da0e0651d4c119c2e94948fe8a71990f5..fa566fcbd60b74ea5d16accd4f6eb146eaf99dba 100644 (file)
@@ -408,6 +408,8 @@ def _extract_target_func(
 
 
 class CLICommandBase(object):
+    COMMANDS: Dict[str, 'CLICommandBase'] = {}
+
     def __init__(self,
                  prefix: str,
                  perm: str = 'rw',