From c4cbe5b90e6042b6be39356584b88042d1e1a7a8 Mon Sep 17 00:00:00 2001 From: rallytime Date: Mon, 17 Sep 2018 15:55:45 -0400 Subject: [PATCH 1/3] Fix heading line-lengths This will clean up some of the warnings found by building the documentation: ``` /root/SaltStack/salt/doc/ref/pillar/all/index.rst:55::1: WARNING: Unexpected section title or transition. ================= ``` --- salt/pillar/cmd_yamlex.py | 3 +-- salt/pillar/makostack.py | 2 +- salt/pillar/mysql.py | 4 ++-- salt/pillar/postgres.py | 4 ++-- salt/pillar/sql_base.py | 4 ++-- salt/pillar/sqlcipher.py | 4 ++-- 6 files changed, 10 insertions(+), 11 deletions(-) diff --git a/salt/pillar/cmd_yamlex.py b/salt/pillar/cmd_yamlex.py index bcdb921a79a5..af9e895f9737 100644 --- a/salt/pillar/cmd_yamlex.py +++ b/salt/pillar/cmd_yamlex.py @@ -1,7 +1,6 @@ # -*- coding: utf-8 -*- ''' -Execute a command and read the output as YAMLEX. The YAMLEX data is then -directly overlaid onto the minion's Pillar data +Execute a command and read the output as YAMLEX. The YAMLEX data is then directly overlaid onto the minion's Pillar data ''' # Don't "fix" the above docstring to put it on two lines, as the sphinx diff --git a/salt/pillar/makostack.py b/salt/pillar/makostack.py index f233dcfd215f..6ba60d41352e 100644 --- a/salt/pillar/makostack.py +++ b/salt/pillar/makostack.py @@ -103,7 +103,7 @@ - baz MakoStack configuration files -------------------------------- +----------------------------- The config files that are referenced in the above ``ext_pillar`` configuration are mako templates which must render as a simple ordered list of ``yaml`` diff --git a/salt/pillar/mysql.py b/salt/pillar/mysql.py index cb7965f4b6fe..eb52489a2d1b 100644 --- a/salt/pillar/mysql.py +++ b/salt/pillar/mysql.py @@ -12,7 +12,7 @@ :platform: all Configuring the mysql ext_pillar -===================================== +================================ Use the 'mysql' key under ext_pillar for configuration of queries. @@ -22,7 +22,7 @@ Required python modules: MySQLdb Complete example -===================================== +================ .. code-block:: yaml diff --git a/salt/pillar/postgres.py b/salt/pillar/postgres.py index 7b6300989a6e..7dfceea21c51 100644 --- a/salt/pillar/postgres.py +++ b/salt/pillar/postgres.py @@ -8,8 +8,8 @@ :depends: psycopg2 :platform: all -Complete example -===================================== +Complete Example +================ .. code-block:: yaml diff --git a/salt/pillar/sql_base.py b/salt/pillar/sql_base.py index e7abceb134ea..91d46c2efbf1 100644 --- a/salt/pillar/sql_base.py +++ b/salt/pillar/sql_base.py @@ -10,7 +10,7 @@ :platform: all Theory of sql_base ext_pillar -===================================== +============================= Ok, here's the theory for how this works... @@ -32,7 +32,7 @@ exact settings. Configuring a sql_base ext_pillar -===================================== +================================= The sql_base ext_pillar cannot be used directly, but shares query configuration with its implementations. These examples use a fake 'sql_base' adapter, which diff --git a/salt/pillar/sqlcipher.py b/salt/pillar/sqlcipher.py index b984235704e8..8222af114d46 100644 --- a/salt/pillar/sqlcipher.py +++ b/salt/pillar/sqlcipher.py @@ -37,8 +37,8 @@ pass: strong_pass_phrase timeout: 5.0 -Complete example -================= +Complete Example +================ .. code-block:: yaml From 7e5bab78c589e938ba937414279869f46e3375bc Mon Sep 17 00:00:00 2001 From: Erik Johnson Date: Mon, 17 Sep 2018 22:35:08 -0600 Subject: [PATCH 2/3] Fix docs build errors (2017.7 branch) --- doc/conf.py | 1 + doc/ref/modules/index.rst | 6 +++--- doc/ref/states/writing.rst | 2 +- doc/topics/grains/index.rst | 4 ++-- doc/topics/jinja/index.rst | 2 +- 5 files changed, 8 insertions(+), 7 deletions(-) diff --git a/doc/conf.py b/doc/conf.py index 1b5c258fe2c0..9cefacc789e8 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -65,6 +65,7 @@ def next(self): 'user', # salt core + 'concurrent', 'Crypto', 'Crypto.Signature', 'Crypto.Cipher', diff --git a/doc/ref/modules/index.rst b/doc/ref/modules/index.rst index 3cb3fb2abd92..f9d963203a53 100644 --- a/doc/ref/modules/index.rst +++ b/doc/ref/modules/index.rst @@ -137,7 +137,7 @@ call functions available in other execution modules. The variable ``__salt__`` is packed into the modules after they are loaded into the Salt minion. -The ``__salt__`` variable is a :ref:`Python dictionary ` +The ``__salt__`` variable is a :ref:`Python dictionary ` containing all of the Salt functions. Dictionary keys are strings representing the names of the modules and the values are the functions themselves. @@ -176,7 +176,7 @@ Grains Data ----------- The values detected by the Salt Grains on the minion are available in a -:ref:`Python dictionary ` named ``__grains__`` and can be +:ref:`Python dictionary ` named ``__grains__`` and can be accessed from within callable objects in the Python modules. To see the contents of the grains dictionary for a given system in your @@ -265,7 +265,7 @@ Virtual module names are set using the ``__virtual__`` function and the ``__virtual__`` Function ======================== -The ``__virtual__`` function returns either a :ref:`string `, +The ``__virtual__`` function returns either a :ref:`string `, :py:data:`True`, :py:data:`False`, or :py:data:`False` with an :ref:`error string `. If a string is returned then the module is loaded using the name of the string as the virtual name. If ``True`` is returned the diff --git a/doc/ref/states/writing.rst b/doc/ref/states/writing.rst index 6b3da0ed1628..84b0f566deba 100644 --- a/doc/ref/states/writing.rst +++ b/doc/ref/states/writing.rst @@ -190,7 +190,7 @@ functions available in other state modules. The variable ``__states__`` is packed into the modules after they are loaded into the Salt minion. -The ``__states__`` variable is a :ref:`Python dictionary ` +The ``__states__`` variable is a :ref:`Python dictionary ` containing all of the state modules. Dictionary keys are strings representing the names of the modules and the values are the functions themselves. diff --git a/doc/topics/grains/index.rst b/doc/topics/grains/index.rst index 0008ddd091bc..8256208ff0a0 100644 --- a/doc/topics/grains/index.rst +++ b/doc/topics/grains/index.rst @@ -152,8 +152,8 @@ The grains are derived by executing all of the "public" functions (i.e. those which do not begin with an underscore) found in the modules located in the Salt's core grains code, followed by those in any custom grains modules. The functions in a grains module must return a :ref:`Python dictionary -`, where the dictionary keys are the names of grains, and each -key's value is that value for that grain. +`, where the dictionary keys are the names of grains, and +each key's value is that value for that grain. Custom grains modules should be placed in a subdirectory named ``_grains`` located under the :conf_master:`file_roots` specified by the master config diff --git a/doc/topics/jinja/index.rst b/doc/topics/jinja/index.rst index 5006fdad32c4..ee20afcd37af 100644 --- a/doc/topics/jinja/index.rst +++ b/doc/topics/jinja/index.rst @@ -161,7 +161,7 @@ Saltstack extends `builtin filters`_ with these custom filters: Converts any time related object into a time based string. It requires valid strftime directives. An exhaustive list can be found :ref:`here -` in the Python documentation. +` in the Python documentation. .. code-block:: jinja From 02b2d544c0906fd00864d589943a6ffe1cfe92f5 Mon Sep 17 00:00:00 2001 From: rallytime Date: Tue, 18 Sep 2018 09:34:00 -0400 Subject: [PATCH 3/3] Split intro docs for cmd_yamlex pillar into shorter lines. --- salt/pillar/cmd_yamlex.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/salt/pillar/cmd_yamlex.py b/salt/pillar/cmd_yamlex.py index af9e895f9737..1fa96c6911e7 100644 --- a/salt/pillar/cmd_yamlex.py +++ b/salt/pillar/cmd_yamlex.py @@ -1,14 +1,12 @@ # -*- coding: utf-8 -*- ''' -Execute a command and read the output as YAMLEX. The YAMLEX data is then directly overlaid onto the minion's Pillar data -''' - -# Don't "fix" the above docstring to put it on two lines, as the sphinx -# autosummary pulls only the first line for its description. +Execute a command and read the output as YAMLEX. -from __future__ import absolute_import +The YAMLEX data is then directly overlaid onto the minion's Pillar data +''' # Import python libs +from __future__ import absolute_import import logging # Import salt libs