[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [libvirt] [PATCHv4 1/2] virsh: add new --details option to pool-list



On 07/02/2010 12:00 AM, Daniel P. Berrange wrote:
<sip>
A global '--format=plain|csv|json|xml' flag could apply to every single
virsh command, causing these methods to print in the corresponding
data format. Thus we'd have no code paths duplicated&  flexible data
formatting in many styles

The concept/idea here seems pretty nifty. It starts putting in place a good foundation for virsh to becoming a widely useful utility. :)

We don't even have to implement it all at once. Instead we can convert over one function at a time if that's more practical.

We'll probably need another suggested data type as well:

  virshPrintCapacityValue(some large capacity numeric type)

That could take a raw byte (or kilobyte?) value then display it appropriately (ie raw, human readable, etc). ie.:

  1979120929996 vs 1,979,120,929,996 vs 1.8TB

Regards and best wishes,

Justin Clift

--
Salasaga  -  Open Source eLearning IDE
              http://www.salasaga.org


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]