Commit Graph

47 Commits

Author SHA1 Message Date
Benjamin Drung
3d37eca847 Fix various spelling mistakes
lintian found various spelling mistakes.

Signed-off-by: Benjamin Drung <benjamin.drung@profitbricks.com>
2018-03-08 19:14:42 +01:00
rallytime
776f2ea5d7
Merge branch '2018.3.0rc1' into '2018.3'
Conflicts:
  - salt/pillar/file_tree.py
  - tests/unit/modules/test_yumpkg.py
2018-02-26 11:01:42 -05:00
rallytime
79bed6cff1
Merge branch '2017.7' into '2018.3'
Conflicts:
  - salt/modules/cmdmod.py
  - salt/modules/reg.py
  - salt/modules/win_lgpo.py
  - salt/modules/win_path.py
  - salt/modules/win_pkg.py
  - salt/pillar/file_tree.py
  - salt/states/boto3_route53.py
  - salt/states/reg.py
  - salt/utils/win_functions.py
  - tests/unit/modules/test_kubernetes.py
  - tests/unit/modules/test_win_path.py
2018-02-23 09:50:19 -05:00
Erik Johnson
1668a489c4
Update refrences to Oxygen codename to 2018.3.0 2018-02-21 21:47:41 -06:00
Ch3LL
2a5d855d97
add required arg to dns_check jinja doc example 2018-02-16 10:48:57 -05:00
Nicole Thomas
04a2ea8cd1
Merge pull request #45019 from rallytime/merge-oxygen
[oxygen] Merge forward from 2017.7 to oxygen
2017-12-16 08:16:57 -05:00
rallytime
3e319d50b3
Merge branch '2017.7' into 'oxygen'
Conflicts:
  - README.rst
  - salt/modules/win_pkg.py
  - salt/utils/process.py
2017-12-14 13:01:29 -05:00
Erik Johnson
c3332c857f
Clarify jinja filter documentation 2017-12-13 16:43:45 -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
mvivaldi
d23ac4eabc Fix for the jinja documentation 2017-12-12 17:35:46 +01: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
mvivaldi
62409d608a Added Escape Filters and Set Theory Filters in jinja documentation 2017-12-09 09:48:55 +01:00
Daniel Wallace
41c086faf7
convert jinja context to dictionary
For `show_full_context`, it is useful to have this as a serializable dictionary so that it can be dumped and actually parsed using

`{{show_full_context|yaml(False)}}`
2017-10-11 10:24:34 -06:00
Erik Johnson
3184168365 Use explicit unicode strings + break up salt.utils
This PR is part of what will be an ongoing effort to use explicit
unicode strings in Salt. Because Python 3 does not suport Python 2's raw
unicode string syntax (i.e. `ur'\d+'`), we must use
`salt.utils.locales.sdecode()` to ensure that the raw string is unicode.
However, because of how `salt/utils/__init__.py` has evolved into the
hulking monstrosity it is today, this means importing a large module in
places where it is not needed, which could negatively impact
performance. For this reason, this PR also breaks out some of the
functions from `salt/utils/__init__.py` into new/existing modules under
`salt/utils/`. The long term goal will be that the modules within this
directory do not depend on importing `salt.utils`.

A summary of the changes in this PR is as follows:

* Moves the following functions from `salt.utils` to new locations
  (including a deprecation warning if invoked from `salt.utils`):
  `to_bytes`, `to_str`, `to_unicode`, `str_to_num`, `is_quoted`,
  `dequote`, `is_hex`, `is_bin_str`, `rand_string`,
  `contains_whitespace`, `clean_kwargs`, `invalid_kwargs`, `which`,
  `which_bin`, `path_join`, `shlex_split`, `rand_str`, `is_windows`,
  `is_proxy`, `is_linux`, `is_darwin`, `is_sunos`, `is_smartos`,
  `is_smartos_globalzone`, `is_smartos_zone`, `is_freebsd`, `is_netbsd`,
  `is_openbsd`, `is_aix`
* Moves the functions already deprecated by @rallytime to the bottom of
  `salt/utils/__init__.py` for better organization, so we can keep the
  deprecated ones separate from the ones yet to be deprecated as we
  continue to break up `salt.utils`
* Updates `salt/*.py` and all files under `salt/client/` to use explicit
  unicode string literals.
* Gets rid of implicit imports of `salt.utils` (e.g. `from salt.utils
  import foo` becomes `import salt.utils.foo as foo`).
* Renames the `test.rand_str` function to `test.random_hash` to more
  accurately reflect what it does
* Modifies `salt.utils.stringutils.random()` (née `salt.utils.rand_string()`)
  such that it returns a string matching the passed size. Previously
  this function would get `size` bytes from `os.urandom()`,
  base64-encode it, and return the result, which would in most cases not
  be equal to the passed size.
2017-08-08 13:33:43 -05:00
rallytime
1f0b90aa57 Merge branch '2017.7' into 'develop'
Conflicts:
  - salt/cloud/clouds/joyent.py
  - salt/engines/slack.py
2017-07-26 17:51:36 -06:00
Nicole Thomas
994d3dc74a Merge pull request #42454 from terminalmage/jinja-docs-2017.7
Document future renaming of new rand_str jinja filter
2017-07-21 12:47:50 -06:00
Erik Johnson
98b661406e Document future renaming of new rand_str jinja filter
The name and the documentation for this filter are entirely inaccurate
for what it actually does. It will be renamed in the Oxygen release.
2017-07-21 09:21:38 -05:00
Mike Place
7419e82cb2 Merge pull request #42362 from rallytime/merge-develop
[develop] Merge forward from 2017.7 to develop
2017-07-19 10:56:15 -05:00
Nicole Thomas
ba799b2831 Merge pull request #42179 from rallytime/fix-42151
Fix some documentation issues found in jinja filters doc topic
2017-07-18 12:01:56 -06:00
Nathan Grennan
4985e68f61 Update index.rst 2017-07-18 10:38:17 -07:00
rallytime
f59ecb7ffe Merge branch '2017.7' into 'develop'
Conflicts:
  - salt/executors/sudo.py
2017-07-18 08:57:55 -06:00
Nathan Grennan
0bfc1a2fb2 Document use of python methods in jinja 2017-07-17 12:24:41 -07:00
rallytime
798d29276e Add note about "to_bytes" jinja filter issues when using yaml_jinja renderer 2017-07-07 15:14:06 -06:00
rallytime
b8bcc0d599 Add note to various network_hosts docs about long_run for IPv6 networks 2017-07-06 17:36:18 -06:00
rallytime
1bbff572ab Fix some documentation issues found in jinja filters doc topic
These doc issues were all found in issue #42151. This commit takes
care of all of the issues presented in #42151 except for the last
task.
2017-07-06 11:46:23 -06:00
Alexandru Bleotu
23f963f946 Added Errors section to jinja doc 2017-07-04 16:10:52 +01:00
Alexandru Bleotu
e42d1172a8 Added Tests section in JINJA documentation 2017-06-19 17:15:23 +01:00
rallytime
c5b75d030a Update Nitrogen references to 2017.7.0 in doc/* 2017-06-14 11:36:06 -06:00
Mircea Ulinic
406e582479 Small adjustment 2017-06-06 15:14:47 +00:00
Mircea Ulinic
62cb2a1c7a More jinja references 2017-06-06 15:05:50 +00:00
Mircea Ulinic
bba8c27873 Restructure the Jinja topic to have refrences 2017-06-06 14:56:21 +00:00
rallytime
caebd5d8cf Merge branch '2016.11' into 'develop'
Conflicts:
  - doc/topics/targeting/nodegroups.rst
  - salt/runners/manage.py
2017-03-16 17:23:57 -06:00
rallytime
72d16c9fa9 Update "yaml" code-block references with "jinja" where needed
There are many `.. code-block: yaml` definitions that should really
be `.. code-block: jinja` definitions. This commit cleans up some
of those and removes warnings like these from the doc build:

```
WARNING: Could not lex literal_block as "yaml". Highlighting skipped.
```
2017-03-15 10:22:19 -06:00
rallytime
609e6e4b23 Merge branch '2016.11' into 'develop'
Conflicts:
  - salt/config/__init__.py
  - salt/modules/win_lgpo.py
  - salt/utils/aws.py
  - tests/unit/utils/schema_test.py
2017-02-09 10:29:40 -07:00
Mike Place
d5d39321c8 Merge pull request #37808 from cloudflare/JINJA-FILTERS
Jinja filters
2017-02-07 14:52:23 -07:00
rallytime
2f74dcf685 Various doc updates to fix warnings in doc build 2017-02-06 16:56:58 -07:00
Mircea Ulinic
06c8899e20 do instead of set 2017-02-01 23:11:56 +00:00
Mircea Ulinic
60b6caa502 Jinja topic doc: logs subsection 2017-02-01 23:11:56 +00:00
Mircea Ulinic
c6078a751d Custom Jinja filters paragraph 2017-01-18 15:01:05 +00:00
Mircea Ulinic
3ccda08439 More doc for Jinja util filters
Fix indent
2017-01-18 15:01:05 +00:00
Mircea Ulinic
d743aff755 Document util filters 2017-01-18 15:01:05 +00:00
rallytime
494a06bee2 Merge branch '2016.11' into 'develop'
Conflicts:
  - doc/ref/configuration/minion.rst
2016-12-20 10:03:44 -07:00
rallytime
4aafa41d22 Remove ":doc:" references from a bunch of doc/* files 2016-12-15 16:09:27 -07:00
Eric Radman
3f2e13d1fc Remove repeated words in docs (#37871)
Found using

find . -name '*.rst' | xargs igor -R -r
2016-11-23 14:53:17 -07:00
David Wittman
9cfdb11fe1 Typo fix in Jinja docs
s/again grains/against grains/
2016-10-05 18:14:56 -05:00
Jacob Hammons
a4b67fd1e9 Updated latest release to 2016.3.1
Clean up installation instructions
code-block type updates
Add link to jinja tutorial
2016-06-15 11:52:02 -06:00
Jacob Hammons
887a415138 Adds new Understanding Jinja topic, and fixes several Jinja doc issues.
Removes the "Full list of builtin ..." from each module reference list, leaving just the module type for scanability.

Refs #12470
Refs #10206
Refs #10480
Refs #23522
Refs #33023
2016-06-13 18:30:42 -06:00