From 53eca1b943fd9ebdcd49da51197d464b5c7b411c Mon Sep 17 00:00:00 2001 From: Erik Johnson Date: Mon, 2 Jun 2014 11:03:36 -0500 Subject: [PATCH] Add versionadded for varnish module Also did some cleanup and made it conform to the way Salt does things --- salt/modules/varnish.py | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/salt/modules/varnish.py b/salt/modules/varnish.py index fb6530254e..7bfd3cd684 100644 --- a/salt/modules/varnish.py +++ b/salt/modules/varnish.py @@ -2,16 +2,23 @@ ''' Support for Varnish -Please note: The functions in here are generic functions designed to work with -all implementations of Varnish. +.. versionadded:: Helium + +.. note:: + + These functions are generic, and are designed to work with all + implementations of Varnish. ''' -# Import salt libs -import salt.utils +# Import python libs import logging import re -log = logging.getLogger(__name__) +# Import salt libs +import salt.utils + +# Define the module's virtual name +__virtualname__ = 'varnish' def __virtual__(): @@ -20,7 +27,7 @@ def __virtual__(): ''' cmd = _detect_os() if salt.utils.which(cmd): - return True + return __virtualname__ return False