From 824ae87563f3d206a5258be4f1b62cc413fb7b0d Mon Sep 17 00:00:00 2001 From: Adam King Date: Wed, 28 Aug 2024 13:46:59 -0400 Subject: [PATCH] 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 (cherry picked from commit b377085c3020484c74a7a71357c35761b5e5de25) --- src/pybind/mgr/orchestrator/module.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/pybind/mgr/orchestrator/module.py b/src/pybind/mgr/orchestrator/module.py index 492f14cd739..7746471d54a 100644 --- a/src/pybind/mgr/orchestrator/module.py +++ b/src/pybind/mgr/orchestrator/module.py @@ -1880,6 +1880,7 @@ Usage: @_cli_write_command('orch apply nvmeof') def _apply_nvmeof(self, pool: str, + group: str, placement: Optional[str] = None, unmanaged: bool = False, dry_run: bool = False, @@ -1891,8 +1892,9 @@ Usage: raise OrchestratorValidationError('unrecognized command -i; -h or --help for usage') spec = NvmeofServiceSpec( - service_id=pool, + service_id=f'{pool}.{group}', pool=pool, + group=group, placement=PlacementSpec.from_string(placement), unmanaged=unmanaged, preview_only=dry_run -- 2.47.3