fix: add new return code for api with the version 5.10
This commit is contained in:
parent
fdeaea2e88
commit
8ea56a7e1b
3 changed files with 4 additions and 2 deletions
|
@ -6,10 +6,11 @@ Which is based on [Keep A Changelog](http://keepachangelog.com/)
|
||||||
## [Unreleased]
|
## [Unreleased]
|
||||||
|
|
||||||
- feat: add labels in checks
|
- feat: add labels in checks
|
||||||
- fix: create roles before users
|
|
||||||
- feat: add a debug mode with sensu_no_log variable
|
- feat: add a debug mode with sensu_no_log variable
|
||||||
- feat: add mutators
|
- feat: add mutators
|
||||||
- feat: add sensu_agent_redact variable to add new redact keywords
|
- feat: add sensu_agent_redact variable to add new redact keywords
|
||||||
|
- fix: add new return code for api with the version 5.10
|
||||||
|
- fix: create roles before users
|
||||||
- doc: add example in readme
|
- doc: add example in readme
|
||||||
|
|
||||||
## [1.1.0] - 2019-02-17
|
## [1.1.0] - 2019-02-17
|
||||||
|
|
|
@ -59,7 +59,7 @@ class SensuApi:
|
||||||
raise Exception('Server return 500 error: {}'.format(r.text))
|
raise Exception('Server return 500 error: {}'.format(r.text))
|
||||||
elif r.status_code == 401:
|
elif r.status_code == 401:
|
||||||
raise Exception('Authentification has failed')
|
raise Exception('Authentification has failed')
|
||||||
elif r.status_code != 200:
|
elif r.status_code not in [200, 201, 204]:
|
||||||
raise Exception('Server return an unknown error: {}'.format(r.text))
|
raise Exception('Server return an unknown error: {}'.format(r.text))
|
||||||
|
|
||||||
def delete(self, path):
|
def delete(self, path):
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
- hosts: default
|
- hosts: default
|
||||||
connection: local
|
connection: local
|
||||||
vars:
|
vars:
|
||||||
|
sensu_no_log: false
|
||||||
sensu_backend: yes
|
sensu_backend: yes
|
||||||
sensu_agent_redact:
|
sensu_agent_redact:
|
||||||
- supersecret
|
- supersecret
|
||||||
|
|
Loading…
Reference in a new issue