Enable auto-unit formatting in script output
This patch enables by default the old 'human-readable' option, but in a slightly different model. The option is now called "units" and takes either: - 'h' for automatic formatting - 'm', 'g' or 't' for mebi/gibi/tebibytes If 'h' is used, we add a unit suffix, otherwise nothing is added so that parsing is easy. The default value of this unit is: - 'h' if a separator is not passed - 'm' if a separator is passed Reviewed-by: ultrotter
Showing
- lib/cli.py 34 additions, 12 deletionslib/cli.py
- lib/utils.py 23 additions, 6 deletionslib/utils.py
- scripts/gnt-instance 2 additions, 6 deletionsscripts/gnt-instance
- scripts/gnt-job 1 addition, 1 deletionscripts/gnt-job
- scripts/gnt-node 4 additions, 10 deletionsscripts/gnt-node
- scripts/gnt-os 2 additions, 1 deletionscripts/gnt-os
- test/ganeti.utils_unittest.py 31 additions, 10 deletionstest/ganeti.utils_unittest.py
Loading
Please register or sign in to comment