Michael Pasternak has submitted this change and it was merged.
Change subject: cli: add basic scripting capabilities
......................................................................
cli: add basic scripting capabilities
this patch adds basic scripting capabilities,
added new option -f/--file that accept path
to the file with ovirt-shell commands,
also added new command called 'file'
HELP
===
[oVirt shell (connected)]# help file
== Usage ==
file FILE
== Description ==
This command reads commands from the FILE instead of stdin.
== Examples ==
file /home/test/script
EXAMPLE
======
[mpastern@lp /]# ovirt-shell --connec -l ... -u ... -p ... -f /home/mpastern/script
or
[oVirt shell (connected)]# file /home/mpastern/script
SCRIPT
======
less /home/mpastern/script
-----_____----------------
list vms
list clusters
list datacenters
...
Change-Id: I08b7fd6d072e237e1dc95ed6f41fb57387c72dd5
Signed-off-by: Michael Pasternak <mpastern(a)redhat.com>
---
M src/ovirtcli/options.py
M src/ovirtcli/shell/engineshell.py
A src/ovirtcli/shell/filecmdshell.py
3 files changed, 145 insertions(+), 11 deletions(-)
Approvals:
Michael Pasternak: Verified; Looks good to me, approved
--
To view, visit
http://gerrit.ovirt.org/4426
To unsubscribe, visit
http://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I08b7fd6d072e237e1dc95ed6f41fb57387c72dd5
Gerrit-PatchSet: 2
Gerrit-Project: ovirt-engine-cli
Gerrit-Branch: master
Gerrit-Owner: Michael Pasternak <mpastern(a)redhat.com>
Gerrit-Reviewer: Juan Hernandez <juan.hernandez(a)redhat.com>
Gerrit-Reviewer: Michael Pasternak <mpastern(a)redhat.com>
Gerrit-Reviewer: Ori Liel <oliel(a)redhat.com>