Commit Graph

35 Commits

Author SHA1 Message Date
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
c5b75d030a Update Nitrogen references to 2017.7.0 in doc/* 2017-06-14 11:36:06 -06:00
rallytime
9ff2694155 Merge branch '2016.11' into 'nitrogen'
Conflicts:
  - pkg/salt-minion.service
  - salt/modules/junos.py
  - salt/modules/localemod.py
  - salt/modules/win_system.py
  - salt/states/junos.py
  - tests/unit/modules/test_localemod.py
  - tests/unit/modules/test_win_powercfg.py
  - tests/unit/states/dockerng_test.py
2017-05-24 16:32:59 -06:00
Benjamin Drung
33a7f8b2ec Fix typos
lintian found several spelling errors.

Signed-off-by: Benjamin Drung <benjamin.drung@profitbricks.com>
2017-05-24 12:50:29 +02: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
rallytime
2f74dcf685 Various doc updates to fix warnings in doc build 2017-02-06 16:56:58 -07:00
rallytime
9ad362fbde Merge branch '2016.11' into 'develop'
Conflicts:
  - salt/states/kapacitor.py
2017-01-03 10:17:18 -05:00
twangboy
e96bfe8fa2 Change OSX/OS X to macOS where possible 2016-12-28 14:49:46 -07:00
rallytime
494a06bee2 Merge branch '2016.11' into 'develop'
Conflicts:
  - doc/ref/configuration/minion.rst
2016-12-20 10:03:44 -07:00
rallytime
23bce1c929 Remove ":doc:" references from all doc/topics/releases/* files 2016-12-15 16:45:51 -07:00
rallytime
4760455600 Merge branch '2016.11' into 'develop'
Conflicts:
  - salt/grains/core.py
  - salt/modules/dockerng.py
  - tests/unit/modules/linux_acl_test.py
2016-11-29 09:31:05 -07:00
Benjamin Drung
9a51ba5c5b Fix various spelling mistakes 2016-11-24 16:00:31 +01: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
Erik Johnson
b815c98577 Add note about yumpkg.check_db removal in Boron
Resolves #36292.
2016-09-15 15:30:07 -05:00
rallytime
fbaff3e98e Update 2016.3.0 release notes with repo.saltstack.com Xenial pkg availability
Refs #33870
2016-08-01 11:14:53 -06:00
Jacob Hammons
2cf787d4ba 2016.3.0 known issues update 2016-06-12 20:58:21 -06:00
Nicole Thomas
00e016ecfc Add note about Xenial packages to 2016.3.0 release notes (#33870)
Refs #32761
2016-06-09 10:52:16 -04:00
Justin Findlay
9b0eb858a6 add note and workaround to release notes 2016-05-31 11:24:27 -06:00
Jacob Hammons
a424c38f5d New doc site layout, 2016.3.0 release note known issue additions 2016-05-25 17:39:55 -06:00
Bruno Binet
d70e630f76 Add pillar.stack external pillar to 2016.3.0 release notes (#33265)
* Add pillar.stack external pillar to 2016.3.0 release notes

* Fix typos in pillar.stack doc
2016-05-16 07:17:51 -07:00
Mike Place
a1f286fc9b Move salt-ssh thin dir location to /var/tmp (#33130)
* Move salt-ssh thin dir location to /var/tmp

Closes #32771

* Remove performance penelty language
2016-05-10 07:36:03 -07:00
Thomas S Hatch
d81b82ed8b this blurb explains the syndic fixes, we should also have (#33022)
this blurb in the release notes for the next 2015.8 point release
2016-05-03 13:23:12 -06:00
C. R. Oldham
7abf8becaa Documentation updates that go with PR #32252. 2016-03-31 10:41:24 -06:00
David Boucha
b48d0c6b5b Fix spelling error 2016-03-29 11:16:18 -06:00
anthony-shaw
c0aa856946 Document what is in the Dimension Data Cloud support in SaltStack 2016.3 2016-03-22 11:14:26 +11:00
Mike Place
63133ebbb5 Add docs for master_tries
Refs #31794
2016-03-20 10:27:16 -06:00
Jacob Hammons
fd7f7bcddf Updated release notes
Added a shortcut to link to pull requests
Added doc entries for all new modules
removed the unnecessary :undoc-members: option from recent doc module entries
2016-03-14 16:34:22 -06:00
Jorge Schrauwen
9aa0f72cad Add some info about massive improvements for SmartOS, illumos, and Solaris 2016-03-03 20:23:38 +00:00
C. R. Oldham
1ce9d85dd4 Proxy minion release notes. 2016-03-02 11:26:56 -07:00
Thomas S Hatch
56634682b2 sp 2016-02-18 09:32:23 -07:00
Thomas S Hatch
3ab8d21927 Add Thorium docs 2016-02-18 09:17:27 -07:00
Mike Place
7d8c2de090 Merge pull request #31281 from rallytime/bp-31218-and-31246
Back-port #31218 and #31246 to 2016.3
2016-02-17 13:27:41 -07:00
Mike Place
6fe4a7dc8a Document new functionality for packaging external modules
Refs #31218
2016-02-17 12:15:43 -07:00
Jacob Hammons
4640e819c8 Release notes updated
Updates to doc build template
2016-02-16 19:54:49 -07:00
rallytime
a19f7799e0 Rename Boron release notes to 2016.3.0 2016-02-16 11:16:09 -07:00