Commit Graph

61509 Commits

Author SHA1 Message Date
Bo Maryniuk
0d9a06b8c6 Cleaner deprecation process with decorators
* Add deprecation decorator scaffold

* Capture type error and unhandled exceptions while function calls

* Aware of the current and future version of deprecation

* Implement initially is_deprecated decorator

* Add an alias for the capitalization

* Fix capitalization easier way

* Remove an extra line

* Add successor name to the deprecation decorator.

* Granulate logging and error messages.

* Implement function swapper

* Raise later the caught exception

* Clarify exception message

* Save function original name

* Remove an extra line

* Hide an alternative hidden function name in the error message, preserving the error itself

* Rename variable as private

* Add a method to detect if a function is using its previous version

* Message to the log and/or raise an exception accordingly to the status of used function

* Log an error along with the exception

* Add internal method documentation

* Add documentation and usage process for decorator "is_deprecated"

* Add documentation and process usage for the decorator "with_deprecated"

* Hide private method name

* Fix PEP8, re-word the error message

* Deprecate basic uptime function

* Add initial decorator unit test

* Rename old/new functions, mock versions

* Move frequent data to the test setup

* Add logging on EOL exception

* Rename and document high to low version test on is_deprecated

* Implement a test on low to high version of is_deprecated decorator

* Add a correction to the test description

* Remove a dead code

* Implement a test for high to low version on is_deprecated, using with_successor param

* Correct typso adn mistaeks

* Implement high to low version with successor param on is_deprecated

* Setup a virtual name for the module

* Implement test for with_deprecated should raise an exception if same deprecated function not found

* Implement test for with_deprecated an old function is picked up if configured

* Correct test description purpose

* Implement test with_deprecated when no deprecation is requested

* Add logging test to the configured deprecation request

* Add logging testing when deprecated version wasn't requested

* Implement test EOL for with_deprecated decorator

* Correct test explanation

* Rename the test

* Implement with_deprecated no EOL, deprecated other function name

* Implement with_deprecated, deprecated other function name, EOL reached

* Add test description for the with_deprecated + with_name + EOL

* Fix confusing test names

* Add logging test to the is_deprecated decorator when function as not found.

* Add more test point to each test, remove empty lines

* Bugfix: at certain conditions a wrong alias name is reported to the log

* Fix a typo in a comment

* Add test for the logging

* Disable a pylint: None will _never_ be raised

* Fix test for the deprecated "status.uptime" version

* Bugfix: Do not yank raised exceptions

* Remove unnecessary decorator

* Add test for the new uptime

* Add test for the new uptime fails when /proc/uptime does not exists

* Rename old test case

* Skip test for the UTC time, unless freeze time is used.

* Fix pylint

* Fix documentation

* Bugfix: proxy-pass the docstring of the decorated function

* Lint fix
2016-04-06 12:55:45 -06:00
rkgrunt
6979fdaa5f Correcty index glusterfs bricks
Fixes issue #32311
2016-04-06 12:48:20 -06:00
Mike Place
ad77d76cad Merge pull request #32393 from jfindlay/win_zone
modules.win_timezone: don't list all zones in debug log
2016-04-06 12:10:43 -06:00
Justin Findlay
c01c1b9da2 modules.win_timezone: don't list all zones in debug log 2016-04-06 10:46:52 -06:00
Nicole Thomas
76ae95863d Merge pull request #32372 from rallytime/bp-32358
Back-port #32358 to 2015.8
2016-04-06 10:35:05 -06:00
Nicole Thomas
c612baa119 Merge pull request #32392 from multani/2015.8
Fix documentation on boto_asg and boto_elb modules and states
2016-04-06 10:34:35 -06:00
Jonathan Ballet
77c4772752 Fix documentation on boto_asg and boto_elb modules and states 2016-04-06 18:16:13 +02:00
Nicole Thomas
b706d3aa4d Merge pull request #32373 from cachedout/issue_32201
Resolve memory leak in authentication
2016-04-06 09:19:55 -06:00
Arthur Lutz
95e0fe7744 outputter virt_list does not exist anymore 2016-04-05 16:03:56 -06:00
Mike Place
d9e4a0f372 Resolve memory leak in authentication 2016-04-05 15:55:55 -06:00
Nicole Thomas
097aa7ccfc Merge pull request #32126 from cro/outputter_terse_docs
Add a couple CLI examples for the highstate outputter.
2016-04-05 11:23:29 -06:00
Mike Place
eab3b99be2 Merge pull request #32353 from mcalmer/prevent-refresh-on-list-installed-products
Prevent metadata download when listing installed products
2016-04-05 11:02:15 -06:00
Mike Place
64abec94e7 Merge pull request #32321 from abednarik/minion_start_fail_log
Better message when minion fail to start
2016-04-05 10:28:06 -06:00
Nicole Thomas
59aca733ea Merge pull request #32345 from nmadhok/patch-4
[2015.8] Check if profile key exists in vm_ dict
2016-04-05 10:16:35 -06:00
Mike Place
bb033c238d Merge pull request #32343 from Ferbla/2015.8
Fixed win_wua example documentation
2016-04-05 10:14:36 -06:00
Mike Place
3219a8d176 Merge pull request #32360 from rallytime/fix-32354
Make sure hash_type is lowercase in master/minion config files
2016-04-05 10:10:46 -06:00
Mike Place
fb530256f6 Merge pull request #32361 from cro/remove_sdb_exp_flag
SDB is no longer experimental
2016-04-05 10:10:23 -06:00
C. R. Oldham
3bbe284d89 Remove 'experimental' warning from SDB docs. 2016-04-05 09:42:34 -06:00
rallytime
8b47c205df Make sure hash_type is lowercase in master/minion config files
Fixes #32354
2016-04-05 09:30:07 -06:00
Michael Calmer
e32212ad53 Prevent metadata download when listing installed products 2016-04-05 13:23:17 +02:00
abednarik
4c72adc03a Better message when minion fail to start
When minion fail to start due to issues related to log path, print a better message
to help fix it.

Fixes #32255.
2016-04-04 19:39:36 -03:00
Nitin Madhok
42d7a54240 Check if profile key exists in vm_ dict 2016-04-04 18:31:47 -04:00
Ferbla
e2f0f16564 Fixed win_wua example documentation 2016-04-04 17:25:29 -05:00
Mike Place
e1ef4a9d66 Merge pull request #32336 from rallytime/bp-28639
Back-port #28639 to 2015.8
2016-04-04 14:53:11 -06:00
Mike Place
6ee5a9729c Merge pull request #32332 from rallytime/fix-32305
Don't unsubscribe from open events on the CLI too early on long-running commands
2016-04-04 14:39:39 -06:00
C. R. Oldham
dafe279e60 Lint 2016-04-04 14:07:38 -06:00
Nicole Thomas
22b296d2fd Merge pull request #32333 from rallytime/merge-2015.8
[2015.8] Merge forward from 2015.5 to 2015.8
2016-04-04 14:06:02 -06:00
C. R. Oldham
abc2de0119 More clarification. 2016-04-04 13:47:56 -06:00
RuriRyan
0829143dd1 Fixed handling of the disabled option for yumpkg
It wasn't possible do set enabled back to 1 via state files. So if you once disabled a repository you couldn't enable it again.

This line fixes all the weird behaviour in simply converting disabled=True/False to enabled=0/1 respectively.
2016-04-04 12:57:13 -06:00
rallytime
d7b4b8b081 Merge branch '2015.5' into '2015.8'
Conflicts:
  - doc/ref/configuration/master.rst
  - doc/ref/configuration/minion.rst
  - salt/config.py
2016-04-04 12:36:14 -06:00
rallytime
8dc1161c8a Don't unsubscribe from open events on the CLI too early on long-running commands
Fixes #32305
2016-04-04 12:15:53 -06:00
Mike Place
28cc054244 Merge pull request #32289 from rallytime/fix-32246
New salt-cloud instances should not use old hash_type default.
2016-04-04 11:52:09 -06:00
Mike Place
5fb90a1040 Merge pull request #32291 from twangboy/fix_14277
Fix bad output for chocolatey.version (fixes #14277)
2016-04-04 11:50:54 -06:00
Mike Place
edbab99164 Merge pull request #32295 from rallytime/test-cloud-deploy-dir
Test the contents of 'deploy_scripts_search_path' in salt.config.cloud_config
2016-04-04 11:38:47 -06:00
Mike Place
4389680bc5 Merge pull request #32315 from ahus1/fix_file_managed_http_requests
fixing file.managed with requests lib
2016-04-04 11:20:11 -06:00
Mike Place
9065201761 Merge pull request #32316 from vutny/update-bootstrap-tutorial
Update Salt Bootstrap tutorial
2016-04-04 11:18:12 -06:00
Mike Place
352f3c01d1 Merge pull request #32325 from bdrung/fix-shebang
Re-add shebang to ssh-id-wrapper shell script
2016-04-04 11:08:41 -06:00
Mike Place
f16e332b3a Merge pull request #32326 from bdrung/fix-typos
Fix typos
2016-04-04 10:41:41 -06:00
Benjamin Drung
a7db152333 Fix typo dont -> don't 2016-04-04 14:56:29 +02:00
Benjamin Drung
d4c037301b Fix typo missmatch -> mismatch 2016-04-04 14:54:54 +02:00
Benjamin Drung
70dba70ff0 Fix typo additonal -> addition 2016-04-04 14:53:07 +02:00
Benjamin Drung
68c60903aa Fix typo mutliple -> multiple 2016-04-04 14:51:39 +02:00
Benjamin Drung
0f2c779b90 Fix typo fucntion -> function 2016-04-04 14:47:12 +02:00
Benjamin Drung
0c9e4c8c80 Fix typo avilable -> available 2016-04-04 14:46:13 +02:00
Benjamin Drung
920abe2ec7 Fix typo formated -> formatted 2016-04-04 14:45:20 +02:00
Benjamin Drung
e56dd4bb23 Fix typo ommitted -> omitted 2016-04-04 14:37:13 +02:00
Benjamin Drung
f99e6f1f13 Fix typo ouptut -> output 2016-04-04 14:35:41 +02:00
Benjamin Drung
d3804094f2 Fix typo wether -> whether 2016-04-04 14:34:09 +02:00
Benjamin Drung
538fb6fae2 Fix typo perfomed -> performed 2016-04-04 14:33:06 +02:00
Benjamin Drung
db7af998ee Fix typo santized -> sanitized 2016-04-04 14:30:28 +02:00