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 = {}
|
||||
# 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_'):
|
||||
pub_data[k] = kwargs.pop(k)
|
||||
|
||||
|
@ -2,8 +2,11 @@
|
||||
'''
|
||||
Allow for the calling of execution modules via sudo
|
||||
'''
|
||||
|
||||
# Import python libs
|
||||
from __future__ import absolute_import
|
||||
import json
|
||||
|
||||
# Import salt libs
|
||||
import salt.utils
|
||||
import salt.syspaths
|
||||
|
@ -28,7 +28,6 @@ except ImportError:
|
||||
HAS_MATCHHOSTNAME = False
|
||||
import socket
|
||||
import urllib2
|
||||
import httplib
|
||||
|
||||
# Import salt libs
|
||||
import salt.utils
|
||||
@ -37,6 +36,7 @@ import salt.loader
|
||||
import salt.config
|
||||
from salt.template import compile_template
|
||||
from salt import syspaths
|
||||
import salt.ext.six.moves.http_client
|
||||
|
||||
# Import 3rd party libs
|
||||
try:
|
||||
@ -297,7 +297,7 @@ def query(url,
|
||||
}
|
||||
if len(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)
|
||||
for header in header_dict:
|
||||
|
@ -233,6 +233,7 @@ from salt.utils.process import os_is_running
|
||||
# Import 3rd-party libs
|
||||
import yaml
|
||||
import salt.ext.six as six
|
||||
|
||||
# pylint: disable=import-error
|
||||
try:
|
||||
import dateutil.parser as dateutil_parser
|
||||
@ -522,7 +523,7 @@ class Schedule(object):
|
||||
argspec = salt.utils.args.get_function_argspec(self.functions[func])
|
||||
if argspec.keywords:
|
||||
# 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
|
||||
|
||||
try:
|
||||
|
@ -3,6 +3,9 @@
|
||||
:codeauthor: :email:`Jayesh Kariya <jayeshk@saltstack.com>`
|
||||
'''
|
||||
|
||||
# Import Python Libs
|
||||
from __future__ import absolute_import
|
||||
|
||||
# Import Salt Testing Libs
|
||||
from salttesting import TestCase, skipIf
|
||||
from salttesting.mock import (
|
||||
@ -11,6 +14,9 @@ from salttesting.mock import (
|
||||
NO_MOCK,
|
||||
NO_MOCK_REASON
|
||||
)
|
||||
from salttesting.helpers import ensure_in_syspath
|
||||
|
||||
ensure_in_syspath('../../')
|
||||
|
||||
# Import Salt Libs
|
||||
from salt.modules import etcd_mod
|
||||
|
@ -3,6 +3,9 @@
|
||||
:codeauthor: :email:`Jayesh Kariya <jayeshk@saltstack.com>`
|
||||
'''
|
||||
|
||||
# Import Python Libs
|
||||
from __future__ import absolute_import
|
||||
|
||||
# Import Salt Testing Libs
|
||||
from salttesting import TestCase, skipIf
|
||||
from salttesting.mock import (
|
||||
@ -11,6 +14,9 @@ from salttesting.mock import (
|
||||
NO_MOCK,
|
||||
NO_MOCK_REASON
|
||||
)
|
||||
from salttesting.helpers import ensure_in_syspath
|
||||
|
||||
ensure_in_syspath('../../')
|
||||
|
||||
# Import Salt Libs
|
||||
from salt.modules import introspect
|
||||
|
@ -3,6 +3,10 @@
|
||||
:codeauthor: :email:`Jayesh Kariya <jayeshk@saltstack.com>`
|
||||
'''
|
||||
|
||||
# Import Python Libs
|
||||
from __future__ import absolute_import
|
||||
import uuid
|
||||
|
||||
# Import Salt Testing Libs
|
||||
from salttesting import TestCase, skipIf
|
||||
from salttesting.mock import (
|
||||
@ -11,7 +15,9 @@ from salttesting.mock import (
|
||||
NO_MOCK,
|
||||
NO_MOCK_REASON
|
||||
)
|
||||
import uuid
|
||||
from salttesting.helpers import ensure_in_syspath
|
||||
|
||||
ensure_in_syspath('../../')
|
||||
|
||||
# Import Salt Libs
|
||||
from salt.modules import iptables
|
||||
|
@ -3,6 +3,9 @@
|
||||
:codeauthor: :email:`Jayesh Kariya <jayeshk@saltstack.com>`
|
||||
'''
|
||||
|
||||
# Import Python Libs
|
||||
from __future__ import absolute_import
|
||||
|
||||
# Import Salt Testing Libs
|
||||
from salttesting import TestCase, skipIf
|
||||
from salttesting.mock import (
|
||||
@ -11,6 +14,9 @@ from salttesting.mock import (
|
||||
NO_MOCK,
|
||||
NO_MOCK_REASON
|
||||
)
|
||||
from salttesting.helpers import ensure_in_syspath
|
||||
|
||||
ensure_in_syspath('../../')
|
||||
|
||||
# Import Salt Libs
|
||||
from salt.modules import keyboard
|
||||
|
@ -3,6 +3,10 @@
|
||||
:codeauthor: :email:`Jayesh Kariya <jayeshk@saltstack.com>`
|
||||
'''
|
||||
|
||||
# Import python libs
|
||||
from __future__ import absolute_import
|
||||
import time
|
||||
|
||||
# Import Salt Testing Libs
|
||||
from salttesting import TestCase, skipIf
|
||||
from salttesting.mock import (
|
||||
@ -11,13 +15,13 @@ from salttesting.mock import (
|
||||
NO_MOCK,
|
||||
NO_MOCK_REASON
|
||||
)
|
||||
from salttesting.helpers import ensure_in_syspath
|
||||
|
||||
ensure_in_syspath('../../')
|
||||
|
||||
# Import Salt Libs
|
||||
from salt.modules import ldapmod
|
||||
|
||||
# Import Python Libs
|
||||
import time
|
||||
|
||||
# Globals
|
||||
ldapmod.__salt__ = {}
|
||||
|
||||
|
@ -3,6 +3,9 @@
|
||||
:codeauthor: :email:`Jayesh Kariya <jayeshk@saltstack.com>`
|
||||
'''
|
||||
|
||||
# Import Python Libs
|
||||
from __future__ import absolute_import
|
||||
|
||||
# Import Salt Testing Libs
|
||||
from salttesting import TestCase, skipIf
|
||||
from salttesting.mock import (
|
||||
@ -11,6 +14,9 @@ from salttesting.mock import (
|
||||
NO_MOCK,
|
||||
NO_MOCK_REASON
|
||||
)
|
||||
from salttesting.helpers import ensure_in_syspath
|
||||
|
||||
ensure_in_syspath('../../')
|
||||
|
||||
# Import Salt Libs
|
||||
from salt.modules import locate
|
||||
|
@ -3,6 +3,9 @@
|
||||
:codeauthor: :email:`Jayesh Kariya <jayeshk@saltstack.com>`
|
||||
'''
|
||||
|
||||
# Import Python Libs
|
||||
from __future__ import absolute_import
|
||||
|
||||
# Import Salt Testing Libs
|
||||
from salttesting import TestCase, skipIf
|
||||
from salttesting.mock import (
|
||||
@ -11,6 +14,9 @@ from salttesting.mock import (
|
||||
NO_MOCK,
|
||||
NO_MOCK_REASON
|
||||
)
|
||||
from salttesting.helpers import ensure_in_syspath
|
||||
|
||||
ensure_in_syspath('../../')
|
||||
|
||||
# Import Salt Libs
|
||||
from salt.modules import logrotate
|
||||
|
@ -3,6 +3,9 @@
|
||||
:codeauthor: :email:`Jayesh Kariya <jayeshk@saltstack.com>`
|
||||
'''
|
||||
|
||||
# Import Python Libs
|
||||
from __future__ import absolute_import
|
||||
|
||||
# Import Salt Testing Libs
|
||||
from salttesting import TestCase, skipIf
|
||||
from salttesting.mock import (
|
||||
@ -11,6 +14,9 @@ from salttesting.mock import (
|
||||
NO_MOCK,
|
||||
NO_MOCK_REASON
|
||||
)
|
||||
from salttesting.helpers import ensure_in_syspath
|
||||
|
||||
ensure_in_syspath('../../')
|
||||
|
||||
# Import Salt Libs
|
||||
from salt.modules import memcached
|
||||
|
@ -3,6 +3,9 @@
|
||||
:codeauthor: :email:`Jayesh Kariya <jayeshk@saltstack.com>`
|
||||
'''
|
||||
|
||||
# Import Python Libs
|
||||
from __future__ import absolute_import
|
||||
|
||||
# Import Salt Testing Libs
|
||||
from salttesting import TestCase, skipIf
|
||||
from salttesting.mock import (
|
||||
@ -11,15 +14,15 @@ from salttesting.mock import (
|
||||
NO_MOCK,
|
||||
NO_MOCK_REASON
|
||||
)
|
||||
from salttesting.helpers import ensure_in_syspath
|
||||
|
||||
ensure_in_syspath('../../')
|
||||
|
||||
# Import Salt Libs
|
||||
from salt.modules import moosefs
|
||||
|
||||
# Globals
|
||||
# moosefs.__grains__ = {}
|
||||
moosefs.__salt__ = {}
|
||||
# moosefs.__context__ = {}
|
||||
# moosefs.__opts__ = {}
|
||||
|
||||
|
||||
@skipIf(NO_MOCK, NO_MOCK_REASON)
|
||||
|
@ -3,6 +3,9 @@
|
||||
:codeauthor: :email:`Jayesh Kariya <jayeshk@saltstack.com>`
|
||||
'''
|
||||
|
||||
# Import Python Libs
|
||||
from __future__ import absolute_import
|
||||
|
||||
# Import Salt Testing Libs
|
||||
from salttesting import TestCase, skipIf
|
||||
from salttesting.mock import (
|
||||
@ -11,6 +14,9 @@ from salttesting.mock import (
|
||||
NO_MOCK,
|
||||
NO_MOCK_REASON
|
||||
)
|
||||
from salttesting.helpers import ensure_in_syspath
|
||||
|
||||
ensure_in_syspath('../..')
|
||||
|
||||
# Import Salt Libs
|
||||
from salt.modules import munin
|
||||
|
Loading…
Reference in New Issue
Block a user