]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
mgr/orchestrator: allow passing group to apply/add nvmeof commands
authorAdam King <adking@redhat.com>
Wed, 28 Aug 2024 17:46:59 +0000 (13:46 -0400)
committerAlexander Indenbaum <aindenba@redhat.com>
Wed, 19 Nov 2025 18:41:52 +0000 (20:41 +0200)
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 <adking@redhat.com>
(cherry picked from commit b377085c3020484c74a7a71357c35761b5e5de25)

src/pybind/mgr/orchestrator/module.py

index 492f14cd739e1c94d2f288085d22ff220e9f0ad0..7746471d54a6b0f65cf1960cd073071f78045d1b 100644 (file)
@@ -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