mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 08:58:59 +00:00
Merge pull request #46333 from danlsgiga/issue-42438
Fixes color parameter mismatch and handles 204 responses correctly
This commit is contained in:
commit
3849e7a085
@ -176,8 +176,8 @@ def _query(function,
|
||||
if result.get('status', None) == salt.ext.six.moves.http_client.OK:
|
||||
response = hipchat_functions.get(api_version).get(function).get('response')
|
||||
return result.get('dict', {}).get(response, None)
|
||||
elif result.get('status', None) == salt.ext.six.moves.http_client.NO_CONTENT:
|
||||
return False
|
||||
elif result.get('status', None) == salt.ext.six.moves.http_client.NO_CONTENT and api_version == 'v2':
|
||||
return True
|
||||
else:
|
||||
log.debug(url)
|
||||
log.debug(query_params)
|
||||
|
@ -60,7 +60,7 @@ def send_message(name,
|
||||
- api_url: https://hipchat.myteam.com
|
||||
- api_key: peWcBiMOS9HrZG15peWcBiMOS9HrZG15
|
||||
- api_version: v1
|
||||
- color: green
|
||||
- message_color: green
|
||||
- notify: True
|
||||
|
||||
The following parameters are required:
|
||||
@ -93,7 +93,7 @@ def send_message(name,
|
||||
The api version for Hipchat to use,
|
||||
if not specified in the configuration options of master or minion.
|
||||
|
||||
color
|
||||
message_color
|
||||
The color the Hipchat message should be displayed in. One of the following, default: yellow
|
||||
"yellow", "red", "green", "purple", "gray", or "random".
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user