Skip to content

Commit b377085

Browse files
committed
mgr/orchestrator: allow passing group to apply/add nvmeof commands
We no longer require the group when applying an nvmeof spec but we still want to allow the commands to take a group parameter (and this will at least make a group name required when creating a new service on the command line) Signed-off-by: Adam King <[email protected]>
1 parent e63d4b0 commit b377085

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/pybind/mgr/orchestrator/module.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1545,6 +1545,7 @@ def _iscsi_add(self,
15451545
@_cli_write_command('orch daemon add nvmeof')
15461546
def _nvmeof_add(self,
15471547
pool: str,
1548+
group: str,
15481549
placement: Optional[str] = None,
15491550
inbuf: Optional[str] = None) -> HandleCommandResult:
15501551
"""Start nvmeof daemon(s)"""
@@ -1554,6 +1555,7 @@ def _nvmeof_add(self,
15541555
spec = NvmeofServiceSpec(
15551556
service_id='nvmeof',
15561557
pool=pool,
1558+
group=group,
15571559
placement=PlacementSpec.from_string(placement),
15581560
)
15591561
return self._daemon_add_misc(spec)
@@ -1866,6 +1868,7 @@ def _apply_oauth2_proxy(self,
18661868
@_cli_write_command('orch apply nvmeof')
18671869
def _apply_nvmeof(self,
18681870
pool: str,
1871+
group: str,
18691872
placement: Optional[str] = None,
18701873
unmanaged: bool = False,
18711874
dry_run: bool = False,
@@ -1877,8 +1880,9 @@ def _apply_nvmeof(self,
18771880
raise OrchestratorValidationError('unrecognized command -i; -h or --help for usage')
18781881

18791882
spec = NvmeofServiceSpec(
1880-
service_id=pool,
1883+
service_id=f'{pool}.{group}',
18811884
pool=pool,
1885+
group=group,
18821886
placement=PlacementSpec.from_string(placement),
18831887
unmanaged=unmanaged,
18841888
preview_only=dry_run

0 commit comments

Comments
 (0)