Commit graph

107928 commits

Author SHA1 Message Date
Joe Eacott
7d90120182 fix pre-commit 2020-05-06 16:55:15 -07:00
ch3ll
426ee2c342 fix slow test skipifs 2020-05-06 16:55:15 -07:00
Austin Papp
1ed375b58a inline return 2020-05-06 16:55:15 -07:00
Austin Papp
df02e9aa1e pop pid 2020-05-06 16:55:15 -07:00
Austin Papp
be94d6ad2e lint 2020-05-06 16:55:15 -07:00
Austin Papp
4af99d8969 updated tests 2020-05-06 16:55:15 -07:00
Austin Papp
f6bd687819 Return active running jobs on the master
* salt/runner.py::_run_runner was always returning {retcode: 70}. removed the else logic
* fixed some tests
2020-05-06 16:55:15 -07:00
twangboy
4cb03eec2d Fix pre-commit 2020-05-06 16:49:57 -07:00
twangboy
285552fac5 Add tests 2020-05-06 16:49:57 -07:00
twangboy
b923118b1b Fix win_wua state 2020-05-06 16:49:57 -07:00
twangboy
bdf7316ca3 Black 2020-05-06 16:49:57 -07:00
twangboy
047fdc92a8 Revert changes to win_update 2020-05-06 16:49:57 -07:00
twangboy
c3ce07355f Skip Capability SIDs, don't stack trace 2020-05-06 16:49:57 -07:00
Pedro Algarvio
e4c3777faf enum34 is no longer a requirement now that Sodium is Py >= 3.5
Fixes #56603
2020-05-06 15:44:01 -07:00
Pedro Algarvio
4ee43eb7ce Reduce code duplication(complication) 2020-05-06 13:51:43 -07:00
Pedro Algarvio
dd951758e8 Implement change_cwd context manager and use it. 2020-05-06 13:51:43 -07:00
Pedro Algarvio
b6c78ecba6 Don't use run_function just to get grains to skip tests. Skip markers. 2020-05-06 09:08:12 -07:00
Pedro Algarvio
d916ce0b0b Set codecov's status setting to false 2020-05-06 00:21:37 -07:00
Pedro Algarvio
09671d707e Another stab before giving up 2020-05-06 00:21:37 -07:00
Jerzy Drozdz
20c7d3a9ea
Merge branch 'master' into master-x509_fixes 2020-05-06 07:34:20 +02:00
Markus Kramer
6786093ed4 Reverted change for testing 2020-05-05 17:30:15 -07:00
Markus Kramer
390bd1cee4 Uninstall msi-installed salt 2020-05-05 17:30:15 -07:00
twangboy
52a38848f2 Put windows deps in win_req.txt 2020-05-05 14:29:45 -07:00
Charles McMarrow
9875424a9e Update req_win.txt 2020-05-05 14:29:45 -07:00
Charles McMarrow
99f3097bf2 Update req.txt 2020-05-05 14:29:45 -07:00
twangboy
dc4e8dc8a9 Update to python 3.7 - Remove Py2 2020-05-05 14:29:45 -07:00
Mike Place
f52a2f2490 Describe SEPs 2020-05-05 11:21:43 -07:00
Mike Place
120963878f Update hardening doc to mention 4505/4506 2020-05-05 11:21:43 -07:00
Mike Place
a42c776d36 Add link to salt-announce to documentation 2020-05-05 11:21:43 -07:00
David Murphy
21f3c11cbc Black fixes 2020-05-05 08:55:54 -07:00
David Murphy
1e311c2da4 Allow for number of open files on AIX in logging 2020-05-05 08:55:54 -07:00
Erik Johnson
1782743bed Make sure string-based non-matches return default 2020-05-04 01:36:09 -07:00
Erik Johnson
22d3087e6b Fix matching of integer keys in nested subdicts 2020-05-04 01:36:09 -07:00
Derek Ardolf
5a73ef699f
Various Link Redirect and HTTP/HTTPS Fixes in docs (#56655)
* Fixing various redirected links

* Change links to https

* Reintroduced macro link reference

* Change man page to original at master; revert added line
2020-05-04 01:28:38 -07:00
Erik Johnson
3deb61c5ec Skip on windows/mac
Windows doesn't use GIDs, and mac has extra groups that are always
present, making specfiying "groups" problematic.
2020-05-04 01:25:31 -07:00
Erik Johnson
f83663c3c0 Ensure that changes are made in predicable order 2020-05-04 01:25:31 -07:00
Erik Johnson
fd8ed64b17 Fix user.present detecting primary group being moved to "groups" arg 2020-05-04 01:25:31 -07:00
Pedro Algarvio
84421e884b Compile static requirements 2020-05-04 01:19:18 -07:00
twangboy
628b15d686 Roll back Python 3.7 changes 2020-05-04 01:19:18 -07:00
twangboy
1447fb595e Add distro to req.txt 2020-05-04 01:19:18 -07:00
twangboy
a3cb026164 Add removal of Python Launcher 2020-05-04 01:19:18 -07:00
twangboy
73e18a9096 Update to python 3.7 - Remove Py2 2020-05-04 01:19:18 -07:00
Daniel A. Wozniak
c0078a5870 Blacken changed files 2020-05-04 01:18:12 -07:00
Gareth J. Greenaway
5133f0d4b9 Adding a test for __skip_source 2020-05-04 01:18:12 -07:00
Bo Maryniuk
7c70497eeb Decide if the source should be actually skipped 2020-05-04 01:18:12 -07:00
Joe Eacott
c6638f7229
Add method to remove circular references in data objects and add test (#54930)
* Add method to remove circular references in data objects and add test

* remove trailing whitespace

* Blacken changed files

Co-authored-by: xeacott <jeacott@saltstack.com>
Co-authored-by: Frode Gundersen <fgundersen@saltstack.com>
Co-authored-by: Daniel A. Wozniak <dwozniak@saltstack.com>
2020-05-04 01:17:09 -07:00
David Hilton
1c7ce9d793
merge nxos-specific work from develop into master. (#54931)
* Combine proxy and native minion workflows for NXOS

 - Normalize SSH and NX-API proxy minion workflows
 - Add NX-API over unix domain socket support for native minions

* Fix typo

* Fix states correct_roles bug

* Add comment clarification for nxos states

* Fix lint issues

* Address python3 incompatibility

* Fix additional lint issues

* Disable pylint W1699 warning

* Use new style class syntax

* Correct typo

* Fix nxos grains

* Pass data to grains function

* Return nxos grains key

* Protect nxos grain with proper __virtual__() check

The changes in PR #49676 made the following stacktrace occur when running
on a system that doesn't have the proper NXOS/NXAPIClient settings exposed:

```
[CRITICAL] Failed to load grains defined in grain file nxos.system_information in function <function system_information at 0x3aeb758>, error:
Traceback (most recent call last):
  File "/testing/salt/loader.py", line 773, in grains
    ret = funcs[key](**kwargs)
  File "/testing/salt/grains/nxos.py", line 36, in system_information
    data = salt.utils.nxos.version_info()
  File "/testing/salt/utils/nxos.py", line 318, in version_info
    client = NxapiClient()
  File "/testing/salt/utils/nxos.py", line 78, in __init__
    raise RuntimeError("No host specified and no UDS found at {0}\n".format(self.NXAPI_UDS))
RuntimeError: No host specified and no UDS found at /tmp/nginx_local/nginx_1_be_nxapi.sock

local:
    True
```

We need to protect the grains from loading when the settings are missing.

* Initial nxos_upgrade changes

* Revert "Initial nxos_upgrade changes"

This reverts commit e17ca19fbc.

* New NX-OS salt minion install doc

* Add guestshell sync information

* Initial nxos_upgrade changes

* Initial nxos_upgrade changes

* Revert "Initial nxos_upgrade changes"

This reverts commit e17ca19fbc.

* Revert "Initial nxos_upgrade changes"

This reverts commit e17ca19fbc.

* Add nxos to index.rst

* New nxos_upgrade execution and state modules

* Added NXOS UT support - initially for nxos_upgrade.py

* Resolved one pylint 'old class style' issue.  Excluding 'nxos' sub-directory under tests/unit/modules

* Add __init__.py file to treat directory as a package directory.

* Addressed PR comments.

* Removed pylint disable-msg that was only applicable to python 3+

* Document NAPALM installation inside Guestshell

Adding step-by-step guide to install NAPALM inside of the NXOS Guestshell.

* show and sendline method fixes

* Update doc for starting minion in nxos GuestShell

* Revert show method changes

* Revert sendline method doc changes

* Resolve lint errors

* Remove nxos guestshell napalm references

This work is delayed so removing the references

* Address review comments

* Address salt style guide comment

* Doc and module updates

* Initial nxos module and proxy unit tests

* Additional nxos module and proxy unit tests

* Add nxos state unit tests

* Add tests for replace function

* Bug fixes

* Fix test_check_password_password_encrypted_false test

* Add test_config_nxos_error_ssh test

* remove opts modification in init

* reduce scope of variable to function where it's used

* minor nxos cleanup - raise instead of exit, use named kwargs

* use create_autospec in place of raw mocks

* _init_ssh's raise is now caught by ping

* allow gen_hash to work on any system

* change no_save_config option to save_config

* update set_password to work with updated gen_hash

* passing an invalid algorithm to pycrypto.hash raises

* blacken nxos-related files

* _fallback_gen_hash also works without a password

* remove debugging line, improve error message

* lint and black

* nxos docfix

* remove unused variable

* Review comments addressed

* mark old nxos functions as deprecated

* black

* remove unused variables

* clean up arguments

* simplify save_config logic

* minor doc cleanup

* make sendline with a list of commands reliably work

* Update various doc index files for nxos_upgrade

* Fix a few bugs in nxos proxy and execution modules

* doc indent fix

Co-authored-by: mikewiebe <mwiebe@cisco.com>
Co-authored-by: rallytime <nicole@saltstack.com>
Co-authored-by: Thomas Stoner <tmstoner@cisco.com>
Co-authored-by: tstoner <33665760+tstoner@users.noreply.github.com>
Co-authored-by: Chris Van Heuveln <cvanheuv@cisco.com>
2020-05-04 01:13:07 -07:00
Erik Johnson
2b22bd0c26 Fix formatting in test state docs
The current state of the docs, due to incorrectly-formatted RST, puts
the recently-added ``warnings`` argument for the
``configurable_test_state`` function in a "Warning" block. This fixes
that, and also moves some ``versionadded``/``versionchanged`` blocks to
conform with common usage elsewhere in the salt docs.

This also fixes some incorrect capitalization in error messages, and
incorrect usage of single-backtick (should be double-backtick).

Finally, a minor tweak to ``configurable_test_state``: The "random"
functionality is now case-insensitive.
2020-05-03 21:18:50 -07:00
Erik Johnson
f5aa68375c Fix traceback on win_system module import
unicode_literals does not play nicely with `\u` or `\U`.
2020-05-03 21:17:47 -07:00
Tyler Johnson
1340126b9e Revert "Don't fail if cleanup happens in the teardown"
This reverts commit b77a99bd3c.
2020-05-01 06:42:09 -07:00