From: Tomer Haskalovitch Date: Sun, 21 Sep 2025 09:49:29 +0000 (+0300) Subject: mgr/dashboard: fix command alias help message X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=30872b2ae746324083f315a2be00144dea048f19;p=ceph.git mgr/dashboard: fix command alias help message Signed-off-by: Tomer Haskalovitch --- diff --git a/src/pybind/mgr/dashboard/services/nvmeof_cli.py b/src/pybind/mgr/dashboard/services/nvmeof_cli.py index 45624d95b323..5dd6b199fe85 100644 --- a/src/pybind/mgr/dashboard/services/nvmeof_cli.py +++ b/src/pybind/mgr/dashboard/services/nvmeof_cli.py @@ -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)