Skip to content

Commit 9902902

Browse files
committed
mgr/rook: raise an exception when user calls OSD related methods
Signed-off-by: Redouane Kachach <[email protected]>
1 parent d45bb4f commit 9902902

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

src/pybind/mgr/rook/module.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -615,6 +615,19 @@ def add_host_label(self, host: str, label: str) -> OrchResult[str]:
615615
def remove_host_label(self, host: str, label: str, force: bool = False) -> OrchResult[str]:
616616
return self.rook_cluster.remove_host_label(host, label)
617617

618+
@handle_orch_error
619+
def create_osds(self, drive_group: DriveGroupSpec) -> str:
620+
raise orchestrator.OrchestratorError('Creating OSDs is not supported by rook orchestrator. Please, use Rook operator.')
621+
622+
@handle_orch_error
623+
def remove_osds(self,
624+
osd_ids: List[str],
625+
replace: bool = False,
626+
force: bool = False,
627+
zap: bool = False,
628+
no_destroy: bool = False) -> str:
629+
raise orchestrator.OrchestratorError('Removing OSDs is not supported by rook orchestrator. Please, use Rook operator.')
630+
618631
@handle_orch_error
619632
def blink_device_light(self, ident_fault: str, on: bool, locs: List[orchestrator.DeviceLightLoc]) -> List[str]:
620633
return self.rook_cluster.blink_light(ident_fault, on, locs)

0 commit comments

Comments
 (0)