Skip to content

Commit 7812550

Browse files
authored
Merge pull request ceph#65612 from Hezko/nvmeof-cli-fix-aliases-help
mgr/dashboard: fix command alias help message Reviewed-by: Afreen Misbah <[email protected]>
2 parents 734e239 + 30872b2 commit 7812550

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,14 +234,17 @@ def __init__(self, prefix, model: Type[NamedTuple], alias=None, perm='rw', poll=
234234
self._output_formatter = AnnotatedDataTextOutputFormatter()
235235
self._model = model
236236
self._alias = alias
237+
self._alias_cmd: Optional[NvmeofCLICommand] = None
237238

238239
def _use_api_endpoint_desc_if_available(self, func):
239240
if not self.desc and hasattr(func, 'doc_info'):
240241
self.desc = func.doc_info.get('summary', '')
241242

242243
def __call__(self, func) -> HandlerFuncType: # type: ignore
243244
if self._alias:
244-
NvmeofCLICommand(self._alias, model=self._model)._register_handler(func)
245+
self._alias_cmd = NvmeofCLICommand(self._alias, model=self._model)
246+
assert self._alias_cmd is not None
247+
self._alias_cmd(func)
245248

246249
resp = super().__call__(func)
247250
self._use_api_endpoint_desc_if_available(func)

0 commit comments

Comments
 (0)