mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 01:18:58 +00:00
Add quotastats as quota.stats
This commit is contained in:
parent
67e07cb55f
commit
57117b7bde
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user