mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 08:58:59 +00:00
commit
62e9407903
@ -72,7 +72,7 @@ class ClientFuncsDict(collections.MutableMapping):
|
|||||||
}
|
}
|
||||||
pub_data = {}
|
pub_data = {}
|
||||||
# pull out pub_data if you have it
|
# pull out pub_data if you have it
|
||||||
for k, v in kwargs.items():
|
for k, v in six.iteritems(list(kwargs.items())):
|
||||||
if k.startswith('__pub_'):
|
if k.startswith('__pub_'):
|
||||||
pub_data[k] = kwargs.pop(k)
|
pub_data[k] = kwargs.pop(k)
|
||||||
|
|
||||||
|
@ -2,8 +2,11 @@
|
|||||||
'''
|
'''
|
||||||
Allow for the calling of execution modules via sudo
|
Allow for the calling of execution modules via sudo
|
||||||
'''
|
'''
|
||||||
|
|
||||||
# Import python libs
|
# Import python libs
|
||||||
|
from __future__ import absolute_import
|
||||||
import json
|
import json
|
||||||
|
|
||||||
# Import salt libs
|
# Import salt libs
|
||||||
import salt.utils
|
import salt.utils
|
||||||
import salt.syspaths
|
import salt.syspaths
|
||||||
|
@ -28,7 +28,6 @@ except ImportError:
|
|||||||
HAS_MATCHHOSTNAME = False
|
HAS_MATCHHOSTNAME = False
|
||||||
import socket
|
import socket
|
||||||
import urllib2
|
import urllib2
|
||||||
import httplib
|
|
||||||
|
|
||||||
# Import salt libs
|
# Import salt libs
|
||||||
import salt.utils
|
import salt.utils
|
||||||
@ -37,6 +36,7 @@ import salt.loader
|
|||||||
import salt.config
|
import salt.config
|
||||||
from salt.template import compile_template
|
from salt.template import compile_template
|
||||||
from salt import syspaths
|
from salt import syspaths
|
||||||
|
import salt.ext.six.moves.http_client
|
||||||
|
|
||||||
# Import 3rd party libs
|
# Import 3rd party libs
|
||||||
try:
|
try:
|
||||||
@ -297,7 +297,7 @@ def query(url,
|
|||||||
}
|
}
|
||||||
if len(cert) > 1:
|
if len(cert) > 1:
|
||||||
cert_kwargs['key_file'] = cert[1]
|
cert_kwargs['key_file'] = cert[1]
|
||||||
handlers[0] = httplib.HTTPSConnection(**cert_kwargs)
|
handlers[0] = salt.ext.six.moves.http_client.HTTPSConnection(**cert_kwargs)
|
||||||
|
|
||||||
opener = urllib2.build_opener(*handlers)
|
opener = urllib2.build_opener(*handlers)
|
||||||
for header in header_dict:
|
for header in header_dict:
|
||||||
|
@ -233,6 +233,7 @@ from salt.utils.process import os_is_running
|
|||||||
# Import 3rd-party libs
|
# Import 3rd-party libs
|
||||||
import yaml
|
import yaml
|
||||||
import salt.ext.six as six
|
import salt.ext.six as six
|
||||||
|
|
||||||
# pylint: disable=import-error
|
# pylint: disable=import-error
|
||||||
try:
|
try:
|
||||||
import dateutil.parser as dateutil_parser
|
import dateutil.parser as dateutil_parser
|
||||||
@ -522,7 +523,7 @@ class Schedule(object):
|
|||||||
argspec = salt.utils.args.get_function_argspec(self.functions[func])
|
argspec = salt.utils.args.get_function_argspec(self.functions[func])
|
||||||
if argspec.keywords:
|
if argspec.keywords:
|
||||||
# this function accepts **kwargs, pack in the publish data
|
# this function accepts **kwargs, pack in the publish data
|
||||||
for key, val in ret.iteritems():
|
for key, val in six.iteritems(ret):
|
||||||
kwargs['__pub_{0}'.format(key)] = val
|
kwargs['__pub_{0}'.format(key)] = val
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
@ -3,6 +3,9 @@
|
|||||||
:codeauthor: :email:`Jayesh Kariya <jayeshk@saltstack.com>`
|
:codeauthor: :email:`Jayesh Kariya <jayeshk@saltstack.com>`
|
||||||
'''
|
'''
|
||||||
|
|
||||||
|
# Import Python Libs
|
||||||
|
from __future__ import absolute_import
|
||||||
|
|
||||||
# Import Salt Testing Libs
|
# Import Salt Testing Libs
|
||||||
from salttesting import TestCase, skipIf
|
from salttesting import TestCase, skipIf
|
||||||
from salttesting.mock import (
|
from salttesting.mock import (
|
||||||
@ -11,6 +14,9 @@ from salttesting.mock import (
|
|||||||
NO_MOCK,
|
NO_MOCK,
|
||||||
NO_MOCK_REASON
|
NO_MOCK_REASON
|
||||||
)
|
)
|
||||||
|
from salttesting.helpers import ensure_in_syspath
|
||||||
|
|
||||||
|
ensure_in_syspath('../../')
|
||||||
|
|
||||||
# Import Salt Libs
|
# Import Salt Libs
|
||||||
from salt.modules import etcd_mod
|
from salt.modules import etcd_mod
|
||||||
|
@ -3,6 +3,9 @@
|
|||||||
:codeauthor: :email:`Jayesh Kariya <jayeshk@saltstack.com>`
|
:codeauthor: :email:`Jayesh Kariya <jayeshk@saltstack.com>`
|
||||||
'''
|
'''
|
||||||
|
|
||||||
|
# Import Python Libs
|
||||||
|
from __future__ import absolute_import
|
||||||
|
|
||||||
# Import Salt Testing Libs
|
# Import Salt Testing Libs
|
||||||
from salttesting import TestCase, skipIf
|
from salttesting import TestCase, skipIf
|
||||||
from salttesting.mock import (
|
from salttesting.mock import (
|
||||||
@ -11,6 +14,9 @@ from salttesting.mock import (
|
|||||||
NO_MOCK,
|
NO_MOCK,
|
||||||
NO_MOCK_REASON
|
NO_MOCK_REASON
|
||||||
)
|
)
|
||||||
|
from salttesting.helpers import ensure_in_syspath
|
||||||
|
|
||||||
|
ensure_in_syspath('../../')
|
||||||
|
|
||||||
# Import Salt Libs
|
# Import Salt Libs
|
||||||
from salt.modules import introspect
|
from salt.modules import introspect
|
||||||
|
@ -3,6 +3,10 @@
|
|||||||
:codeauthor: :email:`Jayesh Kariya <jayeshk@saltstack.com>`
|
:codeauthor: :email:`Jayesh Kariya <jayeshk@saltstack.com>`
|
||||||
'''
|
'''
|
||||||
|
|
||||||
|
# Import Python Libs
|
||||||
|
from __future__ import absolute_import
|
||||||
|
import uuid
|
||||||
|
|
||||||
# Import Salt Testing Libs
|
# Import Salt Testing Libs
|
||||||
from salttesting import TestCase, skipIf
|
from salttesting import TestCase, skipIf
|
||||||
from salttesting.mock import (
|
from salttesting.mock import (
|
||||||
@ -11,7 +15,9 @@ from salttesting.mock import (
|
|||||||
NO_MOCK,
|
NO_MOCK,
|
||||||
NO_MOCK_REASON
|
NO_MOCK_REASON
|
||||||
)
|
)
|
||||||
import uuid
|
from salttesting.helpers import ensure_in_syspath
|
||||||
|
|
||||||
|
ensure_in_syspath('../../')
|
||||||
|
|
||||||
# Import Salt Libs
|
# Import Salt Libs
|
||||||
from salt.modules import iptables
|
from salt.modules import iptables
|
||||||
|
@ -3,6 +3,9 @@
|
|||||||
:codeauthor: :email:`Jayesh Kariya <jayeshk@saltstack.com>`
|
:codeauthor: :email:`Jayesh Kariya <jayeshk@saltstack.com>`
|
||||||
'''
|
'''
|
||||||
|
|
||||||
|
# Import Python Libs
|
||||||
|
from __future__ import absolute_import
|
||||||
|
|
||||||
# Import Salt Testing Libs
|
# Import Salt Testing Libs
|
||||||
from salttesting import TestCase, skipIf
|
from salttesting import TestCase, skipIf
|
||||||
from salttesting.mock import (
|
from salttesting.mock import (
|
||||||
@ -11,6 +14,9 @@ from salttesting.mock import (
|
|||||||
NO_MOCK,
|
NO_MOCK,
|
||||||
NO_MOCK_REASON
|
NO_MOCK_REASON
|
||||||
)
|
)
|
||||||
|
from salttesting.helpers import ensure_in_syspath
|
||||||
|
|
||||||
|
ensure_in_syspath('../../')
|
||||||
|
|
||||||
# Import Salt Libs
|
# Import Salt Libs
|
||||||
from salt.modules import keyboard
|
from salt.modules import keyboard
|
||||||
|
@ -3,6 +3,10 @@
|
|||||||
:codeauthor: :email:`Jayesh Kariya <jayeshk@saltstack.com>`
|
:codeauthor: :email:`Jayesh Kariya <jayeshk@saltstack.com>`
|
||||||
'''
|
'''
|
||||||
|
|
||||||
|
# Import python libs
|
||||||
|
from __future__ import absolute_import
|
||||||
|
import time
|
||||||
|
|
||||||
# Import Salt Testing Libs
|
# Import Salt Testing Libs
|
||||||
from salttesting import TestCase, skipIf
|
from salttesting import TestCase, skipIf
|
||||||
from salttesting.mock import (
|
from salttesting.mock import (
|
||||||
@ -11,13 +15,13 @@ from salttesting.mock import (
|
|||||||
NO_MOCK,
|
NO_MOCK,
|
||||||
NO_MOCK_REASON
|
NO_MOCK_REASON
|
||||||
)
|
)
|
||||||
|
from salttesting.helpers import ensure_in_syspath
|
||||||
|
|
||||||
|
ensure_in_syspath('../../')
|
||||||
|
|
||||||
# Import Salt Libs
|
# Import Salt Libs
|
||||||
from salt.modules import ldapmod
|
from salt.modules import ldapmod
|
||||||
|
|
||||||
# Import Python Libs
|
|
||||||
import time
|
|
||||||
|
|
||||||
# Globals
|
# Globals
|
||||||
ldapmod.__salt__ = {}
|
ldapmod.__salt__ = {}
|
||||||
|
|
||||||
|
@ -3,6 +3,9 @@
|
|||||||
:codeauthor: :email:`Jayesh Kariya <jayeshk@saltstack.com>`
|
:codeauthor: :email:`Jayesh Kariya <jayeshk@saltstack.com>`
|
||||||
'''
|
'''
|
||||||
|
|
||||||
|
# Import Python Libs
|
||||||
|
from __future__ import absolute_import
|
||||||
|
|
||||||
# Import Salt Testing Libs
|
# Import Salt Testing Libs
|
||||||
from salttesting import TestCase, skipIf
|
from salttesting import TestCase, skipIf
|
||||||
from salttesting.mock import (
|
from salttesting.mock import (
|
||||||
@ -11,6 +14,9 @@ from salttesting.mock import (
|
|||||||
NO_MOCK,
|
NO_MOCK,
|
||||||
NO_MOCK_REASON
|
NO_MOCK_REASON
|
||||||
)
|
)
|
||||||
|
from salttesting.helpers import ensure_in_syspath
|
||||||
|
|
||||||
|
ensure_in_syspath('../../')
|
||||||
|
|
||||||
# Import Salt Libs
|
# Import Salt Libs
|
||||||
from salt.modules import locate
|
from salt.modules import locate
|
||||||
|
@ -3,6 +3,9 @@
|
|||||||
:codeauthor: :email:`Jayesh Kariya <jayeshk@saltstack.com>`
|
:codeauthor: :email:`Jayesh Kariya <jayeshk@saltstack.com>`
|
||||||
'''
|
'''
|
||||||
|
|
||||||
|
# Import Python Libs
|
||||||
|
from __future__ import absolute_import
|
||||||
|
|
||||||
# Import Salt Testing Libs
|
# Import Salt Testing Libs
|
||||||
from salttesting import TestCase, skipIf
|
from salttesting import TestCase, skipIf
|
||||||
from salttesting.mock import (
|
from salttesting.mock import (
|
||||||
@ -11,6 +14,9 @@ from salttesting.mock import (
|
|||||||
NO_MOCK,
|
NO_MOCK,
|
||||||
NO_MOCK_REASON
|
NO_MOCK_REASON
|
||||||
)
|
)
|
||||||
|
from salttesting.helpers import ensure_in_syspath
|
||||||
|
|
||||||
|
ensure_in_syspath('../../')
|
||||||
|
|
||||||
# Import Salt Libs
|
# Import Salt Libs
|
||||||
from salt.modules import logrotate
|
from salt.modules import logrotate
|
||||||
|
@ -3,6 +3,9 @@
|
|||||||
:codeauthor: :email:`Jayesh Kariya <jayeshk@saltstack.com>`
|
:codeauthor: :email:`Jayesh Kariya <jayeshk@saltstack.com>`
|
||||||
'''
|
'''
|
||||||
|
|
||||||
|
# Import Python Libs
|
||||||
|
from __future__ import absolute_import
|
||||||
|
|
||||||
# Import Salt Testing Libs
|
# Import Salt Testing Libs
|
||||||
from salttesting import TestCase, skipIf
|
from salttesting import TestCase, skipIf
|
||||||
from salttesting.mock import (
|
from salttesting.mock import (
|
||||||
@ -11,6 +14,9 @@ from salttesting.mock import (
|
|||||||
NO_MOCK,
|
NO_MOCK,
|
||||||
NO_MOCK_REASON
|
NO_MOCK_REASON
|
||||||
)
|
)
|
||||||
|
from salttesting.helpers import ensure_in_syspath
|
||||||
|
|
||||||
|
ensure_in_syspath('../../')
|
||||||
|
|
||||||
# Import Salt Libs
|
# Import Salt Libs
|
||||||
from salt.modules import memcached
|
from salt.modules import memcached
|
||||||
|
@ -3,6 +3,9 @@
|
|||||||
:codeauthor: :email:`Jayesh Kariya <jayeshk@saltstack.com>`
|
:codeauthor: :email:`Jayesh Kariya <jayeshk@saltstack.com>`
|
||||||
'''
|
'''
|
||||||
|
|
||||||
|
# Import Python Libs
|
||||||
|
from __future__ import absolute_import
|
||||||
|
|
||||||
# Import Salt Testing Libs
|
# Import Salt Testing Libs
|
||||||
from salttesting import TestCase, skipIf
|
from salttesting import TestCase, skipIf
|
||||||
from salttesting.mock import (
|
from salttesting.mock import (
|
||||||
@ -11,15 +14,15 @@ from salttesting.mock import (
|
|||||||
NO_MOCK,
|
NO_MOCK,
|
||||||
NO_MOCK_REASON
|
NO_MOCK_REASON
|
||||||
)
|
)
|
||||||
|
from salttesting.helpers import ensure_in_syspath
|
||||||
|
|
||||||
|
ensure_in_syspath('../../')
|
||||||
|
|
||||||
# Import Salt Libs
|
# Import Salt Libs
|
||||||
from salt.modules import moosefs
|
from salt.modules import moosefs
|
||||||
|
|
||||||
# Globals
|
# Globals
|
||||||
# moosefs.__grains__ = {}
|
|
||||||
moosefs.__salt__ = {}
|
moosefs.__salt__ = {}
|
||||||
# moosefs.__context__ = {}
|
|
||||||
# moosefs.__opts__ = {}
|
|
||||||
|
|
||||||
|
|
||||||
@skipIf(NO_MOCK, NO_MOCK_REASON)
|
@skipIf(NO_MOCK, NO_MOCK_REASON)
|
||||||
|
@ -3,6 +3,9 @@
|
|||||||
:codeauthor: :email:`Jayesh Kariya <jayeshk@saltstack.com>`
|
:codeauthor: :email:`Jayesh Kariya <jayeshk@saltstack.com>`
|
||||||
'''
|
'''
|
||||||
|
|
||||||
|
# Import Python Libs
|
||||||
|
from __future__ import absolute_import
|
||||||
|
|
||||||
# Import Salt Testing Libs
|
# Import Salt Testing Libs
|
||||||
from salttesting import TestCase, skipIf
|
from salttesting import TestCase, skipIf
|
||||||
from salttesting.mock import (
|
from salttesting.mock import (
|
||||||
@ -11,6 +14,9 @@ from salttesting.mock import (
|
|||||||
NO_MOCK,
|
NO_MOCK,
|
||||||
NO_MOCK_REASON
|
NO_MOCK_REASON
|
||||||
)
|
)
|
||||||
|
from salttesting.helpers import ensure_in_syspath
|
||||||
|
|
||||||
|
ensure_in_syspath('../..')
|
||||||
|
|
||||||
# Import Salt Libs
|
# Import Salt Libs
|
||||||
from salt.modules import munin
|
from salt.modules import munin
|
||||||
|
Loading…
Reference in New Issue
Block a user