Skip to content

Commit 303f136

Browse files
authored
Merge pull request ceph#65504 from Hezko/nvmeof-cli-fix-subsys-group-add
mgr/dashboard: --no-group-append default value to False, aligned with old cli Reviewed-by: Nizamudeen A <[email protected]>
2 parents 53e4f74 + 46b74fa commit 303f136

File tree

2 files changed

+14
-5
lines changed

2 files changed

+14
-5
lines changed

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

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -195,15 +195,20 @@ def get(self, nqn: str, gw_group: Optional[str] = None, traddr: Optional[str] =
195195
"Create a new NVMeoF subsystem",
196196
parameters={
197197
"nqn": Param(str, "NVMeoF subsystem NQN"),
198+
"enable_ha": Param(bool, "Enable high availability", True, None),
198199
"max_namespaces": Param(int, "Maximum number of namespaces", True, 4096),
199-
"enable_ha": Param(bool, "Enable high availability"),
200+
"no_group_append": Param(int, "Do not append gateway group name to the NQN",
201+
True, False),
202+
"serial_number": Param(int, "Subsystem serial number", True, None),
203+
"dhchap_key": Param(int, "Subsystem DH-HMAC-CHAP key", True, None),
200204
"gw_group": Param(str, "NVMeoF gateway group", True, None),
205+
"traddr": Param(str, "NVMeoF gateway address", True, None),
201206
},
202207
)
203208
@convert_to_model(model.SubsystemStatus)
204209
@handle_nvmeof_error
205210
def create(self, nqn: str, enable_ha: Optional[bool] = True,
206-
max_namespaces: Optional[int] = 4096, no_group_append: Optional[bool] = True,
211+
max_namespaces: Optional[int] = 4096, no_group_append: Optional[bool] = False,
207212
serial_number: Optional[str] = None, dhchap_key: Optional[str] = None,
208213
gw_group: Optional[str] = None, traddr: Optional[str] = None):
209214
return NVMeoFClient(gw_group=gw_group, traddr=traddr).stub.create_subsystem(

src/pybind/mgr/dashboard/openapi.yaml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8790,7 +8790,8 @@ paths:
87908790
schema:
87918791
properties:
87928792
dhchap_key:
8793-
type: string
8793+
description: Subsystem DH-HMAC-CHAP key
8794+
type: integer
87948795
enable_ha:
87958796
default: true
87968797
description: Enable high availability
@@ -8803,14 +8804,17 @@ paths:
88038804
description: Maximum number of namespaces
88048805
type: integer
88058806
no_group_append:
8806-
default: true
8807-
type: boolean
8807+
default: false
8808+
description: Do not append gateway group name to the NQN
8809+
type: integer
88088810
nqn:
88098811
description: NVMeoF subsystem NQN
88108812
type: string
88118813
serial_number:
8814+
description: Subsystem serial number
88128815
type: integer
88138816
traddr:
8817+
description: NVMeoF gateway address
88148818
type: string
88158819
required:
88168820
- nqn

0 commit comments

Comments
 (0)