From: Michael Fritch Date: Tue, 28 Apr 2020 23:57:34 +0000 (-0600) Subject: mgr/orch: add iscsi apply cli X-Git-Tag: v16.1.0~2422^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=884fc3d07fe86c004e188626eb4c8aeb384ee6a4;p=ceph.git mgr/orch: add iscsi apply cli `$ ceph orch apply iscsi --pool ` Signed-off-by: Michael Fritch --- diff --git a/src/pybind/mgr/orchestrator/module.py b/src/pybind/mgr/orchestrator/module.py index 467a73cb4fcb..65f995b1e4db 100644 --- a/src/pybind/mgr/orchestrator/module.py +++ b/src/pybind/mgr/orchestrator/module.py @@ -926,6 +926,26 @@ Usage: self._orchestrator_wait([completion]) return HandleCommandResult(stdout=completion.result_str()) + @_cli_write_command( + 'orch apply iscsi', + 'name=pool,type=CephString ' + 'name=trusted_ip_list,type=CephString,req=false ' + 'name=placement,type=CephString,req=false ' + 'name=unmanaged,type=CephBool,req=false', + 'Scale an iSCSI service') + def _apply_iscsi(self, pool, trusted_ip_list=None, placement=None, unmanaged=False, inbuf=None): + spec = IscsiServiceSpec( + service_id='iscsi', + pool=pool, + trusted_ip_list=trusted_ip_list, + placement=PlacementSpec.from_string(placement), + unmanaged=unmanaged, + ) + completion = self.apply_iscsi(spec) + self._orchestrator_wait([completion]) + raise_if_exception(completion) + return HandleCommandResult(stdout=completion.result_str()) + @_cli_write_command( 'orch set backend', "name=module_name,type=CephString,req=true",