Commit Graph

1391 Commits

Author SHA1 Message Date
Nicole Thomas
2a562243b6
Merge pull request #45541 from terminalmage/py3-tier1
[PY3] Add unicode_literals to high-priority modules/states
2018-01-24 16:54:24 -05:00
Nicole Thomas
66a38a1c61
Merge pull request #45601 from DSRCorporation/bugs/unicode_3
Salt Unicode Update 3rd tier 3rd bunch from DK
2018-01-24 16:32:29 -05:00
Dmitry Kuzmenko
8916b91aa8
Fixed unit tests. 2018-01-24 20:37:11 +03:00
Erik Johnson
9c86cd627a
[PY3] Add unicode_literals to high-priority modules/states 2018-01-24 10:33:58 -06:00
Nicole Thomas
fa373e658e
Merge pull request #45476 from rallytime/unicode-h
Add unicode_literals to modules, states, tests (H)
2018-01-24 09:15:40 -05:00
Nicole Thomas
d5cedf6d81
Merge pull request #45560 from rallytime/unicode-changes-1
Add unicode_literals to modules, states, and related tests
2018-01-24 09:13:58 -05:00
Nicole Thomas
189c133ebc
Merge branch 'oxygen' into bugs/unicode_3 2018-01-24 09:11:23 -05:00
Nicole Thomas
4423989ac8
Merge pull request #45587 from DSRCorporation/bugs/unicode_2
Salt Unicode Update 3rd tier 2nd bunch from DK
2018-01-23 17:08:59 -05:00
rallytime
637ec36739
Fix state unit tests for kernelpkg 2018-01-23 15:26:26 -05:00
rallytime
c08c67f3d4
Add unicode_literals to modules, states, and related tests 2018-01-23 15:26:25 -05:00
rallytime
a35cf9ca1e
Add unicode_literals to modules, states, tests (H) 2018-01-23 09:55:46 -05:00
Nicole Thomas
9facc5ede5
Merge pull request #45543 from terminalmage/py3-tier1-2
[PY3] Add unicode_literals to more high-priority states/modules
2018-01-23 09:38:21 -05:00
Nicole Thomas
a8dabbc150
Merge branch 'oxygen' into bugs/unicode_2 2018-01-23 07:56:21 -05:00
Nicole Thomas
2cf7a806bc
Merge pull request #45557 from DSRCorporation/bugs/unicode_1
Salt Unicode Update 3rd tier 1st bunch from DK
2018-01-23 07:48:11 -05:00
Nicole Thomas
af033f1c93
Merge pull request #45549 from rallytime/unicode-i
Add unicode_literals to modules, states, tests (I)
2018-01-22 14:40:11 -05:00
Erik Johnson
06ec8db7e2
[PY3] Add unicode_literals to more high-priority states/modules 2018-01-22 08:26:28 -06:00
Nicole Thomas
e9c7faa357
Merge pull request #45466 from rallytime/unicode-e
Add unicode_literals to modules, states, tests (E)
2018-01-22 08:57:30 -05:00
Dmitry Kuzmenko
9b09d1b2c9
Salt Unicode Update 3rd tier 3rd bunch from DK 2018-01-22 14:38:49 +03:00
Dmitry Kuzmenko
3ee328a28c
Salt Unicode Update 2018-01-22 14:38:24 +03:00
Dmitry Kuzmenko
06d3351f13
Salt Unicode Update 2018-01-22 14:38:01 +03:00
Erik Johnson
033f34ee21
Fix failing boto/network tests
These failures were recently introduced but went undiscovered due to
some recent instability in the test suite (which has now been fixed).

This commit fixes these failing tests.
2018-01-21 17:24:11 -06:00
rallytime
9effd08bb3
Add unicode_literals to modules, states, tests (I) 2018-01-21 09:27:14 -05:00
rallytime
4b47e8e75a
Add unicode_literals to modules, states, tests (E) 2018-01-21 09:25:58 -05:00
Erik Johnson
4ca7931655
[PY3] Update modules/states for PY3/Unicode compatibility (B)
This includes all the boto modules
2018-01-17 17:06:07 -06:00
Nicole Thomas
78ce60e4d4
Merge pull request #44977 from terminalmage/remove-more-explicit-unicode-literals
Remove more unnecessary explicit unicode literals
2018-01-14 07:55:29 -05:00
Erik Johnson
ce6fccde9c
[PY3] Add unicode_literals to states/modules (A) 2018-01-14 01:31:52 -06:00
Erik Johnson
b89efc16eb
Remove more unnecessary explicit unicode literals 2018-01-13 21:10:04 -06:00
Daniel Wallace
fdcf71a10c
fix test boto imports
Test boto imports are failing for some reason
2018-01-11 15:14:25 -07:00
Nicole Thomas
e402807cc0
Merge pull request #45332 from frogunder/fix_mac_archive_tests
fix test_archive tests for mac
2018-01-09 15:49:12 -05:00
Frode Gundersen
9edca8a6cf
fix test_archive tests for mac 2018-01-08 20:18:52 +00:00
rallytime
59076f5ee8
Merge branch '2017.7' into 'oxygen'
Conflicts:
  - salt/client/ssh/wrapper/state.py
  - salt/modules/yumpkg.py
2018-01-04 17:45:29 -05:00
Erik Johnson
002aa88a97
Replace yaml usage with a helper to ensure unicode is handled properly
Without allow_unicode=True, unicode characters are processed through the
str representer and on Python 2 are dumped as a Unicode code point (i.e.
a literal \u0414). This commit makes allow_unicode=True the default in
our salt.utils.yamlloader.safe_dump() helper. It also adds a new
salt.utils.yamlloader.dump() helper which wraps yaml.dump() and also
makes allow_unicode=True the default.

To make importing and using our custom yaml loader/dumper easier, a
convenience module called salt.utils.yaml has been added, which does a
wildcard import from both salt.utils.yamldumper and
salt.utils.yamlloader.

Refs to yaml.load/dump and yaml.safe_load/safe_dump have been updated to
salt.utils.yaml, to ensure that unicode is handled properly.
2018-01-03 14:14:21 -06:00
Daniel Wallace
fd6597a2b4
test directory that doesn't exist
sometimes /etc/grub.conf exists and is a symlink to /boot/grub/grub.conf, and
this won't do the right thing.
2017-12-29 10:19:24 -07:00
Adam Mendlik
29ef67bac2
Test pkg.uptodate with failed upgrades 2017-12-29 07:18:50 -07:00
Adam Mendlik
7c67ec39d9
Add tests for pkg.uptodate state 2017-12-29 07:18:49 -07:00
Erik Johnson
7b13a7df8b
Replace json module usage with a helper to ensure unicode content is handled properly
This adds wrappers for json.dump{,s} which disable `ensure_ascii` by
default.
2017-12-27 09:30:58 -06:00
Erik Johnson
8cdb9ea54f
[PY3] Add print_function import to files with unicode_literals already added
This makes the 2.x usage invalid syntax and forces the use of print as a
function. This adds the import to the files which I've updated in the
last couple of days but forgot to add it.
2017-12-15 12:14:18 -06:00
Nicole Thomas
653ad2a224
Merge pull request #44946 from terminalmage/unicode-file
[PY3] Update file state/execution modules and associated files with unicode_literals
2017-12-14 16:26:50 -05:00
Nicole Thomas
ae8dd2e202
Merge pull request #44982 from terminalmage/docker-unicode
[PY3] Add unicode_literals to docker state/execution modules
2017-12-14 11:03:15 -05:00
Erik Johnson
5e1f75aab0
[PY3] Add unicode_literals to docker state/execution modules 2017-12-13 22:49:23 -06:00
Erik Johnson
1bfc53fc57
Update file state/execution modules and associated files with unicode_literals
This updates the file state and execution modules to use
unicode_literals. Since the serializers and the cmd module are touched
by the file state/exec module, those are also updated here, as well as
the cmd state module, for good measure.

Additionally, I found that salt.utils.data.decode_dict (and decode_list)
are misnamed for what they actually do. Since they *encode* the
contents, the functions should be named encode_dict and encode_list,
respectively. And we also should have counterparts which actually
decode, so I've added them. The compatibility functions from salt.utils
still use the old "decode" names to preserve backward compatibility, but
they now invoke the renamed "encode" functions in salt.utils.data. Note
that this means that the compatibility functions
salt.utils.decode_dict/list, and their cognates in salt.utils.data now
do different things, but since the move to salt.utils.data is also
happening in the Oxygen release this is as good a time as any to correct
this oversight.

I've updated the jinja filter docs to include information on the renamed
jinja filters, and also added a section on jinja filter renaming to the
Oxygen release notes. There was another filter that I renamed during the
process of moving functions from salt.utils which I did not properly
document in the release notes, so this is now included along with the
others.
2017-12-13 16:43:45 -06:00
Erik Johnson
6d52aeb739
Replace os.walk with a helper function
On PY2, when os.walk is invoked with a str as input, the paths in the
return data are all str types as well. This leaves undecoded unicode
data in those strings when files/dirs under the top dir that was passed
contain unicode characters in the filename.

>>> import os
>>> list(os.walk('temp'))
[('temp', [], ['\xd0\x94.txt', 'foo.txt'])]
>>> list(os.walk(u'temp'))
[(u'temp', [], [u'\u0414.txt', u'foo.txt'])]

The helper introduced here ensures that we always invoke os.walk with a
unicode top-level dir, so that we get unicode types in the return data.
2017-12-13 16:38:12 -06:00
rallytime
08c71f13e4
Merge branch '2017.7' into 'oxygen'
Conflicts:
  - doc/ref/configuration/minion.rst
  - doc/topics/thorium/index.rst
  - salt/beacons/__init__.py
  - salt/client/mixins.py
  - salt/client/ssh/wrapper/state.py
  - salt/daemons/masterapi.py
  - salt/grains/extra.py
  - salt/minion.py
  - salt/modules/cron.py
  - salt/modules/file.py
  - salt/modules/mac_user.py
  - salt/modules/napalm_network.py
  - salt/modules/state.py
  - salt/modules/win_file.py
  - salt/modules/win_pkg.py
  - salt/proxy/dummy.py
  - salt/state.py
  - salt/states/file.py
  - salt/states/lxc.py
  - salt/utils/__init__.py
  - salt/utils/schedule.py
  - tests/integration/modules/test_file.py
  - tests/integration/modules/test_groupadd.py
  - tests/integration/ssh/test_state.py
  - tests/integration/states/test_file.py
  - tests/unit/daemons/test_masterapi.py
  - tests/unit/grains/test_core.py
  - tests/unit/modules/test_disk.py
  - tests/unit/modules/test_napalm_network.py
  - tests/unit/modules/test_state.py
  - tests/unit/test_minion.py
  - tests/unit/utils/test_process.py
2017-12-11 18:24:41 -05:00
rallytime
23c5a4ca3e
Merge branch '2016.11' into '2017.7'
Conflicts:
  - salt/modules/win_pkg.py
  - salt/states/file.py
  - tests/integration/states/test_file.py
  - tests/unit/states/test_file.py
2017-12-07 17:33:03 -05:00
Gareth J. Greenaway
01dc34cf91
Merge branch 'develop' into 44606_glusterfs_peered_self_detection 2017-12-07 13:43:11 -08:00
Nicole Thomas
53eee476ac
Merge pull request #44638 from terminalmage/new-docker-hotness
Many improvements to docker network and container states
2017-12-07 15:50:55 -05:00
Tom Williams
c03112dbb0
Merge branch 'develop' into infra5980 2017-12-06 14:48:03 -05:00
Tom Williams
93de11063a INFRA-5743 - carriage return... 2017-12-06 14:47:07 -05:00
Erik Johnson
64aa4fbbec
Many improvements to docker network and container states
Much Improved Support for Docker Networking
===========================================

The `docker_network.present` state has undergone a full rewrite, which
includes the following improvements:

Full API Support for Network Management
---------------------------------------

The improvements made to input handling in the
`docker_container.running` state for 2017.7.0 have now been expanded to
docker_network.present`.  This brings with it full support for all
tunable configuration arguments.

Custom Subnets
--------------

Custom subnets can now be configured. Both IPv4 and mixed IPv4/IPv6
networks are supported.

Network Configuration in :py:func:`docker_container.running` States
-------------------------------------------------------------------

It is now possible to configure static IPv4/IPv6 addresses, as well as
links and labels.

Improved Handling of Images from Custom Registries
==================================================

Rather than attempting to parse the tag from the passed image name, Salt
will now resolve that tag down to an image ID and use that ID instead.

Due to this change, there are some backward-incompatible changes to
image management. See below for a full list of these changes.

Backward-incompatible Changes to Docker Image Management
--------------------------------------------------------

Passing image names to the following functions must now be done using separate
`repository` and `tag` arguments:

- `docker.build`
- `docker.commit`
- `docker.import`
- `docker.load`
- `docker.tag`
- `docker.sls_build`

Additionally, the `tag` argument must now be explicitly passed to the
`docker_image.present` state, unless the image is being pulled from a
docker registry.
2017-12-06 12:12:25 -06:00
Tom Williams
ef414cb2f2 INFRA-5980 - fix other unit test :) 2017-12-05 17:24:25 -05:00