Commit Graph

29 Commits

Author SHA1 Message Date
Alexandru Bleotu
f811523e80 pylint 2017-09-22 14:35:14 -04:00
Alexandru Bleotu
d4d6ad99c2 Added tests for salt.utils.vmware.remove_dvportgroup 2017-09-22 14:31:48 -04:00
Alexandru Bleotu
d7474f8d30 Added tests for salt.utils.vmware.update_dvportgroup 2017-09-22 14:31:46 -04:00
Alexandru Bleotu
8a84f27adf Added tests for salt.utils.vmware.create_dvportgroup 2017-09-22 14:31:41 -04:00
Alexandru Bleotu
b8bc8fd581 Added tests for salt.utils.vmware.get_uplink_dvportgroup 2017-09-22 14:31:34 -04:00
Alexandru Bleotu
82f6ae3688 Added tests for salt.utils.vmware.get_dvportgroups 2017-09-22 14:31:29 -04:00
Alexandru Bleotu
aa247b43b8 Added tests for salt.utils.vmware.set_dvs_network_resource_management_enabled 2017-09-22 14:31:24 -04:00
Alexandru Bleotu
f211874462 Added tests for salt.utils.vmware.update_dvs 2017-09-22 14:31:19 -04:00
Alexandru Bleotu
d31d98c2d3 Added tests for salt.utils.vmware.create_dvs 2017-09-22 14:31:14 -04:00
Alexandru Bleotu
4f09bf5e88 Added tests for salt.utils.vmware.get_network_folder 2017-09-22 14:31:08 -04:00
Alexandru Bleotu
3584a91692 Added tests for salt.utils.vmware.get_dvss 2017-09-22 14:31:03 -04:00
Alexandru Bleotu
173a697be2 Added comments and imports for dvs functions in salt.utils.vmware 2017-09-22 14:31:01 -04:00
Alexandru Bleotu
a41b5072da more pylint 2017-09-20 13:40:36 -04:00
Alexandru Bleotu
8cdaf01642 pylint 2017-09-20 09:40:22 -04:00
Alexandru Bleotu
14deb25379 Added tests for salt.utils.vmware.assign_license 2017-09-20 06:28:51 -04:00
Alexandru Bleotu
e0ae5ecd83 Added tests for salt.utils.vmware.get_assigned_licenses 2017-09-20 06:28:47 -04:00
Alexandru Bleotu
ca33adcee7 Added tests for salt.utils.vmware.add_license 2017-09-20 06:28:44 -04:00
Alexandru Bleotu
e660af495b Added tests for salt.utils.vmware.get_licenses 2017-09-20 06:28:40 -04:00
Alexandru Bleotu
e844dbceeb Added tests for salt.utils.vmware.get_license_assignment_manager 2017-09-20 06:28:37 -04:00
Alexandru Bleotu
9f566fbe9c Added tests for salt.utils.vmware.get_license_manager 2017-09-20 06:28:33 -04:00
Alexandru Bleotu
643f38c98c Added tests for salt.utils.vmware.rename_datastore 2017-09-20 06:28:21 -04:00
Alexandru Bleotu
51e881e5cf Added tests for salt.utils.vmware.get_datastores 2017-09-20 06:28:18 -04:00
Alexandru Bleotu
457246a871 Added tests for salt.utils.vmware.get_storage_system 2017-09-20 06:28:14 -04:00
Alexandru Bleotu
d9d78fa35c Added missing decorators in utils.vmware tests 2017-09-14 12:47:55 -04:00
Alexandru Bleotu
caf9a0578b Added tests for utils.vmware.get_service_info 2017-09-14 12:47:53 -04:00
rallytime
78e744bda4 Merge branch '2017.7' into 'develop'
Conflicts:
  - salt/client/mixins.py
  - salt/fileclient.py
  - salt/modules/status.py
  - tests/integration/states/test_npm.py
2017-08-14 14:21:17 -04: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
Alexandru Bleotu
e783d6edd5 pylint 2017-07-18 06:44:34 -04:00
Alexandru Bleotu
c256eaef82 Renamed vmware_test folder to vmware to follow new naming standard 2017-07-17 13:12:34 -04:00