Commit Graph

73406 Commits

Author SHA1 Message Date
Erik Johnson
ab9a89d6dc Add test for jid in runner ret events (zh 858) 2016-09-03 14:59:04 -05:00
Erik Johnson
3345da0d36 Add tests for gitfs per-saltenv configuration (#29954) 2016-09-03 14:59:04 -05:00
Erik Johnson
c35ed45668 Rename test file so that it runs properly when unit tests are executed 2016-09-03 14:59:04 -05:00
Erik Johnson
92d6d4ab75 Fix incorrect key for return data
The return data from run_run_plus previously returned the runner return
in the ``fun`` key. This has since been corrected. This commit replaces
these references to the ``fun`` key with the corrected ``return`` key.
2016-09-03 14:59:04 -05:00
Erik Johnson
5673395f0c Update usage of run_run_plus to remove unused "options" argument 2016-09-03 14:59:04 -05:00
Erik Johnson
d4059a0d79 Update the run_run_plus docstring 2016-09-03 14:59:04 -05:00
Erik Johnson
a3442a88ed Update docs on run_run_plus 2016-09-03 14:59:04 -05:00
Erik Johnson
74d5f3aa51 Remove unused argument 2016-09-03 14:59:04 -05:00
Erik Johnson
a4e96cfb7a Don't execute the runner twice in run_run_plus
Instead, compile output by executing salt.output.display_output() on the
return data obtained from executing the runner via the Python API.
2016-09-03 14:59:04 -05:00
Erik Johnson
b3dfd95a6d Support writing output to an open filehandle/file-like object 2016-09-03 14:59:04 -05:00
Erik Johnson
f41db032a2 Add ability to reload client_config to run_run_plus
This allows one to pass a kwarg to run_run_plus called
``__reload_config`` which will be passed as the ``from_scratch``
argument to self.get_config(). This allows self.run_run_plus() to force
a reload of the master config for integration tests which require the
config to be reloaded, for instance, from master.d/*.conf.
2016-09-03 14:59:04 -05:00
Erik Johnson
693ea2a066 Remove code adding runner return data to master job cache
This has been removed in favor of the one already in
salt/client/mixins.py.
2016-09-03 14:59:04 -05:00
Erik Johnson
09907cadc1 Add code to disable runner_returns via config option
This also will allow any future classes which happen to use this mixin
to disable storing the job data in the master job cache.
2016-09-03 14:59:04 -05:00
Erik Johnson
6f8984630d Change default for runner_returns to True 2016-09-03 14:59:04 -05:00
Erik Johnson
230c684d4c Add test case for runner returns 2016-09-03 14:59:04 -05:00
Erik Johnson
c872f12f9c Replace _jid_dir() with salt.utils.jid.jid_dir() 2016-09-03 14:59:03 -05:00
Erik Johnson
c278b1f52c Move function for jid_dir to salt.utils.jid
This makes it more readily available for integration tests
2016-09-03 14:59:03 -05:00
Erik Johnson
070e5f3c48 Fix typo, add return and jid to run_run_plus
Also make kwargs work (they were being ignored)
2016-09-03 14:59:03 -05:00
Erik Johnson
d53e1ce9a4 Remove usage of double-asterisk for state.orchestrate runner
This prevents the entire master opts from being part of the event data
for orchestration jobs.
2016-09-03 14:59:03 -05:00
Erik Johnson
573442fe82 Add orchestration_jid directly to kwargs which will be passed to state.orchestrate 2016-09-03 14:59:03 -05:00
Nicole Thomas
f76dc0f9c0 Merge pull request #36026 from rallytime/merge-develop
[develop] Merge forward from 2016.3 to develop
2016-09-02 10:40:32 -06:00
rallytime
1bf840b036 Merge branch '2016.3' into 'develop'
No conflicts.
2016-09-02 09:43:40 -06:00
Mike Place
cd60ec5d57 Merge pull request #36024 from DSRCorporation/bugs/31454_local_client_memleak
Don't subscribe to events if not sure it would read them.
2016-09-03 00:41:01 +09:00
Nicole Thomas
32d5f896d4 Merge pull request #36023 from rallytime/merge-2016.3
[2016.3] Merge forward from 2015.8 to 2016.3
2016-09-02 09:37:59 -06:00
Dmitry Kuzmenko
01911c530e Don't subscribe to events if not sure it would read them.
Reactor uses LocalClient to send message but do not read events that
produces memory leak in EventPublisher: sent messages are collected
there in the IOStream class.
2016-09-02 17:20:30 +03:00
rallytime
a63c9dfc6a Merge branch '2015.8' into '2016.3'
Conflicts:
  - salt/states/service.py
2016-09-02 08:19:16 -06:00
Mike Place
e6b93c2380 Merge pull request #36022 from saltstack/revert-33770-service_tests
Revert "service state integration tests"
2016-09-02 21:38:36 +09:00
Mike Place
6cf56843d4 Revert "service state integration tests" 2016-09-02 21:38:15 +09:00
Nicole Thomas
e864b9b571 Merge pull request #36012 from rallytime/fix-failing-boto-vpc-tests
Pass in connection parameters to boto_vpc function calls
2016-09-01 22:38:07 -06:00
rallytime
f8c9b8443f Pass in connection parameters to boto_vpc function calls
Otherwise we are not properly mocking this function call and the
tests fail when the `_conn3` function is called. (Any distro using
salt.utils.boto3 will fail here.)

We also need to protect the test class if the correct versions of
boto and moto are not installed on the test system.
2016-09-01 22:35:14 -06:00
Nicole Thomas
e0da395ddc Merge pull request #36006 from rallytime/merge-develop
[develop] Merge forward from 2016.3 to develop
2016-09-01 16:31:29 -06:00
Justin Anderson
9f7994ea40 Suse user state test fix (#36009) 2016-09-01 16:28:13 -06:00
Nicole Thomas
15cb551bd6 Don't import string_types from six. Import the whole lib only once. (#36005)
* Don't import string_types from six. Import the whole lib only once.

* Make weird pylint error happy
2016-09-01 15:57:55 -06:00
Justin Anderson
e6b4dd651e Suse Useradd test fix (#36007) 2016-09-01 15:57:03 -06:00
Justin Anderson
40131b9c27 Groupadd test fix (#36002)
* Change osmajorrelease back to str in test_useradd

* Change osmajorrelease back to str in test_userdel

* Change osmajorrelease back to str in test_members
2016-09-01 15:40:15 -06:00
rallytime
430cdeaa03 Merge branch '2016.3' into 'develop'
Conflicts:
  - salt/modules/win_repo.py
  - salt/utils/win_runas.py
2016-09-01 15:15:33 -06:00
Aditya Kulkarni
50981f4f11 Add unit tests for VPC module (#35996) 2016-09-01 15:12:22 -06:00
Nicole Thomas
d248ab0120 Merge pull request #36004 from rallytime/merge-2016.3
[2016.3] Merge forward from 2015.8 to 2016.3
2016-09-01 15:11:05 -06:00
rallytime
318bffed1d Merge branch '2015.8' into '2016.3'
No conflicts.
2016-09-01 14:27:07 -06:00
Tom Williams
1a0c1b31a4 INFRA-1976 - bugfix. boto_iam fails to correctly compare policies (#35875)
* INFRA-1976 - bugfix.  boto_iam fails to correctly compare policies

* INFRA-1976 - fixup some pylint thingummies...
2016-09-01 13:51:45 -06:00
lomeroe
4ae95b4dc3 Add win_lgpo execution module (#35738)
* initial add of win_lgpo module

* initial add of win_lgpo module

* Add ability to set admx based policies
add documenation
lint cleanup

* lint fixes

* i before e except after c

* more spelling corrections

* attempts to correct w1699 lint

fixes for "get" policy when ADM names conflict

* py3 compatability fix
string continuation changes for better pep8 conformity
additional module functions for in-progress state module

* update function names to not shadow builtins
additional execution module updates to handle ADML quirks
add state module

* add additional documentation

remove cumulative_rights_assignments argument from set_user_policy

* correct module function documentation examples that used original virtual name of 'gpedit'

* lint fix in states file
2016-09-01 13:25:09 -06:00
Nicole Thomas
778a05d47d Merge pull request #36000 from rallytime/lint-35916
Lint #35916
2016-09-01 13:19:20 -06:00
Damon Atkins
8f8599596d win_pkg Fix#35342 Fix#34781 Unicode Support (#35899)
* Fix#35342 Fix#34781 Unicode Support
Fix#35342
 Issue: win_pkg: refresh_db doesn't remove cached items which have been
renamed or removed
 Solution: Conservative solution was to just remove *.sls files from
\win\repo-ng  tree  as part of pkg.refresh_db instead of removing all
of \win\repo-ng\salt-winrepo-ng

Fix#34781
 Issue: Logs did not contain enough information, and from executing it from the
master it was too difficult to determine if there was an issue due to the
output being data
 Solution:
* pkg.genrepo now reports the status of the operation instead of the
large about of metadata. The status report indicates:
- Total SLS Files processed
- Number of failed sls files
- Number of successful sls files
- list of files with errors and the render/compile errors they had
- optionally a list of successfully render/compiled files and the
package names within those files
* pkg.refresh_db was also part of this issue, as it just reported a list
of files copied from the same large list of files would be reported almost
every time. As pkg.refresh_db calls pkg.genrepo after copy all the files
it now reports the same as data as pkg.genrepo.

Unicode Support
  Issue: Windows Registry module supports Unicode in development, win_pkg
needed to be updated to support the Unicode output from reg.

* Lint space fixes

* More Lint fixes

* more lint fixes.

* refresh_db lint issues

* More lint fo win_pkg.py

* Notice list_pkgs did not call refresh_db with the current saltenv

* * Update states/pkg.py not to include in its name space an internal
function which has been removed
* With Windows we ignore issues with refresh_db existing behaviour,
update win_pkg.py to not report errors with refresh_db back
to states/pkg.py. As part of doing this created an internal version
if refresh_db called _refresh_db with different defaults

* Lint and Doco fixes win_pkg

* Remove trailing white space

* Remove a blank line
2016-09-01 13:16:56 -06:00
Nicole Thomas
86e5edfd0a Add persist deprecation from win_useradd to Carbon release notes (#36001) 2016-09-01 11:53:25 -06:00
Erik Johnson
678f10cf8b Avoid traceback in mac_user.py when user.chhome is invoked from a user state (#35901)
* mac_user.py: Avoid traceback in chhome func

* Add warning about lack of Windows/Mac support for createhome
2016-09-01 11:44:47 -06:00
Erik Johnson
dd6bf8ae72 Remove persist parameter for chhome in win_useradd.py (#35994)
Replaced it with a log mesage when someone passes ``persist=True``.
2016-09-01 11:37:25 -06:00
rallytime
1d5d035cb2 Lint for #35916
Merges #35916
2016-09-01 11:30:14 -06:00
Heghedus Razvan
1a38cc340c shadow: test set&delete password for root (#35929)
Signed-off-by: Heghedus Razvan <razvan.heghedus@ni.com>
2016-09-01 11:25:44 -06:00
Nicole Thomas
6658ef1351 Lint develop (#35998)
* Lint fixes for develop

Refs #35795

* Versionadded tag and use single quotes for function doc
2016-09-01 11:16:31 -06:00
Thomas S Hatch
b48d7a7899 Merge pull request #35965 from edgan/salt-ssh_highstate_retcode
Set the return code to 1 on salt-ssh highstate errors
2016-09-01 10:21:37 -06:00