From: Redouane Kachach Date: Thu, 22 Feb 2024 08:48:41 +0000 (+0100) Subject: mgr/rook: raise an exception when user calls OSD related methods X-Git-Tag: testing/wip-pdonnell-testing-20240430.123648-reef-debug~234^2~2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=92e5bb30e7508f8db03a3bfc8bb7a0ee52fc82ac;p=ceph-ci.git mgr/rook: raise an exception when user calls OSD related methods Signed-off-by: Redouane Kachach --- 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)