[libvirt] [PATCH v3 08/18] blockjob: add new --raw flag to virsh blockjob

Eric Blake eblake at redhat.com
Fri Sep 5 18:48:11 UTC 2014


On 09/04/2014 10:23 AM, Peter Krempa wrote:
> On 08/31/14 06:02, Eric Blake wrote:
>> The current output of 'blockjob [--info]' is a single line
>> designed for human consumption; it's not very nice for machine
>> parsing.  Furthermore, I have plans to modify the line in
>> response to the new flag for controlling bandwidth units.
>> Solve that by adding a --raw parameter, which outputs
>> information closer to the C struct.
>>
>> $ virsh blockjob testvm1 vda --raw
>>  type=Block Copy
>>  bandwidth=1
>>  cur=197120
>>  end=197120
>>
>> The information is indented, because I'd like for a later patch
>> to add a mode that iterates over all the vm's disks with status
>> for each; in that mode, each block name would be listed unindented
>> before information (if any) about that block.

I haven't actually finished adding a loop operation yet, but hope to
have it in v4.

>> * tools/virsh-domain.c (cmdBlockJob): Add --raw parameter; tweak
>> error wording.
>> * tools/virsh.pod (blockjob): Document it.
>>
>> Signed-off-by: Eric Blake <eblake at redhat.com>
>> ---
>>  tools/virsh-domain.c | 31 +++++++++++++++++++++++--------
>>  tools/virsh.pod      | 19 ++++++++++++-------
>>  2 files changed, 35 insertions(+), 15 deletions(-)
>>
> 
> ACK,

Pushed after fixing an accidental double space.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 539 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20140905/8b3bcedf/attachment-0001.sig>


More information about the libvir-list mailing list