Commit Graph

91676 Commits

Author SHA1 Message Date
Nicole Thomas
0eb137fb4e
Merge pull request #46103 from bdrung/2017.7
Fix skipping Kubernetes tests if client is not installed
2018-02-20 11:33:41 -05:00
Erik Johnson
3df29121fb
Fix failure to build docs in develop branch
The docs are failing to build with the following error:

Failed to import 'salt.cloud.clouds.azurearm'; the module executes
module level statement and it might call sys.exit().

The "cleanup" done in 982c55cf broke docs builds on develop. It made a
number of unnecessary changes, for puzzling reasons. The `__opts__` and
`__utils__` dunders do not need to be manually created, they're present
automagically courtesy of the loader.

This removes all of the module level calls and replaces the helpers with
calls to the corresponding functions from the `__utils__` dunder.
2018-02-20 10:29:31 -06:00
Erik Johnson
8ce0f29842
Add rst file for new module 2018-02-20 10:21:29 -06:00
Bo Maryniuk
98cb94ae73 Update unit test on ignoring logging while file do not exist 2018-02-20 16:47:05 +01:00
Bo Maryniuk
2e76606edf Update unit test for catching out permission error 2018-02-20 16:46:43 +01:00
Bo Maryniuk
82ad57f104 Fix typo 2018-02-20 16:46:21 +01:00
Bo Maryniuk
e61315c956 Update unit test to handle OSError exception 2018-02-20 16:28:00 +01:00
Bo Maryniuk
bba2b93e79 Remove double-stating file while generating grains 2018-02-20 16:24:31 +01:00
Vasiu Alexandru
1564f21277
Merge branch 'develop' into develop 2018-02-20 16:52:11 +02:00
Alexandru Vasiu
00412a89ea modules/nilrt_ip.py: Change get_interfaces_details
We modified the name of that 2 properties.

Signed-off-by: Alexandru Vasiu <alexandru.vasiu@ni.com>
2018-02-20 16:44:29 +02:00
Bo Maryniuk
8aa0e83be6 Refactor unit test for simplicity so it does not need to be splitted in two functions 2018-02-20 15:25:54 +01:00
Bo Maryniuk
8320939f5e Add pytest 2018-02-20 15:25:19 +01:00
Bo Maryniuk
3015ed6bcb Fix unit test for testing main functionality of linux_iqn 2018-02-20 15:18:21 +01:00
Bo Maryniuk
2aa4d02677 Add unit test for linux_iqn testing, if not iscsii available 2018-02-20 15:10:11 +01:00
Bo Maryniuk
a2ba9377f6 Add unit test for grains linux_iqn when running as non-root 2018-02-20 15:03:59 +01:00
Bo Maryniuk
0df31e9e19 Handle access denied error when Master is not running as root 2018-02-20 15:03:25 +01:00
Adam Mendlik
8d9a432fb2
Add --assumeyes to yum/dnf commands in yumpkg.refresh_db
Without --assumeyes, these commands can hang waiting for
user confirmation if there is an unaccepted repository key.
2018-02-19 17:51:11 -07:00
Dmitry Kuzmenko
e35bdb39d1
M2Crypto py3 unicode related fixes 2018-02-19 19:23:51 +03:00
Bo Maryniuk
43026b67da Add unit test for x509 module on function _parse_subject 2018-02-19 15:53:42 +01:00
Bo Maryniuk
efb18b87a9 Add logging to the subject parsing 2018-02-19 15:53:06 +01:00
Benjamin Drung
dd3f936557 Fix skipping Kubernetes tests if client is not installed
When the Kubernetes client is not installed, the import of
salt.modules.kubernetes will still succeed, but HAS_LIBS will be set to
False (since the library import will be covered by a try-except clause).

Therefore expect the salt.modules.kubernetes to always succeed and check
kubernetes.HAS_LIBS instead for the presence of the kubernetes library.

Signed-off-by: Benjamin Drung <benjamin.drung@profitbricks.com>
2018-02-19 12:32:14 +01:00
Denys Havrysh
2062fd0e5c
[DOC] Put https link to the formulas doc page 2018-02-19 12:59:00 +02:00
gwiyeong
48080a1bae
Fixes memory leak, saltclients should be cleaned after used. 2018-02-19 16:31:32 +09:00
gwiyeong
aba00805f4
Adds set_close_callback function to removes stream instance after closed from a set streams. 2018-02-19 14:44:49 +09:00
Gareth J. Greenaway
f36b14dbf2
Merge pull request #46079 from rallytime/stale-config-update
Reduce the number of days an issue is stale by 10
2018-02-18 15:55:18 -08:00
Wedge Jarrad
5a0fe104f7 Fix contributing doc typo 2018-02-18 10:57:28 -08:00
C. R. Oldham
d4524abd7e
Lint 2018-02-17 14:56:27 -07:00
C. R. Oldham
69c6e7a289
Docs 2018-02-17 14:50:59 -07:00
C. R. Oldham
730ab90054
Add ability to specify a startup script id in a profile. 2018-02-17 14:44:16 -07:00
xyoun
50f26f767e
Merge branch 'develop' into develop 2018-02-18 00:39:31 +08:00
xy@zhihu.com
77ae131e20 add version tag in pip.list_all_versions 2018-02-18 00:33:28 +08:00
zr
405510be53 fix kernel subpackages install bug 2018-02-17 23:31:26 +08:00
Christian McHugh
cee4333067 Fix wording
Improve id_exists by using show_low_sls and checking __id__ keys.
2018-02-17 06:24:17 -08:00
Renat Zaripov
77d70657f2 Merge branch 'update_win_network_ip_addrs' of https://github.com/rrzaripov/salt into update_win_network_ip_addrs 2018-02-17 12:18:05 +03:00
Renat Zaripov
883f8b75c6 Fix missed is_private method 2018-02-17 12:15:45 +03:00
Nicole Thomas
0e8f476a01
Merge pull request #46080 from terminalmage/salt-jenkins-844
Correct the version number in upstream pygit2 workaround
2018-02-16 16:53:52 -05:00
Erik Johnson
03b0591f06
Remove object_hook usage from (almost) all json loading
To explain this change, it's necessary to first understand the history
of `object_hook` usage in Salt.

Initially, the function used as the object hook wherever we used it was
(incorrectly) named `encode_dict`, despite the fact that the code was
*decoding* the contents of the dictionary to unicode. This function was
renamed to `decode_dict`, and a counterpart which *actually* encodes was
put in its place. At this time *most* of the `object_hook` usage was
changed so that `decode_dict` was used, but some references were left
using `encode_dict` (likely because I wasn't sure whether or not
changing them would break things).

However, if the desire is to have unicode values after loading JSON,
there is actually no need to use an object hook, since loading JSON in
Python always produces unicode results even with a POSIX locale!

[root@2719cd6224d3 /]# locale
LANG=
LC_CTYPE="POSIX"
LC_NUMERIC="POSIX"
LC_TIME="POSIX"
LC_COLLATE="POSIX"
LC_MONETARY="POSIX"
LC_MESSAGES="POSIX"
LC_PAPER="POSIX"
LC_NAME="POSIX"
LC_ADDRESS="POSIX"
LC_TELEPHONE="POSIX"
LC_MEASUREMENT="POSIX"
LC_IDENTIFICATION="POSIX"
LC_ALL=
[root@2719cd6224d3 /]# python
Python 2.7.5 (default, Nov  6 2016, 00:28:07)
[GCC 4.8.5 20150623 (Red Hat 4.8.5-11)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import json
>>> json.loads('{"foo": "bar"}')
{u'foo': u'bar'}
>>> json.loads('{"foo": "Д"}')
{u'foo': u'\u0414'}
>>>

Therefore, this commit removes all `object_hook` usage where
`decode_dict` was the hook being used, since it is redundant. It also
removes one use of `encode_dict` as an object hook that was still left
in code used by salt-thin.

The only `object_hook` left is in some of our ioflo code. I left the
`encode_dict` there, but _only for Python 2_, because if I remember
correctly ioflo needs str types, and encoding a string in Python 2
produces a str type.
2018-02-16 14:55:42 -06:00
Ch3LL
edc6243d1c
Patch salt.utils call for test_parse_localectl test 2018-02-16 15:26:06 -05:00
Nicole Thomas
c3a938e994
Merge pull request #46070 from Ch3LL/fix-doc-dns
add required arg to dns_check jinja doc example
2018-02-16 15:00:44 -05:00
Nicole Thomas
f09db38f63
Merge pull request #46072 from rallytime/bp-46056
Back-port #46056 to oxygen.rc1
2018-02-16 14:56:56 -05:00
Nicole Thomas
8d99c3b8fe
Merge pull request #46071 from rallytime/bp-46043
Back-port #46043 to oxygen
2018-02-16 14:56:35 -05:00
Nicole Thomas
01042e9d77
Merge pull request #46067 from rallytime/bp-45994
Back-port #45994 to 2017.7
2018-02-16 14:55:26 -05:00
Nicole Thomas
7897d7922c
Merge pull request #45851 from garethgreenaway/38625_overriding_retcode
[develop] Ability to override retcode from various cmdmod functions
2018-02-16 14:54:55 -05:00
Erik Johnson
7b89dbb22b
Correct the version number in upstream pygit2 workaround
I used the incorrect version in my upstream bug workaround in #45892,
I missed that there was a 0.26.3 released before the bugfix was made.
This corrects that, and also fixes an incomplete comment that trailed
off in the middle of the sentence.
2018-02-16 13:21:45 -06:00
rallytime
dec24ae9bd
Reduce the number of days an issue is stale by 10 2018-02-16 12:59:49 -05:00
rallytime
2d0f81fd1b
Merge branch 'oxygen.rc1' into 'oxygen'
No conflicts.
2018-02-16 12:36:13 -05:00
rallytime
e0a419655b
Pin tornado version in requirements file
tornado needs to be >= 4.2.1, but less that 5.0.

Tornado 5.0 is introducing backwards-incompatible changes. Therefore,
we need to pin the version of tornado in base.txt until we can fix
supporting Tornado 5.0 in Salt.

Refs #45790
2018-02-16 12:05:44 -05:00
rallytime
b94d73c53e
Pin tornado version in requirements file
tornado needs to be >= 4.2.1, but less that 5.0.

Tornado 5.0 is introducing backwards-incompatible changes. Therefore,
we need to pin the version of tornado in base.txt until we can fix
supporting Tornado 5.0 in Salt.

Refs #45790
2018-02-16 12:05:18 -05:00
Nicole Thomas
b5b083fd26
Merge pull request #46074 from Ch3LL/update-7.4
Update 2017.7.4 Release Notes with new fixes
2018-02-16 11:47:55 -05:00
Ch3LL
8d0eeeb059
Update 2017.7.4 Release Notes with new fixes 2018-02-16 11:45:49 -05:00