Commit Graph

419 Commits

Author SHA1 Message Date
twangboy
75546eadaf Fix tests for mac_utils 2016-03-04 16:36:02 -07:00
twangboy
6cf7a4b364 Add missing import 2016-03-04 10:55:23 -07:00
twangboy
5d6de86a25 Fix some lint 2016-03-04 10:53:11 -07:00
twangboy
88d5db9cdd Add tests for remaining functions 2016-03-04 10:53:11 -07:00
twangboy
69aa8f8cbf Add test for execute_return_success 2016-03-04 10:53:11 -07:00
Colton Myers
076b49a4ca Merge remote-tracking branch 'upstream/2015.8' into merge-forward-2016.3
Conflicts:
    README.rst
    doc/conf.py
    doc/ref/index.rst
    doc/ref/proxy/all/salt.proxy.ssh_sample.rst
    doc/topics/installation/rhel.rst
    doc/topics/releases/2015.8.4.rst
    doc/topics/tutorials/states_pt5.rst
    salt/cloud/clouds/ec2.py
    salt/cloud/clouds/opennebula.py
    salt/config/__init__.py
    salt/modules/boto_dynamodb.py
    salt/modules/boto_ec2.py
    salt/modules/boto_elasticache.py
    salt/modules/boto_elb.py
    salt/modules/boto_iam.py
    salt/modules/boto_rds.py
    salt/modules/boto_sns.py
    salt/modules/boto_sqs.py
    salt/modules/dracr.py
    salt/modules/git.py
    salt/modules/mine.py
    salt/modules/systemd.py
    salt/modules/win_pkg.py
    salt/modules/yumpkg.py
    salt/pillar/__init__.py
    salt/states/git.py
    salt/states/rabbitmq_vhost.py
    salt/states/saltmod.py
    salt/utils/pkg/rpm.py
    setup.py
    tests/unit/modules/systemd_test.py
    tests/unit/states/rabbitmq_vhost_test.py
2016-02-11 22:33:49 -07:00
Colton Myers
67e17b3022 Revert "Deprecated code removed. " 2016-02-10 11:40:48 -07:00
Erik Johnson
763581798b Add unit tests to ensure a valid provider 2016-02-08 15:18:11 -06:00
justinta89
ef36afe5de Removed deprecated jid code and corresponding test 2016-02-05 09:05:54 -07:00
Steve Hajducko
a015473d4e Add etcd update function
Adds a update function that takes a dict and sets multiple etcd keys.
2016-01-25 14:13:33 -08:00
Sean Jenkins
e44a30620b Remove recurse_list from pillar_source_merging_strategy and add pillar_merge_list (bool) instead 2016-01-19 15:06:30 -07:00
rallytime
39b49621ad Merge branch '2015.8' into 'develop'
Conflicts:
  - salt/beacons/service.py
  - salt/cloud/clouds/vmware.py
  - salt/modules/file.py
  - salt/modules/ipset.py
  - salt/modules/npm.py
  - salt/modules/rpm.py
  - salt/states/file.py
  - salt/utils/event.py
  - salt/utils/schedule.py
  - tests/unit/modules/state_test.py
2016-01-14 13:33:53 -07:00
Mike Place
11d27ba694 Mock config module in utils test 2016-01-11 16:31:21 -07:00
Sean Jenkins
41353b7ab3 Remove recurse_list from pillar_source_merging_strategy and add pillar_merge_list (bool) instead 2015-12-29 10:22:54 -07:00
Sergey Kizunov
a37a2700af ZeroMQ no longer required when transport is TCP
salt/master.py:
- If ZMQ is not importable, use `tornado.ioloop.IOLoop` as the loop class.
- Check HAS_ZMQ before using any zmq.* content.
- Did not touch `FloMWorker` usage of zmq.*. This is only used when the
transport is RAET.

salt/minion.py:
- If ZMQ is not importable, use `tornado.ioloop.IOLoop` as the loop class.
- Check HAS_ZMQ before using any zmq.* content.

salt/transport/ipc.py:
- Added `IPCMessagePublisher`. This is intended to function much like
ZMQ's zmq.PUB sockets. Used in implementing utils/event.py to function
without ZMQ.
- Added `IPCMessageSubscriber`. This is intended to function much like
ZMQ's zmq.SUB sockets. Used in implementing utils/event.py to function
without ZMQ. What makes this class a bit different is that the associated
IO Loop is meant to not be running when it is used. Due to this, it is
recommended that the caller create a new IO Loop for this purpose. The
reason for this is that the `get_event()` API may be invoked from
anywhere, whether or not there is a current IO Loop that is running in
the thread of the invocation.

salt/utils/async.py:
- If ZMQ is not importable, use `tornado.ioloop.IOLoop` as the loop class.

salt/utils/event.py:
- Implemented using `salt.transport.ipc` instead of ZMQ.
- zmq.PUB ==> `IPCMessagePublisher`
- zmq.SUB ==> `IPCMessageSubscriber`
- zmq.PUSH ==> `IPCMessageClient`
- zmq.PULL ==> `IPCMessageServer`

Signed-off-by: Sergey Kizunov <sergey.kizunov@ni.com>
2015-12-07 20:22:16 -06:00
Steve Hajducko
cef6eff7c8 Catch ValueError on timeout on non-existing key
The etcd watch function tries to read a key when it reaches the timeout
in order to obtain details about the key.

On python 2.6, when it tries to re-read the key, it throws a ValueError,
since python-etcd doesn't officially support python 2.6.  The watch
function wasn't catching this ValueError, so it was returning the
exception, rather than a blank dict.
2015-12-01 10:30:45 -08:00
Bastiaan Bakker
5226cd8f79 remove trailing whitespace
fix subdict_match test cases
2015-11-25 20:41:13 -07:00
Bastiaan Bakker
44713cdb95 fix issue 29191: only try partial matches when a wildcard has been specified 2015-11-25 20:41:13 -07:00
Bastiaan Bakker
7052479ad3 remove trailing whitespace
fix subdict_match test cases
2015-11-25 17:12:17 +01:00
Bastiaan Bakker
e3af8d2151 fix issue 29191: only try partial matches when a wildcard has been specified 2015-11-25 16:03:33 +01:00
Colton Myers
d76d62877d Merge remote-tracking branch 'upstream/2015.8' into merge-forward-develop
Conflicts:
    salt/modules/git.py
    salt/renderers/gpg.py
    salt/utils/__init__.py
2015-11-17 16:24:43 -07:00
Mike Place
5b680c938a Merge pull request #28950 from DSRCompany/pr/28812_which
PR 28812 which test fix
2015-11-17 08:32:16 -07:00
Dmitry Kuzmenko
18571000c5 Fix which test in PR#28812 2015-11-17 11:29:41 +03:00
Todd Tomkinson
ba94878f45 marathon and chronos proxy minions 2015-11-12 10:03:38 -07:00
Todd Tomkinson
f6ccc0e250 marathon and chronos proxy minions 2015-11-11 10:51:28 -07:00
Steve Hajducko
455f40b0d2 Refactor etcd modules
The etcd modules were using bits and pieces of python-etcd directly and
were using outdated exceptions to catch errors.  These errors were
causing issues when trying to use etcd modules for logic.

A summary of changes
    - Most of the 'work' is now done in etcd_util
    - Removed import of python-etcd from states/etcd_mod and the
      returner
    - Added new tests for etcd_util
    - Put in proper exceptions and catches for python-etcd
    - Added support for ValueError catching.  python-etcd doesn't
      support python 2.6 and raises ValueError when trying to format
      exceptions
    - Added watch function to etcd execution module
    - Added autospec to unit tests so hopefully less brittle
    - Added TTL and directory features to the set function

*BACKWARDS INCOMPATIBLE CHANGES*

All interfaces are still backwards incompatible.  However, the returns
from several of the etcd util functions have been changed.  The old
returns presented issues with certain test cases.  For instance, a
failed 'get' returned '', but a key with no value will also return ''.

The same issues occured with the 'ls', 'tree' and 'set' functions.  Trying to
ls a blank directory returned the same result as a failed ls of a
non-existent key.
2015-11-06 16:29:50 -08:00
rallytime
9ea33bf0e4 Pylint fixes 2015-10-16 07:22:46 -06:00
Domingo Kiser
4af5b5c33f introduce recurse_list pillar_source_merging_strategy 2015-10-16 05:24:40 -06:00
Mike Place
6d46a38d5d Whitespace lint
Refs #27891
2015-10-13 09:15:12 -06:00
Domingo Kiser
a8adaa8f9e introduce recurse_list pillar_source_merging_strategy 2015-10-12 21:59:39 -07: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
rallytime
78c85fbb31 Add unit tests for new recursive function 2015-09-29 21:25:47 -06:00
Pedro Algarvio
10a9189d83 Merge remote-tracking branch 'upstream/2015.8' into hotfix/merge-forward-develop 2015-09-06 12:42:58 +01:00
Pedro Algarvio
503e050a75 Sometimes the event system is just too fast 2015-09-04 15:52:06 +01:00
Pedro Algarvio
2f40387290 Add test_event_single_wait_0_no_block_False test case 2015-09-03 19:54:57 +01:00
Pedro Algarvio
ae9c6c9cff Workaround wait=0 meaning a blocking call when non blocking is required 2015-09-03 18:06:43 +01:00
Pedro Algarvio
dc0fec3be3 Restore backwards compatibility to salt.utils.event
Fixes #26848
Refs #26000
2015-09-03 11:11:58 +01: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
Erik Johnson
d30eaee653 Add http basic auth tests 2015-08-29 21:14:20 -05:00
Colton Myers
75f48b4a96 Merge remote-tracking branch 'upstream/2015.8' into merge-forward-develop
Conflicts:
    doc/topics/targeting/grains.rst
2015-08-21 16:48:48 -06:00
Jenkins
f5131c2b46 More indent 2015-08-20 13:57:36 -06:00
Jenkins
52cde47aaf Fix failing event tests and modify event init
There was a problem wherein two sockets would race to see which was connected first,
causing unit.utils.event_test.TestSaltEvent.test_event_multiple_clients to fail from
time to time. This gives a little breathing room to the second socket.

This also only does the pub connect if necessary on SaltEvent instantation.
2015-08-20 13:41:07 -06:00
Colton Myers
73282d51cc Merge remote-tracking branch 'upstream/2015.8' into merge-forward-develop
Conflicts:
    salt/cli/daemons.py
    salt/master.py
    salt/minion.py
    salt/modules/gpg.py
    salt/modules/pw_group.py
    salt/utils/http.py
    setup.py
    tests/unit/modules/schedule_test.py
2015-08-19 11:29:45 -06:00
Colton Myers
bf6c7e82cc Keep the formatted assertMsg 2015-08-18 12:50:24 -06:00
Mike Place
53d4739fa3 Merge pull request #26418 from driskell/fix_discarded_events_2015.8
Fix forward-merged caching from 2015.5 into 2015.8 to be compatible with the new match_func
2015-08-18 08:59:16 -06:00
Jason Woods
63b195987e Fix forward-merged caching from 2015.5 into 2015.8 to be compatible with the new match_func 2015-08-18 14:37:23 +01:00
Colton Myers
f3c8ba85dc Merge remote-tracking branch 'upstream/2015.8' into merge-forward-develop
Conflicts:
    salt/cloud/clouds/opennebula.py
    salt/modules/systemd.py
    salt/utils/aws.py
2015-08-17 17:06:59 -06:00
Thomas S Hatch
9d64b419d2 Merge pull request #26272 from garethgreenaway/schedule_list_show_jobs_enabled
Fixes to schedule module
2015-08-17 12:54:24 -06:00
Pedro Algarvio
a73ca74bc3 White-space lint fix 2015-08-17 15:28:22 +01:00
Pedro Algarvio
8f69530f65 Add the unit tests for Schema in a DictItem properties 2015-08-17 13:20:18 +01:00