Commit Graph

70 Commits

Author SHA1 Message Date
Bo Maryniuk
11a94cad12 Remove an empty line 2018-09-13 12:07:43 +02:00
Bo Maryniuk
adb832424d Use SHA256 algorithm for zyppnotify plugin 2018-09-13 12:01:04 +02:00
Bo Maryniuk
27001cf4cc Use SHA256 algorithm for yumnotify plugin 2018-09-13 12:00:55 +02: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
Pablo Suárez Hernández
4257ba5af9 Adding salt-minion watchdog for sysV systems (rhel6 and sles11) 2017-06-20 17:28:40 +01:00
Bo Maryniuk
a27415c4cc Add YUM plugin
* Add plugin for Yum-Salt integration
* Add configuration for the yumnotify plugin
* Fixes wrong 'enabled' opts for yumnotify plugin
2017-06-20 17:28:39 +01:00
Bo Maryniuk
1c817bb6c9 Add zypp-notify plugin
* Add unit test to the libzypp drift detector plugin
2017-06-20 17:18:31 +01:00
C. R. Oldham
3be90cc9f4 Rescue proxy_auto_tests PR from git rebase hell 2017-05-05 17:04:00 -06:00
Anthony Shaw
e32ba10365
add 2.6 support 2016-07-29 10:00:28 +10:00
Anthony Shaw
bbb5efb308 refactor the code to not use cookiecutter (1) 2016-07-27 09:39:54 +10:00
Anthony Shaw
aacd253c4c
explain what the command does 2016-07-25 13:59:07 +10:00
Anthony Shaw
df2d4f7798
name the arguments and allow description to be set on command line 2016-07-25 13:45:13 +10:00
Anthony Shaw
9dac0c76c7
take args from command line 2016-07-25 10:54:39 +10:00
Anthony Shaw
ee3ea218f8 renamed to extend, read module name and description at prompt 2016-07-25 09:40:02 +10:00
Anthony Shaw
ad77f799df
renamed the quickstart to extend 2016-07-25 09:01:09 +10:00
Anthony Shaw
d3016f0055
ask basic question 2016-07-24 20:59:49 +10:00
Anthony Shaw
c11f2349b1
import cookiecutter if installed and ask a basic question 2016-07-24 20:34:36 +10:00
C. R. Oldham
abdbbb6325 Begin modifying proxy to be called from command line. 2015-08-13 15:22:43 -06:00
rallytime
abfae94e1d Started changing Beryllium references to 2015.8.0 2015-07-08 10:01:03 -06:00
Joseph Hall
8e1bebfc92 Add versionadded 2015-06-23 09:31:21 -06:00
Joseph Hall
4a95b11652 Initial commit of Salt Package Manager 2015-06-23 09:31:21 -06:00
Sergey Kizunov
57fba60eda Make extensionless scripts runable in Windows
Previously, to make these run on Windows, I added the '.py'
extension. For example 'salt-master' => 'salt-master.py'

If this wasn't done, you would get an exception that looks like this
when spawning an addition process:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
    File "C:\salt\bin\lib\multiprocessing\forking.py",
    line 380, in main
        prepare(preparation_data)
          File "C:\salt\bin\lib\multiprocessing\forking.py",
          line 489, in prepare
              file, path_name, etc = imp.find_module(main_name, dirs)
              ImportError: No module named salt-master

Instead of adding the '.py' extension, I found another work-around that
seems to avoid the issue. The details are described in the file comments.

Signed-off-by: Sergey Kizunov <sergey.kizunov@ni.com>
2015-05-15 20:04:55 -05:00
Justin Findlay
8605281629 mv zsh completion to pkg/
fix #19892
2015-02-04 13:50:35 -07:00
Colton Myers
9a89057f83 Merge branch '2014.7' into merge-forward
Conflicts:
	salt/transport/__init__.py
2014-11-13 12:40:24 -07:00
Mathieu Le Marec - Pasquet
dafb765ad6 factorize call 2014-11-11 17:43:05 +01:00
steve
d13c7275a7 show_timeouts, new default 2014-08-14 13:10:52 -04:00
Chris Rebert
177c168a21 Fix numerous typos found via Lintian
Thanks https://github.com/Debian/lintian/tree/master/data/spelling !
2014-08-11 10:46:43 -07:00
Seth House
53bab586f4 Merged salt-api into Salt
Woot!

The conflicts below are intentional because they contained salt-api-isms
that needed to be included into the corresponding Salt files.

Conflicts:
	debian/changelog
	debian/control
	doc/conf.py
	doc/index.rst
	opt_requirements.txt
	salt/config.py
	salt/loader.py
2014-06-18 22:13:56 -06:00
Pedro Algarvio
7bd8b1360f Remove remaining exsel code 2014-05-29 01:32:54 +01:00
Daniel Wallace
8eb99c846b Add zshell completion for salt salt-call and salt-cp
I will do bash completion soonish
2014-05-19 00:41:09 -05:00
Thomas Jackson
963effa0ea rest_tornado
An async implementation of the salt api
2014-04-14 21:12:07 -07:00
Thomas S Hatch
b483ff7323 Add salt-unity script
This script allows all salt commands to be called from a single top level
shell script
2014-02-26 15:15:36 -07:00
Thomas S Hatch
5de4e73d4d Modernize the salt-cloud script 2013-11-08 14:11:27 -07:00
Joseph Hall
62a8e31809 Pointing salt-cloud script to new correct location 2013-11-08 14:09:18 -07:00
Joseph Hall
9f3fcfe64f Moving salt-cloud script into proper location 2013-11-08 14:08:34 -07:00
Thomas S Hatch
9b40510bb2 Add salt-ssh script 2013-07-01 15:48:23 -06:00
Onur Yalazı
88ec4ec97f Updated hashbangs with /usr/bin/env for virtual environment installs 2013-01-03 11:36:51 +02:00
Thomas S Hatch
760d3f6720 clean up loader module 2012-09-24 14:45:36 -06:00
Thomas S Hatch
8f03f76b43 Add scripts 2012-09-24 13:21:59 -06:00
Aaron Tygart
a05911d985 Add freeze_support on salt-minion script 2012-09-10 14:13:02 -05:00
E.G. Galano
ed4658a7a4 Change salt-syndic exec script to instantiate a syndic class rather than a minion. Fixing the bug introduced in ee0072d3e8 2012-07-10 18:10:17 -07:00
Benoit Bryon
ee0072d3e8 Updated setup(): use setuptools' console_scripts if available, else fallback to distutils' scripts. Refs #1028. 2012-06-05 12:00:20 +02:00
Corey Quinn
dfd82ad0bd Debian/Ubuntu package for upstream acceptance
Applying latest changes for packaging

Fixed typos in man pages

Latest round of changes

More packaging fixups

Fixed salt-common typo

Fixed wildcarding in install files

Removed extra man pages

Removed trailing slash

Fixed links

Moved binaries to proper packages

Fixed man pages

Pathing

Perms tweak

Missing files

Fixed spacing

Fixed another lintian error

build the msgpack stuff

Updating rules and install files

Fixed shebang

Control updates

Fixed copyright file

Fixed lintian

Fixed overrides

cmd.retcode no longer uses subprocess.call since it is broken

fix issue with source_hash and trailing whitespace

Bye-bye pickle, hello msgpack

Add docs for new source powers

Add support for source_hash to be a source hash string

add pure python template type

add return clarifying that no states were found if no states are found

change some strings to use format

add code to cache jobs on the minion if option is set

serialize cache data

was caching the wrong line data

Add cache_jobs to the minion config template

add docs for new config param cache_jobs

make the minions return to the master in addition to returning to
returners

Add capability to designate multiple returns

only run the apache module if apachectl is installed

only load solr module if solr is installed

Debug statement used the wrong variable.

Only load nginx on machines that have nginx installed

Make it more like the apache module
2012-01-18 12:15:01 -08:00
Jeff Schroeder
f02cb42be3 Gracefully print an error when running salt-call as non-root
Fixes #438

This also sets a default "level" argument to setup_console_logger()
to error which it already does when the level isn't in the dict.
2012-01-07 22:03:41 -08:00
Corey Quinn
3e79767c25 Merge branch 'develop' of github.com:KB1JWQ/salt into KB1JWQ 2011-12-30 11:58:03 -08:00
Jeff Schroeder
bb0629e690 Handle Ctrl-c on the syndic or regular minion and log it
- Log a message when the syndic or minion is exiting
    - Cleanly exit and use the same message on all daemons
    - Add places to handle a sigterm or sighup by KeyboardInterrupt
2011-12-27 17:00:52 -08:00
Corey Quinn
e5f5bb3c2b Set the scripts to be executable 2011-12-27 12:02:09 -08:00
Jeff Schroeder
021cebbbf3 Teach all non-daemon scripts how to cleanly exit on CTRL-c
Using: raise SystemExit('some message')

is equivalent to:
sys.stderr.write('some message\n')
sys.exit(1)
2011-12-20 19:09:27 -08:00
Markus Gattol
38e5d2b2cb file permissions: from 775 to 755
Signed-off-by: Markus Gattol <markus.gattol@sunoano.org>
2011-11-14 15:49:06 +00:00
Thomas S Hatch
010de4ee59 fix typo in salt-key docstring 2011-08-14 22:38:13 -06:00