mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 01:18:58 +00:00
salt.modules.vacuum now takes a parameter verbose.
This commit is contained in:
parent
17acf8e622
commit
e70c885a22
@ -230,15 +230,18 @@ def delete(uuid=None):
|
||||
return ret
|
||||
|
||||
|
||||
def vacuum():
|
||||
def vacuum(verbose=False):
|
||||
'''
|
||||
Remove unused images
|
||||
|
||||
verbose : boolean (False)
|
||||
Specifies verbose output
|
||||
|
||||
CLI Example:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
salt '*' imgadm.vacuum
|
||||
salt '*' imgadm.vacuum [True]
|
||||
'''
|
||||
ret = {}
|
||||
imgadm = _check_imgadm()
|
||||
@ -256,7 +259,10 @@ def vacuum():
|
||||
'name': image[3][1:image[3].index('@')],
|
||||
'version': image[3][image[3].index('@')+1:-1]
|
||||
}
|
||||
return result
|
||||
if verbose:
|
||||
return result
|
||||
else:
|
||||
return list(result.keys())
|
||||
|
||||
|
||||
# vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4
|
||||
|
Loading…
Reference in New Issue
Block a user