Skip to content

Commit

Permalink
Renaming engine_type to engine_module for configuration parameter.
Browse files Browse the repository at this point in the history
  • Loading branch information
garethgreenaway committed Oct 29, 2018
1 parent b3e276b commit d84993b
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
6 changes: 3 additions & 3 deletions doc/topics/engines/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Salt engines are configured under an ``engines`` top-level section in your Salt
.. versionadded:: Neon

Multiple copies of a particular Salt engine can be configured by including the ``engine_type`` parameter in the engine configuration.
Multiple copies of a particular Salt engine can be configured by including the ``engine_module`` parameter in the engine configuration.

.. code-block:: yaml
Expand All @@ -38,12 +38,12 @@ Multiple copies of a particular Salt engine can be configured by including the `
host: production_log.my_network.com
port: 5959
proto: tcp
engine_type: logstash
engine_module: logstash
- develop_logstash:
host: develop_log.my_network.com
port: 5959
proto: tcp
engine_type: logstash
engine_module: logstash
Salt engines must be in the Salt path, or you can add the ``engines_dirs`` option in your Salt master configuration with a list of directories under which Salt attempts to find Salt engines. This option should be formatted as a list of directories to search, such as:

Expand Down
6 changes: 3 additions & 3 deletions doc/topics/releases/neon.rst
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ Enhancements to Engines
=======================

Multiple copies of a particular Salt engine can be configured by including
the ``engine_type`` parameter in the engine configuration.
the ``engine_module`` parameter in the engine configuration.

.. code-block:: yaml
Expand All @@ -267,12 +267,12 @@ the ``engine_type`` parameter in the engine configuration.
host: production_log.my_network.com
port: 5959
proto: tcp
engine_type: logstash
engine_module: logstash
- develop_logstash:
host: develop_log.my_network.com
port: 5959
proto: tcp
engine_type: logstash
engine_module: logstash
Salt Cloud Features
===================
Expand Down
6 changes: 3 additions & 3 deletions salt/engines/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,10 @@ def start_engines(opts, proc_mgr, proxy=None):
else:
engine_opts = None
engine_name = None
if engine_opts is not None and 'engine_type' in engine_opts:
fun = '{0}.start'.format(engine_opts['engine_type'])
if engine_opts is not None and 'engine_module' in engine_opts:
fun = '{0}.start'.format(engine_opts['engine_module'])
engine_name = engine
del engine_opts['engine_type']
del engine_opts['engine_module']
else:
fun = '{0}.start'.format(engine)
if fun in engines:
Expand Down
6 changes: 3 additions & 3 deletions tests/unit/test_engines.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,14 @@ class EngineTestCase(TestCase, LoaderModuleMockMixin):
def setup_loader_modules(self):
return {engines: {}}

def test_engine_type(self):
def test_engine_module(self):
'''
Test
'''
mock_opts = salt.config.DEFAULT_MINION_OPTS
mock_opts['__role'] = 'minion'
mock_opts['engines'] = [{'test_one': {'engine_type': 'test'}},
{'test_two': {'engine_type': 'test'}}]
mock_opts['engines'] = [{'test_one': {'engine_module': 'test'}},
{'test_two': {'engine_module': 'test'}}]

process_manager = salt.utils.process.ProcessManager()
with patch.dict(engines.__opts__, mock_opts):
Expand Down

0 comments on commit d84993b

Please sign in to comment.