]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
mgr/rook: raise an exception when user calls OSD related methods
authorRedouane Kachach <rkachach@redhat.com>
Thu, 22 Feb 2024 09:18:48 +0000 (10:18 +0100)
committerRedouane Kachach <rkachach@redhat.com>
Thu, 22 Feb 2024 09:18:48 +0000 (10:18 +0100)
Signed-off-by: Redouane Kachach <rkachach@redhat.com>
src/pybind/mgr/rook/module.py

index 91099710c4b351dfd19f0153077b9b069728684e..afd789a8ba233db7c1f833207165dea2afedeb13 100644 (file)
@@ -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)