Commit Graph

78169 Commits

Author SHA1 Message Date
Pedro Algarvio
4f8edc36a2 Merge pull request #39340 from terminalmage/issue39334
Fix gpg renderer breakage from bef5e66
2017-02-12 12:20:31 +00:00
Erik Johnson
6653d98c5a Fix gpg renderer breakage from bef5e66
bef5e66 sought to make a PY3 compatibility change, but the attribute
from Python2's cStringIO module is not available via the "fake"
cStringIO which six exposes, as six's cStringIO is just the
cStringIO.StringIO function. The other cStringIO class attributes are
not available via six.

This commit adds a new module with a few functions to get information on
StringIO objects both in Python2 and 3, and modifies the files edited in
bef5e66 to use this new module to determine if the object is a readable
StringIO.

Fixes #39334.
2017-02-12 01:24:09 -06:00
Michael Calmer
17521fb23c added unit test for dockerng.sls_build dryrun option (#39305) 2017-02-10 16:11:26 -07:00
Nicole Thomas
050b4cc824 Protect hardware clock test comparison better (#39298)
In #39060, some tests were added to check for the hardware clock
getting reset when possible. The test attempted to gate the test
when access to the hardware clock was impossible, but the check
wasn't quite right and caused problems with the resulting tests.

This change makes the `has_settable_hwclock()` function public
in order to make the test gate work correctly. This function
could also be useful at the CLI level.

When running `self.run_function('status._has_settable_hwclock()')`
from the test suite, the return is a string noting that the
function is unavailable. This change allows for the `if not` check
to evaluate the return of the function.
2017-02-10 10:15:25 -07:00
Mike Place
89283e0c04 Merge pull request #39215 from Mrten/patch-1
remove (?x) modifiers in file.comment regex
2017-02-09 16:11:12 -07:00
Mike Place
a80209caf7 Merge pull request #38767 from github-abcde/improve-templating
template.py: Fix error thrown if default passed to compile_template i…
2017-02-09 16:05:46 -07:00
Mike Place
a4fcdf3439 Merge pull request #39212 from carlpett/feature/vault-integration
Merge carlpett/salt-vault
2017-02-09 16:01:19 -07:00
Mike Place
1d813bd902 Merge pull request #39283 from rallytime/merge-develop
[develop] Merge forward from 2016.11 to develop
2017-02-09 15:10:03 -07:00
Mike Place
8dff26bd18 Merge pull request #39267 from KaiSforza/nix
Add nix module to Salt
2017-02-09 15:08:46 -07:00
rallytime
827906832a Fix up bad merge 2017-02-09 15:06:00 -07:00
Mike Place
5caa083024 Merge pull request #39250 from Juniper/develop
junos specific changes to add more feature and enhancements to our APIs
2017-02-09 14:49:09 -07:00
William Giokas
654dbc1341 nix: Correct documentation for gc
It doesn't actually show a list of all the operations, just the nix
summary.
2017-02-09 15:02:57 -06:00
William Giokas
88831d5246 nix: Check for nix-collect-garbage
I changed this from nix-store to nix-collect-garbage as the
nix.collect_garbage function used to use `nix-store --gc`, but now just
uses nix-collect-garbage.
2017-02-09 14:20:41 -06:00
William Giokas
5cb25025c9 Add nix module to Salt
This module adds the ability to work with nix packages, and do some
basic operations on the nix store. There is still some work to be done,
but this lets you orchestrate some basic tasks for a system with nix
installed.
2017-02-09 14:18:50 -06:00
Pedro Algarvio
7da366f98a Merge pull request #39285 from s0undt3ch/features/py3
Features/py3
2017-02-09 18:08:43 +00:00
Pedro Algarvio
b82bf6bebf
Inform on which python version we are running on 2017-02-09 18:06:30 +00:00
Pedro Algarvio
b264114901
Restore full user permissions when failing to delete 2017-02-09 18:06:27 +00:00
Pedro Algarvio
bef5e66c5b
Use six.moves to import cStringIO 2017-02-09 18:02:40 +00:00
Mike Place
8e028f958c Merge pull request #39272 from daxroc/fix/lsblk_to_blkid
Refactor blockdev to use blkid instead of lsblk - fixes #39255
2017-02-09 11:02:34 -07:00
Mike Place
eaf8f3faa2 Merge pull request #39278 from mcalmer/dockerng-dryrun-for-sls_build
Dockerng dryrun for sls build
2017-02-09 10:54:10 -07:00
Mike Place
49529db00e Merge pull request #39056 from sergeizv/simplify-string-manipulation
Simplify string manipulation
2017-02-09 10:50:38 -07:00
Mike Place
8de8ca9110 Remove unused imports 2017-02-09 10:42:07 -07:00
Mike Place
04161b001d Merge pull request #39248 from gtmanfred/develop
add runas as a global state variable
2017-02-09 10:36:15 -07:00
rallytime
609e6e4b23 Merge branch '2016.11' into 'develop'
Conflicts:
  - salt/config/__init__.py
  - salt/modules/win_lgpo.py
  - salt/utils/aws.py
  - tests/unit/utils/schema_test.py
2017-02-09 10:29:40 -07:00
Nicole Thomas
db6140aa83 Merge pull request #39264 from rallytime/merge-2016.11
[2016.11] Merge forward from 2016.3 to 2016.11
2017-02-09 10:10:13 -07:00
Mike Place
bac99d9e72 Merge pull request #39252 from gtmanfred/extmod_whitelist
Allow specifying which modules should be used when running saltutil.sync_*
2017-02-09 10:09:43 -07:00
Mike Place
304eb19b18 Merge pull request #39276 from gtmanfred/2016.11
_device_mismatch_ignored will never be True
2017-02-09 10:05:27 -07:00
Mike Place
d43f0b41ae Merge pull request #39263 from bsherrod/export_iam_roles
add boto_iam.export_roles execution module function
2017-02-09 09:53:23 -07:00
Erik Johnson
d35c2f810c salt.utils.gitfs: remove dulwich support, make refspecs configurable (#39210)
* Add config params for custom refspecs

* Add exceptions for errors encountered modifying git config

* Make the refspecs a configurable parameter

* Make refspecs a per-remote parameter

* Update master config template to include custom refspecs opts

* Add documentation for new config params

* Update GitFS walkthrough with a section on custom refspecs

* Remove dulwich support from salt.utils.gitfs

Dulwich still lacks important features, including (but not limited to)
the following:

- Lack of the necessary support for checking out a ref needed for
  git_pillar/winrepo support

- No support in its config objects for multivar git config items, making
  it impossible to detect when repos have multiple refspecs set for a
  given git remote

Given this information, and the fact that it trails as a distant third
to Pygit2 and GitPython, Salt will cease to support Dulwich as a git
interface moving forward.

* Excise references to dulwich from documentation

* Add mention of custom refspecs to Nitrogen release notes

* Add gitfs_refspecs to mocked opts in gitfs integration tests

Also remove dulwich from unit tests

* Add information about opts argument not being intended for CLI use
2017-02-09 09:50:45 -07:00
Mike Place
4dba2d31a9 Merge pull request #39265 from edgan/roster_grain_pillars
Fixing issue 39161, salt-ssh : match:grain for pillars inconsistencies
2017-02-09 09:50:06 -07:00
Roche, Damien
32c1fb74fa Purged trailing whitespace 2017-02-09 16:17:24 +00:00
Nicole Thomas
63c7c79455 Fix the new jinja_test failures (#39262)
Refs #37808

The max fuction returns an int, not a float, as does the min function.
This updates the assertions to compare against ints.
2017-02-09 08:53:00 -07:00
Michael Calmer
cc1865345b provide the possibility to put extra modules into the thin 2017-02-09 16:52:23 +01:00
Nicole Thomas
05d4df4a0e Add __utils__ to sdb unit test (#39261)
Refs #39174
2017-02-09 08:52:16 -07:00
Michael Calmer
17dda94d39 support dryrun for dockerng.sls_build 2017-02-09 16:51:47 +01:00
rallytime
a9c2c106c1 Pylint fix 2017-02-09 08:50:56 -07:00
Daniel Wallace
6635a9fd3b _device_mismatch_ignored will never be True
It will be the name of the device that has matched the regex
2017-02-09 09:45:24 -06:00
Sergei Zviagintsev
df82b11695 Do boolean check instead len() to test whether string is empty
Do a truth check to test whether a string is empty instead of using the
len() function. As @terminalmage mentioned in #39056, this is about
twice faster; also this is what PEP8 says to do.
2017-02-09 16:21:57 +01:00
Roche, Damien
f4cf1dec11 salt/states/blockdev.py 2017-02-09 13:02:29 +00:00
Nitin Kumar
2cdfb882c3 Merge pull request #12 from rajvidhimar/bug-fixes
Add safety mechanism in shutdown function and add passwd as valid arg…
2017-02-09 17:50:51 +05:30
rajvidhimar
e297af1148 Remove blank line 2017-02-09 17:36:49 +05:30
rajvidhimar
207891c343 Add safety mechanism in shutdown fucntion and add passwd as valid argument 2017-02-09 17:34:47 +05:30
Nitin Kumar
a4a846ec27 Merge pull request #11 from rajvidhimar/bug-fixes
Lint and other changes
2017-02-09 16:56:44 +05:30
rajvidhimar
c4df77f20e Change indentation 2017-02-09 16:54:09 +05:30
Roche, Damien
bcb58eba02 Refactor blockdev to use blkid instead of lsblk 2017-02-09 10:32:20 +00:00
rajvidhimar
4cb6c0ebd2 Lint and other changes 2017-02-09 12:25:34 +05:30
Daniel Wallace
e38c5d296b fix pylint 2017-02-08 18:07:13 -06:00
rallytime
f6aad99db2 Merge branch '2016.3' into '2016.11'
Conflicts:
  - salt/loader.py
  - salt/output/highstate.py
  - salt/runners/fileserver.py
2017-02-08 16:57:54 -07:00
Nathan Grennan
d1bb38aacf Fixing issue #39161, salt-ssh : match:grain for pillars inconsistencies 2017-02-08 15:57:45 -08:00
Erik Johnson
1b9217d636 Update jsonschema tests to reflect change in jsonschema 2.6.0 (#39260)
Version 2.6.0 changed the wording of one of the exceptions tested,
causing tests to fail when jsonschema 2.6.0 is installed. This commit
updates the tests to change the assert for 2.6.0 and later.
2017-02-08 16:51:56 -07:00