Add quotastats as quota.stats

This commit is contained in:
Joseph Hall 2013-03-10 21:25:56 -06:00
parent 67e07cb55f
commit 57117b7bde

View File

@ -144,3 +144,22 @@ def warn():
'''
__salt__['cmd.run']('quotawarn')
def stats():
'''
Runs the quotastats command, and returns the parsed output
CLI Example::
salt '*' quota.stats
'''
ret = {}
out = __salt__['cmd.run']('quotastats').splitlines()
for line in out:
if not line:
continue
comps = line.split(': ')
ret[comps[0]] = comps[1]
return ret