From: Gil Bregman Date: Thu, 30 Jul 2026 11:56:12 +0000 (+0300) Subject: mgr/dashboard: Add --keep-connections parameter to NVMEoF CLI X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=fd39161c7f1fb7324349e6c31cdc51f775cf1692;p=ceph.git mgr/dashboard: Add --keep-connections parameter to NVMEoF CLI Fixes: https://tracker.ceph.com/issues/78833 Signed-off-by: Gil Bregman --- diff --git a/src/pybind/mgr/dashboard/controllers/nvmeof.py b/src/pybind/mgr/dashboard/controllers/nvmeof.py index 6527651da80d..87fba37f25cc 100644 --- a/src/pybind/mgr/dashboard/controllers/nvmeof.py +++ b/src/pybind/mgr/dashboard/controllers/nvmeof.py @@ -2337,6 +2337,10 @@ else: "gw_group": Param(str, "NVMeoF gateway group", True, None), "server_address": Param(str, "NVMeoF gateway address", True, None), "traddr": Param(str, "NVMeoF gateway address (deprecated)", True, None), + "keep_connections": Param( + bool, + "Do not disconnect existing connections from that host", + True, False), }, ) @convert_to_model(model.RequestStatus) @@ -2344,7 +2348,8 @@ else: def delete(self, nqn: str, host_nqn: str, force: Optional[bool] = False, gw_group: Optional[str] = None, server_address: Optional[str] = None, - traddr: Optional[str] = None): + traddr: Optional[str] = None, + keep_connections: Optional[bool] = False): server_address = resolve_nvmeof_server_address( server_address=server_address, traddr=traddr @@ -2353,7 +2358,8 @@ else: gw_group=gw_group, server_address=server_address ).stub.remove_host( - NVMeoFClient.pb2.remove_host_req(subsystem_nqn=nqn, host_nqn=host_nqn, force=force) + NVMeoFClient.pb2.remove_host_req(subsystem_nqn=nqn, host_nqn=host_nqn, force=force, + keep_connections=keep_connections) ) @empty_response diff --git a/src/pybind/mgr/dashboard/openapi.yaml b/src/pybind/mgr/dashboard/openapi.yaml index 875962cb8ba1..9f72a7ec7c13 100644 --- a/src/pybind/mgr/dashboard/openapi.yaml +++ b/src/pybind/mgr/dashboard/openapi.yaml @@ -13822,6 +13822,12 @@ paths: name: traddr schema: type: string + - default: false + description: Do not disconnect existing connections from that host + in: query + name: keep_connections + schema: + type: boolean responses: '202': content: