mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 09:23:56 +00:00
more pep8 stuff
This commit is contained in:
parent
e270e9586b
commit
3975429f48
@ -49,6 +49,7 @@ __virtualname__ = 'librato'
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
|
||||
def __virtual__():
|
||||
if not HAS_LIBRATO:
|
||||
log.error("Could not import librato module.")
|
||||
@ -58,6 +59,7 @@ def __virtual__():
|
||||
log.debug("Librato Module loaded.")
|
||||
return __virtualname__
|
||||
|
||||
|
||||
def _get_options(ret=None):
|
||||
'''
|
||||
Get the librato options from salt.
|
||||
@ -78,6 +80,7 @@ def _get_options(ret=None):
|
||||
log.debug("Retrieved Librato options: {0}".format(_options))
|
||||
return _options
|
||||
|
||||
|
||||
def _get_librato(ret=None):
|
||||
'''
|
||||
Return a librato connection object.
|
||||
@ -92,6 +95,7 @@ def _get_librato(ret=None):
|
||||
log.info("Connected to librato.")
|
||||
return conn
|
||||
|
||||
|
||||
def _calculate_runtimes(states):
|
||||
results = {
|
||||
'runtime': 0.00,
|
||||
@ -113,6 +117,7 @@ def _calculate_runtimes(states):
|
||||
log.debug("Parsed state metrics: {0}".format(results))
|
||||
return results
|
||||
|
||||
|
||||
def returner(ret):
|
||||
'''
|
||||
Parse the return data and return metrics to librato.
|
||||
|
Loading…
Reference in New Issue
Block a user