the field separator on OpenBSD and NetBSD is '=', not ':'.
verified on OpenBSD, assuming this now works on NetBSD based on
upstream documentation for sysctl(8)
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.
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.
The runner was not connecting the client event listener to the event
bus. This meant that all events between the `client.run_job()` and when
`client.get_cli_event_returns()` began polling for events would be lost.
Before `get_cli_event_returns` (via LocalClient's `get_iter_returns`)
gets around to polling for events, it first checks to see if the job
cache has a record of the jid it's querying. When using a custom
returner for the job_cache, one which has even a little bit of latency,
return events from minions may sneak past before the jid lookup is
complete, meaning that `get_iter_returns` will not return them and the
manage runner will assume the minion did not respond.
Connecting to the event bus before we run the test.ping ensures that we
do not miss any of these events.