mgr/dashboard: Add --keep-connections parameter to NVMEoF CLI

Fixes: https://tracker.ceph.com/issues/78833

Signed-off-by: Gil Bregman <gbregman@il.ibm.com>
This commit is contained in:
Gil Bregman 2026-07-30 14:56:12 +03:00
parent 6beaf71d96
commit fd39161c7f
2 changed files with 14 additions and 2 deletions

View File

@ -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

View File

@ -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: