From 2c72e3d1ab8c3edeece2c982075a9db6f8b99fa1 Mon Sep 17 00:00:00 2001 From: Paul Cuzner Date: Wed, 13 Jan 2021 14:22:10 +1300 Subject: [PATCH] mgr/orchestrator: rebase patch Signed-off-by: Paul Cuzner --- src/pybind/mgr/orchestrator/module.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/pybind/mgr/orchestrator/module.py b/src/pybind/mgr/orchestrator/module.py index ee56eea4dc65a..d5d401caab825 100644 --- a/src/pybind/mgr/orchestrator/module.py +++ b/src/pybind/mgr/orchestrator/module.py @@ -322,9 +322,10 @@ class OrchestratorCli(OrchestratorClientMixin, MgrModule, return cast(str, self.get_module_option("orchestrator")) @_cli_write_command('orch host add') - def _add_host(self, hostname: str, addr: Optional[str] = None, labels: Optional[List[str]] = None) -> HandleCommandResult: + def _add_host(self, hostname: str, addr: Optional[str] = None, labels: Optional[List[str]] = None, maintenance: bool = False) -> HandleCommandResult: """Add a host""" - s = HostSpec(hostname=hostname, addr=addr, labels=labels) + _status = 'maintenance' if maintenance else '' + s = HostSpec(hostname=hostname, addr=addr, labels=labels, status=_status) completion = self.add_host(s) self._orchestrator_wait([completion]) raise_if_exception(completion) -- 2.39.5