Skip to content

Commit

Permalink
Merge branch 'develop' into issue38971
Browse files Browse the repository at this point in the history
  • Loading branch information
Nicole Thomas authored Sep 22, 2017
2 parents 8b237c1 + 7448153 commit 49bb3b0
Show file tree
Hide file tree
Showing 19 changed files with 606 additions and 109 deletions.
4 changes: 2 additions & 2 deletions .github/stale.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Probot Stale configuration file

# Number of days of inactivity before an issue becomes stale
# 1030 is approximately 2 years and 10 months
daysUntilStale: 1030
# 1000 is approximately 2 years and 9 months
daysUntilStale: 1000

# Number of days of inactivity before a stale issue is closed
daysUntilClose: 7
Expand Down
12 changes: 6 additions & 6 deletions salt/cloud/clouds/digitalocean.py
Original file line number Diff line number Diff line change
Expand Up @@ -969,7 +969,7 @@ def list_floating_ips(call=None):
CLI Examples:
... code-block:: bash
.. code-block:: bash
salt-cloud -f list_floating_ips my-digitalocean-config
'''
Expand Down Expand Up @@ -1009,7 +1009,7 @@ def show_floating_ip(kwargs=None, call=None):
CLI Examples:
... code-block:: bash
.. code-block:: bash
salt-cloud -f show_floating_ip my-digitalocean-config floating_ip='45.55.96.47'
'''
Expand Down Expand Up @@ -1042,7 +1042,7 @@ def create_floating_ip(kwargs=None, call=None):
CLI Examples:
... code-block:: bash
.. code-block:: bash
salt-cloud -f create_floating_ip my-digitalocean-config region='NYC2'
Expand Down Expand Up @@ -1084,7 +1084,7 @@ def delete_floating_ip(kwargs=None, call=None):
CLI Examples:
... code-block:: bash
.. code-block:: bash
salt-cloud -f delete_floating_ip my-digitalocean-config floating_ip='45.55.96.47'
'''
Expand Down Expand Up @@ -1119,7 +1119,7 @@ def assign_floating_ip(kwargs=None, call=None):
CLI Examples:
... code-block:: bash
.. code-block:: bash
salt-cloud -f assign_floating_ip my-digitalocean-config droplet_id=1234567 floating_ip='45.55.96.47'
'''
Expand Down Expand Up @@ -1152,7 +1152,7 @@ def unassign_floating_ip(kwargs=None, call=None):
CLI Examples:
... code-block:: bash
.. code-block:: bash
salt-cloud -f unassign_floating_ip my-digitalocean-config floating_ip='45.55.96.47'
'''
Expand Down
2 changes: 1 addition & 1 deletion salt/grains/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -2446,7 +2446,7 @@ def default_gateway():
ip_gw: True # True if either of the above is True, False otherwise
'''
grains = {}
if not salt.utils.which('ip'):
if not salt.utils.path.which('ip'):
return {}
grains['ip_gw'] = False
grains['ip4_gw'] = False
Expand Down
2 changes: 1 addition & 1 deletion salt/modules/boto_sqs.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ def __virtual__():
'''
if not HAS_BOTO3:
return (False, 'The boto_sqs module could not be loaded: boto3 libraries not found')
__utils__['boto3.assign_funcs'](__name__, 'sqs', pack=__salt__)
__utils__['boto3.assign_funcs'](__name__, 'sqs')
return True


Expand Down
24 changes: 24 additions & 0 deletions salt/modules/panos.py
Original file line number Diff line number Diff line change
Expand Up @@ -926,6 +926,30 @@ def get_platform():
return __proxy__['panos.call'](query)


def get_security_rule(rulename=None, vsys='1'):
'''
Get the candidate configuration for the specified rule.
rulename(str): The name of the security rule.
vsys(str): The string representation of the VSYS ID.
CLI Example:
.. code-block:: bash
salt '*' panos.get_security_rule rule01
salt '*' panos.get_security_rule rule01 3
'''
query = {'type': 'config',
'action': 'get',
'xpath': '/config/devices/entry[@name=\'localhost.localdomain\']/vsys/entry[@name=\'vsys{0}\']/'
'rulebase/security/rules/entry[@name=\'{1}\']'.format(vsys, rulename)}

return __proxy__['panos.call'](query)


def get_session_info():
'''
Show device session statistics.
Expand Down
2 changes: 1 addition & 1 deletion salt/modules/win_path.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def rehash():
CLI Example:
... code-block:: bash
.. code-block:: bash
salt '*' win_path.rehash
'''
Expand Down
8 changes: 4 additions & 4 deletions salt/modules/zk_concurrency.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ def lock_holders(path,
Example:
... code-block: bash
.. code-block: bash
salt minion zk_concurrency.lock_holders /lock/path host1:1234,host2:1234
'''
Expand Down Expand Up @@ -237,7 +237,7 @@ def lock(path,
Example:
... code-block: bash
.. code-block: bash
salt minion zk_concurrency.lock /lock/path host1:1234,host2:1234
'''
Expand Down Expand Up @@ -298,7 +298,7 @@ def unlock(path,
Example:
... code-block: bash
.. code-block: bash
salt minion zk_concurrency.unlock /lock/path host1:1234,host2:1234
'''
Expand Down Expand Up @@ -348,7 +348,7 @@ def party_members(path,
Example:
... code-block: bash
.. code-block: bash
salt minion zk_concurrency.party_members /lock/path host1:1234,host2:1234
salt minion zk_concurrency.party_members /lock/path host1:1234,host2:1234 min_nodes=3 blocking=True
Expand Down
5 changes: 5 additions & 0 deletions salt/runners/git_pillar.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@ def update(branch=None, repo=None):
fetched, and ``False`` if there were errors or no new commits were
fetched.
.. versionchanged:: Oxygen
The return for a given git_pillar remote will now be ``None`` when no
changes were fetched. ``False`` now is reserved only for instances in
which there were errors.
Fetch one or all configured git_pillar remotes.
.. note::
Expand Down
10 changes: 5 additions & 5 deletions salt/spm/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,16 @@
import salt.config
import salt.loader
import salt.cache
import salt.utils.files
import salt.utils.http as http
import salt.syspaths as syspaths
from salt.ext import six
from salt.ext.six import string_types
from salt.ext.six.moves import input
from salt.ext.six.moves import filter
from salt.template import compile_template
import salt.utils.files
import salt.utils.http as http
import salt.utils.platform
import salt.utils.win_functions
from salt.utils.yamldumper import SafeOrderedDumper

# Get logging started
Expand Down Expand Up @@ -493,9 +495,7 @@ def _install_indv_pkg(self, pkg_name, pkg_file):

# No defaults for this in config.py; default to the current running
# user and group
import salt.utils
if salt.utils.is_windows():
import salt.utils.win_functions
if salt.utils.platform.is_windows():
uname = gname = salt.utils.win_functions.get_current_user()
uname_sid = salt.utils.win_functions.get_sid_from_name(uname)
uid = self.opts.get('spm_uid', uname_sid)
Expand Down
Loading

0 comments on commit 49bb3b0

Please sign in to comment.