From 142d8d1f1cc5f36192395e224b76972d8406360b Mon Sep 17 00:00:00 2001 From: Peter Palasti Date: Tue, 11 Apr 2017 19:17:46 +0000 Subject: [PATCH] add a test file for testing --- salt/modules/pp_test_module.py | 56 ++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 salt/modules/pp_test_module.py diff --git a/salt/modules/pp_test_module.py b/salt/modules/pp_test_module.py new file mode 100644 index 000000000000..eb5e445f79cd --- /dev/null +++ b/salt/modules/pp_test_module.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +''' +pp_test_module execution module +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +PP Playground Test module + +.. versionadded:: Nitrogen + +:configuration: + + .. code-block:: yaml + + +''' +# Import Python libs +from __future__ import absolute_import +import logging + +# Import salt libs +import salt.utils.compat + +# Import third party libs +try: + # Import libs... + + HAS_LIBS = True + MISSING_PACKAGE_REASON = None +except ImportError as ie: + HAS_LIBS = False + MISSING_PACKAGE_REASON = ie.message + +log = logging.getLogger(__name__) + +__virtualname__ = 'pp_test_module' + + +def __virtual__(): + ''' + Only load this module if dependencies is installed on this minion. + ''' + if HAS_LIBS: + return __virtualname__ + return (False, + 'The pp_test_module execution module failed to load:' + 'import error - {0}.'.format(MISSING_PACKAGE_REASON)) + + +def __init__(opts): + # Put logic here to instantiate underlying jobs/connections + salt.utils.compat.pack_dunder(__name__) + + +def my_action(params): + # Replace this with your actions + pass \ No newline at end of file