Fixes an issue in win_groupadd where an unmapped account would throw a
double stacktrace. One for the error and another when it tried to look
up the error code to get the message. Since pywintypes.com_error returns
a good text string, we'll just use that instead of trying to look it up
again.
This code is being covered by an existing test.
This was broken because a normalize_name function was added to aptpkg,
which was incorrectly written. The pkg states use this function, if
present, to figure out whether or not the package architecture needs to
be stripped from the package name. However, this recently-added function
was *always* stripping the architecture, causing 32-bit suffixes to be
stripped.
This commit fixes the incorrect implementation of normalize_name and
adds a unit test.
When a process ends between the start of the function and the end, a
psutil.NoSuchProcess exception will be raised if you try to invoke
member functions of a psutil.Process object for that PID.
This fixes two problems:
1. Poorly-designed handling of unpacking selective items from a
`psutil.Process` instance, leading to ValueError. This is fixed by
slicing.
2. `psutil.Process` objects are not sortable on Python 3. Fixed by using
a key lambda to sort on the `pid` attribute.
The issue with different behavior between Python 2 and 3 was fixed in
ffdae27877 around the same time the
original PR was opened. There is no need to restrict this code
exclusively to Python 3.
* Merged junos-specific changes on 2019.2
* Merged junos-specific changes on 2019.2
* Fixes FileNotFound exception with invalid dest option in junos.cli
* Fixed documentation for junos.diff
* Fixed improper handling of dest and format options in rpc modules
* Implement exception handling around XML filter parsing
* Porting fix from develop to 2019.2
* Fixed documentation
* Fixed documentation
* Fixed rollback docstring: CLI example
* Implemented exception handling around template rendering in junos.load
* Implemented exception handling around template rendering in junos.install_config
* Fixes broken state module junos.diff
* Fixes broken state module junos.rollback
* Fixes broken state module junos.rpc
* Adds documentation about zeroize functionality for non-root user
* Adds error message for install_config in case invalid mode provided
* Handle LockError case in install_config gracefully
* Replace string concatenation with format
* Revert replacing cli command with rpc: junos.zeroize
* Support dynamic config mode
* Changed CLI example to conform with new rpc module definition
* Added exception handling for invalid image path for install_os module
* Extended load() support to config_action:merge, to match PyEZ capabilities
* Added check to allow only 1 config_action in load()
* Fixed reboot=True scenario for install_os
* Added comments to explain the behaviour in reboot scenario
* Added new option all_re. Updated documentation
* Fixed#117
* Temporary fix for #117
* Modified as per review comments
* Fixes junos.load template case
* Fixed test cases in 2019.2 branch
* Update junos_syslog.py
* Use cache_file instead of get_file
* Revert "Use cache_file instead of get_file"
This reverts commit b679c068de.
* Revert "Use cache_file instead of get_file"
This reverts commit b679c068de.
* added new testcases
* code changes as per review comment by @twangboy
* code changes as per review comment by @twangboy
* fix lint warnings as per saltpylint
* fix pylint, pydoc, and test failures due to junos-eznc version
* Revert "fix pylint, pydoc, and test failures due to junos-eznc version"
This reverts commit 430d5bdb9b.
* Revert "Revert "fix pylint, pydoc, and test failures due to junos-eznc version""
This reverts commit 4e69ce76e3.
* Revert "fix pylint, pydoc, and test failures due to junos-eznc version"
This reverts commit 430d5bdb9b.
* working on fixing comments from saltstack unit runs
* fix: salt.states.junos.rst:20:Pygments lexer name 'set' is not known
* fix as per comment from @dmurphy18 and pre-commit changes
* import line changes as per pre-commit
* changes as per comment from salt team regarding interface syntax
* changes as per comment from salt team regarding interface syntax
* when called from junos.rpc from test, dest is intacct
* pre-commit checks for darwin
* pre-commit check for linux onf py 3.8 and 3.9
Co-authored-by: rsmekala <rsmekala@juniper.net>
Co-authored-by: Nitin Kr <nitinkr@juniper.net>
Co-authored-by: Nitin Kr <nitin.nitp@gmail.com>
Co-authored-by: Shane Lee <slee@saltstack.com>
Co-authored-by: Sage the Rage <36676171+sagetherage@users.noreply.github.com>
Co-authored-by: David Murphy <dmurphy@saltstack.com>
* add cmd state features to state.py
also dry git state
* dry docker_container
* update docker test
* correct integration test
* clarity improvement
* lint and test fixes
* correct test
* global req updates
* doc update
* doc updates
* remove unused mac requisite implementation
* other macpackage cleanup
* handle missing user in runas
* add test cases unless/onlyif exception handling
* fix macpackage tests
* fix typo