jedelman8/cpal — pull request #20 by IPyandy (2014-04-03 23:05:15+00:00)
Title: Added new module utils.py and "fixed" some indents

Added a new module utils.py which has convertSize() to convert between kB and Mb and so forth. Will allow to show output in more human readable format.. test below, but not actually in effect yet, just for demonstration.

instead of showing this, look at lines **free_system_memory** and **total_system_memory** in specific.

```
$ python main.py -i 10.17.31.51 -m arista -n 'SW1' -f getFacts
{ 'connect_ip': '10.17.31.51',
'cpu_utilization': u'Cpu(s): 10.0%us',
'free_system_memory': 1327828,
'hostname': u'eos-sw01',
'platform': u'DCS-7050T-64-R',
'serial_number': u'JPE13020644',
'system_uptime': u' 7:53',
'total_sytem_memory': 3990500,
'var_name': 'dev',
'vendor': 'arista',
'version': u'4.13.2F'}
```

we can show this if needed

```
$ python main.py -i 10.17.31.51 -m arista -n 'SW1' -f getFacts
{ 'connect_ip': '10.17.31.51',
'cpu_utilization': 'Cpu(s): 10.0%us',
'free_system_memory': '1296.5 MiB',
'hostname': 'eos-sw01',
'platform': 'DCS-7050T-64-R',
'serial_number': 'JPE13020644',
'system_uptime': ' 7:39',
'total_sytem_memory': '3.8 GiB',
'var_name': 'dev',
'vendor': 'arista',
'version': '4.13.2F'}
```