Commit Graph

86 Commits

Author SHA1 Message Date
Aditya Kulkarni
34135e1f67 Add runner for execution modules (#33949)
* Add runner for execution modules

* Make sure all modules load and fix argument passing

* Fix lint error

* Add docs for salt runner
2016-06-13 11:49:26 -04:00
Thomas S Hatch
c8facc5dae these are no longer loaded by the loader and proved to be (#32548)
more trouble that they were worth.
2016-04-13 12:55:54 -06:00
Nicole Thomas
216d9fdc9a [develop] Merge forward from 2016.3 to develop (#32494)
* fix sorting by latest version when called with an attribute

* remove reference to master_alive_check

* Fixes saltstack/salt#28262

* Resolve memory leak in authentication

* outputter virt_list does not exist anymore

* Update proxmox documentation

* Fix documentation on boto_asg and boto_elb modules and states

* modules.win_timezone: don't list all zones in debug log

* Correcty index glusterfs bricks

Fixes issue #32311

* Cleaner deprecation process with decorators

* Add deprecation decorator scaffold

* Capture type error and unhandled exceptions while function calls

* Aware of the current and future version of deprecation

* Implement initially is_deprecated decorator

* Add an alias for the capitalization

* Fix capitalization easier way

* Remove an extra line

* Add successor name to the deprecation decorator.

* Granulate logging and error messages.

* Implement function swapper

* Raise later the caught exception

* Clarify exception message

* Save function original name

* Remove an extra line

* Hide an alternative hidden function name in the error message, preserving the error itself

* Rename variable as private

* Add a method to detect if a function is using its previous version

* Message to the log and/or raise an exception accordingly to the status of used function

* Log an error along with the exception

* Add internal method documentation

* Add documentation and usage process for decorator "is_deprecated"

* Add documentation and process usage for the decorator "with_deprecated"

* Hide private method name

* Fix PEP8, re-word the error message

* Deprecate basic uptime function

* Add initial decorator unit test

* Rename old/new functions, mock versions

* Move frequent data to the test setup

* Add logging on EOL exception

* Rename and document high to low version test on is_deprecated

* Implement a test on low to high version of is_deprecated decorator

* Add a correction to the test description

* Remove a dead code

* Implement a test for high to low version on is_deprecated, using with_successor param

* Correct typso adn mistaeks

* Implement high to low version with successor param on is_deprecated

* Setup a virtual name for the module

* Implement test for with_deprecated should raise an exception if same deprecated function not found

* Implement test for with_deprecated an old function is picked up if configured

* Correct test description purpose

* Implement test with_deprecated when no deprecation is requested

* Add logging test to the configured deprecation request

* Add logging testing when deprecated version wasn't requested

* Implement test EOL for with_deprecated decorator

* Correct test explanation

* Rename the test

* Implement with_deprecated no EOL, deprecated other function name

* Implement with_deprecated, deprecated other function name, EOL reached

* Add test description for the with_deprecated + with_name + EOL

* Fix confusing test names

* Add logging test to the is_deprecated decorator when function as not found.

* Add more test point to each test, remove empty lines

* Bugfix: at certain conditions a wrong alias name is reported to the log

* Fix a typo in a comment

* Add test for the logging

* Disable a pylint: None will _never_ be raised

* Fix test for the deprecated "status.uptime" version

* Bugfix: Do not yank raised exceptions

* Remove unnecessary decorator

* Add test for the new uptime

* Add test for the new uptime fails when /proc/uptime does not exists

* Rename old test case

* Skip test for the UTC time, unless freeze time is used.

* Fix pylint

* Fix documentation

* Bugfix: proxy-pass the docstring of the decorated function

* Lint fix

* Fixes saltstack/salt#28262 for 2015.5 branch

* Update master config docs

* Improve git_pillar documentation/logging

* Add note about different behavior of top file in git_pillar

* Make log entry for a missing pillar SLS file more accurate for git_pillar

* FreeBSD supports packages in format java/openjdk7 so the prior commit broke that functionality. Check freebsd/pkg#1409 for more info.

* FreeBSD supports packages in format java/openjdk7 so the prior commit broke that functionality. Check freebsd/pkg#1409 for more info.

* Update glusterfs_test to be inline with #32312

* Fix salt-cloud paralell provisioning

Closes #31632

* Ignore Raspbian in service.py __virtual__ (#32421)

* Ignore Raspbian in service.py __virtual__

This prevents more than one execution module from trying to load as the
service virtual module.

Refs: #32413

* pack __salt__ before loading provider overrides

We can (and should) pack here since we're just packing a reference to the
object. __salt__ needs to be available when we're loading our provider
overrides

* Fix broken __salt__ dict in provider override

Using ret.items() here sets ``__salt__`` to its items (tuple containing
function name and reference), breaking usage of ``__salt__`` inside
overridden functions.

* Merge #32293 with test fixes (#32418)

* Fix issue #11497

* Remove check for working directory presence in tests

* Fix Domainname introspection

Default value needs to be extracted from the container itself,
because dockerd set Domainname value when network_mode=host.

* Add pgjsonb_queue to queue doc index

* Pylint fixes

* Pass parser options into batch mode

Resolves #31738

* Changed the target file in file.symlink test (#32443)

* Argument name in docs should match actual arg name (#32445)

Fixes #31851

* tests.integration: bypass MacOS TMPDIR, gettempdir (#32447)

Updates 0edd532, 8f558a5.

When logging in as root over `ssh root@host`, `$TMPDIR` and
`tempfile.gettempdir()` are both set to a variation of:
```
/private/var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/
```
When logging in as root over `sudo -i`, `$TMPDIR` is unset and
`tempfile.gettempdir()` is set to `/tmp`.

My guess is that the second case is an unintended or uncorrected omision
by Apple as they have introduced the longer, randomized temp path in a
recent version of MacOS.

* Issue #28706: Fix state user.present behavior. (#32448)

- As mentionned in issue #28706, state user.present no longer remove
      user from groups if the keyword 'groups' with empty value '[]' is not
      explicitly set, salt will assume current groups are still wanted.

* tests.integration: fix 4230c8a

* Move the tables of virtual modules to individual documentation pages

* Add new doc pages to toctree

* Add external ref to windows package manager docs

* Improve docstrings

* Add documentation on virtual module provider overrides to the module docs

* Clarify the scope of the provider param in states.

* Add link to provider override docs to all package providers

* Add link to provider override docs to all service providers

* Add link to provider override docs to all user providers

* dd link to provider override docs to all shadow providers

* Add link to provider override docs to all group providers

* Backport 31164 and 31364 (#32474)

* Don't send REQ while another one is waiting for response.

The message has to be removed from the queue the only *after* it's
already processed to don't confuse send() functionality that expects
empty queue means: there's no active sendings.

* Fixed zeromq ReqMessageClient destroy

* Add link to provider override docs to opkg.py

This is a companion to https://github.com/saltstack/salt/pull/32458, but
this module was not added until the 2016.3 branch, so the documentation
is being updated there for this module.

* Add documentation for some master/minion configs (#32454)

Refs #32400

Adds docs for:

- cli_summary
- event_return_queue
- event_return_whitelist
- event_return_blacklist
- file_recv_max_size
- fileserver_followsymlinks
- fileserver_ignoresymlinks
- fileserver_limit_traversal

* Automatically detect correct MySQL password column for 5.7 and fix setting passwords (#32440)

* Automatically detect MySQL password column

* Fix changing password in MySQL 5.7

* Fix lint test

* Fix unit tests (?)

They will still fail if "authentication_string" is legitimately the right column name, but I don't know what to do about that.

* Additional unit test fix

* Only unsub if we have a jid

Closes #32479
2016-04-11 17:07:15 -06:00
rallytime
f6d9cdc633 Merge branch '2015.8' into '2016.3'
Conflicts:
  - doc/ref/states/compiler_ordering.rst
  - doc/topics/installation/suse.rst
  - doc/topics/jobs/schedule.rst
  - doc/topics/targeting/grains.rst
  - doc/topics/tutorials/preseed_key.rst
  - doc/topics/tutorials/states_pt5.rst
  - pkg/suse/use-forking-daemon.patch
  - salt/minion.py
  - salt/modules/pacman.py
  - salt/modules/state.py
  - salt/modules/yumpkg.py
2016-03-25 11:47:16 -06:00
rallytime
7554d0f42d Merge branch '2015.5' into '2015.8'
Conflicts:
  - doc/ref/states/include.rst
  - doc/topics/cloud/reactor.rst
  - doc/topics/reactor/index.rst
  - doc/topics/releases/2015.5.10.rst
  - doc/topics/tutorials/states_pt5.rst
  - doc/topics/windows/windows-package-manager.rst
  - salt/config.py
  - salt/modules/state.py
  - salt/states/grains.py
  - tests/integration/modules/sysmod.py
  - tests/unit/states/grains_test.py
2016-03-24 15:48:00 -06:00
Erik Johnson
1b97e4a3df Improve state module docs, replace references to state.highstate/state.sls with state.apply
Resolves #32037.
2016-03-21 22:56:17 -05:00
Jacob Hammons
b192a9ba38 Doc restructuring, organization, and cleanup. Updated the doc navigation. 2016-01-31 20:10:02 -07:00
rallytime
d31b0d1573 Merge branch '2015.8' into develop 2015-11-04 15:40:03 -07:00
Benjamin Drung
8edd2c1add Fix typos of dependency 2015-11-04 10:58:40 +01:00
Colton Myers
9128e8e7ae Merge remote-tracking branch 'upstream/2015.8' into merge-forward-develop
Conflicts:
    salt/cloud/clouds/gce.py
    salt/modules/daemontools.py
2015-10-07 13:14:28 -06:00
Colton Myers
69d960f8e6 Merge remote-tracking branch 'upstream/2015.8' into merge-forward-develop
Conflicts:
    doc/man/salt.7
    doc/topics/ssh/index.rst
    salt/modules/boto_secgroup.py
    salt/modules/dockerng.py
    salt/states/archive.py
    salt/states/boto_elb.py
    salt/states/boto_secgroup.py
    tests/unit/modules/schedule_test.py
2015-10-07 13:11:48 -06:00
Colton Myers
35425b14ad Merge remote-tracking branch 'upstream/2015.5' into merge-forward-2015.8
Conflicts:
    doc/man/salt-api.1
    doc/man/salt-call.1
    doc/man/salt-cloud.1
    doc/man/salt-cp.1
    doc/man/salt-key.1
    doc/man/salt-master.1
    doc/man/salt-minion.1
    doc/man/salt-run.1
    doc/man/salt-ssh.1
    doc/man/salt-syndic.1
    doc/man/salt-unity.1
    doc/man/salt.1
    doc/man/salt.7
    salt/modules/pip.py
    salt/states/user.py
2015-10-07 12:06:12 -06:00
Justin Findlay
03400ef45b fix virtual fcn return doc indentation
Fixes #27724.
2015-10-07 11:49:16 -06:00
Jacob Hammons
75cc07cf10 noted that __virtual__ can return False and an error string 2015-10-07 09:48:46 -06:00
Jacob Hammons
b928e1afa8 update docs for __virtual__ and __virtualname__
Refs #26673
2015-10-06 17:23:42 -06:00
Justin Findlay
6bddf80546 update __virtual__ return documentation
Related to #26755; fixes #27116; implements part of #27643.
2015-10-06 13:47:31 -06:00
Colton Myers
9864d9e0fa Merge remote-tracking branch 'upstream/2015.8' into merge-forward-develop
Conflicts:
    doc/ref/modules/all/index.rst
    doc/topics/releases/boron.rst
    salt/cli/daemons.py
    salt/cli/salt.py
    salt/modules/jboss7.py
    salt/states/file.py
2015-09-18 11:03:37 -06:00
Colton Myers
26b6c92975 Merge remote-tracking branch 'upstream/2015.8' into merge-forward-develop
Conflicts:
    doc/conf.py
    salt/config/__init__.py
    salt/modules/rh_ip.py
    salt/pillar/s3.py
    salt/returners/local_cache.py
    salt/states/user.py
    salt/templates/rh_ip/rh7_eth.jinja
2015-09-17 11:10:37 -06:00
Colton Myers
2c2a5f85ac Merge remote-tracking branch 'upstream/2015.5' into merge-forward-2015.8
Conflicts:
    doc/conf.py
    doc/topics/cloud/gce.rst
    salt/cli/api.py
    salt/cli/call.py
    salt/cli/cp.py
    salt/cli/key.py
    salt/cli/run.py
    salt/cli/salt.py
    salt/modules/dockerio.py
    salt/states/dockerio.py
2015-09-17 10:54:33 -06:00
Jacob Hammons
6e323b6dd3 Update latest to 2015.8, 2015.5 is now previous
Assorted style and minor updates
2015-09-14 16:32:22 -06:00
Colton Myers
274464a85b Merge remote-tracking branch 'upstream/2015.5' into merge-forward-2015.8
Conflicts:
    doc/topics/reactor/index.rst
    salt/cloud/clouds/digital_ocean_v2.py
    salt/modules/groupadd.py
    salt/modules/localemod.py
    salt/modules/mysql.py
    salt/modules/useradd.py
    salt/modules/win_pkg.py
    salt/modules/win_useradd.py
    salt/netapi/rest_cherrypy/app.py
    salt/pillar/s3.py
    salt/returners/local_cache.py
    salt/states/htpasswd.py
    salt/states/user.py
2015-09-14 14:39:03 -06:00
Colton Myers
307d3d05a4 Merge remote-tracking branch 'upstream/2015.8' into merge-forward-develop
Conflicts:
    doc/man/salt.7
    salt/modules/yumpkg.py
2015-09-03 14:24:45 -06:00
Jacob Hammons
ac3bd47440 states/pkgrepo examples, suse installation updates
Refs #26644
Refs #26638
2015-09-02 11:37:40 -06:00
Colton Myers
1e1f5f3a95 Merge remote-tracking branch 'upstream/2015.5' into merge-forward-2015.8
Conflicts:
    doc/conf.py
    doc/topics/cloud/config.rst
    doc/topics/cloud/index.rst
    salt/modules/git.py
    salt/states/git.py
    salt/states/pkgrepo.py
2015-09-01 15:35:21 -06:00
Colton Myers
278e8dda5b Merge remote-tracking branch 'upstream/2015.8' into merge-forward-develop
Conflicts:
    salt/cloud/clouds/gce.py
2015-09-01 15:15:13 -06:00
Jacob Hammons
0ec036350d Updates to salt-ssh and salt-key
#24510
2015-08-31 20:00:30 -06:00
Jacob Hammons
06ac3bed42 Fixed typo 2015-08-31 13:53:59 -06:00
Jacob Hammons
45c1ff3543 Add doc for __states__ to writing states topic and 2015.8 release notes. Also added a missing line in release notes for git module updates.
Refs #21214
2015-08-31 13:51:31 -06:00
Jeremy Rosenbaum
763ee20713 documentation for zip archive modules 2015-08-26 12:18:57 -06:00
Jeremy Rosenbaum
b122adcf45 documentation for zip archive modules 2015-08-24 10:51:17 -07:00
Mark Lee
acc13b657f Fix typos in execution module docs 2015-07-05 18:04:06 -07:00
Thomas Jackson
b8e39c13f9 Add docs for new raw boolean support of depends decorator 2015-03-05 22:02:34 -08:00
Thomas Jackson
e32a7e1ed7 Whitespace cleanup 2014-12-11 07:53:20 -08:00
Mike Place
a5e1540f22 Provide a facility for modules to report the reasons they cannot be
loaded.
2014-10-02 15:43:10 -06:00
Thomas S Hatch
3ce955c774 Merge branch '2014.7' into develop
Conflicts:
	salt/cloud/deploy/bootstrap-salt.sh
2014-09-24 12:46:37 -06:00
Erik Johnson
a4413bb27a Improve formatting
Bullet points look better here than an indented section with an enormous
font.
2014-09-23 20:58:26 -05:00
loz-hurst
9031ea871a Fix broken back ticks in 68301c4 2014-09-11 16:15:35 +01:00
loz-hurst
68301c4339 Updated module documentation for clarification
Added note to say that __salt__ is not available to __virtual__.  Also added link to 'at.py' as an example, since it demonstrates using salt.utils in __virtual__ which the existing examples do not. Tweaked wording to make clear that not all the examples are package managers any more.
2014-09-10 14:35:40 +01:00
Seth House
64b8fb6a81 Added label to the docs for writing execution modules 2014-05-20 23:30:02 -06:00
Chris Rebert
7d1df94bb1 copyedit ref docs 2014-04-30 14:08:31 -07:00
Mike Place
2637fc689f Docs build cleanly! Yay! 2014-02-26 13:32:33 -07:00
Mike Place
a485eceac9 Fix all broken links in docs. Ignore certain known-good links. Adjust many links that are returning 301.
Conflicts:
	doc/topics/installation/index.rst
2014-02-20 16:16:59 -07:00
Thomas S Hatch
553a4fe10f Merge pull request #10598 from cachedout/2_19_docfix
2 19 docfix
2014-02-19 19:11:12 -07:00
Mike Place
7001c9dcc3 Big re-write of the modules reference. Standardized on 'execution module' as a term to avoid confusion. Cleaned up a lot of weasel-words and made the phrasing more declarative. 2014-02-19 12:51:53 -07:00
Mike Place
f12194c146 Change decorator example to setup logging. Closes #10584. 2014-02-19 09:38:38 -07:00
Thomas S Hatch
6c144e003e Log to trace instead of print, @pwaller per #9752 2014-01-16 10:49:41 -07:00
Peter Waller
054fccd3b7 Update index.rst
Fix a pet peeve of mine so that beginners don't repeat the mistake: silencing `ImportError` is evil since you don't know if it came because `dependency_that_sometimes_exists` is unavailable or the `dependency_that_sometimes_exists` tried to import something which was broken.

This can seriously hinder debugging.
2014-01-15 14:04:03 +00:00
Colton Myers
b43b0d5d09 Add more state vs module clarification 2014-01-07 16:55:28 -07:00
Joseph Hall
214843c53b Clarify that execution modules and state modules are not the same thing 2014-01-06 19:57:01 -07:00
Jeffrey C. Ollie
b1fb52a680 fix more funcion => function typos 2013-11-15 14:50:17 -06:00