diff --git a/salt/returners/librato_return.py b/salt/returners/librato_return.py index 4c60b73937..be81a8ec70 100644 --- a/salt/returners/librato_return.py +++ b/salt/returners/librato_return.py @@ -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.