Commit Graph

10689 Commits

Author SHA1 Message Date
Daniel Wallace
373a9a0be4 allow docker util to be reloaded with reload_modules
If we reference the actual import, the utils module won't be reloaded, but if
we use `__utils__` it can be reloaded on a pip install
2017-08-21 13:18:08 -06:00
garethgreenaway
882fcd846f Merge pull request #43029 from terminalmage/fix-func-alias
Normalize the salt caching API
2017-08-21 09:54:58 -07:00
Nicole Thomas
9ac043d997 Merge branch 'develop' into fix-iptables-negation 2017-08-18 16:52:29 -04:00
rallytime
6ca3607770 Merge branch '2017.7' into 'develop'
Conflicts:
  - salt/engines/slack.py
  - salt/modules/win_pkg.py
  - salt/utils/versions.py
2017-08-18 09:28:26 -04:00
rallytime
84829a6f8c Merge branch '2016.11' into '2017.7'
Conflicts:
  - salt/modules/jenkins.py
  - salt/states/jenkins.py
2017-08-18 09:13:54 -04:00
Daniel Wallace
35e45049e2 use a ruby gem that doesn't have dependencies 2017-08-18 08:55:02 -04:00
Andrew Bulford
d4507f1a08 Re-use container connection logic on net creation
Re-factoring a little following the previous commit, so that the same
container connection logic can be used in both places, rather than it
being repeated.
2017-08-18 13:36:46 +01:00
Andrew Bulford
d59d0adfeb Add ability to re-configure docker networks
Previously any changes to network states wouldn't result in any change
to the network when the state was applied.  This was less of an issue
the only attributes you could set for a network were its name and
driver, but with the recent support for driver options and now IPAM
config being added, it's useful for the state to be able to modify the
network if it needs to.

The Docker API doesn't provide any facility to modify an existing
network, so the only option is to recreate it with the new options,
which means disconnecting and reconnecting all containers.

Fixes #43047
2017-08-18 13:36:14 +01:00
Andrew Bulford
ec2a8a82c8 Add support for IPAM config in Docker networks
Fixes #43047
2017-08-18 13:35:48 +01:00
Andrew Bulford
8048fbcfa7 Remove check_duplicates from create_network call
The create_network function in dockermod.py doesn't take a
check_duplicates argument so passing it here causes a failure.

Fixes #42976
2017-08-18 13:26:33 +01:00
garethgreenaway
2957467ed7 Merge pull request #43026 from rallytime/bp-43020
Back-port #43020 to 2016.11
2017-08-17 16:19:46 -07:00
Erik Johnson
f8f74a310c Update localfs cache tests to reflect changes to func naming 2017-08-17 17:19:34 -05:00
twangboy
fbe54c9a33 Remove unused import six (lint) 2017-08-17 15:54:38 -06:00
twangboy
7f5ee55f57 Fix unit.utils.test_url for Windows
Detect escaped urls in Windows
Unescape urls in Windows
Fix tests to deal with sanitized Windows paths
2017-08-17 14:20:25 -06:00
Nicole Thomas
c35706fa3f Merge pull request #43011 from rallytime/merge-develop
[develop] Merge forward from 2017.7 to develop
2017-08-17 16:19:33 -04:00
Daniel Wallace
ba80a7d4b5 use a ruby gem that doesn't have dependencies 2017-08-17 13:45:10 -06:00
garethgreenaway
51d16840bb Merge pull request #42890 from DSRCorporation/bugs/42627_salt-cp
Make chunked mode in salt-cp optional
2017-08-17 11:37:43 -07:00
Daniel Wallace
0eb15a1f67 test with gem that appears to be abandoned 2017-08-17 14:28:39 -04:00
twangboy
b04d1a2f18 Fix unit.utils.test_find for Windows
Fix skipIf statements
Use sys.maxsize instead of sys.maxint
2017-08-17 11:55:00 -06:00
Adam Mendlik
f87fe54b7b Fix linter errors for kernelpkg modules and states 2017-08-17 11:27:57 -06:00
Adam Mendlik
8f575ade60 Add kernelpkg.remove function for APT-based systems 2017-08-17 11:27:57 -06:00
Adam Mendlik
5c4a5ca59a Add kernelpkg.remove function for YUM-based systems 2017-08-17 11:27:57 -06:00
Erik Johnson
4089b7b1bc Use socket.AF_INET6 to get the correct value instead of doing an OS check
This builds on #43014 with a more future-proof solution.
2017-08-17 12:12:27 -05:00
garethgreenaway
973d288eca Merge pull request #43020 from gtmanfred/test_gem
test with gem that appears to be abandoned
2017-08-17 09:40:40 -07:00
Daniel Wallace
0a1f40a664 test with gem that appears to be abandoned 2017-08-17 10:38:32 -06:00
Ch3LL
b8eee4401e Change AF_INET6 family for mac in test_host_to_ips 2017-08-17 10:55:53 -04:00
rallytime
93c11d827a Merge branch '2017.7' into 'develop'
Conflicts:
  - salt/engines/slack.py
  - salt/minion.py
2017-08-17 09:30:50 -04:00
rallytime
8a0f948e4a Merge branch '2016.11' into '2017.7'
Conflicts:
  - salt/utils/versions.py
  - tests/unit/modules/test_boto_elb.py
  - tests/unit/modules/test_boto_secgroup.py
  - tests/unit/states/test_boto_vpc.py
2017-08-17 09:10:31 -04:00
aajdinov
d365888489 Initial commit of oneandone salt cloud driver. 2017-08-17 08:03:01 +00:00
twangboy
92dc3c0ece Use os.sep for path 2017-08-16 15:59:10 -06:00
Lukas Raska
90c46ddefb Allow cmdmod.exec_code_all to utilize cmdmod.run_all parameters 2017-08-16 21:40:33 +02:00
Tarjei Husøy
6f19fc023c Fix broken negation in iptables
Introduced in 7c6ff77c and released with 2017.7.
2017-08-16 10:30:55 -07:00
twangboy
201ceae4c4 Fix lint, remove debug statement 2017-08-16 10:29:26 -06:00
Andrew Bulford
d3f792d47d Remove check_duplicates from create_network call
The create_network function in dockermod.py doesn't take a
check_duplicates argument so passing it here causes a failure.

Fixes #42976
2017-08-16 14:05:31 +01:00
Gilbert Gilb's
08d453eb37 Fix unit tests. 2017-08-16 09:00:26 +02:00
twangboy
e9febe4893 Fix unit.test_fileclient
Use os.sep instead of hard-coded, unix-style paths
2017-08-15 16:34:03 -06:00
Mike Place
40c4323593 Merge branch 'develop' into modularise-tokens 2017-08-15 15:48:25 -06:00
Nicole Thomas
abac36d907 Merge pull request #42450 from pwdng/ldap_fix
Use OrderedSet instead of set to allow handling of OpenLDAP X-ORDERED…
2017-08-15 17:30:35 -04:00
twangboy
37029c1a16 Fix unit.test_doc test
Use findstr instead of grep on Windows
Use os.linesep for file paths
2017-08-15 15:30:13 -06:00
Nicole Thomas
275122d04e Merge pull request #42834 from terminalmage/salt.utils.versions
Move 4 functions from salt.utils to salt.utils.versions
2017-08-15 17:28:24 -04:00
Mike Place
f881aa5117 Merge branch 'develop' into nfs-exports 2017-08-15 13:28:12 -06:00
Mike Place
4f406602cf Merge branch 'develop' into ldap_fix 2017-08-15 12:36:47 -06:00
rallytime
c6b9ca4b9e Lint fix: add missing space 2017-08-15 14:26:44 -04:00
rallytime
5597b1a30e Skip 2 failing tests in Python 3 due to upstream bugs 2017-08-15 14:26:44 -04:00
rallytime
a0b19bdc27 Update account id value in boto_secgroup module unit test
This value was updated in moto 1.0.0 with the following commit:

5f3fbff627
2017-08-15 14:23:00 -04:00
rallytime
60b406e088 @mock_elb needs to be changed to @mock_elb_deprecated as well 2017-08-15 14:23:00 -04:00
rallytime
6ae1111295 Replace @mock_ec2 calls with @mock_ec2_deprecated calls
moto versions >= 1.0.0 have changed the way the mocked connections through
boto are handled with the @mock_ec2 decorator. They use the boto3 connection
method. However, since we are still using boto in many places, we need to use
the new @mock_ec2_deprecated decorator instead to handle the boto connection
functions for the unit tests.

Versions of moto < 1.0.0 are not Python 3 compatible, so salt-jenkins should
be installing newer versions of moto for those tests. Unfortunately, we cannot
install an older version of moto for Python2 that use the original @mock_ec2 call
and also import the @mock_ec2_deprecated function for newer versions of moto
simultaneously as the @mock_ec2_deprecated function doesn't exist in older
versions of moto.
2017-08-15 14:22:59 -04:00
Erik Johnson
2b76029ded Move 4 functions from salt.utils to salt.utils.versions
This moves the following functions from salt.utils to salt.utils.versions:

- warn_until
- kwargs_warn_until
- compare_versions (as salt.utils.versions.compare)
- version_cmp
2017-08-15 12:53:57 -05:00
Nicole Thomas
47ff9d5627 Merge pull request #42812 from terminalmage/yaml-loader-tests
Update custom YAML loader tests to properly test unicode literals
2017-08-15 13:50:22 -04:00
Erik Johnson
9d8486a894 Add test for custom YAML loader with unicode literal strings 2017-08-15 11:06:20 -05:00
Erik Johnson
a0118bcece Remove bytestrings and use textwrap.dedent for readability
PyYAML works with and without bytestrings on PY3, and Python 3 can read
all of the test data as regular strings, so bytestrings are unnecessary
here.

This also adds use of textwrap.dedent to make the YAML easier to read,
so it can be indented away from the far left side of the line.
2017-08-15 11:05:48 -05:00
garethgreenaway
8b48341a36 Merge branch 'develop' into fixing_beacons 2017-08-15 09:00:09 -07:00
Mike Place
db32d81d8a Merge pull request #42917 from rallytime/merge-develop
[develop] Merge forward from 2017.7 to develop
2017-08-14 21:53:18 -06:00
Mike Place
11a33fe692 Merge pull request #42925 from terminalmage/f26-debug-logging
Add debug logging to troubleshoot test failures
2017-08-14 21:47:50 -06:00
Erik Johnson
8165f46165 Add debug logging to troubleshoot test failures
This adds logging to troubleshoot https://github.com/saltstack/salt-jenkins/issues/477
2017-08-14 16:28:09 -05:00
Nicole Thomas
4fcdab3ae9 Merge pull request #42657 from nhavens/2017.7
back-port #42612 to 2017.7
2017-08-14 15:42:25 -04:00
garethgreenaway
bbaae409b5 Merge branch 'develop' into postgres-valid-until 2017-08-14 12:09:43 -07:00
Gareth J. Greenaway
ed742bb506 Updating mock from salt.utils to salt.utils.files for fopen. 2017-08-14 12:04:38 -07:00
Gareth J. Greenaway
bf1aefa47b Updating memusage, ps and diskusage beacons for python3 related failures. Updating respective tests as well. 2017-08-14 12:04:38 -07:00
Gareth J. Greenaway
fe5dd1e7b9 Removing unused import from ps beacon. Fixing mock for sensehat test. 2017-08-14 12:04:38 -07:00
Gareth J. Greenaway
9072edd8a1 Fixing mocking for ps beacon. Types for sensehat beacon. 2017-08-14 12:04:38 -07:00
Gareth J. Greenaway
d8ac1f8cfb Updating unit and integration tests for beacons to reflect changes. 2017-08-14 12:04:38 -07:00
Gareth J. Greenaway
ff6f42405f Fixing typo in service beacon. Removing unused import. 2017-08-14 12:04:38 -07:00
Gareth J. Greenaway
4e1fea1433 Updating logging, shuffling some imports of salt.ext.six.moves around to fix linting. better way to determine the twilio library version. 2017-08-14 12:04:38 -07:00
Gareth J. Greenaway
813445d1ed Updating with various requested changes 2017-08-14 12:04:38 -07:00
Gareth J. Greenaway
cca7c0d091 Removing the wrong import, re-adding Mock and removing the ones that are not used. 2017-08-14 12:04:38 -07:00
Gareth J. Greenaway
71963cccce fixing more lint issues 2017-08-14 12:04:38 -07:00
Gareth J. Greenaway
1ec4ccba85 Renaming all tests to be consistent with naming. 2017-08-14 12:04:38 -07:00
Gareth J. Greenaway
23d572199a Adding test_beacon for the beacon state module. Updating beacon state module documentation. Removing over aggressive code in the validate function for service beacon. 2017-08-14 12:04:38 -07:00
Gareth J. Greenaway
474b6dbdf8 Updating various documentation and beacons. Adding unit tests for the beacon module. 2017-08-14 12:04:38 -07:00
Gareth J. Greenaway
7f89fa4886 Removing test_network_settings_match from tests. 2017-08-14 12:04:37 -07:00
Gareth J. Greenaway
ee3befbed8 Updating documentation for wtmp, btmp, fixing service tests and updating various bits in the service beacon. 2017-08-14 12:04:37 -07:00
Gareth J. Greenaway
6f9412b41c adding network_info, network_settings, and service tests. 2017-08-14 12:04:37 -07:00
Gareth J. Greenaway
4f6c04cbbf Adding the tests 2017-08-14 12:04:37 -07:00
Gareth J. Greenaway
507071e9e6 Updating the salt_proxy beacon to use list based configuration and adding unit tests. 2017-08-14 12:04:37 -07:00
Gareth J. Greenaway
a04b0fe3ee Updating network_info beacon for list based configuration. Adding unit tests for network_info beacon 2017-08-14 12:04:37 -07:00
Gareth J. Greenaway
8b507b1635 Updating twilio_txt_msg & memusage beacons to ensure list based configuration. Adding/Updating unit tests for both. Updating twilio related things to support newer version of twilio python library. 2017-08-14 12:04:37 -07:00
Gareth J. Greenaway
366bed8998 Updating twilio_txt_msg beacon for list based configuration. 2017-08-14 12:04:37 -07:00
Gareth J. Greenaway
7361672339 Updating the telegram_bot_msg beacon to use list based configuration rather that dictionary based configuration. 2017-08-14 12:04:37 -07:00
Gareth J. Greenaway
dfc27c63fd Updating beacon.log to use list based configuration rather than dictionary. Adding the unit test for beacon.log. 2017-08-14 12:04:37 -07:00
Gareth J. Greenaway
b03f840aed Simplying the validate functions by converting from list to dict when looking for various items to be present. 2017-08-14 12:04:36 -07:00
Gareth J. Greenaway
2a02d1c324 Updating inotify beacon & inotify beacon test to use list based configuration rather than dictionary based configuration 2017-08-14 12:04:36 -07:00
Gareth J. Greenaway
8f0a34e035 Adding unit test for haproxy beacon. Updating haproxy beacon to use list based configuration instead of dictionary based configurations 2017-08-14 12:04:36 -07:00
Gareth J. Greenaway
ebcdbfeb52 Shuffling things around in the haproxy module. Initially adding the unit test. 2017-08-14 12:04:36 -07:00
Gareth J. Greenaway
f3843ac789 Fixing validate in adb to check that the states parameter is an array/list. Updating glxinfo and glxinfo beacon tests to use configuration based on a list rather than a dictionary. 2017-08-14 12:04:36 -07:00
Gareth J. Greenaway
0b0ada65e3 Couple typos in the avahi and bonnjour beacons. Reworked the diskusage beacon to handle regex properly. Adding unit test for diskusage beacon. 2017-08-14 12:04:36 -07:00
Gareth J. Greenaway
cf1a4ff2d6 Fixing some typos in adb beacon, updating unit tests to reflect changes 2017-08-14 12:04:36 -07:00
rallytime
78e744bda4 Merge branch '2017.7' into 'develop'
Conflicts:
  - salt/client/mixins.py
  - salt/fileclient.py
  - salt/modules/status.py
  - tests/integration/states/test_npm.py
2017-08-14 14:21:17 -04:00
Nicole Thomas
c6ca7d639f Merge pull request #42889 from rallytime/merge-2017.7
[2017.7] Merge forward from 2016.11 to 2017.7
2017-08-14 10:16:19 -04:00
Adam Bolte
7848189ad4
Implement rbenv state module test mode checks
Fixes #42815 and updates unit tests.
2017-08-14 19:13:42 +10:00
Dmitry Kuzmenko
9fedf6012e Fixed 'test_valid_docs' test. 2017-08-14 10:54:16 +03:00
Gilbert Gilb's
3c136e3138 Add support for PostgreSQL password expiration. 2017-08-12 13:48:12 +02:00
rallytime
fb7117f2ac Use salt.utils.versions.LooseVersion instead of distutils 2017-08-11 16:31:24 -04:00
Erik Johnson
1764878754 Merge pull request #42883 from rallytime/fix-boto-tests
Fix failing boto tests
2017-08-11 15:29:11 -05:00
rallytime
29ff19c587 Merge branch '2016.11' into '2017.7'
Conflicts:
  - salt/config/__init__.py
  - salt/states/dockerng.py
  - salt/utils/cloud.py
2017-08-11 15:17:19 -04:00
Nicole Thomas
b21778efac Merge pull request #42885 from terminalmage/fix-f26-tests
Move weird tearDown test to an actual tearDown
2017-08-11 15:14:41 -04:00
rallytime
6a7bf99848 Lint fix: add missing space 2017-08-11 14:19:15 -04:00
Erik Johnson
462d653082 Move weird tearDown test to an actual tearDown
Also catch KeyError when user doesn't exist
2017-08-11 12:20:50 -05:00
Daniel Wallace
da3402a53d make sure cmd is not run when npm isn't installed
apparently the skipIf on the functions still get run, even if the function is
going to be skipped based on a skipIf on the class.
2017-08-11 10:58:00 -06:00
rallytime
43643227c6 Skip 2 failing tests in Python 3 due to upstream bugs 2017-08-11 12:57:39 -04:00