summaryrefslogtreecommitdiff
path: root/targetcli
diff options
context:
space:
mode:
authorPrasanna Kumar Kalever <prasanna.kalever@redhat.com>2020-04-03 13:01:06 +0530
committerPrasanna Kumar Kalever <prasanna.kalever@redhat.com>2020-04-06 23:21:30 +0530
commitb60c74594abf6cf681ff8eaa348059c5348399e9 (patch)
tree64362b58ea2e83027fd233acc6b9399cf82ecdb6 /targetcli
parente09fa8c531b4a4d2972df8e96e0baf0bdd953715 (diff)
downloadtargetcli-b60c74594abf6cf681ff8eaa348059c5348399e9.tar.gz
daemonized-mode: add interactive shell support
set interactive mode as default to make it appear similar to cli approach, $ targetcli targetcli shell version 2.1.51 Entering targetcli interactive mode for daemonized approach. Type 'exit' to quit. /> pwd / /> cd /iscsi /> pwd /iscsi /> exit Here we introduce a new global option daemon_use_batch_mode for switching between batch and interactive modes. $ targetcli set global daemon_use_batch_mode=true Parameter daemon_use_batch_mode is now 'true'. $ targetcli targetcli shell version 2.1.51 Entering targetcli batch mode for daemonized approach. Enter multiple commands separated by newline and type 'exit' to run them all in one go. /> pwd /> cd /iscsi /> pwd / /iscsi Fixes: #160 Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
Diffstat (limited to 'targetcli')
-rw-r--r--targetcli/ui_node.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/targetcli/ui_node.py b/targetcli/ui_node.py
index 58a70c6..0485950 100644
--- a/targetcli/ui_node.py
+++ b/targetcli/ui_node.py
@@ -52,6 +52,9 @@ class UINode(ConfigNode):
self.define_config_group_param(
'global', 'auto_use_daemon', 'bool',
'If true, commands will be sent to targetclid.')
+ self.define_config_group_param(
+ 'global', 'daemon_use_batch_mode', 'bool',
+ 'If true, use batch mode for daemonized approach.')
def assert_root(self):
'''