From 92e5bb30e7508f8db03a3bfc8bb7a0ee52fc82ac Mon Sep 17 00:00:00 2001 From: Redouane Kachach Date: Thu, 22 Feb 2024 09:48:41 +0100 Subject: [PATCH] mgr/rook: raise an exception when user calls OSD related methods Signed-off-by: Redouane Kachach --- src/pybind/mgr/rook/module.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/pybind/mgr/rook/module.py b/src/pybind/mgr/rook/module.py index 91099710c4b..afd789a8ba2 100644 --- a/src/pybind/mgr/rook/module.py +++ b/src/pybind/mgr/rook/module.py @@ -615,6 +615,19 @@ class RookOrchestrator(MgrModule, orchestrator.Orchestrator): def remove_host_label(self, host: str, label: str, force: bool = False) -> OrchResult[str]: return self.rook_cluster.remove_host_label(host, label) + @handle_orch_error + def create_osds(self, drive_group: DriveGroupSpec) -> str: + raise orchestrator.OrchestratorError('Creating OSDs is not supported by rook orchestrator. Please, use Rook operator.') + + @handle_orch_error + def remove_osds(self, + osd_ids: List[str], + replace: bool = False, + force: bool = False, + zap: bool = False, + no_destroy: bool = False) -> str: + raise orchestrator.OrchestratorError('Removing OSDs is not supported by rook orchestrator. Please, use Rook operator.') + @handle_orch_error def blink_device_light(self, ident_fault: str, on: bool, locs: List[orchestrator.DeviceLightLoc]) -> List[str]: return self.rook_cluster.blink_light(ident_fault, on, locs) -- 2.39.5