@_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,
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
#: ``name`` name of the nvmeof gateway
self.name = name
#: ``group`` name of the nvmeof gateway
- self.group = group or ''
+ self.group = group
#: ``enable_auth`` enables user authentication on nvmeof gateway
self.enable_auth = enable_auth
#: ``state_update_notify`` enables automatic update from OMAP in nvmeof gateway
if not self.pool:
raise SpecValidationError('Cannot add NVMEOF: No Pool specified')
+ if not self.group:
+ raise SpecValidationError('Cannot add NVMEOF: No group specified')
+
if self.enable_auth:
if not all([self.server_key, self.server_cert, self.client_key,
self.client_cert, self.root_ca_cert]):