Commit Graph

80461 Commits

Author SHA1 Message Date
Pedro Algarvio
6a638620ba
Move base test case modules to tests.support.case 2017-04-04 18:04:39 +01:00
Pedro Algarvio
9af2ca8823
No need to load all modules docs.
This should reduce memory usage as well as speeding up the decorator
2017-04-04 18:04:38 +01:00
Pedro Algarvio
4853952f1f
Use a temporary config 2017-04-04 18:04:38 +01:00
Pedro Algarvio
785698d2ce
Import for the original module 2017-04-04 18:04:38 +01:00
Pedro Algarvio
b94992f544
Some more RUNTIME_CONFIGS and RUNTIME_VARS fixes 2017-04-04 18:04:38 +01:00
Pedro Algarvio
e163a747f1
Minor import fixes 2017-04-04 17:29:34 +01:00
Pedro Algarvio
8031ac0209
Move mixins to tests.support.mixins.
The adapted config mixin get config methods are not static methods
2017-04-04 17:29:34 +01:00
Mike Place
6056ee302a Merge pull request #40339 from s0undt3ch/features/py3-pt2
[WIP] Move unit tests which were in integration tests - More py3 and mocking fixes
2017-04-04 10:21:46 -06:00
Mike Place
d254b96498 Merge pull request #40471 from tonybaloney/libcloud_dns_kwargs
Update to libcloud_dns module to allow custom kwargs for DNS drivers
2017-04-04 10:12:44 -06:00
Nicole Thomas
31f27beca3 Merge pull request #40521 from ledeuns/patch-2
Set True instead of 1
2017-04-04 10:03:24 -06:00
Nicole Thomas
fdf029905c Merge pull request #40511 from eradman/keyboard_test
Add mocks to allow keyboard tests to function on non-Linux systems
2017-04-04 10:02:10 -06:00
Denis Fondras
a58e320f41 Set True instead of 1 2017-04-04 14:50:03 +02:00
Eric Radman
3299f5b2ea Add mocks to allow keyboard tests to function on non-Linux systems 2017-04-03 22:11:38 -04:00
Anthony Shaw
8c74d3df89 Update test_libcloud_dns.py
add absolute imports
2017-04-04 10:57:32 +10:00
Mike Place
174db75e04 Merge pull request #40487 from Whissi/start-minion-after-master
salt-minion.service: Start after salt-master.service
2017-04-03 16:52:23 -06:00
Mike Place
17808e7181 Merge pull request #40480 from terminalmage/docker-auth-handling
Improved Docker auth handling and other misc. Docker improvements
2017-04-03 16:44:48 -06:00
Mike Place
30f2593408 Merge pull request #40478 from cloudflare/add-new-funs
Add new functions to the net module
2017-04-03 16:31:24 -06:00
Mike Place
f6803bbd6c Merge pull request #40475 from cloudflare/yang-state
New state module: NAPALM YANG
2017-04-03 16:30:54 -06:00
Mike Place
ae43cb69e9 Merge pull request #40458 from cloudflare/napalm-syslog
New engine: Napalm syslog
2017-04-03 16:27:10 -06:00
Mike Place
eb7dabb669 Merge pull request #40452 from q1x/develop
Added the ability to manage Zabbix usergroup permissions
2017-04-03 16:26:44 -06:00
Mike Place
806657ece4 Merge pull request #40102 from sitepoint/develop-file_replace_output_fix
Fix for bug in file.replace change report
2017-04-03 16:05:55 -06:00
Mike Place
d76cf4813f Merge pull request #39921 from ScoreUnder/39915_fix_relpath_handling
Fix relpath handling in file.recurse
2017-04-03 15:30:41 -06:00
Mike Place
55fa3c12fa Merge pull request #39874 from kiorky/fixup_fail_rc
Make returncode friendly to onfail requisites
2017-04-03 15:28:50 -06:00
Erik Johnson
0088a850bc Merge pull request #40284 from The-Loeki/cache-roster2
cache roster: Add SDB support, improve documentation
2017-04-03 15:21:01 -05:00
Mircea Ulinic
a0d93e0021 Merge branch 'develop' into add-new-funs 2017-04-03 22:11:26 +03:00
Erik Johnson
c526e8c7b0 Improved Docker auth handling and other misc. Docker improvements
This commit changes how we handle Docker authentication. We no longer
try to auth when pushing/pulling images. This was initially done based
on a misunderstanding of how authentication was handled in docker-py.
docker-py will automagically use the base64-encoded username/password
combination stored in config.json if present, so we don't need to auth
at all for push or pull, docker-py will handle all of that. We just need
to make sure that we get the auth info into the config.json. To do this
I have added a login() function to the execution module, which uses the
Docker CLI to authenticate (with output_loglevel set to "quiet" to
suppress any logging of the credentials). The CLI is used in this
instance because docker-py provides no interface by which to persist a
login in the config.json; it can read from the file, but is not designed
to *write* to it. Rather than trying to write to this file ourselves,
and potentially breaking it when (not *if*) Docker decides to change the
internal format of the JSON data structure, using the CLI is a way of
future-proofing the authentication logic.

Context caching of the docker-py client instance has also been removed.
Context caching was used based on the same incorrect understanding of
how docker-py handles authentication, and sought to avoid repeated login
attempts. As that is no longer a concern, there is no need to cache the
client instance in the context dunder because we don't really gain a
performance benefit from it.

The _image_wrapper() function has been removed, as it no longer serves
any purpose, and the image-specific code in it that was still needed
has been absorbed into the _client_wrapper() helper. The functions which
used the _image_wrapper() helper (like push() and pull()) now use
_client_wrapper().

Additionally, the decorators used to enforce a minimum Docker version
(or Docker API version) have been removed. These are not necessary since
docker-py handles raising exceptions when a given feature is not
supported by the effective API version. The _client_wrapper() helper
function now checks for miscellaneous docker exceptions by catching the
docker.errors.DockerException class, which is the base class for the
custom exceptions raised by docker-py, and by doing so catches exceptions
raised due to API version incompatibility (and more).

The list of functions in the top-level docstring has been removed as it
is very out-of-date, and is somewhat superfluous anyway given that we
have for some time now had a list of the functions on the right side of
the page in the documentation.

Other changes:

- Fixed a bug I introduced when I overhauled the
  docker_container.running state, in which a container with no changes
  to be made, which was not running, would be started by the state even
  when test=True was passed.
- Custom registry image names are now properly identified. The colon in
  the hostname of the custom registry was previously causing incorrect
  identification of the image name and tag, when no explicit tag was
  being passed (e.g. localhost:5000/myimage).
- When configuring credentials, the creds for the Docker Hub can be
  configured under a registry named ``hub``. This keeps the user from
  having to figure out the registry URL and configure it in their Pillar
  data, and thus makes using this module easier.
- Removes the email address from the documentation for credential
  configuration. This was probably initially added because docker-py
  accepts it as an argument, but it is entirely ignored for purposes of
  authentication (even by docker-py) and is thus unnecessary. Relic of
  an earlier time in Docker's history, perhaps?
- Fixed RST references to functions which weren't caught when this
  module was renamed to dockermod.py
- Allow filter arguments in docker.networks to be passed as a
  comma-separated list as well as a Python list, in keeping with general
  usage elsewhere in Salt.
2017-04-03 13:29:28 -05:00
Nicole Thomas
595888a439 Merge pull request #40473 from cloudflare/napalm-yang
New execution module: Napalm YANG
2017-04-03 09:30:50 -06:00
Thomas Deutschmann
a177d7f0a1
salt-minion.service: Start after salt-master.service
On systems where you have both services, salt-master and salt-minion,
enabled, you want that salt-minion.service starts after
salt-master.service so that the minion will be able to connect to the
master on first attempt.
2017-04-03 11:43:00 +02:00
Ronald van Zantvoort
f787ae574c Roster cache: Link doc to pillar.get 2017-04-03 11:23:16 +02:00
Erik Johnson
2a23a63190 Merge pull request #40470 from techhat/cachetest
Add cache.store to the runners
2017-04-02 22:57:45 -05:00
Ronald van Zantvoort
d113f97aec Cache roster lint fix 2017-04-02 17:42:52 +02:00
Ronald van Zantvoort
e325b6a637 Cache roster: Rework env support through SDB 2017-04-02 17:06:39 +02:00
Mircea Ulinic
f7e5473a23 Insert new funs into Nitrogen release notes 2017-04-02 11:05:35 +00:00
Mircea Ulinic
7659d0a375 Adapt new functions to Nitrogen 2017-04-02 10:55:51 +00:00
Mircea Ulinic
a46e7d9593 New getters: config and optics 2017-04-02 10:48:43 +00:00
Mircea Ulinic
85020dee1a Remove _kwargs from data 2017-04-02 10:30:49 +00:00
Mircea Ulinic
5053593da3 Add configured function 2017-04-02 10:20:05 +00:00
Mircea Ulinic
afff6d5bd1 Solve imports 2017-04-02 10:02:49 +00:00
Pedro Algarvio
863d8d453f
Ignore the unimplemented abstract method 2017-04-01 23:23:50 +01:00
Mircea Ulinic
66d99b520c Index netyang state 2017-04-01 19:06:35 +00:00
Mircea Ulinic
24cdabd3d4 Netyang autodoc 2017-04-01 18:07:08 +00:00
Mircea Ulinic
30798b0fe3 Pillar example & fix SLS example 2017-04-01 18:04:15 +00:00
Pedro Algarvio
d198a900a4
Remove unused imports 2017-04-01 19:01:09 +01:00
Pedro Algarvio
d6d3161f80
Use a temporary configuration instead 2017-04-01 19:00:14 +01:00
Pedro Algarvio
9fd126c904
Use a temporary configuration instead 2017-04-01 18:58:03 +01:00
Mircea Ulinic
26541cf32e Fix tpyo 2017-04-01 17:57:38 +00:00
Pedro Algarvio
c6fce40a2a
Use a temporary configuration instead 2017-04-01 18:57:25 +01:00
Pedro Algarvio
e2a5b1bf54
Use a temporary configuration instead 2017-04-01 18:56:46 +01:00
Pedro Algarvio
ec7182a292
Use a temporary configuration instead 2017-04-01 18:55:48 +01:00
Mircea Ulinic
f8e120f47c Doc: SLS example 2017-04-01 17:48:59 +00:00