Bug 866853 - RHEVM-CLI: disable output pagination via config file
Summary: RHEVM-CLI: disable output pagination via config file
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine-cli
Version: 3.1.0
Hardware: Unspecified
OS: Unspecified
low
unspecified
Target Milestone: ---
: 3.2.0
Assignee: Michael Pasternak
QA Contact: Ilia Meerovich
URL:
Whiteboard: infra
Depends On: 891722
Blocks: Simon-RFE-Tracker 877151
TreeView+ depends on / blocked
 
Reported: 2012-10-16 07:48 UTC by Ilia Meerovich
Modified: 2018-12-02 16:47 UTC (History)
14 users (show)

Fixed In Version: SF4
Doc Type: Enhancement
Doc Text:
A new feature has been added that allows output pagination to be disabled. This has been done to assist with automation and testing.This is done by adding 'autopage = False' value in the .rhevmshellrc file.
Clone Of:
: 877151 891722 (view as bug list)
Environment:
Last Closed: 2013-06-10 20:28:06 UTC
oVirt Team: Infra
Target Upstream Version:
Embargoed:
dyasny: Triaged+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Knowledge Base (Solution) 419323 0 None None None Never
Red Hat Product Errata RHBA-2013:0890 0 normal SHIPPED_LIVE rhevm-cli bug fix and enhancement update 2013-06-11 00:24:57 UTC

Description Ilia Meerovich 2012-10-16 07:48:27 UTC
We need support for enabling/disabling cli paging.
It could be done via cli command or parameter to rhevm-shell.

This feature will ease:
 - writing system scripts by end user 
 - cli validation automation effort

I can tell you that in current situation it will be difficult for end user to parse output (since each  ': <space>', 'END q' is adding tons of gibberish ACSI  characters and slowing down expect). 
Due this reason this feature is common in cli products and user (and me as automation engineer) will expect it.

Comment 1 Michael Pasternak 2012-10-16 08:11:09 UTC
it's disabled by default when executing script (-f/--file) which is works
for your use-case.

Comment 2 Ilia Meerovich 2012-10-16 08:22:02 UTC
"-f FILE, --file=FILE  read commands from FILE instead of stdin"
is not enought,

please provide an example how can I use it when I will need to do query, process information and put it back.
for example: how can i write script that do query, getting need information and running command with this information by using this option?

Comment 3 Michael Pasternak 2012-10-16 09:47:09 UTC
rhevm-shel is combined rhevm & linux shell environment, you can use linux
tools to filter and process the output at runtime:

1. run rhevm command and process the output saving it in to data holder
==============================================================+========
[RHEVM shell (connected)]# list vms | grep name > vms.txt

2. create new script at runtime
===============================

[RHEVM shell (connected)]# !less vms.txt | sed s/'name       :'/'action vm'/ | sed -e 's/$/ start/' > new_script_to_run.txt

2. invoke new script at runtime
===============================

[RHEVM shell (connected)]# file new_script_to_run.txt


* see the files output in shell during dev as "!less new_script_to_run.txt"
* i believe it answers all your (and users) needs for testing and scripting

Comment 4 Michael Pasternak 2012-10-16 10:06:39 UTC
i've created wiki example [1] using mentioned above.

[1] http://wiki.ovirt.org/wiki/CLI#Run_all_vms

Comment 5 Ilia Meerovich 2012-10-16 10:25:42 UTC
Thanks Michael.

from my experience with cli (it comes from embedded systems like switches) I can tell you that many users would like to use expect with scripting language that will be readable days after that script was written.

Also If company already uses/develops some king of framework, it will use perl/python/tcl stuff rather bash stuff and it means using expect 

All what i'm asking is to give user option to disable paging so he will be able to use any language that he wants.

For example: Now I should write wrapper for bash in python.
Why you are insisting so mach?

Comment 6 Michael Pasternak 2012-10-16 11:05:43 UTC
(In reply to comment #5)
> Thanks Michael.
> 
> from my experience with cli (it comes from embedded systems like switches) I
> can tell you that many users would like to use expect with scripting
> language that will be readable days after that script was written.
> 
> Also If company already uses/develops some king of framework, it will use
> perl/python/tcl stuff rather bash stuff and it means using expect 
> 
> All what i'm asking is to give user option to disable paging so he will be
> able to use any language that he wants.
> 
> For example: Now I should write wrapper for bash in python.
> Why you are insisting so mach?

insist?, ilia, 

i just replied to your RFE Description and Comment 2 (that enduser have to deal with file output redirection in scripts), saying that it's disabled by default during script execution.

this RFE should be called "disable output redirection to ease testing efforts"

Comment 18 Simon Grinberg 2012-11-15 10:20:26 UTC
To sum up what I'm acking: 

Disabling auto scrolling via configuration. 
Default value as today for backwards compatibility

Comment 19 Michael Pasternak 2012-11-15 11:26:31 UTC
ec069fc807716e065b8eb3c8d626ae87810513b0

paging disabling is done via 'no_paging = True' configuration value.

1. run shell to update configuration file with new key
2. modify ~/.ovirtshellrc or ~/.rhevmshellrc (depends on your distribution).

Comment 21 Barak 2012-12-10 10:47:11 UTC
http://gerrit.ovirt.org/#/c/9263/

Comment 23 Ilia Meerovich 2013-02-05 09:19:10 UTC
verified with rhevm-cli-3.2.0.3-1.el6ev.noarch

Comment 24 Michael Pasternak 2013-05-01 05:19:43 UTC
the configuration key of this feature was eventually renamed to 'autopage'

Comment 26 errata-xmlrpc 2013-06-10 20:28:06 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2013-0890.html


Note You need to log in before you can comment on or make changes to this bug.