mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 09:23:56 +00:00
Merge branch '2018.3' into merge-2018.3
This commit is contained in:
commit
097103553b
13
doc/_themes/saltstack2/layout.html
vendored
13
doc/_themes/saltstack2/layout.html
vendored
@ -71,6 +71,14 @@
|
||||
{%- endmacro %}
|
||||
<html>
|
||||
<head>
|
||||
<!-- Google Tag Manager -->
|
||||
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
|
||||
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
|
||||
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
|
||||
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
|
||||
})(window,document,'script','dataLayer','GTM-MCK7VL3');</script>
|
||||
<!-- End Google Tag Manager -->
|
||||
|
||||
<meta charset="{{ encoding }}">
|
||||
{{ metatags }}
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||
@ -120,6 +128,11 @@
|
||||
</head>
|
||||
|
||||
<body class="index">
|
||||
<!-- Google Tag Manager (noscript) -->
|
||||
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-MCK7VL3"
|
||||
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
|
||||
<!-- End Google Tag Manager (noscript) -->
|
||||
|
||||
<!--[if lt IE 8]>
|
||||
<p>You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser.</a></p>
|
||||
<![endif]-->
|
||||
|
@ -531,7 +531,13 @@ Global Remotes
|
||||
|
||||
The ``all_saltenvs`` per-remote configuration parameter overrides the logic
|
||||
Salt uses to map branches/tags to fileserver environments (i.e. saltenvs). This
|
||||
allows a single branch/tag to appear in *all* saltenvs.
|
||||
allows a single branch/tag to appear in *all* GitFS saltenvs.
|
||||
|
||||
.. note::
|
||||
``all_saltenvs`` only works *within* GitFS. That is, files in a branch
|
||||
configured using ``all_saltenvs`` will *not* show up in a fileserver
|
||||
environment defined via some other fileserver backend (e.g.
|
||||
:conf_master:`file_roots`).
|
||||
|
||||
This is very useful in particular when working with :ref:`salt formulas
|
||||
<conventions-formula>`. Prior to the addition of this feature, it was necessary
|
||||
|
@ -22,6 +22,7 @@ import re
|
||||
|
||||
# Import salt libs
|
||||
import salt.utils.args
|
||||
import salt.utils.compat
|
||||
import salt.utils.data
|
||||
import salt.utils.functools
|
||||
import salt.utils.path
|
||||
@ -31,9 +32,6 @@ import salt.utils.versions
|
||||
from salt.exceptions import CommandExecutionError, MinionError
|
||||
from salt.ext import six
|
||||
|
||||
# Workaround for 'reload' builtin of py2.7
|
||||
if six.PY3:
|
||||
from importlib import reload # pylint: disable=no-name-in-module
|
||||
|
||||
# Import third party libs
|
||||
HAS_PORTAGE = False
|
||||
@ -69,13 +67,13 @@ def __virtual__():
|
||||
|
||||
def _vartree():
|
||||
import portage # pylint: disable=3rd-party-module-not-gated
|
||||
portage = reload(portage)
|
||||
portage = salt.utils.compat.reload(portage)
|
||||
return portage.db[portage.root]['vartree']
|
||||
|
||||
|
||||
def _porttree():
|
||||
import portage # pylint: disable=3rd-party-module-not-gated
|
||||
portage = reload(portage)
|
||||
portage = salt.utils.compat.reload(portage)
|
||||
return portage.db[portage.root]['porttree']
|
||||
|
||||
|
||||
|
@ -10,6 +10,7 @@ import os
|
||||
import shutil
|
||||
|
||||
# Import salt libs
|
||||
import salt.utils.compat
|
||||
import salt.utils.data
|
||||
import salt.utils.files
|
||||
import salt.utils.path
|
||||
@ -57,7 +58,7 @@ def _get_portage():
|
||||
portage module must be reloaded or it can't catch the changes
|
||||
in portage.* which had been added after when the module was loaded
|
||||
'''
|
||||
return reload(portage)
|
||||
return salt.utils.compat.reload(portage)
|
||||
|
||||
|
||||
def _porttree():
|
||||
|
@ -8,6 +8,7 @@ from __future__ import absolute_import, print_function, unicode_literals
|
||||
import sys
|
||||
import copy
|
||||
import types
|
||||
import importlib
|
||||
|
||||
# Import salt libs
|
||||
import salt.loader
|
||||
@ -58,3 +59,13 @@ def cmp(x, y):
|
||||
Return negative if x<y, zero if x==y, positive if x>y.
|
||||
'''
|
||||
return (x > y) - (x < y)
|
||||
|
||||
|
||||
def reload(mod):
|
||||
'''
|
||||
Compatibility helper function to replace the ``reload`` builtin from Python 2.
|
||||
'''
|
||||
try:
|
||||
return importlib.reload(mod)
|
||||
except AttributeError:
|
||||
return reload(mod)
|
||||
|
@ -14,13 +14,11 @@ import re
|
||||
import time
|
||||
|
||||
# Import salt libs
|
||||
import salt.utils.compat
|
||||
import salt.utils.data
|
||||
from salt.utils.timeout import wait_for
|
||||
import salt.ext.six as six
|
||||
|
||||
# Workaround for 'reload' builtin of py2.7
|
||||
if six.PY3:
|
||||
from importlib import reload # pylint: disable=no-name-in-module
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
@ -140,7 +138,7 @@ def vb_get_manager():
|
||||
'''
|
||||
global _virtualboxManager
|
||||
if _virtualboxManager is None and HAS_LIBS:
|
||||
reload(vboxapi)
|
||||
salt.utils.compat.reload(vboxapi)
|
||||
_virtualboxManager = vboxapi.VirtualBoxManager(None, None)
|
||||
|
||||
return _virtualboxManager
|
||||
|
@ -17,6 +17,7 @@ from tests.support.unit import TestCase, skipIf
|
||||
from tests.support.mock import patch, NO_MOCK, NO_MOCK_REASON
|
||||
|
||||
# Import Salt libs
|
||||
import salt.utils.compat
|
||||
import salt.utils.path
|
||||
import salt.utils.platform
|
||||
from salt.exceptions import CommandNotFoundError
|
||||
@ -125,7 +126,7 @@ class PathJoinTestCase(TestCase):
|
||||
platform.system = lambda: "windows"
|
||||
|
||||
for module in (ntpath, os, os.path, tempfile):
|
||||
reload(module)
|
||||
salt.utils.compat.reload(module)
|
||||
|
||||
def __unpatch_path(self):
|
||||
del sys.modules['nt']
|
||||
@ -133,7 +134,7 @@ class PathJoinTestCase(TestCase):
|
||||
platform.system = self.PLATFORM_FUNC
|
||||
|
||||
for module in (posixpath, os, os.path, tempfile, platform):
|
||||
reload(module)
|
||||
salt.utils.compat.reload(module)
|
||||
|
||||
|
||||
@skipIf(NO_MOCK, NO_MOCK_REASON)
|
||||
|
Loading…
Reference in New Issue
Block a user