mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 00:55:19 +00:00
Merge pull request #4615 from kinware/versions-report-2
Add test.versions_information(). Fix stray print() call in version.py.
This commit is contained in:
commit
89884a0c11
@ -9,6 +9,8 @@ import time
|
||||
import random
|
||||
|
||||
# Import Salt libs
|
||||
import salt
|
||||
import salt.version
|
||||
import salt.loader
|
||||
|
||||
|
||||
@ -69,10 +71,20 @@ def version():
|
||||
|
||||
salt '*' test.version
|
||||
'''
|
||||
import salt
|
||||
return salt.__version__
|
||||
|
||||
|
||||
def versions_information():
|
||||
'''
|
||||
Returns versions of components used by salt as a dict
|
||||
|
||||
CLI Example::
|
||||
|
||||
salt '*' test.versions_information
|
||||
'''
|
||||
return dict(salt.version.versions_information())
|
||||
|
||||
|
||||
def versions_report():
|
||||
'''
|
||||
Returns versions of components used by salt
|
||||
@ -81,7 +93,6 @@ def versions_report():
|
||||
|
||||
salt '*' test.versions_report
|
||||
'''
|
||||
import salt.version
|
||||
return '\n'.join(salt.version.versions_report())
|
||||
|
||||
|
||||
|
@ -148,7 +148,6 @@ def versions_report():
|
||||
'''
|
||||
Yield each library properly formatted for a console clean output.
|
||||
'''
|
||||
print dict(versions_information())
|
||||
libs = list(versions_information())
|
||||
|
||||
padding = len(max([lib[0] for lib in libs], key=len)) + 1
|
||||
|
Loading…
Reference in New Issue
Block a user