Commit Graph

16 Commits

Author SHA1 Message Date
Daniel Wallace
3bae894306
digitalocean should be one word.
Everything on their webpage is a reference to DigitalOcean
2017-09-19 12:47:16 -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
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
Denys Havrysh
f7beeb69f2 Correct Salt Cloud documentation about updating Salt Bootstrap script 2016-02-27 22:43:07 +02:00
Jacob Hammons
d8d5045d3b Updates to cloud docs for the provider > driver change in provider configs.
Refs #24797
2015-08-10 09:20:26 -06:00
C. R. Oldham
f171df4311 Merge forward 2015.2->develop 2015-03-01 19:54:22 -07:00
Thomas Jackson
8b635fe07d Comma Cleanup 2014-12-12 11:32:16 -08:00
Thomas Jackson
498a612078 Whitespace cleanup
Conflicts:
	doc/topics/cloud/linode.rst
	doc/topics/cloud/misc.rst
	doc/topics/cloud/parallels.rst
	doc/topics/cloud/proxmox.rst

Conflicts:
	doc/topics/development/architecture.rst
	doc/topics/development/translating.rst
2014-12-11 07:53:19 -08:00
rallytime
0f4f68eddf Add --list-providers and --list-profiles to cloud docs 2014-08-26 00:18:57 -06:00
Kamal Nasser
825bb191bf Replace all occurrences of "Digital Ocean" with "DigitalOcean" 2014-08-08 22:16:37 +03:00
Chris Rebert
8af229253f more copyediting 2014-04-30 13:55:48 -07:00
Mike Place
a485eceac9 Fix all broken links in docs. Ignore certain known-good links. Adjust many links that are returning 301.
Conflicts:
	doc/topics/installation/index.rst
2014-02-20 16:16:59 -07:00
Joseph Hall
e060354e02 Update docs for list_nodes_select() 2013-12-15 09:40:03 -07:00
Joseph Hall
750a28f5ef Minor typo fixes 2013-12-13 07:50:46 -07:00
Joseph Hall
a1a9281417 Add more detail on writing new cloud modules 2013-12-12 23:20:20 -07:00
Seth House
e4f638e6d7 Moved salt-cloud documentation into main docs dir 2013-11-08 14:08:36 -07:00