Skip to content

Commit 652d93a

Browse files
Tomer HaskalovitchTomer Haskalovitch
authored andcommitted
mgr/dashboard: migrate nvmeof pr ceph#1335 to new cli
Signed-off-by: Tomer Haskalovitch <[email protected]>
1 parent 4713b19 commit 652d93a

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

src/pybind/mgr/dashboard/controllers/nvmeof.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -862,16 +862,19 @@ class NVMeoFHost(RESTController):
862862
"List all allowed hosts for an NVMeoF subsystem",
863863
parameters={
864864
"nqn": Param(str, "NVMeoF subsystem NQN"),
865+
"clear_alerts": Param(bool, "Clear any host alert signal after getting its value",
866+
True, False),
865867
"gw_group": Param(str, "NVMeoF gateway group", True, None),
866868
},
867869
)
868870
@pick('hosts')
869871
@NvmeofCLICommand("nvmeof host list", model.HostsInfo)
870872
@convert_to_model(model.HostsInfo, finalize=_update_hosts)
871873
@handle_nvmeof_error
872-
def list(self, nqn: str, gw_group: Optional[str] = None, traddr: Optional[str] = None):
874+
def list(self, nqn: str, clear_alerts: Optional[bool],
875+
gw_group: Optional[str] = None, traddr: Optional[str] = None):
873876
return NVMeoFClient(gw_group=gw_group, traddr=traddr).stub.list_hosts(
874-
NVMeoFClient.pb2.list_hosts_req(subsystem=nqn)
877+
NVMeoFClient.pb2.list_hosts_req(subsystem=nqn, clear_alerts=clear_alerts)
875878
)
876879

877880
@EndpointDoc(

src/pybind/mgr/dashboard/model/nvmeof.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,10 @@ class Connection(NamedTuple):
9494
connected: bool
9595
qpairs_count: int
9696
controller_id: int
97+
use_psk: Optional[bool]
98+
use_dhchap: Optional[bool]
9799
subsystem: Optional[str]
100+
disconnected_due_to_keepalive_timeout: Optional[bool]
98101

99102

100103
class ConnectionList(NamedTuple):
@@ -186,6 +189,7 @@ class Host(NamedTuple):
186189
nqn: str
187190
use_psk: Optional[bool]
188191
use_dhchap: Optional[bool]
192+
disconnected_due_to_keepalive_timeout: Optional[bool]
189193

190194

191195
class HostsInfo(NamedTuple):

0 commit comments

Comments
 (0)