Daniel P. Berrange wrote:
This patch updates virsh to make use of any APIs with
new *Job variants. This means the 'create', 'start',
'save', 'restore', 'dump', 'net-create' and
'net-start'
methods all now take a '--verbose' option. If this
option is given, it will invoke the *Job variant of
the API and print out increment progress information.
eg, As an example of a job which has a bounded time,
$ ./virsh --connect test:///default save --verbose test foo
save [===== 18% ] Duration: 9 s, ETA: 41 s
error: Cancelled domain save operation
eg, As an example which is unbounded
$ ./virsh --connect test:///default save --verbose test foo
save [ = ] Duration: 9 s
error: Cancelled domain save operation
In the latter case, the '=' will bounce back & forth while
the job is running.
Both cases illustrate how the 'Ctrl-C' / SIGINT handler is
hooked up such that 'virJobCancel' is run. Pressing Ctrl-C
twice in quick succession will still immediately exit the
program - useful if cancellation fails for some reason.
Looks sensible.
Rich.
--
Emerging Technologies, Red Hat -
http://et.redhat.com/~rjones/
Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod
Street, Windsor, Berkshire, SL4 1TE, United Kingdom. Registered in
England and Wales under Company Registration No. 03798903