Commit graph

3124 commits

Author SHA1 Message Date
Michael "M3" Lasevich
8515ba5faa Typos Identified in #58238 2020-10-19 14:51:33 -07:00
Pedro Algarvio
b427688048 Start checking rst files at pre-commit level with rstcheck
Additionally, fixed most of the errors reported by rstcheck.

Fixes https://github.com/saltstack/salt/issues/58668
2020-10-13 13:53:16 -07:00
mlasevich
c35b43d9f0
Cleanup calculation of template sls/tpl context (#58238)
* Cleanup calculation of template sls/tpl context

Fixes #56410

* fix string formatting

* Add unit test that works against old version (with bugs)

* Updated unit tests with non-buggy values and fix found bugs

* cleanup unit tests to test underlying function

* remove old unit test components no longer used

* Cleanup

* More Cleanup

* More cleanup. Add Mock to test.support.unit

* Add changelog entries

* Fix Mockery

* Import order fix

* Handle backslashes in sls names under *nix

* Cleanup

* Make sure we return a dictionary from jinja.load_map

* Fix scenario when sls is empty but present

* Touched another file - Cleanup to make pre-commit happy

* Adding variables to docs

* Fix expected tplpath value to be OS specific and note so in docs

* removing comments from imports as per pre-commit

* removing comments from imports as per pre-commit

* Put slsvars changes behind a feature flag

* Better documentation for enable_slsvars_fixes feature flag

* Fix test that should be skipped on windows

Co-authored-by: Michael "M3" Lasevich <Michael.Lasevich@bhnetwork.com>
Co-authored-by: Sage the Rage <36676171+sagetherage@users.noreply.github.com>
Co-authored-by: Daniel A. Wozniak <dwozniak@saltstack.com>
Co-authored-by: Shane Lee <slee@saltstack.com>
2020-10-08 07:18:08 -07:00
Tyler Johnson
f909cb5aaa States can have sub state returns 2020-10-07 13:23:32 -07:00
Jeremy Willden
2237cf2c60
Corrected a section title (#58151)
Co-authored-by: Daniel Wozniak <dwozniak@saltstack.com>
2020-10-02 02:49:37 -07:00
krionbsd
fb75bd70b4 Fix typo 2020-09-24 20:33:25 +02:00
piterpunk
77f337c5a0 Fixed underlines in RST file 2020-09-23 13:04:45 -07:00
piterpunk
cba1ad3206 Added unit tests to slackware_service.py module
- Added tests/init/modules/test_slackware_service.py
- Fixed the permission mask on slackware_service.py
- Added slackware_service in index.rst
2020-09-23 13:04:45 -07:00
piterpunk
9af3ce6a93 Initial support to manage services in Slackware
- Added slackware_service.py module to handle the Slackware rc-scripts
- Added Slackware in the list to not use the linux_service.py
2020-09-23 13:04:45 -07:00
Varjitt Jeeva
c6428ecff0 Fix Docs: Salt 3000 onlyif targeting with grains cannot have a space in function query 2020-09-08 17:51:11 -07:00
Christian McHugh
ae206709b5 allow result parsing in unless/onlyif 2020-09-08 13:25:36 -07:00
Charles Kenney
00af98a23f exclude LinodeAPI class members from docs 2020-09-08 08:13:06 -07:00
piterpunk
c521f72d49 Added salt.grains.lvm to index.rst 2020-08-24 15:08:11 -07:00
piterpunk
deb2a310b0 Added "lvm" grain to list the LVM volumes
- LVM is an important information about a Linux machine.
  Usually Linux servers have most or all their disk
  filesystems using a logical volume as mountpoint.
- This initial support implements a grain called "lvm"
  which returns a dictionary with the volume groups, each
  one with a list of their logical volumes inside:

      VolumeGroup00:
          - LogicalVolume00
          - LogicalVolume01
          - ...
          - LogicalVolumeNN
      VolumeGroup01:
      ...
      VolumeGroupNN:
          - LogicalVolume00
          - LogicalVolume01
          - ...
          - LogicalVolumeNN
2020-08-24 15:08:11 -07:00
Tyler Johnson
4684a0b585 added idem exec and state modules 2020-08-12 13:55:34 -07:00
Gareth J. Greenaway
7db68aa780 Disable fqdns grain for proxy minions 2020-07-29 11:22:16 -07:00
twangboy
bbca033e89 Add review suggestions 2020-07-14 15:12:06 -07:00
twangboy
a7426b7f2d Update docs for winrepo
Organize the document
Provide additional examples
Clear out all the Legacy stuff and put it at the end as it just muddled
things up
2020-07-14 15:12:06 -07:00
Max Arnold
7f7dd97ae3 Replace Sodium with 3001 for new master niceness settings 2020-07-13 06:42:48 -07:00
Pedro Algarvio
5e72e192f9 Blacken docs 2020-06-09 03:37:02 -07:00
twangboy
443be978ea enable_fqdns_grains default to false on Windows 2020-06-08 17:38:35 -07:00
Bryce Larson
4c374a8ff3 don't overwrite rst files with autodoc 2020-06-06 21:00:50 -07:00
Frode Gundersen
9536d322ac
Change Sodium reference to 3001 (#57419)
* Change Sodium reference to 3001

* Update nacl.py

Change back name to libsodium, got changed to lib3001.

Co-authored-by: Daniel Wozniak <dwozniak@saltstack.com>
2020-05-22 08:26:32 -07:00
twangboy
d59f460f57 Fix docs 2020-05-21 20:55:39 -07:00
twangboy
b1f6ea067d Fix docs 2020-05-21 20:55:39 -07:00
Matt Phillips
3a541e87b0 add niceness control for subprocesses of salt master
under high load these can be useful to tweak for ensuring critical parts
of salt aren't being resource starved.
2020-05-21 20:55:39 -07:00
gwiyeong
d0dff37419
Fix mismatch function argument between cassandra_cql and cassandra_cql_return (#56404)
* Revert "Support original API"

This reverts commit 377fbbc7b7.

* add test case for cassandra_cql async param

* remove warning message
add test for async args

* mocking cassandra.query.dict_factory to avoid test failure

* Blacken changed files

* add cassandra-driver at requirements/static/linux.in
change virtualname for salt/module/cassandra

* add missing asynchronous args

* add diff from jenkins instend running pre-commit

* add diff from jenkins instend of running pre-commit after merged with
master

* changed name salt/module/cassandra.py to salt/module/cassandra_mod.py and set its __virtualname__ is 'cassandra'
add cassandra to mac, window requirements.

* fix for pre-commit
change cassandra test module name

* Fix req files

* Add reqs again

Co-authored-by: Daniel A. Wozniak <dwozniak@saltstack.com>
Co-authored-by: Joe Eacott <31625359+xeacott@users.noreply.github.com>
Co-authored-by: Joe Eacott <jeacott22@hotmail.com>
2020-05-21 15:42:40 -07:00
Mathieu Parent
79c4fdad32 doc: Fix document linking in requisites.rst 2020-05-20 17:39:25 -07:00
Wesley Whetstone
f9f6382df9 include plist in serializer index doc 2020-05-19 10:16:07 -07:00
Wesley Whetstone
1231b463f5 Revert "add plist to serializers doc index"
This reverts commit 7512218a81.
2020-05-19 10:16:07 -07:00
Wesley Whetstone
3615410955 add plist to serializers doc index 2020-05-19 10:16:07 -07:00
Wesley Whetstone
3e9d5d5ab2 fix plist doc Title overline too short. 2020-05-19 10:16:07 -07:00
Wesley Whetstone
903d4ac396 add plist doc, and update plist serialize module doc string with instructions for making a binary plist. 2020-05-19 10:16:07 -07:00
Alberto Planas
0d6b43d01c devinfo: Add new module devinfo
devinfo is a new module designed to get hardware information. It
provides and API to access the output of hwinfo, and a set of functions
to filter udev information.
2020-05-18 14:34:22 -07:00
Alberto Planas
d4cfc32cc4 kubeadm: add initial module for kubeadm 2020-05-18 12:56:13 -07:00
Ken Crowell
44d2c90251 Clarify custom module sync requirements 2020-05-10 11:47:10 -07:00
MKelley80
a6b63cb81d Port #49617 to master 2020-05-07 13:27:31 -07:00
Christian McHugh
2520ae8675
Consolidate some state requisites (#55974)
* 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
2020-05-06 17:06:03 -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
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
Alex Rothman
507998c1b0
Azure Blob ext_pillar (#55493)
* Fixes #54374

* Added tests for #55493

* Fixes #54374

* Added tests for #55493

* Fixed lint issue

* Add pylint exception

* Fixes #54374

* Added tests for #55493

* Fixed lint issue

* Add pylint exception

* Blacken Salt

* Added sphinx stub

* Fixed sphinx stub

Co-authored-by: Akmod <tjohnson@saltstack.com>
Co-authored-by: Daniel Wozniak <dwozniak@saltstack.com>
2020-04-26 20:50:13 -07:00
twangboy
adec0c81ea Add pending_reboot to toctree 2020-04-25 22:14:26 -07:00
twangboy
ea993e4b06 Add sphinx stub 2020-04-25 22:14:26 -07:00
Christian McHugh
6a5a14e4e1
Merge branch 'master' into toml 2020-04-25 11:02:49 +01:00
Christian McHugh
2b7c302825
add docs 2020-04-23 17:18:54 +01:00
Wayne Werner
39af7c6ec7
Merged salt/master 2020-04-23 10:57:52 -05:00
Daniel Wozniak
5b45fd0325
Merge pull request #56685 from mchugh19/baredoc_ast
Module to list arguments to salt modules without loading
2020-04-23 00:50:18 -07:00
Wayne Werner
cdf00848fe
Add a note about service.running
A common source of confusion, hopefully this will help prevent that
confusion.
2020-04-22 16:24:35 -05:00
Daniel Wozniak
5adf5cfe9b
Merge pull request #56831 from joechainz/master-port-50264
Master port 50264
2020-04-22 12:38:00 -07:00
Daniel Wozniak
a9ebb98d5d
Merge pull request #52699 from aplanas/fix_brtfs
btrfs: Add properties state
2020-04-22 12:01:00 -07:00