2011-05-23 06:51:31 +00:00
|
|
|
# -*- coding: utf-8 -*-
|
2012-10-15 20:26:11 +00:00
|
|
|
# pylint: disable=C0103,W0622
|
|
|
|
'''
|
|
|
|
Sphinx documentation for Salt
|
|
|
|
'''
|
2014-06-19 05:05:26 +00:00
|
|
|
import functools
|
2012-01-16 05:33:44 +00:00
|
|
|
import sys
|
|
|
|
import os
|
2012-05-29 23:17:03 +00:00
|
|
|
import types
|
2016-06-13 15:24:40 +00:00
|
|
|
import time
|
2011-05-23 06:51:31 +00:00
|
|
|
|
2012-06-19 08:09:33 +00:00
|
|
|
from sphinx.directives import TocTree
|
|
|
|
|
|
|
|
|
2012-10-15 20:26:11 +00:00
|
|
|
# pylint: disable=R0903
|
2012-01-16 05:33:44 +00:00
|
|
|
class Mock(object):
|
|
|
|
'''
|
2016-08-25 14:47:08 +00:00
|
|
|
Mock out specified imports.
|
2012-01-16 05:33:44 +00:00
|
|
|
|
2014-04-30 19:06:27 +00:00
|
|
|
This allows autodoc to do its thing without having oodles of req'd
|
2012-01-16 05:33:44 +00:00
|
|
|
installed libs. This doesn't work with ``import *`` imports.
|
|
|
|
|
2016-08-25 14:47:08 +00:00
|
|
|
This Mock class can be configured to return a specific values at specific names, if required.
|
|
|
|
|
2012-01-16 05:33:44 +00:00
|
|
|
http://read-the-docs.readthedocs.org/en/latest/faq.html#i-get-import-errors-on-libraries-that-depend-on-c-modules
|
|
|
|
'''
|
2016-08-25 14:47:08 +00:00
|
|
|
def __init__(self, mapping=None, *args, **kwargs):
|
|
|
|
"""
|
2017-05-24 09:40:44 +00:00
|
|
|
Mapping allows autodoc to bypass the Mock object, but actually assign
|
2016-08-25 14:47:08 +00:00
|
|
|
a specific value, expected by a specific attribute returned.
|
|
|
|
"""
|
|
|
|
self.__mapping = mapping or {}
|
2012-01-16 05:33:44 +00:00
|
|
|
|
2015-05-18 23:40:50 +00:00
|
|
|
__all__ = []
|
|
|
|
|
2012-01-16 05:33:44 +00:00
|
|
|
def __call__(self, *args, **kwargs):
|
2014-06-19 03:27:49 +00:00
|
|
|
# If mocked function is used as a decorator, expose decorated function.
|
2014-06-19 05:20:25 +00:00
|
|
|
# if args and callable(args[-1]):
|
|
|
|
# functools.update_wrapper(ret, args[0])
|
2016-08-25 14:47:08 +00:00
|
|
|
return Mock(mapping=self.__mapping)
|
2012-01-16 05:33:44 +00:00
|
|
|
|
2016-08-25 14:47:08 +00:00
|
|
|
def __getattr__(self, name):
|
|
|
|
#__mapping = {'total': 0}
|
|
|
|
data = None
|
|
|
|
if name in self.__mapping:
|
|
|
|
data = self.__mapping.get(name)
|
|
|
|
elif name in ('__file__', '__path__'):
|
|
|
|
data = '/dev/null'
|
2012-01-16 05:33:44 +00:00
|
|
|
else:
|
2016-08-25 14:47:08 +00:00
|
|
|
data = Mock(mapping=self.__mapping)
|
|
|
|
return data
|
2016-12-20 18:50:43 +00:00
|
|
|
|
|
|
|
def __iter__(self):
|
|
|
|
return self
|
|
|
|
|
|
|
|
def next(self):
|
|
|
|
raise StopIteration
|
|
|
|
|
2012-10-15 20:26:11 +00:00
|
|
|
# pylint: enable=R0903
|
2012-01-16 05:33:44 +00:00
|
|
|
|
|
|
|
MOCK_MODULES = [
|
[develop] Merge forward from 2016.3 to develop (#33193)
* Add run_on_start docs to schedule.rst (#32958)
Fixes #22580
* Backport #33021 manually to 2015.5 (#33044)
* Saltfile with pillar tests (#33045)
* add file.managed with pillar data tests
* do not require git for other tests
* Fix minor document error of test.assertion (#33067)
* test pillar.items output (#33060)
* File and User test fixes for 2015.5 on Fedora23 (#33055)
* Fix file_test.test_symlink on 2015.5
* Fix failing user present test
* add test for installing package while using salt-call --local (#33025)
* add test for installing package while using salt-call --local
* fix pylint
* ssh docs: install py-2.6 for RHEL 5
* Bugfix: Restore boolean values from the repo configuration
* Add test data for repos
* Add repo config test
* Bugfix (follow-up): setting priority requires non-positive integer
* modules.npm: do not log npm --version at info level (#33084)
* salt-cloud: fix ipv6-only virtual machines (#32865)
* salt-cloud: fix ipv6-only virtual machines
* fix hostname for rsync fallback in scp_file function
* use 4 spaces instead of 2
* remove global variable, use direct socket call instead
* Use saltstack repo in buildpackage.py on CentOS 5 (#33080)
* Lower display of msgpack failure msg to debug (#33078)
Closes #33074
* cloud.query needs to define mapper.opts (#33098)
* clarify docs that map is designed to be run once. is not stateful (#33102)
* Moved _finger_fail method to parent class.
Method _finger_fail method from SAuth to AsyncAuth class to make method available
in both class and fix an issue where _finger_Fail is called inside AsyncAuth.
* Fix 33058 (#33099)
* Fix servermanager module
- Added check for 2008 version of windows
- Added Import-Module ServerManager to _pshell_json.
Apparently this needs to run each time we issue a
servermanager command.
* Fix list_available
* salt.utils.gitfs: fix formatting for warning messages (#33064)
* salt.utils.gitfs: fix formatting for warning messages
When git_pillar support was added to salt.utils.gitfs, the
recommendation globals had string formatting placeholders added to them,
but the locations where these values are referenced do not call
``.format()`` to properly replace them. This commit fixes that
oversight.
* Remove more gitfs and master-specific wording from log messages
* Add a check that the cmdline of the found proc matches (#33129)
* Doc mock decorators (#33132)
* Add mock function for mocking decorators
* Mock the stdlib user module because importing it will open the repl
* Fix broken parsing of usermgmt.conf on OpenBSD (#33135)
When creating a new user, if a group of the same name already exists,
the usermgmt.conf file is consulted to determine the primary group.
It's in these cases that the parsing bug is triggered.
This code change addresses several of the existing issues:
- The previous split statement explicitly specified a single space.
Since a config line may have any number of spaces and/or tabs
surrounding the entries, the resulting array's elements may be
incorrect.
- According to the man pages for usermgmt.conf, the "group" config
entry accpets a single parameter -- so we shouldn't iterate.
- The "val[1]" was returning the 2nd letter of each word and not the
second word on the config line as intended.
* Move salt-ssh thin dir location to /var/tmp (#33130)
* Move salt-ssh thin dir location to /var/tmp
Closes #32771
* Remove performance penelty language
* If cache_jobs: True is set, populate the local job cache when running salt-call (#33100)
* If cache_jobs: True is set, populate the local job cache
Fixes #32834
Allows a masterless minion to query the job cache.
* Refactor cache_jobs functionality to be DRY
* Skipping salt-call --local test
* Back-port #31769 to 2015.8 (#33139)
* Handle empty acl_name in linux_acl state
Calls to setfacl interpret an empty group or user name to mean to be the
owner of the file they're operating on. For example, for a directory
owned by group 'admin', the ACL 'default:group::rwx' is equivalent to
'default:group:admin:rwx'.
The output of the getfacl execution module returns ACLs in the format of
'group:admin:rwx' instead of 'group::rwx'. This commit changes the
acl.present state to look for the owner of the file if the acl_name
paremeter is empty.
* Fix acl.present/acl.absent changing default ACLs
The behaviour of the acl.present and acl.absent is to check the data
structure returned by getfacl contains a key by the name of acl_type.
However, this data structure does not contain any default ACLs if none
exist, so this check will fail. We omit the check if a default ACL was
passed into the state functions.
Unfortunately, the call to modfacl may fail if the user passes in an
acl_type such as 'default:random'. In this case the state will appear to
succeed, but do nothing.
This fixes the state module to allow setting default ACLs on files which
have none.
* Fix regression in 2016.3 HEAD when version is specified (#33146)
Resolves #33013.
* Hash fileclients by opts (#33142)
* Hash fileclients by opts
There was an issue whereby the cache of the fileclient was being overwritten
by dueling minion instances in multimaster mode. This protects them by hashing
by the id of opts.
Closes #25040
* Silly typo!
* Remove tests which do not test any actual functionality or are too tightly coupled to the implementation
* Strip ldap fqdn (#33127)
* Add option to strip off domain names on computer names that come from LDAP/AD
* Add strip_domains option for ldap.
* Add documentation for auth.ldap.minion_stripdomains.
* [2015.5] Update to latest bootstrap script v2016.05.10 (#33155)
* [2015.8] Update to latest bootstrap script v2016.05.10 (#33156)
* [2016.3] Update to latest bootstrap script v2016.05.10 (#33157)
* add 2015.5.11 release notes (#33160)
* add 2015.8.9 release notes (#33161)
* Pip fix (#33180)
* fix pip!!
* make it work with old pip as well
* Added resiliency
* Don't need to check, just get the right name
* [2015.5] Update to latest bootstrap script v2016.05.11 (#33185)
2016-05-12 14:53:39 +00:00
|
|
|
# Python stdlib
|
|
|
|
'user',
|
|
|
|
|
2012-01-16 05:33:44 +00:00
|
|
|
# salt core
|
|
|
|
'Crypto',
|
2015-05-27 02:48:03 +00:00
|
|
|
'Crypto.Signature',
|
2012-01-16 05:33:44 +00:00
|
|
|
'Crypto.Cipher',
|
2012-04-19 17:20:03 +00:00
|
|
|
'Crypto.Hash',
|
|
|
|
'Crypto.PublicKey',
|
|
|
|
'Crypto.Random',
|
2015-04-15 23:52:10 +00:00
|
|
|
'Crypto.Signature',
|
2015-09-03 19:49:15 +00:00
|
|
|
'Crypto.Signature.PKCS1_v1_5',
|
2012-04-26 05:09:48 +00:00
|
|
|
'M2Crypto',
|
2017-06-29 19:43:56 +00:00
|
|
|
'msgpack',
|
2012-10-04 20:51:45 +00:00
|
|
|
'yaml',
|
|
|
|
'yaml.constructor',
|
|
|
|
'yaml.nodes',
|
2016-08-29 22:41:15 +00:00
|
|
|
'yaml.parser',
|
2013-11-10 21:38:51 +00:00
|
|
|
'yaml.scanner',
|
2012-10-04 20:51:45 +00:00
|
|
|
'zmq',
|
2014-11-25 22:11:15 +00:00
|
|
|
'zmq.eventloop',
|
2015-04-15 23:52:10 +00:00
|
|
|
'zmq.eventloop.ioloop',
|
2014-06-19 03:27:49 +00:00
|
|
|
|
|
|
|
# third-party libs for cloud modules
|
2013-11-11 21:52:09 +00:00
|
|
|
'libcloud',
|
|
|
|
'libcloud.compute',
|
|
|
|
'libcloud.compute.base',
|
|
|
|
'libcloud.compute.deployment',
|
|
|
|
'libcloud.compute.providers',
|
|
|
|
'libcloud.compute.types',
|
2014-02-26 18:51:43 +00:00
|
|
|
'libcloud.loadbalancer',
|
|
|
|
'libcloud.loadbalancer.types',
|
|
|
|
'libcloud.loadbalancer.providers',
|
|
|
|
'libcloud.common',
|
|
|
|
'libcloud.common.google',
|
2014-06-19 03:27:49 +00:00
|
|
|
|
|
|
|
# third-party libs for netapi modules
|
2012-11-15 21:55:54 +00:00
|
|
|
'cherrypy',
|
2014-03-11 01:50:39 +00:00
|
|
|
'cherrypy.lib',
|
2014-05-19 14:58:16 +00:00
|
|
|
'cherrypy.process',
|
2012-11-15 21:55:54 +00:00
|
|
|
'cherrypy.wsgiserver',
|
|
|
|
'cherrypy.wsgiserver.ssl_builtin',
|
2012-10-24 22:30:45 +00:00
|
|
|
|
2014-04-15 04:52:19 +00:00
|
|
|
'tornado',
|
|
|
|
'tornado.concurrent',
|
|
|
|
'tornado.gen',
|
2015-05-01 19:32:23 +00:00
|
|
|
'tornado.httpclient',
|
2014-04-15 04:52:19 +00:00
|
|
|
'tornado.httpserver',
|
2015-05-01 19:32:23 +00:00
|
|
|
'tornado.httputil',
|
2014-04-15 04:52:19 +00:00
|
|
|
'tornado.ioloop',
|
2016-01-19 17:06:36 +00:00
|
|
|
'tornado.iostream',
|
2016-01-19 21:03:27 +00:00
|
|
|
'tornado.netutil',
|
2015-09-03 19:49:15 +00:00
|
|
|
'tornado.simple_httpclient',
|
2016-01-19 21:03:27 +00:00
|
|
|
'tornado.stack_context',
|
2014-04-15 04:52:19 +00:00
|
|
|
'tornado.web',
|
2014-06-19 03:27:49 +00:00
|
|
|
'tornado.websocket',
|
2016-08-26 16:43:34 +00:00
|
|
|
'tornado.locks',
|
2014-04-15 04:52:19 +00:00
|
|
|
|
2014-05-19 14:58:16 +00:00
|
|
|
'ws4py',
|
|
|
|
'ws4py.server',
|
|
|
|
'ws4py.server.cherrypyserver',
|
|
|
|
'ws4py.websocket',
|
2014-06-18 20:29:59 +00:00
|
|
|
|
2012-01-16 05:33:44 +00:00
|
|
|
# modules, renderers, states, returners, et al
|
2015-04-15 23:52:10 +00:00
|
|
|
'ClusterShell',
|
|
|
|
'ClusterShell.NodeSet',
|
2012-10-04 20:51:45 +00:00
|
|
|
'django',
|
2012-01-16 05:33:44 +00:00
|
|
|
'libvirt',
|
2012-10-04 20:51:45 +00:00
|
|
|
'MySQLdb',
|
|
|
|
'MySQLdb.cursors',
|
2015-04-15 23:52:10 +00:00
|
|
|
'nagios_json',
|
2016-08-25 14:47:59 +00:00
|
|
|
'psutil',
|
2012-10-04 20:51:45 +00:00
|
|
|
'pycassa',
|
2012-01-16 05:33:44 +00:00
|
|
|
'pymongo',
|
2012-10-25 00:29:27 +00:00
|
|
|
'rabbitmq_server',
|
2012-01-16 05:33:44 +00:00
|
|
|
'redis',
|
2014-04-11 20:21:58 +00:00
|
|
|
'requests',
|
2015-04-15 23:52:10 +00:00
|
|
|
'requests.exceptions',
|
2012-01-16 05:33:44 +00:00
|
|
|
'rpm',
|
|
|
|
'rpmUtils',
|
|
|
|
'rpmUtils.arch',
|
2012-10-04 20:51:45 +00:00
|
|
|
'yum',
|
2013-07-22 12:08:07 +00:00
|
|
|
'OpenSSL',
|
2015-04-15 23:52:10 +00:00
|
|
|
'zfs',
|
2016-03-23 20:08:36 +00:00
|
|
|
'salt.ext.six.moves.winreg',
|
|
|
|
'win32security',
|
|
|
|
'ntsecuritycon',
|
2016-05-05 03:35:18 +00:00
|
|
|
'napalm',
|
|
|
|
'dson',
|
|
|
|
'jnpr',
|
|
|
|
'json',
|
|
|
|
'lxml',
|
|
|
|
'lxml.etree',
|
|
|
|
'jnpr.junos',
|
|
|
|
'jnpr.junos.utils',
|
|
|
|
'jnpr.junos.utils.config',
|
|
|
|
'jnpr.junos.utils.sw',
|
|
|
|
'dns',
|
|
|
|
'dns.resolver',
|
|
|
|
'netaddr',
|
|
|
|
'netaddr.IPAddress',
|
|
|
|
'netaddr.core',
|
|
|
|
'netaddr.core.AddrFormatError',
|
2016-07-12 19:08:46 +00:00
|
|
|
'pyroute2',
|
|
|
|
'pyroute2.ipdb',
|
2016-10-12 15:31:07 +00:00
|
|
|
'avahi',
|
|
|
|
'dbus',
|
2017-02-03 18:59:47 +00:00
|
|
|
'twisted',
|
|
|
|
'twisted.internet',
|
|
|
|
'twisted.internet.protocol',
|
|
|
|
'twisted.internet.protocol.DatagramProtocol',
|
|
|
|
'msgpack',
|
2012-01-16 05:33:44 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
for mod_name in MOCK_MODULES:
|
2016-08-25 14:48:34 +00:00
|
|
|
if mod_name == 'psutil':
|
2017-06-29 19:32:09 +00:00
|
|
|
mock = Mock(mapping={'total': 0}) # Otherwise it will crash Sphinx
|
2016-08-25 14:48:34 +00:00
|
|
|
else:
|
|
|
|
mock = Mock()
|
|
|
|
sys.modules[mod_name] = mock
|
2012-01-16 05:33:44 +00:00
|
|
|
|
[develop] Merge forward from 2016.3 to develop (#33193)
* Add run_on_start docs to schedule.rst (#32958)
Fixes #22580
* Backport #33021 manually to 2015.5 (#33044)
* Saltfile with pillar tests (#33045)
* add file.managed with pillar data tests
* do not require git for other tests
* Fix minor document error of test.assertion (#33067)
* test pillar.items output (#33060)
* File and User test fixes for 2015.5 on Fedora23 (#33055)
* Fix file_test.test_symlink on 2015.5
* Fix failing user present test
* add test for installing package while using salt-call --local (#33025)
* add test for installing package while using salt-call --local
* fix pylint
* ssh docs: install py-2.6 for RHEL 5
* Bugfix: Restore boolean values from the repo configuration
* Add test data for repos
* Add repo config test
* Bugfix (follow-up): setting priority requires non-positive integer
* modules.npm: do not log npm --version at info level (#33084)
* salt-cloud: fix ipv6-only virtual machines (#32865)
* salt-cloud: fix ipv6-only virtual machines
* fix hostname for rsync fallback in scp_file function
* use 4 spaces instead of 2
* remove global variable, use direct socket call instead
* Use saltstack repo in buildpackage.py on CentOS 5 (#33080)
* Lower display of msgpack failure msg to debug (#33078)
Closes #33074
* cloud.query needs to define mapper.opts (#33098)
* clarify docs that map is designed to be run once. is not stateful (#33102)
* Moved _finger_fail method to parent class.
Method _finger_fail method from SAuth to AsyncAuth class to make method available
in both class and fix an issue where _finger_Fail is called inside AsyncAuth.
* Fix 33058 (#33099)
* Fix servermanager module
- Added check for 2008 version of windows
- Added Import-Module ServerManager to _pshell_json.
Apparently this needs to run each time we issue a
servermanager command.
* Fix list_available
* salt.utils.gitfs: fix formatting for warning messages (#33064)
* salt.utils.gitfs: fix formatting for warning messages
When git_pillar support was added to salt.utils.gitfs, the
recommendation globals had string formatting placeholders added to them,
but the locations where these values are referenced do not call
``.format()`` to properly replace them. This commit fixes that
oversight.
* Remove more gitfs and master-specific wording from log messages
* Add a check that the cmdline of the found proc matches (#33129)
* Doc mock decorators (#33132)
* Add mock function for mocking decorators
* Mock the stdlib user module because importing it will open the repl
* Fix broken parsing of usermgmt.conf on OpenBSD (#33135)
When creating a new user, if a group of the same name already exists,
the usermgmt.conf file is consulted to determine the primary group.
It's in these cases that the parsing bug is triggered.
This code change addresses several of the existing issues:
- The previous split statement explicitly specified a single space.
Since a config line may have any number of spaces and/or tabs
surrounding the entries, the resulting array's elements may be
incorrect.
- According to the man pages for usermgmt.conf, the "group" config
entry accpets a single parameter -- so we shouldn't iterate.
- The "val[1]" was returning the 2nd letter of each word and not the
second word on the config line as intended.
* Move salt-ssh thin dir location to /var/tmp (#33130)
* Move salt-ssh thin dir location to /var/tmp
Closes #32771
* Remove performance penelty language
* If cache_jobs: True is set, populate the local job cache when running salt-call (#33100)
* If cache_jobs: True is set, populate the local job cache
Fixes #32834
Allows a masterless minion to query the job cache.
* Refactor cache_jobs functionality to be DRY
* Skipping salt-call --local test
* Back-port #31769 to 2015.8 (#33139)
* Handle empty acl_name in linux_acl state
Calls to setfacl interpret an empty group or user name to mean to be the
owner of the file they're operating on. For example, for a directory
owned by group 'admin', the ACL 'default:group::rwx' is equivalent to
'default:group:admin:rwx'.
The output of the getfacl execution module returns ACLs in the format of
'group:admin:rwx' instead of 'group::rwx'. This commit changes the
acl.present state to look for the owner of the file if the acl_name
paremeter is empty.
* Fix acl.present/acl.absent changing default ACLs
The behaviour of the acl.present and acl.absent is to check the data
structure returned by getfacl contains a key by the name of acl_type.
However, this data structure does not contain any default ACLs if none
exist, so this check will fail. We omit the check if a default ACL was
passed into the state functions.
Unfortunately, the call to modfacl may fail if the user passes in an
acl_type such as 'default:random'. In this case the state will appear to
succeed, but do nothing.
This fixes the state module to allow setting default ACLs on files which
have none.
* Fix regression in 2016.3 HEAD when version is specified (#33146)
Resolves #33013.
* Hash fileclients by opts (#33142)
* Hash fileclients by opts
There was an issue whereby the cache of the fileclient was being overwritten
by dueling minion instances in multimaster mode. This protects them by hashing
by the id of opts.
Closes #25040
* Silly typo!
* Remove tests which do not test any actual functionality or are too tightly coupled to the implementation
* Strip ldap fqdn (#33127)
* Add option to strip off domain names on computer names that come from LDAP/AD
* Add strip_domains option for ldap.
* Add documentation for auth.ldap.minion_stripdomains.
* [2015.5] Update to latest bootstrap script v2016.05.10 (#33155)
* [2015.8] Update to latest bootstrap script v2016.05.10 (#33156)
* [2016.3] Update to latest bootstrap script v2016.05.10 (#33157)
* add 2015.5.11 release notes (#33160)
* add 2015.8.9 release notes (#33161)
* Pip fix (#33180)
* fix pip!!
* make it work with old pip as well
* Added resiliency
* Don't need to check, just get the right name
* [2015.5] Update to latest bootstrap script v2016.05.11 (#33185)
2016-05-12 14:53:39 +00:00
|
|
|
def mock_decorator_with_params(*oargs, **okwargs):
|
|
|
|
'''
|
|
|
|
Optionally mock a decorator that takes parameters
|
|
|
|
|
|
|
|
E.g.:
|
|
|
|
|
|
|
|
@blah(stuff=True)
|
|
|
|
def things():
|
|
|
|
pass
|
|
|
|
'''
|
|
|
|
def inner(fn, *iargs, **ikwargs):
|
|
|
|
if hasattr(fn, '__call__'):
|
|
|
|
return fn
|
|
|
|
else:
|
|
|
|
return Mock()
|
|
|
|
return inner
|
|
|
|
|
2015-09-28 19:51:31 +00:00
|
|
|
# Define a fake version attribute for the following libs.
|
2014-09-17 19:03:48 +00:00
|
|
|
sys.modules['libcloud'].__version__ = '0.0.0'
|
2015-09-28 19:51:31 +00:00
|
|
|
sys.modules['pymongo'].version = '0.0.0'
|
2016-03-23 20:08:36 +00:00
|
|
|
sys.modules['ntsecuritycon'].STANDARD_RIGHTS_REQUIRED = 0
|
|
|
|
sys.modules['ntsecuritycon'].SYNCHRONIZE = 0
|
2014-09-17 19:03:48 +00:00
|
|
|
|
[develop] Merge forward from 2016.3 to develop (#33193)
* Add run_on_start docs to schedule.rst (#32958)
Fixes #22580
* Backport #33021 manually to 2015.5 (#33044)
* Saltfile with pillar tests (#33045)
* add file.managed with pillar data tests
* do not require git for other tests
* Fix minor document error of test.assertion (#33067)
* test pillar.items output (#33060)
* File and User test fixes for 2015.5 on Fedora23 (#33055)
* Fix file_test.test_symlink on 2015.5
* Fix failing user present test
* add test for installing package while using salt-call --local (#33025)
* add test for installing package while using salt-call --local
* fix pylint
* ssh docs: install py-2.6 for RHEL 5
* Bugfix: Restore boolean values from the repo configuration
* Add test data for repos
* Add repo config test
* Bugfix (follow-up): setting priority requires non-positive integer
* modules.npm: do not log npm --version at info level (#33084)
* salt-cloud: fix ipv6-only virtual machines (#32865)
* salt-cloud: fix ipv6-only virtual machines
* fix hostname for rsync fallback in scp_file function
* use 4 spaces instead of 2
* remove global variable, use direct socket call instead
* Use saltstack repo in buildpackage.py on CentOS 5 (#33080)
* Lower display of msgpack failure msg to debug (#33078)
Closes #33074
* cloud.query needs to define mapper.opts (#33098)
* clarify docs that map is designed to be run once. is not stateful (#33102)
* Moved _finger_fail method to parent class.
Method _finger_fail method from SAuth to AsyncAuth class to make method available
in both class and fix an issue where _finger_Fail is called inside AsyncAuth.
* Fix 33058 (#33099)
* Fix servermanager module
- Added check for 2008 version of windows
- Added Import-Module ServerManager to _pshell_json.
Apparently this needs to run each time we issue a
servermanager command.
* Fix list_available
* salt.utils.gitfs: fix formatting for warning messages (#33064)
* salt.utils.gitfs: fix formatting for warning messages
When git_pillar support was added to salt.utils.gitfs, the
recommendation globals had string formatting placeholders added to them,
but the locations where these values are referenced do not call
``.format()`` to properly replace them. This commit fixes that
oversight.
* Remove more gitfs and master-specific wording from log messages
* Add a check that the cmdline of the found proc matches (#33129)
* Doc mock decorators (#33132)
* Add mock function for mocking decorators
* Mock the stdlib user module because importing it will open the repl
* Fix broken parsing of usermgmt.conf on OpenBSD (#33135)
When creating a new user, if a group of the same name already exists,
the usermgmt.conf file is consulted to determine the primary group.
It's in these cases that the parsing bug is triggered.
This code change addresses several of the existing issues:
- The previous split statement explicitly specified a single space.
Since a config line may have any number of spaces and/or tabs
surrounding the entries, the resulting array's elements may be
incorrect.
- According to the man pages for usermgmt.conf, the "group" config
entry accpets a single parameter -- so we shouldn't iterate.
- The "val[1]" was returning the 2nd letter of each word and not the
second word on the config line as intended.
* Move salt-ssh thin dir location to /var/tmp (#33130)
* Move salt-ssh thin dir location to /var/tmp
Closes #32771
* Remove performance penelty language
* If cache_jobs: True is set, populate the local job cache when running salt-call (#33100)
* If cache_jobs: True is set, populate the local job cache
Fixes #32834
Allows a masterless minion to query the job cache.
* Refactor cache_jobs functionality to be DRY
* Skipping salt-call --local test
* Back-port #31769 to 2015.8 (#33139)
* Handle empty acl_name in linux_acl state
Calls to setfacl interpret an empty group or user name to mean to be the
owner of the file they're operating on. For example, for a directory
owned by group 'admin', the ACL 'default:group::rwx' is equivalent to
'default:group:admin:rwx'.
The output of the getfacl execution module returns ACLs in the format of
'group:admin:rwx' instead of 'group::rwx'. This commit changes the
acl.present state to look for the owner of the file if the acl_name
paremeter is empty.
* Fix acl.present/acl.absent changing default ACLs
The behaviour of the acl.present and acl.absent is to check the data
structure returned by getfacl contains a key by the name of acl_type.
However, this data structure does not contain any default ACLs if none
exist, so this check will fail. We omit the check if a default ACL was
passed into the state functions.
Unfortunately, the call to modfacl may fail if the user passes in an
acl_type such as 'default:random'. In this case the state will appear to
succeed, but do nothing.
This fixes the state module to allow setting default ACLs on files which
have none.
* Fix regression in 2016.3 HEAD when version is specified (#33146)
Resolves #33013.
* Hash fileclients by opts (#33142)
* Hash fileclients by opts
There was an issue whereby the cache of the fileclient was being overwritten
by dueling minion instances in multimaster mode. This protects them by hashing
by the id of opts.
Closes #25040
* Silly typo!
* Remove tests which do not test any actual functionality or are too tightly coupled to the implementation
* Strip ldap fqdn (#33127)
* Add option to strip off domain names on computer names that come from LDAP/AD
* Add strip_domains option for ldap.
* Add documentation for auth.ldap.minion_stripdomains.
* [2015.5] Update to latest bootstrap script v2016.05.10 (#33155)
* [2015.8] Update to latest bootstrap script v2016.05.10 (#33156)
* [2016.3] Update to latest bootstrap script v2016.05.10 (#33157)
* add 2015.5.11 release notes (#33160)
* add 2015.8.9 release notes (#33161)
* Pip fix (#33180)
* fix pip!!
* make it work with old pip as well
* Added resiliency
* Don't need to check, just get the right name
* [2015.5] Update to latest bootstrap script v2016.05.11 (#33185)
2016-05-12 14:53:39 +00:00
|
|
|
# Define a fake version attribute for the following libs.
|
|
|
|
sys.modules['cherrypy'].config = mock_decorator_with_params
|
|
|
|
|
2012-01-16 05:33:44 +00:00
|
|
|
|
|
|
|
# -- Add paths to PYTHONPATH ---------------------------------------------------
|
2013-10-11 22:23:17 +00:00
|
|
|
try:
|
|
|
|
docs_basepath = os.path.abspath(os.path.dirname(__file__))
|
|
|
|
except NameError:
|
|
|
|
# sphinx-intl and six execute some code which will raise this NameError
|
|
|
|
# assume we're in the doc/ directory
|
|
|
|
docs_basepath = os.path.abspath(os.path.dirname('.'))
|
2012-01-16 05:33:44 +00:00
|
|
|
|
2012-01-10 13:10:34 +00:00
|
|
|
addtl_paths = (
|
2013-12-03 22:54:38 +00:00
|
|
|
os.pardir, # salt itself (for autodoc)
|
|
|
|
'_ext', # custom Sphinx extensions
|
2012-01-10 13:10:34 +00:00
|
|
|
)
|
2011-05-23 06:51:31 +00:00
|
|
|
|
2012-01-10 13:10:34 +00:00
|
|
|
for path in addtl_paths:
|
|
|
|
sys.path.insert(0, os.path.abspath(os.path.join(docs_basepath, path)))
|
2011-05-23 06:51:31 +00:00
|
|
|
|
2013-10-11 22:23:17 +00:00
|
|
|
|
|
|
|
# We're now able to import salt
|
2013-07-15 21:09:13 +00:00
|
|
|
import salt.version
|
2012-01-16 05:33:44 +00:00
|
|
|
|
2011-09-25 06:30:36 +00:00
|
|
|
|
2013-09-11 06:36:22 +00:00
|
|
|
formulas_dir = os.path.join(os.pardir, docs_basepath, 'formulas')
|
2012-01-16 09:14:22 +00:00
|
|
|
|
2013-07-23 15:39:55 +00:00
|
|
|
# ----- Intersphinx Settings ------------------------------------------------>
|
|
|
|
intersphinx_mapping = {
|
|
|
|
'python2': ('http://docs.python.org/2', None),
|
|
|
|
'python3': ('http://docs.python.org/3', None)
|
|
|
|
}
|
|
|
|
# <---- Intersphinx Settings -------------------------------------------------
|
|
|
|
|
2013-10-29 08:13:07 +00:00
|
|
|
# -- General Configuration -----------------------------------------------------
|
2011-05-23 06:51:31 +00:00
|
|
|
|
2016-08-31 15:51:36 +00:00
|
|
|
# Set a var if we're building docs for the live site or not
|
|
|
|
on_saltstack = 'SALT_ON_SALTSTACK' in os.environ
|
|
|
|
|
2012-06-04 22:40:34 +00:00
|
|
|
project = 'Salt'
|
2011-05-23 06:51:31 +00:00
|
|
|
|
2013-07-15 21:09:13 +00:00
|
|
|
version = salt.version.__version__
|
2017-09-27 16:25:30 +00:00
|
|
|
latest_release = '2017.7.2' # latest release
|
|
|
|
previous_release = '2016.11.8' # latest release from previous branch
|
2017-07-17 20:56:56 +00:00
|
|
|
previous_release_dir = '2016.11' # path on web server for previous branch
|
2016-11-28 17:10:00 +00:00
|
|
|
next_release = '' # next release
|
|
|
|
next_release_dir = '' # path on web server for next release branch
|
2015-05-22 17:53:33 +00:00
|
|
|
|
2016-08-31 15:51:36 +00:00
|
|
|
today = ''
|
|
|
|
copyright = ''
|
|
|
|
if on_saltstack:
|
|
|
|
today = "Generated on " + time.strftime("%B %d, %Y") + " at " + time.strftime("%X %Z") + "."
|
|
|
|
copyright = time.strftime("%Y")
|
2016-06-13 15:24:40 +00:00
|
|
|
|
2016-05-26 00:09:37 +00:00
|
|
|
# < --- START do not merge these settings to other branches START ---> #
|
2017-07-17 20:56:56 +00:00
|
|
|
build_type = 'latest' # latest, previous, develop, next
|
|
|
|
release = latest_release # version, latest_release, previous_release
|
2016-05-26 00:09:37 +00:00
|
|
|
# < --- END do not merge these settings to other branches END ---> #
|
2015-05-22 17:53:33 +00:00
|
|
|
|
|
|
|
# Set google custom search engine
|
|
|
|
|
|
|
|
if release == latest_release:
|
2015-09-14 21:17:59 +00:00
|
|
|
search_cx = '004624818632696854117:yfmprrbw3pk' # latest
|
2015-05-22 17:53:33 +00:00
|
|
|
elif release.startswith('2014.7'):
|
2015-09-14 21:17:59 +00:00
|
|
|
search_cx = '004624818632696854117:thhslradbru' # 2014.7
|
2015-08-24 16:13:01 +00:00
|
|
|
elif release.startswith('2015.5'):
|
2015-09-14 21:17:59 +00:00
|
|
|
search_cx = '004624818632696854117:ovogwef29do' # 2015.5
|
2016-05-26 00:09:37 +00:00
|
|
|
elif release.startswith('2015.8'):
|
|
|
|
search_cx = '004624818632696854117:aw_tegffouy' # 2015.8
|
2015-05-22 17:53:33 +00:00
|
|
|
else:
|
|
|
|
search_cx = '004624818632696854117:haj7bjntf4s' # develop
|
2011-05-23 06:51:31 +00:00
|
|
|
|
2014-12-19 20:46:02 +00:00
|
|
|
needs_sphinx = '1.3'
|
|
|
|
|
2014-07-13 18:43:33 +00:00
|
|
|
spelling_lang = 'en_US'
|
2013-09-12 04:23:46 +00:00
|
|
|
language = 'en'
|
|
|
|
locale_dirs = [
|
|
|
|
'_locale',
|
|
|
|
]
|
|
|
|
|
2011-10-11 01:31:51 +00:00
|
|
|
master_doc = 'contents'
|
2011-10-11 01:23:39 +00:00
|
|
|
templates_path = ['_templates']
|
2013-08-20 22:43:54 +00:00
|
|
|
exclude_patterns = ['_build', '_incl/*', 'ref/cli/_includes/*.rst']
|
2011-05-23 06:51:31 +00:00
|
|
|
|
2012-10-15 20:26:11 +00:00
|
|
|
extensions = [
|
2013-12-14 05:33:50 +00:00
|
|
|
'saltdomain', # Must come early
|
2012-10-15 20:26:11 +00:00
|
|
|
'sphinx.ext.autodoc',
|
2016-10-12 15:31:07 +00:00
|
|
|
'sphinx.ext.napoleon',
|
2012-10-15 20:26:11 +00:00
|
|
|
'sphinx.ext.autosummary',
|
|
|
|
'sphinx.ext.extlinks',
|
2013-09-17 23:53:29 +00:00
|
|
|
'sphinx.ext.intersphinx',
|
2014-06-19 18:27:31 +00:00
|
|
|
'httpdomain',
|
2013-09-17 23:53:29 +00:00
|
|
|
'youtube',
|
2013-12-14 05:33:50 +00:00
|
|
|
'saltautodoc', # Must be AFTER autodoc
|
2014-04-16 00:01:31 +00:00
|
|
|
'shorturls',
|
2012-10-15 20:26:11 +00:00
|
|
|
]
|
2011-05-23 06:51:31 +00:00
|
|
|
|
2014-07-14 21:18:52 +00:00
|
|
|
try:
|
|
|
|
import sphinxcontrib.spelling
|
|
|
|
except ImportError:
|
|
|
|
pass
|
|
|
|
else:
|
|
|
|
extensions += ['sphinxcontrib.spelling']
|
|
|
|
|
2011-10-11 01:23:39 +00:00
|
|
|
modindex_common_prefix = ['salt.']
|
2011-05-23 06:51:31 +00:00
|
|
|
|
2011-11-07 07:47:06 +00:00
|
|
|
autosummary_generate = True
|
|
|
|
|
2011-10-11 01:23:39 +00:00
|
|
|
# Define a substitution for linking to the latest release tarball
|
|
|
|
rst_prolog = """\
|
2015-03-11 02:06:59 +00:00
|
|
|
.. |current_release_doc| replace:: :doc:`/topics/releases/{release}`
|
2011-11-16 05:41:20 +00:00
|
|
|
.. |saltrepo| replace:: https://github.com/saltstack/salt
|
2014-07-14 20:54:36 +00:00
|
|
|
.. _`salt-users`: https://groups.google.com/forum/#!forum/salt-users
|
|
|
|
.. _`salt-announce`: https://groups.google.com/forum/#!forum/salt-announce
|
|
|
|
.. _`salt-packagers`: https://groups.google.com/forum/#!forum/salt-packagers
|
2015-08-05 21:13:19 +00:00
|
|
|
.. |windownload| raw:: html
|
|
|
|
|
2017-07-21 13:45:30 +00:00
|
|
|
<p>Python2 x86: <a
|
|
|
|
href="https://repo.saltstack.com/windows/Salt-Minion-{release}-Py2-x86-Setup.exe"><strong>Salt-Minion-{release}-x86-Setup.exe</strong></a>
|
|
|
|
| <a href="https://repo.saltstack.com/windows/Salt-Minion-{release}-Py2-x86-Setup.exe.md5"><strong>md5</strong></a></p>
|
|
|
|
|
|
|
|
<p>Python2 AMD64: <a
|
|
|
|
href="https://repo.saltstack.com/windows/Salt-Minion-{release}-Py2-AMD64-Setup.exe"><strong>Salt-Minion-{release}-AMD64-Setup.exe</strong></a>
|
|
|
|
| <a href="https://repo.saltstack.com/windows/Salt-Minion-{release}-Py2-AMD64-Setup.exe.md5"><strong>md5</strong></a></p>
|
|
|
|
<p>Python3 x86: <a
|
|
|
|
href="https://repo.saltstack.com/windows/Salt-Minion-{release}-Py3-x86-Setup.exe"><strong>Salt-Minion-{release}-x86-Setup.exe</strong></a>
|
|
|
|
| <a href="https://repo.saltstack.com/windows/Salt-Minion-{release}-Py3-x86-Setup.exe.md5"><strong>md5</strong></a></p>
|
|
|
|
|
|
|
|
<p>Python3 AMD64: <a
|
|
|
|
href="https://repo.saltstack.com/windows/Salt-Minion-{release}-Py3-AMD64-Setup.exe"><strong>Salt-Minion-{release}-AMD64-Setup.exe</strong></a>
|
|
|
|
| <a href="https://repo.saltstack.com/windows/Salt-Minion-{release}-Py3-AMD64-Setup.exe.md5"><strong>md5</strong></a></p>
|
2015-09-01 02:20:44 +00:00
|
|
|
|
2015-08-05 21:13:19 +00:00
|
|
|
|
2016-06-15 17:52:02 +00:00
|
|
|
.. |osxdownload| raw:: html
|
|
|
|
|
|
|
|
<p>x86_64: <a href="https://repo.saltstack.com/osx/salt-{release}-x86_64.pkg"><strong>salt-{release}-x86_64.pkg</strong></a>
|
|
|
|
| <a href="https://repo.saltstack.com/osx/salt-{release}-x86_64.pkg.md5"><strong>md5</strong></a></p>
|
2015-08-05 21:13:19 +00:00
|
|
|
|
2015-06-11 16:01:30 +00:00
|
|
|
""".format(release=release)
|
2011-05-23 06:51:31 +00:00
|
|
|
|
2011-09-25 06:36:41 +00:00
|
|
|
# A shortcut for linking to tickets on the GitHub issue tracker
|
|
|
|
extlinks = {
|
2012-09-24 19:20:17 +00:00
|
|
|
'blob': ('https://github.com/saltstack/salt/blob/%s/%%s' % 'develop', None),
|
2014-02-20 23:16:59 +00:00
|
|
|
'download': ('https://cloud.github.com/downloads/saltstack/salt/%s', None),
|
2011-11-16 05:41:20 +00:00
|
|
|
'issue': ('https://github.com/saltstack/salt/issues/%s', 'issue '),
|
2016-03-14 22:34:22 +00:00
|
|
|
'pull': ('https://github.com/saltstack/salt/pull/%s', 'PR '),
|
2014-12-19 20:47:37 +00:00
|
|
|
'formula_url': ('https://github.com/saltstack-formulas/%s', ''),
|
2011-09-25 06:36:41 +00:00
|
|
|
}
|
2011-05-23 06:51:31 +00:00
|
|
|
|
|
|
|
|
2013-10-11 22:23:17 +00:00
|
|
|
# ----- Localization -------------------------------------------------------->
|
|
|
|
locale_dirs = ['locale/']
|
|
|
|
gettext_compact = False
|
|
|
|
# <---- Localization ---------------------------------------------------------
|
2012-01-16 09:14:22 +00:00
|
|
|
|
2014-04-17 05:58:58 +00:00
|
|
|
|
|
|
|
### HTML options
|
2015-05-19 21:54:28 +00:00
|
|
|
html_theme = 'saltstack2' #change to 'saltstack' to use previous theme
|
2013-02-22 09:59:37 +00:00
|
|
|
html_theme_path = ['_themes']
|
2014-12-19 20:53:15 +00:00
|
|
|
html_title = u''
|
2011-10-11 01:23:39 +00:00
|
|
|
html_short_title = 'Salt'
|
2011-05-23 06:51:31 +00:00
|
|
|
|
2011-10-11 01:31:51 +00:00
|
|
|
html_static_path = ['_static']
|
2014-12-08 22:32:53 +00:00
|
|
|
html_logo = None # specified in the theme layout.html
|
2011-10-17 05:54:11 +00:00
|
|
|
html_favicon = 'favicon.ico'
|
2011-10-11 01:31:51 +00:00
|
|
|
html_use_smartypants = False
|
2011-05-23 06:51:31 +00:00
|
|
|
|
2014-04-17 05:59:40 +00:00
|
|
|
# Use Google customized search or use Sphinx built-in JavaScript search
|
2014-04-29 23:08:16 +00:00
|
|
|
if on_saltstack:
|
2014-04-17 05:59:40 +00:00
|
|
|
html_search_template = 'googlesearch.html'
|
|
|
|
else:
|
|
|
|
html_search_template = 'searchbox.html'
|
|
|
|
|
2011-11-17 02:52:51 +00:00
|
|
|
html_additional_pages = {
|
|
|
|
'404': '404.html',
|
|
|
|
}
|
2011-11-13 11:44:15 +00:00
|
|
|
|
2013-02-28 17:09:11 +00:00
|
|
|
html_default_sidebars = [
|
2014-04-29 22:58:36 +00:00
|
|
|
html_search_template,
|
2014-04-29 22:21:25 +00:00
|
|
|
'version.html',
|
2013-02-28 17:09:11 +00:00
|
|
|
'localtoc.html',
|
|
|
|
'relations.html',
|
|
|
|
'sourcelink.html',
|
2014-04-29 23:49:00 +00:00
|
|
|
'saltstack.html',
|
2013-02-28 17:09:11 +00:00
|
|
|
]
|
2011-11-13 11:44:15 +00:00
|
|
|
html_sidebars = {
|
2013-02-28 17:09:11 +00:00
|
|
|
'ref/**/all/salt.*': [
|
2014-04-29 22:58:36 +00:00
|
|
|
html_search_template,
|
2014-04-29 22:21:25 +00:00
|
|
|
'version.html',
|
2013-02-28 17:09:11 +00:00
|
|
|
'modules-sidebar.html',
|
2012-02-06 22:45:24 +00:00
|
|
|
'localtoc.html',
|
|
|
|
'relations.html',
|
|
|
|
'sourcelink.html',
|
2014-04-29 23:49:00 +00:00
|
|
|
'saltstack.html',
|
2012-02-06 22:45:24 +00:00
|
|
|
],
|
2013-09-11 14:46:58 +00:00
|
|
|
'ref/formula/all/*': [
|
|
|
|
],
|
2011-11-13 11:44:15 +00:00
|
|
|
}
|
|
|
|
|
2011-10-11 01:31:51 +00:00
|
|
|
html_context = {
|
2014-04-29 23:08:16 +00:00
|
|
|
'on_saltstack': on_saltstack,
|
2013-02-28 17:42:26 +00:00
|
|
|
'html_default_sidebars': html_default_sidebars,
|
2011-11-16 05:41:20 +00:00
|
|
|
'github_base': 'https://github.com/saltstack/salt',
|
|
|
|
'github_issues': 'https://github.com/saltstack/salt/issues',
|
|
|
|
'github_downloads': 'https://github.com/saltstack/salt/downloads',
|
2015-05-22 17:53:33 +00:00
|
|
|
'latest_release': latest_release,
|
|
|
|
'previous_release': previous_release,
|
|
|
|
'previous_release_dir': previous_release_dir,
|
2016-02-16 22:25:28 +00:00
|
|
|
'next_release': next_release,
|
|
|
|
'next_release_dir': next_release_dir,
|
2015-05-22 17:53:33 +00:00
|
|
|
'search_cx': search_cx,
|
|
|
|
'build_type': build_type,
|
2016-06-13 15:24:40 +00:00
|
|
|
'today': today,
|
2016-08-31 15:51:36 +00:00
|
|
|
'copyright': copyright,
|
2011-10-11 01:31:51 +00:00
|
|
|
}
|
2011-05-23 06:51:31 +00:00
|
|
|
|
2012-10-11 20:40:40 +00:00
|
|
|
html_use_index = True
|
2011-10-11 01:23:39 +00:00
|
|
|
html_last_updated_fmt = '%b %d, %Y'
|
|
|
|
html_show_sourcelink = False
|
|
|
|
html_show_sphinx = True
|
|
|
|
html_show_copyright = True
|
2011-05-23 06:51:31 +00:00
|
|
|
|
2011-10-11 01:23:39 +00:00
|
|
|
### Latex options
|
2014-11-26 22:21:18 +00:00
|
|
|
|
2011-05-23 06:51:31 +00:00
|
|
|
latex_documents = [
|
2015-05-11 23:29:12 +00:00
|
|
|
('contents', 'Salt.tex', 'Salt Documentation', 'SaltStack, Inc.', 'manual'),
|
2011-05-23 06:51:31 +00:00
|
|
|
]
|
|
|
|
|
2015-05-11 23:29:12 +00:00
|
|
|
latex_logo = '_static/salt-logo.png'
|
2011-05-23 06:51:31 +00:00
|
|
|
|
2014-06-04 23:40:31 +00:00
|
|
|
latex_elements = {
|
|
|
|
'inputenc': '', # use XeTeX instead of the inputenc LaTeX package.
|
|
|
|
'utf8extra': '',
|
|
|
|
'preamble': '''
|
2015-05-19 21:54:28 +00:00
|
|
|
\usepackage{fontspec}
|
|
|
|
\setsansfont{Linux Biolinum O}
|
|
|
|
\setromanfont{Linux Libertine O}
|
|
|
|
\setmonofont{Source Code Pro}
|
2014-06-04 23:40:31 +00:00
|
|
|
''',
|
|
|
|
}
|
2015-05-19 21:54:28 +00:00
|
|
|
### Linux Biolinum, Linux Libertine: http://www.linuxlibertine.org/
|
|
|
|
### Source Code Pro: https://github.com/adobe-fonts/source-code-pro/releases
|
|
|
|
|
2014-06-04 23:40:31 +00:00
|
|
|
|
2014-02-20 23:16:59 +00:00
|
|
|
### Linkcheck options
|
|
|
|
linkcheck_ignore = [r'http://127.0.0.1',
|
|
|
|
r'http://salt:\d+',
|
|
|
|
r'http://local:\d+',
|
|
|
|
r'https://console.aws.amazon.com',
|
|
|
|
r'http://192.168.33.10',
|
|
|
|
r'http://domain:\d+',
|
|
|
|
r'http://123.456.789.012:\d+',
|
|
|
|
r'http://localhost',
|
|
|
|
r'https://groups.google.com/forum/#!forum/salt-users',
|
|
|
|
r'http://logstash.net/docs/latest/inputs/udp',
|
|
|
|
r'http://logstash.net/docs/latest/inputs/zeromq',
|
|
|
|
r'http://www.youtube.com/saltstack',
|
2016-06-11 11:33:37 +00:00
|
|
|
r'https://raven.readthedocs.io',
|
2014-02-20 23:16:59 +00:00
|
|
|
r'https://getsentry.com',
|
2016-06-11 11:33:37 +00:00
|
|
|
r'https://salt-cloud.readthedocs.io',
|
|
|
|
r'https://salt.readthedocs.io',
|
2014-02-20 23:16:59 +00:00
|
|
|
r'http://www.pip-installer.org/',
|
|
|
|
r'http://www.windowsazure.com/',
|
|
|
|
r'https://github.com/watching',
|
|
|
|
r'dash-feed://',
|
|
|
|
r'https://github.com/saltstack/salt/',
|
2014-04-27 10:46:36 +00:00
|
|
|
r'http://bootstrap.saltstack.org',
|
2014-06-07 12:31:12 +00:00
|
|
|
r'https://bootstrap.saltstack.com',
|
2014-04-27 09:02:42 +00:00
|
|
|
r'https://raw.githubusercontent.com/saltstack/salt-bootstrap/stable/bootstrap-salt.sh',
|
2014-02-20 23:16:59 +00:00
|
|
|
r'media.readthedocs.org/dash/salt/latest/salt.xml',
|
|
|
|
r'https://portal.aws.amazon.com/gp/aws/securityCredentials',
|
|
|
|
r'https://help.github.com/articles/fork-a-repo',
|
|
|
|
r'dash-feed://https%3A//media.readthedocs.org/dash/salt/latest/salt.xml'
|
|
|
|
]
|
|
|
|
|
|
|
|
linkcheck_anchors = False
|
2011-05-23 06:51:31 +00:00
|
|
|
|
2011-10-11 01:23:39 +00:00
|
|
|
### Manpage options
|
2011-05-23 06:51:31 +00:00
|
|
|
# One entry per manual page. List of tuples
|
|
|
|
# (source start file, name, description, authors, manual section).
|
|
|
|
authors = [
|
2012-07-13 15:38:59 +00:00
|
|
|
'Thomas S. Hatch <thatch45@gmail.com> and many others, please see the Authors file',
|
2011-05-23 06:51:31 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
man_pages = [
|
2012-06-04 22:40:34 +00:00
|
|
|
('contents', 'salt', 'Salt Documentation', authors, 7),
|
2013-08-10 15:03:07 +00:00
|
|
|
('ref/cli/salt', 'salt', 'salt', authors, 1),
|
2012-06-04 22:40:34 +00:00
|
|
|
('ref/cli/salt-master', 'salt-master', 'salt-master Documentation', authors, 1),
|
|
|
|
('ref/cli/salt-minion', 'salt-minion', 'salt-minion Documentation', authors, 1),
|
|
|
|
('ref/cli/salt-key', 'salt-key', 'salt-key Documentation', authors, 1),
|
|
|
|
('ref/cli/salt-cp', 'salt-cp', 'salt-cp Documentation', authors, 1),
|
|
|
|
('ref/cli/salt-call', 'salt-call', 'salt-call Documentation', authors, 1),
|
2015-09-01 23:09:35 +00:00
|
|
|
('ref/cli/salt-proxy', 'salt-proxy', 'salt-proxy Documentation', authors, 1),
|
2012-06-04 22:40:34 +00:00
|
|
|
('ref/cli/salt-syndic', 'salt-syndic', 'salt-syndic Documentation', authors, 1),
|
|
|
|
('ref/cli/salt-run', 'salt-run', 'salt-run Documentation', authors, 1),
|
2013-08-10 15:03:07 +00:00
|
|
|
('ref/cli/salt-ssh', 'salt-ssh', 'salt-ssh Documentation', authors, 1),
|
2013-11-08 21:40:13 +00:00
|
|
|
('ref/cli/salt-cloud', 'salt-cloud', 'Salt Cloud Command', authors, 1),
|
2014-06-20 16:19:27 +00:00
|
|
|
('ref/cli/salt-api', 'salt-api', 'salt-api Command', authors, 1),
|
2014-09-13 18:53:49 +00:00
|
|
|
('ref/cli/salt-unity', 'salt-unity', 'salt-unity Command', authors, 1),
|
2015-07-07 22:54:26 +00:00
|
|
|
('ref/cli/spm', 'spm', 'Salt Package Manager Command', authors, 1),
|
2011-05-23 06:51:31 +00:00
|
|
|
]
|
2011-11-07 02:16:34 +00:00
|
|
|
|
|
|
|
|
|
|
|
### epub options
|
2012-06-04 22:40:34 +00:00
|
|
|
epub_title = 'Salt Documentation'
|
2013-07-15 20:58:42 +00:00
|
|
|
epub_author = 'SaltStack, Inc.'
|
2011-11-07 02:16:34 +00:00
|
|
|
epub_publisher = epub_author
|
2013-07-15 20:58:42 +00:00
|
|
|
epub_copyright = copyright
|
2011-11-07 02:16:34 +00:00
|
|
|
|
|
|
|
epub_scheme = 'URL'
|
2016-01-22 17:45:32 +00:00
|
|
|
epub_identifier = 'http://saltstack.com/'
|
2011-11-07 02:16:34 +00:00
|
|
|
|
|
|
|
#epub_tocdepth = 3
|
2012-05-29 23:17:03 +00:00
|
|
|
|
2012-06-19 08:09:33 +00:00
|
|
|
|
2012-05-29 23:17:03 +00:00
|
|
|
def skip_mod_init_member(app, what, name, obj, skip, options):
|
2012-06-10 15:20:47 +00:00
|
|
|
if name.startswith('_'):
|
|
|
|
return True
|
2012-05-29 23:17:03 +00:00
|
|
|
if isinstance(obj, types.FunctionType) and obj.__name__ == 'mod_init':
|
|
|
|
return True
|
|
|
|
return False
|
|
|
|
|
2012-06-19 08:09:33 +00:00
|
|
|
|
|
|
|
def _normalize_version(args):
|
|
|
|
_, path = args
|
|
|
|
return '.'.join([x.zfill(4) for x in (path.split('/')[-1].split('.'))])
|
|
|
|
|
|
|
|
|
|
|
|
class ReleasesTree(TocTree):
|
|
|
|
option_spec = dict(TocTree.option_spec)
|
|
|
|
|
|
|
|
def run(self):
|
|
|
|
rst = super(ReleasesTree, self).run()
|
|
|
|
entries = rst[0][0]['entries'][:]
|
|
|
|
entries.sort(key=_normalize_version, reverse=True)
|
|
|
|
rst[0][0]['entries'][:] = entries
|
|
|
|
return rst
|
|
|
|
|
|
|
|
|
2012-05-29 23:17:03 +00:00
|
|
|
def setup(app):
|
2012-06-19 08:09:33 +00:00
|
|
|
app.add_directive('releasestree', ReleasesTree)
|
2015-05-22 17:53:33 +00:00
|
|
|
app.connect('autodoc-skip-member', skip_mod_init_member)
|