]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/dashboard: fix command alias help message 65750/head
authorTomer Haskalovitch <tomer.haska@ibm.com>
Sun, 21 Sep 2025 09:49:29 +0000 (12:49 +0300)
committerHezko <tomer.haska@gmail.com>
Wed, 1 Oct 2025 17:40:32 +0000 (20:40 +0300)
Signed-off-by: Tomer Haskalovitch <tomer.haska@ibm.com>
(cherry picked from commit 30872b2ae746324083f315a2be00144dea048f19)

src/pybind/mgr/dashboard/services/nvmeof_cli.py

index 45624d95b323f99072d8b84da021499b57facc20..5dd6b199fe85b29595682a054521209116d16dd4 100644 (file)
@@ -234,6 +234,7 @@ class NvmeofCLICommand(CLICommand):
         self._output_formatter = AnnotatedDataTextOutputFormatter()
         self._model = model
         self._alias = alias
+        self._alias_cmd: Optional[NvmeofCLICommand] = None
 
     def _use_api_endpoint_desc_if_available(self, func):
         if not self.desc and hasattr(func, 'doc_info'):
@@ -241,7 +242,9 @@ class NvmeofCLICommand(CLICommand):
 
     def __call__(self, func) -> HandlerFuncType:  # type: ignore
         if self._alias:
-            NvmeofCLICommand(self._alias, model=self._model)._register_handler(func)
+            self._alias_cmd = NvmeofCLICommand(self._alias, model=self._model)
+            assert self._alias_cmd is not None
+            self._alias_cmd(func)
 
         resp = super().__call__(func)
         self._use_api_endpoint_desc_if_available(func)