File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed
python-common/ceph/deployment Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -1831,6 +1831,7 @@ def _apply_mgmt_gateway(self,
18311831 @_cli_write_command ('orch apply nvmeof' )
18321832 def _apply_nvmeof (self ,
18331833 pool : str ,
1834+ group : str ,
18341835 placement : Optional [str ] = None ,
18351836 unmanaged : bool = False ,
18361837 dry_run : bool = False ,
@@ -1842,8 +1843,9 @@ def _apply_nvmeof(self,
18421843 raise OrchestratorValidationError ('unrecognized command -i; -h or --help for usage' )
18431844
18441845 spec = NvmeofServiceSpec (
1845- service_id = pool ,
1846+ service_id = f' { pool } . { group } ' ,
18461847 pool = pool ,
1848+ group = group ,
18471849 placement = PlacementSpec .from_string (placement ),
18481850 unmanaged = unmanaged ,
18491851 preview_only = dry_run
Original file line number Diff line number Diff line change @@ -1381,7 +1381,7 @@ def __init__(self,
13811381 #: ``name`` name of the nvmeof gateway
13821382 self .name = name
13831383 #: ``group`` name of the nvmeof gateway
1384- self .group = group or ''
1384+ self .group = group
13851385 #: ``enable_auth`` enables user authentication on nvmeof gateway
13861386 self .enable_auth = enable_auth
13871387 #: ``state_update_notify`` enables automatic update from OMAP in nvmeof gateway
@@ -1473,6 +1473,9 @@ def validate(self) -> None:
14731473 if not self .pool :
14741474 raise SpecValidationError ('Cannot add NVMEOF: No Pool specified' )
14751475
1476+ if not self .group :
1477+ raise SpecValidationError ('Cannot add NVMEOF: No group specified' )
1478+
14761479 if self .enable_auth :
14771480 if not all ([self .server_key , self .server_cert , self .client_key ,
14781481 self .client_cert , self .root_ca_cert ]):
You can’t perform that action at this time.
0 commit comments