diff --git a/.ci/docs b/.ci/docs index 931c463a9386..cc3892dda11a 100644 --- a/.ci/docs +++ b/.ci/docs @@ -29,7 +29,7 @@ pipeline { } stage('build') { steps { - sh 'eval "$(pyenv init -)"; make -C doc clean html' + sh 'eval "$(pyenv init -)"; make SPHINXOPTS="-W" -C doc clean html' } } } @@ -48,8 +48,8 @@ pipeline { description: 'The docs job has failed', status: 'FAILURE', context: "jenkins/pr/docs" - slackSend channel: "#jenkins-prod-pr", - color: '#FF0000', + slackSend channel: "#jenkins-prod-pr", + color: '#FF0000', message: "FAILED: PR-Job: '${env.JOB_NAME} [${env.BUILD_NUMBER}]' (${env.BUILD_URL})" } } diff --git a/doc/conf.py b/doc/conf.py index 5704c204866c..5e61f828c493 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -271,9 +271,10 @@ def inner(fn, *iargs, **ikwargs): # < --- START do not merge these settings to other branches START ---> # build_type = 'develop' # latest, previous, develop, next -release = version # version, latest_release, previous_release # < --- END do not merge these settings to other branches END ---> # +release = latest_release if build_type == 'develop' else version + # Set google custom search engine if release == latest_release: @@ -308,7 +309,7 @@ def inner(fn, *iargs, **ikwargs): 'sphinx.ext.intersphinx', 'httpdomain', 'youtube', - 'saltautodoc', # Must be AFTER autodoc + #'saltautodoc', # Must be AFTER autodoc 'shorturls', ] diff --git a/doc/ref/clients/index.rst b/doc/ref/clients/index.rst index 27fa77c1c07a..43bfd566d1d1 100644 --- a/doc/ref/clients/index.rst +++ b/doc/ref/clients/index.rst @@ -98,13 +98,13 @@ RunnerClient ------------ .. autoclass:: salt.runner.RunnerClient - :members: cmd, async, cmd_sync, cmd_async + :members: cmd, asynchronous, cmd_sync, cmd_async WheelClient ----------- .. autoclass:: salt.wheel.WheelClient - :members: cmd, async, cmd_sync, cmd_async + :members: cmd, asynchronous, cmd_sync, cmd_async CloudClient ----------- diff --git a/doc/ref/engines/all/index.rst b/doc/ref/engines/all/index.rst index 2852249127bd..15f6d8a667e0 100644 --- a/doc/ref/engines/all/index.rst +++ b/doc/ref/engines/all/index.rst @@ -16,7 +16,7 @@ engine modules ircbot junos_syslog logentries - logstash + logstash_engine napalm_syslog reactor redis_sentinel diff --git a/doc/ref/engines/all/salt.engines.logstash.rst b/doc/ref/engines/all/salt.engines.logstash.rst deleted file mode 100644 index 4746ce8783ce..000000000000 --- a/doc/ref/engines/all/salt.engines.logstash.rst +++ /dev/null @@ -1,6 +0,0 @@ -===================== -salt.engines.logstash -===================== - -.. automodule:: salt.engines.logstash - :members: \ No newline at end of file diff --git a/doc/ref/engines/all/salt.engines.logstash_engine.rst b/doc/ref/engines/all/salt.engines.logstash_engine.rst new file mode 100644 index 000000000000..e9ef1f7c3ac2 --- /dev/null +++ b/doc/ref/engines/all/salt.engines.logstash_engine.rst @@ -0,0 +1,6 @@ +============================ +salt.engines.logstash_engine +============================ + +.. automodule:: salt.engines.logstash_engine + :members: diff --git a/doc/ref/states/requisites.rst b/doc/ref/states/requisites.rst index 9a1f7e9231c6..cbdb34f1e230 100644 --- a/doc/ref/states/requisites.rst +++ b/doc/ref/states/requisites.rst @@ -581,7 +581,7 @@ In the following example, Salt will not try to manage the nginx service or any configuration files unless the nginx package is installed because of the ``pkg: nginx`` requisite. -.. code-block:: yaml +.. code-block:: jinja nginx: pkg.installed: [] diff --git a/doc/ref/tops/all/salt.tops.varstack.rst b/doc/ref/tops/all/salt.tops.varstack.rst deleted file mode 100644 index cfe6503e7570..000000000000 --- a/doc/ref/tops/all/salt.tops.varstack.rst +++ /dev/null @@ -1,6 +0,0 @@ -================== -salt.tops.varstack -================== - -.. automodule:: salt.tops.varstack_top - :members: diff --git a/doc/ref/tops/all/salt.tops.varstack_top.rst b/doc/ref/tops/all/salt.tops.varstack_top.rst new file mode 100644 index 000000000000..d4c3616b848f --- /dev/null +++ b/doc/ref/tops/all/salt.tops.varstack_top.rst @@ -0,0 +1,6 @@ +====================== +salt.tops.varstack_top +====================== + +.. automodule:: salt.tops.varstack_top + :members: \ No newline at end of file diff --git a/doc/topics/index.rst b/doc/topics/index.rst index 58fc20edf522..1819cd919706 100644 --- a/doc/topics/index.rst +++ b/doc/topics/index.rst @@ -84,8 +84,11 @@ versatile as it is practical, suitable for any network. Open ==== + Salt is developed under the `Apache 2.0 license`_, and can be used for open and proprietary projects. Please submit your expansions back to the Salt project so that we can all benefit together as Salt grows. Please feel free to sprinkle Salt around your systems and let the deliciousness come forth. + +.. _`Apache 2.0 license`: http://www.apache.org/licenses/LICENSE-2.0.html diff --git a/doc/topics/releases/2014.7.0.rst b/doc/topics/releases/2014.7.0.rst index 925d867e0b87..5cb5e5aad523 100644 --- a/doc/topics/releases/2014.7.0.rst +++ b/doc/topics/releases/2014.7.0.rst @@ -54,9 +54,6 @@ release. Simply stated, users running Salt with RAET should expect some hiccups as we hammer out the update. This is a BETA release of Salt RAET. -For information about how to use Salt with RAET please see the -:ref:`tutorial `. - Salt SSH Enhancements ===================== diff --git a/doc/topics/releases/2018.3.3.rst b/doc/topics/releases/2018.3.3.rst index 73d52c217437..7da84f04ae42 100644 --- a/doc/topics/releases/2018.3.3.rst +++ b/doc/topics/releases/2018.3.3.rst @@ -92,7 +92,7 @@ Example: cmd.run 'echo '\''h=\"baz\"'\''' runas=macuser Changelog for v2018.3.2..v2018.3.3 -================================================================= +================================== *Generated at: 2018-09-21 17:45:27 UTC* @@ -507,7 +507,7 @@ Changelog for v2018.3.2..v2018.3.3 * 3d26affa10 Fix remaining file state integration tests (py3) -* **PR** `#49171`_: (`Ch3LL`_) [2018.3.3] cherry pick `#49103`_ +* **PR** `#49171`_: (`Ch3LL`_) [2018.3.3] cherry pick `#49103`_ @ *2018-08-17 20:23:32 UTC* * **PR** `#49103`_: (`dwoz`_) Install the launcher so we can execute py files (refs: `#49171`_) @@ -1630,7 +1630,7 @@ Changelog for v2018.3.2..v2018.3.3 * **ISSUE** `#46896`_: (`Poil`_) Proxy + file.managed => Comment: Failed to cache xxx invalid arguments to setopt (refs: `#48754`_) -* **PR** `#48754`_: (`lomeroe`_) send proxy/ca_cert parameters as strings (not unicode) to tornado httpclient +* **PR** `#48754`_: (`lomeroe`_) send proxy/ca_cert parameters as strings (not unicode) to tornado httpclient @ *2018-07-25 14:55:42 UTC* * 030c921914 Merge pull request `#48754`_ from lomeroe/fix-tornado-proxy @@ -3075,7 +3075,7 @@ Changelog for v2018.3.2..v2018.3.3 * dae65da256 Merge branch '2018.3.1' into '2018.3' -* **PR** `#48186`_: (`rallytime`_) Add autodoc module for saltcheck.py +* **PR** `#48186`_: (`rallytime`_) Add autodoc module for saltcheck.py @ *2018-06-19 19:03:55 UTC* * 5b4897f050 Merge pull request `#48186`_ from rallytime/saltcheck-docs @@ -3362,11 +3362,11 @@ Changelog for v2018.3.2..v2018.3.3 * **PR** `#48109`_: (`rallytime`_) Back-port `#47851`_ to 2018.3 @ *2018-06-14 13:09:04 UTC* - * **PR** `#47851`_: (`rares-pop`_) Fixup! add master.py:FileserverUpdate **kwargs (refs: `#48109`_) + * **PR** `#47851`_: (`rares-pop`_) Fixup! add master.py:FileserverUpdate \*\*kwargs (refs: `#48109`_) * 2902ee0b14 Merge pull request `#48109`_ from rallytime/bp-47851 - * e9dc30bf8e Fixup! add master.py:FileserverUpdate **kwargs + * e9dc30bf8e Fixup! add master.py:FileserverUpdate \*\*kwargs * **ISSUE** `#47925`_: (`JonGriggs`_) GitFS looking for files in the master branch only (refs: `#47943`_) @@ -3377,7 +3377,7 @@ Changelog for v2018.3.2..v2018.3.3 * 534e1a7100 Merge branch '2018.3' into issue47925 -* **PR** `#48089`_: (`rallytime`_) Update release versions for the 2018.3 branch +* **PR** `#48089`_: (`rallytime`_) Update release versions for the 2018.3 branch @ *2018-06-13 14:03:44 UTC* * 9e1d0040e4 Merge pull request `#48089`_ from rallytime/update_version_doc_2018.3 diff --git a/doc/topics/releases/neon.rst b/doc/topics/releases/neon.rst index e488f7cba36f..8ee0e5fbe6fa 100644 --- a/doc/topics/releases/neon.rst +++ b/doc/topics/releases/neon.rst @@ -37,7 +37,7 @@ Usage Example file system layout: -.. code-block:: txt +.. code-block:: text /srv/salt/apache/ init.sls @@ -47,10 +47,11 @@ Example file system layout: config.tst deployment_validation.tst -Tests can be run for each state by name, for all apache/saltcheck/*.tst files, or for all states -assigned to the minion in top.sls. Tests may also be created with no associated state. These tests -will be run through the use of ``saltcheck.run_state_tests``, but will not be automatically run -by ``saltcheck.run_highstate_tests``. +Tests can be run for each state by name, for all ``apache/saltcheck/*.tst`` files, +or for all states assigned to the minion in top.sls. Tests may also be created +with no associated state. These tests will be run through the use of +``saltcheck.run_state_tests``, but will not be automatically run by +``saltcheck.run_highstate_tests``. .. code-block:: bash diff --git a/salt/cloud/clouds/oneandone.py b/salt/cloud/clouds/oneandone.py index c4d3bd905228..d501dae91bf5 100644 --- a/salt/cloud/clouds/oneandone.py +++ b/salt/cloud/clouds/oneandone.py @@ -99,6 +99,7 @@ sudo salt-cloud -f create_firewall_policy oneandone name='1salttest' description='salt_test_desc' rules='[{"protocol":"TCP", "port":"80", "description":"salt_fw_rule_desc"}]' + List baremetal models .. code-block:: bash diff --git a/salt/modules/bluecoat_sslv.py b/salt/modules/bluecoat_sslv.py index 61c862e07dab..80a4900bde95 100644 --- a/salt/modules/bluecoat_sslv.py +++ b/salt/modules/bluecoat_sslv.py @@ -2,7 +2,7 @@ ''' Module to provide Blue Coat SSL Visibility compatibility to Salt. -:codeauthor: :email:`Spencer Ervin ` +:codeauthor: Spencer Ervin :maturity: new :depends: none :platform: unix @@ -16,7 +16,7 @@ Options passed into opts will be ignored if options are passed into pillar. .. seealso:: - :prox:`Blue Coat SSL Visibility Proxy Module ` + :py:mod:`Blue Coat SSL Visibility Proxy Module ` About ===== diff --git a/salt/modules/boto3_elasticache.py b/salt/modules/boto3_elasticache.py index 2db4a91de8c6..fc86b0e7f0e0 100644 --- a/salt/modules/boto3_elasticache.py +++ b/salt/modules/boto3_elasticache.py @@ -993,6 +993,7 @@ def modify_cache_parameter_group(name, region=None, key=None, keyid=None, profil update. At least one parameter/value pair is required. .. code-block:: yaml + ParameterNameValues: - ParameterName: timeout # Amazon requires ALL VALUES to be strings... diff --git a/salt/modules/dracr.py b/salt/modules/dracr.py index 6ecc08d5fe3b..28f46a7fb11e 100644 --- a/salt/modules/dracr.py +++ b/salt/modules/dracr.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- ''' -Manage Dell DRAC. +Manage Dell DRAC .. versionadded:: 2015.8.2 ''' @@ -154,6 +154,7 @@ def __execute_ret(command, host=None, def get_property(host=None, admin_username=None, admin_password=None, property=None): ''' .. versionadded:: Fluorine + Return specific property host @@ -185,6 +186,7 @@ def get_property(host=None, admin_username=None, admin_password=None, property=N def set_property(host=None, admin_username=None, admin_password=None, property=None, value=None): ''' .. versionadded:: Fluorine + Set specific property host @@ -221,7 +223,8 @@ def set_property(host=None, admin_username=None, admin_password=None, property=N def ensure_property_set(host=None, admin_username=None, admin_password=None, property=None, value=None): ''' .. versionadded:: Fluorine - Ensure that property is set to specific value. + + Ensure that property is set to specific value host The chassis host. diff --git a/salt/modules/nxos.py b/salt/modules/nxos.py index 2910fb82cfb7..d84740a1f357 100644 --- a/salt/modules/nxos.py +++ b/salt/modules/nxos.py @@ -5,10 +5,14 @@ .. versionadded:: 2016.11.0 This module supports execution using a Proxy Minion or Native Minion: -1) Proxy Minion: Connect over SSH or NX-API HTTP(S). - See :mod:`salt.proxy.nxos ` for proxy minion setup details. -2) Native Minion: Connect over NX-API Unix Domain Socket (UDS). - Install the minion inside the GuestShell running on the NX-OS device. + +- Proxy Minion: Connect over SSH or NX-API HTTP(S). + + - See :mod:`salt.proxy.nxos ` for proxy minion setup details. + +- Native Minion: Connect over NX-API Unix Domain Socket (UDS). + + - Install the minion inside the GuestShell running on the NX-OS device. :maturity: new :platform: nxos @@ -45,22 +49,26 @@ cookie: 'username' no_save_config: True -cookie - Use the option to override the default cookie 'admin:local' when - connecting over UDS and use 'username:local' instead. This is needed when - running the salt-minion in the GuestShell using a non-admin user. +``cookie`` + +- Use the option to override the default cookie 'admin:local' when connecting + over UDS and use 'username:local' instead. This is needed when running the + salt-minion in the GuestShell using a non-admin user. + +- This option is ignored for SSH and NX-API Proxy minions. + +``no_save_config`` + +- If False, 'copy running-config starting-config' is issues for every + configuration command. - This option is ignored for SSH and NX-API Proxy minions. +- If True, Running config is not saved to startup config -no_save_config: - If False, 'copy running-config starting-config' is issues for every - configuration command. - If True, Running config is not saved to startup config - Default: False +- Default: False - The recommended approach is to use the `save_running_config` function - instead of this option to improve performance. The default behavior - controlled by this option is preserved for backwards compatibility. +- The recommended approach is to use the `save_running_config` function instead + of this option to improve performance. The default behavior controlled by + this option is preserved for backwards compatibility. The APIs defined in this execution module can also be executed using @@ -75,13 +83,17 @@ The functions in this module can be executed using either of the following syntactic forms. - salt '*' nxos.cmd - salt '*' nxos.cmd get_user username=admin + .. code-block:: bash + + salt '*' nxos.cmd + salt '*' nxos.cmd get_user username=admin or - salt '*' nxos. - salt '*' nxos.get_user username=admin + .. code-block:: bash + + salt '*' nxos. + salt '*' nxos.get_user username=admin The nxos.cmd syntax is preserved for backwards compatibility. ''' diff --git a/salt/modules/saltcheck.py b/salt/modules/saltcheck.py index 81f1c4c20a0d..efa7c2ab3d94 100644 --- a/salt/modules/saltcheck.py +++ b/salt/modules/saltcheck.py @@ -24,7 +24,7 @@ Example file system layout: -.. code-block:: txt +.. code-block:: text /srv/salt/apache/ init.sls @@ -34,10 +34,11 @@ config.tst deployment_validation.tst -Tests can be run for each state by name, for all apache/saltcheck/*.tst files, or for all states -assigned to the minion in top.sls. Tests may also be created with no associated state. These tests -will be run through the use of ``saltcheck.run_state_tests``, but will not be automatically run -by ``saltcheck.run_highstate_tests``. +Tests can be run for each state by name, for all ``apache/saltcheck/*.tst`` +files, or for all states assigned to the minion in top.sls. Tests may also be +created with no associated state. These tests will be run through the use of +``saltcheck.run_state_tests``, but will not be automatically run by +``saltcheck.run_highstate_tests``. .. code-block:: bash diff --git a/salt/modules/virt.py b/salt/modules/virt.py index 78945e5ea8d4..f53e4d8326c0 100644 --- a/salt/modules/virt.py +++ b/salt/modules/virt.py @@ -1244,42 +1244,53 @@ def init(name, :param cpu: Number of virtual CPUs to assign to the virtual machine :param mem: Amount of memory to allocate to the virtual machine in MiB. :param image: Path to a disk image to use as the first disk (Default: ``None``). - Deprecated in favor of the ``disks`` parameter. To set (or change) the image of a - disk, add the following to the disks definitions: + Deprecated in favor of the ``disks`` parameter. To set (or change) the + image of a disk, add the following to the disks definitions: - .. code-block:: python + .. code-block:: python - { - 'name': 'name_of_disk_to_change', - 'image': '/path/to/the/image' - } + { + 'name': 'name_of_disk_to_change', + 'image': '/path/to/the/image' + } :param nic: NIC profile to use (Default: ``'default'``). - The profile interfaces can be customized / extended with the interfaces parameter. - If set to ``None``, no profile will be used. + The profile interfaces can be customized / extended with the interfaces + parameter. If set to ``None``, no profile will be used. + :param interfaces: List of dictionaries providing details on the network interfaces to create. These data are merged with the ones from the nic profile. The structure of - each dictionary is documented in :ref:`init-nic-def`. - - .. versionadded:: Fluorine - :param hypervisor: the virtual machine type. By default the value will be computed according - to the virtual host capabilities. - :param start: ``True`` to start the virtual machine after having defined it (Default: ``True``) - :param disk: Disk profile to use (Default: ``'default'``). If set to ``None``, no profile will be used. - :param disks: List of dictionaries providing details on the disk devices to create. - These data are merged with the ones from the disk profile. The structure of - each dictionary is documented in :ref:`init-disk-def`. - - .. versionadded:: Fluorine - :param saltenv: Fileserver environment (Default: ``'base'``). - See :mod:`cp module for more details ` - :param seed: ``True`` to seed the disk image. Only used when the ``image`` parameter is provided. - (Default: ``True``) + each dictionary is documented in init-nic-def_. + + .. versionadded:: Fluorine + + :param hypervisor: the virtual machine type. By default the value will be + computed according to the virtual host capabilities. + + :param start: ``True`` to start the virtual machine after having defined it + (Default: ``True``) + + :param disk: Disk profile to use (Default: ``'default'``). If set to + ``None``, no profile will be used. + + :param disks: List of dictionaries providing details on the disk devices to + create. These data are merged with the ones from the disk profile. The + structure of each dictionary is documented in init-disk-def_. + + .. versionadded:: Fluorine + + :param saltenv: Fileserver environment (Default: ``'base'``) + + :param seed: ``True`` to seed the disk image. Only used when the ``image`` + parameter is provided. (Default: ``True``) + :param install: install salt minion if absent (Default: ``True``) :param pub_key: public key to seed with (Default: ``None``) :param priv_key: public key to seed with (Default: ``None``) - :param seed_cmd: Salt command to execute to seed the image. (Default: ``'seed.apply'``) + :param seed_cmd: Salt command to execute to seed the image. (Default: + ``'seed.apply'``) + :param enable_vnc: ``True`` to setup a vnc display for the VM (Default: ``False``) @@ -1291,26 +1302,31 @@ def init(name, graphics={'type': 'vnc'} .. deprecated:: Fluorine + :param graphics: Dictionary providing details on the graphics device to create. (Default: ``None``) - See :ref:`init-graphics-def` for more details on the possible values. + See init-graphics-def_ for more details on the possible values. .. versionadded:: Fluorine + :param loader: Dictionary providing details on the BIOS firmware loader. (Default: ``None``) - See :ref:`init-loader-def` for more details on the possible values. + See init-loader-def_ for more details on the possible values. .. versionadded:: Neon + :param os_type: type of virtualization as found in the ``//os/type`` element of the libvirt definition. The default value is taken from the host capabilities, with a preference for ``hvm``. .. versionadded:: Fluorine + :param arch: architecture of the virtual machine. The default value is taken from the host capabilities, but ``x86_64`` is prefed over ``i686``. .. versionadded:: Fluorine + :param enable_qcow: ``True`` to create a QCOW2 overlay image, rather than copying the image (Default: ``False``). @@ -1327,6 +1343,7 @@ def init(name, } .. deprecated:: Fluorine + :param pool: Path of the folder where the image files are located for vmware/esx hypervisors. @@ -1341,6 +1358,7 @@ def init(name, } .. deprecated:: Flurorine + :param dmac: Default MAC address to use for the network interfaces. By default MAC addresses are automatically generated. @@ -1356,25 +1374,31 @@ def init(name, } .. deprecated:: Fluorine - :param config: minion configuration to use when seeding. - See :mod:`seed module for more details ` + + :param config: minion configuration to use when seeding. See :mod:`seed + module ` for more details + :param boot_dev: String of space-separated devices to boot from (Default: ``'hd'``) - :param serial_type: Serial device type. One of ``'pty'``, ``'tcp'`` (Default: ``None``) + :param serial_type: Serial device type. One of ``'pty'``, ``'tcp'`` + (Default: ``None``) :param telnet_port: Telnet port to use for serial device of type ``tcp``. - :param console: ``True`` to add a console device along with serial one (Default: ``True``) + :param console: ``True`` to add a console device along with serial one + (Default: ``True``) :param connection: libvirt connection URI, overriding defaults - .. versionadded:: Fluorine + .. versionadded:: Fluorine + :param username: username to connect with, overriding defaults - .. versionadded:: Fluorine + .. versionadded:: Fluorine + :param password: password to connect with, overriding defaults - .. versionadded:: Fluorine + .. versionadded:: Fluorine .. _init-nic-def: - .. rubric:: Network Interfaces Definitions + **Network Interface Definitions** Network interfaces dictionaries can contain the following properties: @@ -1395,7 +1419,7 @@ def init(name, .. _init-disk-def: - .. rubric:: Disks Definitions + **Disk Definitions** Disk dictionaries can contain the following properties: @@ -1464,7 +1488,7 @@ def init(name, .. _init-graphics-def: - .. rubric:: Graphics Definition + **Graphics Definition** The graphics dictionnary can have the following properties: @@ -1488,7 +1512,9 @@ def init(name, By default, not setting the ``listen`` part of the dictionary will default to listen on all addresses. - .. rubric:: Loader Definition + .. _init-loader-def: + + **Loader Definition** The loader dictionary must have the following property: @@ -1498,7 +1524,7 @@ def init(name, Optionally, you can provide arbitrary attributes such as ``readonly`` or ``type``. See the libvirt documentation for all supported loader parameters. - .. rubric:: CLI Example + CLI Example: .. code-block:: bash @@ -1867,7 +1893,7 @@ def update(name, to empty list. :param graphics: - The new graphics definition as defined in :ref:`init-graphics-def`. If not set, + The new graphics definition as defined in init-graphics-def_. If not set, the graphics will not be changed. To remove a graphics device, set this parameter to ``{'type': 'none'}``. @@ -4761,45 +4787,55 @@ def pool_define(name, Create libvirt pool. :param name: Pool name - :param ptype: - Pool type. See `libvirt documentation `_ for the - possible values. + :param ptype: Pool type. See `libvirt documentation + `_ for the possible values. :param target: Pool full path target :param permissions: - Permissions to set on the target folder. This is mostly used for filesystem-based - pool types. See :ref:`pool-define-permissions` for more details on this structure. + Permissions to set on the target folder. This is mostly used for + filesystem-based pool types. See pool-define-permissions_ for more + details on this structure. + :param source_devices: - List of source devices for pools backed by physical devices. (Default: ``None``) + List of source devices for pools backed by physical devices. (Default: + ``None``) - Each item in the list is a dictionary with ``path`` and optionally ``part_separator`` - keys. The path is the qualified name for iSCSI devices. + Each item in the list is a dictionary with ``path`` and optionally + ``part_separator`` keys. The path is the qualified name for iSCSI + devices. + + Report to `this libvirt page + `_ for more + informations on the use of ``part_separator`` + + :param source_dir: Path to the source directory for pools of type ``dir``, + ``netfs`` or ``gluster``. (Default: ``None``) - Report to `this libvirt page `_ - for more informations on the use of ``part_separator`` - :param source_dir: - Path to the source directory for pools of type ``dir``, ``netfs`` or ``gluster``. - (Default: ``None``) :param source_adapter: - SCSI source definition. The value is a dictionary with ``type``, ``name``, ``parent``, - ``managed``, ``parent_wwnn``, ``parent_wwpn``, ``parent_fabric_wwn``, ``wwnn``, ``wwpn`` - and ``parent_address`` keys. - - The ``parent_address`` value is a dictionary with ``unique_id`` and ``address`` keys. - The address represents a PCI address and is itself a dictionary with ``domain``, ``bus``, - ``slot`` and ``function`` properties. - Report to `this libvirt page `_ - for the meaning and possible values of these properties. - :param source_hosts: - List of source for pools backed by storage from remote servers. Each item is the hostname - optionally followed by the port separated by a colon. (Default: ``None``) + SCSI source definition. The value is a dictionary with ``type``, + ``name``, ``parent``, ``managed``, ``parent_wwnn``, ``parent_wwpn``, + ``parent_fabric_wwn``, ``wwnn``, ``wwpn`` and ``parent_address`` keys. + + The ``parent_address`` value is a dictionary with ``unique_id`` and + ``address`` keys. The address represents a PCI address and is itself a + dictionary with ``domain``, ``bus``, ``slot`` and ``function`` + properties. Report to `this libvirt page + `_ for the meaning + and possible values of these properties. + + :param source_hosts: List of source for pools backed by storage from remote + servers. Each item is the hostname optionally followed by the port + separated by a colon. (Default: ``None``) + :param source_auth: Source authentication details. (Default: ``None``) - The value is a dictionary with ``type``, ``username`` and ``secret`` keys. The type - can be one of ``ceph`` for Ceph RBD or ``chap`` for iSCSI sources. + The value is a dictionary with ``type``, ``username`` and ``secret`` + keys. The type can be one of ``ceph`` for Ceph RBD or ``chap`` for + iSCSI sources. - The ``secret`` value links to a libvirt secret object. It is a dictionary with - ``type`` and ``value`` keys. The type value can be either ``uuid`` or ``usage``. + The ``secret`` value links to a libvirt secret object. It is a + dictionary with ``type`` and ``value`` keys. The type value can be + either ``uuid`` or ``usage``. Examples: @@ -4841,7 +4877,7 @@ def pool_define(name, .. _pool-define-permissions: - .. rubric:: Permissions definition + **Permissions definition** The permissions are described by a dictionary containing the following keys: @@ -4858,7 +4894,7 @@ def pool_define(name, the SELinux label. (Default: `None`) - .. rubric:: CLI Example: + CLI Example: Local folder pool: diff --git a/salt/netapi/rest_cherrypy/app.py b/salt/netapi/rest_cherrypy/app.py index cf7c0bd7457d..0bf960f9b994 100644 --- a/salt/netapi/rest_cherrypy/app.py +++ b/salt/netapi/rest_cherrypy/app.py @@ -7,10 +7,11 @@ .. note:: - This module is Experimental on Windows platforms and support limited + This module is Experimental on Windows platforms, and supports limited configurations: - - doesn't support PAM authentication (i.e. external_auth: auto) - - doesn't support SSL (i.e. disable_ssl: True) + + - doesn't support PAM authentication (i.e. external_auth: auto) + - doesn't support SSL (i.e. disable_ssl: True) :depends: diff --git a/salt/pillar/saltclass.py b/salt/pillar/saltclass.py index d75485c8dc22..bd0be0394931 100644 --- a/salt/pillar/saltclass.py +++ b/salt/pillar/saltclass.py @@ -29,19 +29,20 @@ def __virtual__(): def ext_pillar(minion_id, pillar, *args, **kwargs): ''' - Node definitions path will be retrieved from args - or set to default - - then added to 'salt_data' dict that is passed to the 'get_pillars' function. - 'salt_data' dict is a convenient way to pass all the required datas to the function - It contains: - - __opts__ - - __salt__ - - __grains__ - - __pillar__ - - minion_id - - path - - If successfull the function will return a pillar dict for minion_id + Compile pillar data ''' + # Node definitions path will be retrieved from args (or set to default), + # then added to 'salt_data' dict that is passed to the 'get_pillars' + # function. The dictionary contains: + # - __opts__ + # - __salt__ + # - __grains__ + # - __pillar__ + # - minion_id + # - path + # + # If successful, the function will return a pillar dict for minion_id. + # If path has not been set, make a default for i in args: if 'path' not in i: diff --git a/salt/proxy/bluecoat_sslv.py b/salt/proxy/bluecoat_sslv.py index 35e7abf9120c..16f2c4581db2 100644 --- a/salt/proxy/bluecoat_sslv.py +++ b/salt/proxy/bluecoat_sslv.py @@ -2,17 +2,18 @@ ''' Proxy Minion interface module for managing Blue Coat SSL Decryption devices -:codeauthor: ``Spencer Ervin `` +:codeauthor: Spencer Ervin :maturity: new :depends: none :platform: unix -This proxy minion enables Blue Coat SSL Visibility devices (hereafter referred to -as simply 'bluecoat_sslv') to be treated individually like a Salt Minion. -The bluecoat_sslv proxy leverages the JSON API functionality on the Blue Coat SSL -Visibility devices. The Salt proxy must have access to the Blue Coat device on -HTTPS (tcp/443). -More in-depth conceptual reading on Proxy Minions can be found in the -:ref:`Proxy Minion ` section of Salt's documentation. + +This proxy minion enables Blue Coat SSL Visibility devices (hereafter referred +to as simply 'bluecoat_sslv') to be treated individually like a Salt Minion. +The bluecoat_sslv proxy leverages the JSON API functionality on the Blue Coat +SSL Visibility devices. The Salt proxy must have access to the Blue Coat device +on HTTPS (tcp/443). More in-depth conceptual reading on Proxy Minions can be +found in the :ref:`Proxy Minion ` section of Salt's +documentation. Configuration ============= diff --git a/salt/proxy/nxos.py b/salt/proxy/nxos.py index a7de9caa69d5..43295c3c9fea 100644 --- a/salt/proxy/nxos.py +++ b/salt/proxy/nxos.py @@ -42,123 +42,132 @@ verify: False no_save_config: True -proxytype: - (REQUIRED) Use this proxy minion `nxos` +``proxytype`` -connection: - (REQUIRED) connection transport type. - Choices: `ssh, nxapi` - Default: `ssh` +- (REQUIRED) Use this proxy minion `nxos` -host: - (REQUIRED) login ip address or dns hostname. +``connection`` -username: - (REQUIRED) login username. +- (REQUIRED) connection transport type. +- Choices: `ssh, nxapi` +- Default: `ssh` -password: - (REQUIRED) login password. +``host`` -no_save_config: - If False, 'copy running-config starting-config' is issues for every - configuration command. - If True, Running config is not saved to startup config - Default: False +- (REQUIRED) login ip address or dns hostname. - The recommended approach is to use the `save_running_config` function - instead of this option to improve performance. The default behavior - controlled by this option is preserved for backwards compatibility. +``username`` -Conection SSH Args: +- (REQUIRED) login username. - prompt_name: - (REQUIRED when `connection` is `ssh`) - (REQUIRED, this or `prompt_regex` below, but not both) - The name in the prompt on the switch. Recommended to use your - device's hostname. +``password`` +- (REQUIRED) login password. - prompt_regex: - (REQUIRED when `connection` is `ssh`) - (REQUIRED, this or `prompt_name` above, but not both) - A regular expression that matches the prompt on the switch - and any other possible prompt at which you need the proxy minion - to continue sending input. This feature was specifically developed - for situations where the switch may ask for confirmation. `prompt_name` - above would not match these, and so the session would timeout. +``no_save_config`` - Example: +- If False, 'copy running-config starting-config' is issues for every + configuration command. - .. code-block:: yaml +- If True, Running config is not saved to startup config (Default: False) - nxos-switch#.*|\(y\/n\)\?.* +- The recommended approach is to use the `save_running_config` function instead + of this option to improve performance. The default behavior controlled by + this option is preserved for backwards compatibility. - This should match +**Connection SSH Args** - .. code-block:: shell +``prompt_name`` - nxos-switch# +- (REQUIRED when `connection` is `ssh`) +- (REQUIRED, this or `prompt_regex` below, but not both) +- The name in the prompt on the switch. Recommended to use your device's + hostname. - or +``prompt_regex`` - .. code-block:: shell +- (REQUIRED when ``connection`` is ``ssh``) +- (REQUIRED, this or ``prompt_name`` above, but not both) +- A regular expression that matches the prompt on the switch and any other + possible prompt at which you need the proxy minion to continue sending input. + This feature was specifically developed for situations where the switch may + ask for confirmation. ``prompt_name`` above would not match these, and so the + session would timeout. - Flash complete. Reboot this switch (y/n)? [n] + Example: + .. code-block:: yaml - If neither `prompt_name` nor `prompt_regex` is specified the prompt will be - defaulted to + nxos-switch#.*|\(y\/n\)\?.* - .. code-block:: shell + This should match - .+#$ + .. code-block:: shell - which should match any number of characters followed by a `#` at the end - of the line. This may be far too liberal for most installations. + nxos-switch# - ssh_args: - Extra optional arguments used for connecting to switch. + or - key_accept: - Wheather or not to accept the host key of the switch on initial login. - Default: `False` + .. code-block:: shell -Connection NXAPI Args: + Flash complete. Reboot this switch (y/n)? [n] - transport: - (REQUIRED) when `connection` is `nxapi`. - Choices: `http, https` - Default: `https` - port: - (REQUIRED) when `connection` is `nxapi`. - Default: `80` + If neither ``prompt_name`` nor ``prompt_regex`` is specified the prompt will + be defaulted to - verify: - (REQUIRED) when `connection` is `nxapi`. - Either a boolean, in which case it controls whether we verify the NX-API - TLS certificate, or a string, in which case it must be a path to a CA bundle - to use. - Default: `True` + .. code-block:: shell - When there is no certificate configuration on the device and this option is - set as ``True`` (default), the commands will fail with the following error: - ``SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:581)``. - In this case, you either need to configure a proper certificate on the - device (*recommended*), or bypass the checks setting this argument as ``False`` - with all the security risks considered. + .+#$ - Check https://www.cisco.com/c/en/us/td/docs/switches/datacenter/nexus3000/sw/programmability/6_x/b_Cisco_Nexus_3000_Series_NX-OS_Programmability_Guide/b_Cisco_Nexus_3000_Series_NX-OS_Programmability_Guide_chapter_01.html - to see how to properly configure the certificate. + which should match any number of characters followed by a `#` at the end of + the line. This may be far too liberal for most installations. +``ssh_args`` + +- Extra optional arguments used for connecting to switch. + +``key_accept`` + +- Wheather or not to accept the host key of the switch on initial login. + (Default: `False`) + +**Connection NXAPI Args** + +``transport`` + +- (REQUIRED) when `connection` is `nxapi`. +- Choices: `http, https` +- Default: `https` + +``port`` + +- (REQUIRED) when `connection` is `nxapi`. +- Default: `80` + +``verify`` + +- (REQUIRED) when `connection` is `nxapi`. +- Either a boolean, in which case it controls whether we verify the NX-API TLS + certificate, or a string, in which case it must be a path to a CA bundle to + use. +- When there is no certificate configuration on the device and this option is + set as ``True`` (default), the commands will fail with the following error: + ``SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed + (_ssl.c:581)``. In this case, you either need to configure a proper + certificate on the device (*recommended*), or bypass the checks setting this + argument as ``False`` with all the security risks considered. +- Check + https://www.cisco.com/c/en/us/td/docs/switches/datacenter/nexus3000/sw/programmability/6_x/b_Cisco_Nexus_3000_Series_NX-OS_Programmability_Guide/b_Cisco_Nexus_3000_Series_NX-OS_Programmability_Guide_chapter_01.html + to see how to properly configure the certificate. The functions from the proxy minion can be run from the salt commandline using the :mod:`salt.modules.nxos` execution module. .. note: - If `multiprocessing: True` is set for the proxy minion config, each forked - worker will open up a new connection to the Cisco NX OS Switch. If you - only want one consistent connection used for everything, use - `multiprocessing: False` + If ``multiprocessing: True`` is set for the proxy minion config, each + forked worker will open up a new connection to the Cisco NX OS Switch. If + you only want one consistent connection used for everything, use + ``multiprocessing: False`` ''' diff --git a/salt/states/alternatives.py b/salt/states/alternatives.py index 0b4f90700fec..ae34b41439e7 100644 --- a/salt/states/alternatives.py +++ b/salt/states/alternatives.py @@ -204,6 +204,12 @@ def set_(name, path): path is the location of one of the alternative target files. (e.g. /usr/bin/less) + + .. code-block:: yaml + + foo: + alternatives.set: + - path: /usr/bin/foo-2.0 ''' ret = {'name': name, 'path': path, diff --git a/salt/states/ansiblegate.py b/salt/states/ansiblegate.py index 17793ddca0ea..1fae7d4dcc56 100644 --- a/salt/states/ansiblegate.py +++ b/salt/states/ansiblegate.py @@ -16,8 +16,6 @@ # limitations under the License. r''' -:codeauthor: :email:`Bo Maryniuk ` - Execution of Ansible modules from within states =============================================== diff --git a/salt/states/bluecoat_sslv.py b/salt/states/bluecoat_sslv.py index c29959143fc3..2121f6ab22c1 100644 --- a/salt/states/bluecoat_sslv.py +++ b/salt/states/bluecoat_sslv.py @@ -2,7 +2,7 @@ ''' A state module to manage Blue Coat SSL Visibility Devices. -:codeauthor: :email:`Spencer Ervin ` +:codeauthor: Spencer Ervin :maturity: new :depends: none :platform: unix @@ -15,7 +15,7 @@ module relies on the bluecoat_sslv proxy module to interface with the device. .. seealso:: - :prox:`bluecoat_sslv Proxy Module ` + :py:mod:`Bluecoat SSLV Proxy Module ` ''' diff --git a/salt/states/boto3_elasticache.py b/salt/states/boto3_elasticache.py index 23dcdcfafe68..e679bc64dc17 100644 --- a/salt/states/boto3_elasticache.py +++ b/salt/states/boto3_elasticache.py @@ -1180,6 +1180,7 @@ def cache_parameter_group_present(name, region=None, key=None, keyid=None, profi and a value. .. code-block:: yaml + ParameterNameValues: - ParameterName: timeout # Amazon requires ALL VALUES to be strings... diff --git a/salt/states/eselect.py b/salt/states/eselect.py index 13eeec5b8b8a..22993ade4b3c 100644 --- a/salt/states/eselect.py +++ b/salt/states/eselect.py @@ -5,11 +5,6 @@ A state module to manage Gentoo configuration via eselect -.. code-block:: yaml - - profile: - eselect.set: - target: hardened/linux/amd64 ''' # Import Python libs @@ -44,6 +39,11 @@ def set_(name, target, module_parameter=None, action_parameter=None): action_parameter additional params passed to the defined action + .. code-block:: yaml + + profile: + eselect.set: + - target: hardened/linux/amd64 ''' ret = {'changes': {}, 'comment': '', diff --git a/salt/states/etcd_mod.py b/salt/states/etcd_mod.py index 3f826c917133..6ab7d71522ce 100644 --- a/salt/states/etcd_mod.py +++ b/salt/states/etcd_mod.py @@ -126,7 +126,6 @@ # Function aliases __func_alias__ = { 'set_': 'set', - 'rm_': 'rm' } # Import third party libs @@ -147,12 +146,13 @@ def __virtual__(): def set_(name, value, profile=None, **kwargs): ''' - Set a key in etcd and can be called as ``set``. + Set a key in etcd name The etcd key name, for example: ``/foo/bar/baz``. value The value the key should contain. + profile Optional, defaults to ``None``. Sets the etcd profile to use which has been defined in the Salt Master config. @@ -263,14 +263,16 @@ def directory(name, profile=None, **kwargs): return rtn -def rm_(name, recurse=False, profile=None, **kwargs): +def rm(name, recurse=False, profile=None, **kwargs): ''' - Deletes a key from etcd. This function is also aliased as ``rm``. + Deletes a key from etcd name The etcd key name to remove, for example ``/foo/bar/baz``. + recurse Optional, defaults to ``False``. If ``True`` performs a recursive delete. + profile Optional, defaults to ``None``. Sets the etcd profile to use which has been defined in the Salt Master config. @@ -353,7 +355,7 @@ def mod_watch(name, **kwargs): # Watch to rm etcd key if kwargs.get('sfun') in ['wait_rm_key', 'wait_rm']: - return rm_( + return rm( name, kwargs.get('profile')) diff --git a/salt/states/file.py b/salt/states/file.py index ceb2fdc2f0c8..9ab68325ff1b 100644 --- a/salt/states/file.py +++ b/salt/states/file.py @@ -3703,20 +3703,19 @@ def recurse(name, exclude_pat Exclude this pattern, or list of patterns, from the source when copying. - If both `include_pat` and `exclude_pat` are supplied, then it will apply - conditions cumulatively. i.e. first select based on include_pat, and - then within that result apply exclude_pat. + If both ``include_pat`` and ``exclude_pat`` are supplied, then it will apply + conditions cumulatively. i.e. first select based on ``include_pat``, and + then within that result apply ``exclude_pat``. - Also, when 'clean=True', exclude this pattern from the removal - list and preserve in the destination. - Example: + Also, when ``clean=True``, exclude this pattern from the removal list + and preserve in the destination. For example: .. code-block:: text - - exclude_pat: APPDATA* :: glob matches APPDATA.01, - APPDATA.02,.. for exclusion - - exclude_pat: E@(APPDATA)|(TEMPDATA) :: regexp matches APPDATA - or TEMPDATA for exclusion + # glob matches APPDATA.01, APPDATA.02,.. for exclusion + - exclude_pat: APPDATA* + # regexp matches APPDATA or TEMPDATA for exclusion + - exclude_pat: E@(APPDATA)|(TEMPDATA) .. versionchanged:: Neon List patterns are now supported diff --git a/salt/states/grafana4_user.py b/salt/states/grafana4_user.py index a87cbc5a1dea..d9f694d1a402 100644 --- a/salt/states/grafana4_user.py +++ b/salt/states/grafana4_user.py @@ -93,21 +93,24 @@ def present(name, Default is 'grafana'. - Here is an example for using default_organization and organizations parameters. The user will be added as - a viewer to ReadonlyOrg, as an editor to TestOrg and as an admin to AdminOrg. When she logs on, TestOrg - will be the default. The state will fail if any organisation is unknown or invalid roles are defined. - .. code-block:: yaml - - add_grafana_test_user: - grafana4_user.present: - - name: test - - password: 1234567890 - - fullname: 'Test User' - - default_organization: TestOrg - - organizations: - - ReadonlyOrg - - TestOrg: Editor - - Staging: Admin + Here is an example for using default_organization and organizations + parameters. The user will be added as a viewer to ReadonlyOrg, as an editor + to TestOrg and as an admin to AdminOrg. When she logs on, TestOrg will be + the default. The state will fail if any organisation is unknown or invalid + roles are defined. + + .. code-block:: yaml + + add_grafana_test_user: + grafana4_user.present: + - name: test + - password: 1234567890 + - fullname: 'Test User' + - default_organization: TestOrg + - organizations: + - ReadonlyOrg + - TestOrg: Editor + - Staging: Admin ''' if isinstance(profile, string_types): profile = __salt__['config.option'](profile) diff --git a/salt/states/logrotate.py b/salt/states/logrotate.py index 08e714b5da47..9ba01ccb6cd0 100644 --- a/salt/states/logrotate.py +++ b/salt/states/logrotate.py @@ -62,20 +62,20 @@ def set_(name, key, value, setting=None, conf_file=_DEFAULT_CONF): .. code-block:: yaml logrotate-rotate: - logrotate.set: - - key: rotate - - value: 2 + logrotate.set: + - key: rotate + - value: 2 Example of usage specifying all available arguments: .. code-block:: yaml logrotate-wtmp-rotate: - logrotate.set: - - key: /var/log/wtmp - - value: rotate - - setting: 2 - - conf_file: /etc/logrotate.conf + logrotate.set: + - key: /var/log/wtmp + - value: rotate + - setting: 2 + - conf_file: /etc/logrotate.conf ''' ret = {'name': name, 'changes': dict(), diff --git a/salt/states/virt.py b/salt/states/virt.py index 13454ac358b0..6ce68fdf1efd 100644 --- a/salt/states/virt.py +++ b/salt/states/virt.py @@ -279,7 +279,9 @@ def running(name, .. versionadded:: Fluorine :param disks: List of disk to create for the new virtual machine. - See :ref:`init-disk-def` for more details on the items on this list. + See the **Disk Definitions** section of the :py:func:`virt.init + ` function for more details on the items on + this list. .. versionadded:: Fluorine :param nic_profile: @@ -288,17 +290,21 @@ def running(name, .. versionadded:: Fluorine :param interfaces: List of network interfaces to create for the new virtual machine. - See :ref:`init-nic-def` for more details on the items on this list. + See the **Network Interface Definitions** section of the + :py:func:`virt.init ` function for more details + on the items on this list. .. versionadded:: Fluorine :param graphics: Graphics device to create for the new virtual machine. - See :ref:`init-graphics-def` for more details on this dictionary + See the **Graphics Definition** section of the :py:func:`virt.init + ` function for more details on this dictionary. .. versionadded:: Fluorine :param loader: Firmware loader for the new virtual machine. - See :ref:`init-loader-def` for more details on this dictionary + See the **Loader Definition** section of the :py:func:`virt.init + ` function for more details on this dictionary. .. versionadded:: Fluorine :param saltenv: @@ -720,17 +726,21 @@ def pool_running(name, :param ptype: libvirt pool type :param target: full path to the target device or folder. (Default: ``None``) - :param permissions: - target permissions. See :ref:`pool-define-permissions` for more details on this structure. + :param permissions: target permissions. See the **Permissions definition** + section of the :py:func:`virt.pool_define + ` documentation for more details on this + structure. :param source: dictionary containing keys matching the ``source_*`` parameters in function - :func:`salt.modules.virt.pool_define`. + :py:func:`virt.pool_define `. :param transient: - when set to ``True``, the pool will be automatically undefined after being stopped. (Default: ``False``) + when set to ``True``, the pool will be automatically undefined after + being stopped. (Default: ``False``) :param autostart: Whether to start the pool when booting the host. (Default: ``True``) :param start: - When ``True``, define and start the pool, otherwise the pool will be left stopped. + When ``True``, define and start the pool, otherwise the pool will be + left stopped. :param connection: libvirt connection URI, overriding defaults :param username: username to connect with, overriding defaults :param password: password to connect with, overriding defaults diff --git a/salt/states/zone.py b/salt/states/zone.py index 28d384a48eaa..5406c9189543 100644 --- a/salt/states/zone.py +++ b/salt/states/zone.py @@ -127,7 +127,6 @@ __func_alias__ = { 'import_': 'import', - 'export_': 'export', } # Define the state's virtual name @@ -623,7 +622,7 @@ def halted(name, graceful=True): return ret -def export_(name, path, replace=False): +def export(name, path, replace=False): ''' Export a zones configuration @@ -760,6 +759,11 @@ def import_(name, path, mode='import', nodataset=False, brand_opts=None): ``install``: will import and then try to install the zone ``attach``: will import and then try to attach of the zone + .. code-block:: yaml + + omipkg1: + zone.import: + - path: /foo/bar/baz ''' ret = {'name': name, 'changes': {}, diff --git a/salt/tops/saltclass.py b/salt/tops/saltclass.py index 42b230909e30..4d480e895b2d 100644 --- a/salt/tops/saltclass.py +++ b/salt/tops/saltclass.py @@ -108,7 +108,7 @@ ``/nodes/lausanne/qls.node1.yml`` -.. code-block:: yaml +.. code-block:: jinja environment: base @@ -228,19 +228,20 @@ def __virtual__(): def top(**kwargs): ''' - Node definitions path will be retrieved from __opts__ - or set to default - - then added to 'salt_data' dict that is passed to the 'get_tops' function. - 'salt_data' dict is a convenient way to pass all the required datas to the function - It contains: - - __opts__ - - empty __salt__ - - __grains__ - - empty __pillar__ - - minion_id - - path - - If successfull the function will return a top dict for minion_id + Compile tops ''' + # Node definitions path will be retrieved from args (or set to default), + # then added to 'salt_data' dict that is passed to the 'get_pillars' + # function. The dictionary contains: + # - __opts__ + # - __salt__ + # - __grains__ + # - __pillar__ + # - minion_id + # - path + # + # If successful, the function will return a pillar dict for minion_id. + # If path has not been set, make a default _opts = __opts__['master_tops']['saltclass'] if 'path' not in _opts: diff --git a/salt/utils/dictupdate.py b/salt/utils/dictupdate.py index 001b8e5e8aaa..70b7a9c4b895 100644 --- a/salt/utils/dictupdate.py +++ b/salt/utils/dictupdate.py @@ -15,8 +15,7 @@ # Import 3rd-party libs import copy import logging -from salt.ext import six -from salt.serializers.yamlex import merge_recursive as _yamlex_merge_recursive +import salt.ext.six as six log = logging.getLogger(__name__) @@ -94,6 +93,7 @@ def merge_recurse(obj_a, obj_b, merge_lists=False): def merge_aggregate(obj_a, obj_b): + from salt.serializers.yamlex import merge_recursive as _yamlex_merge_recursive return _yamlex_merge_recursive(obj_a, obj_b, level=1)