Merge pull request #46333 from danlsgiga/issue-42438

Fixes color parameter mismatch and handles 204 responses correctly
This commit is contained in:
Nicole Thomas 2018-03-05 14:42:25 -05:00 committed by GitHub
commit 3849e7a085
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View File

@ -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)

View File

@ -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".