mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Fixed: added additional return code 200 for succeeded api request
This commit is contained in:
parent
69f81214d1
commit
02d09c6281
1 changed files with 2 additions and 2 deletions
|
@ -73,7 +73,7 @@ def _create_new_policy(name, rules):
|
|||
payload = {'rules': rules}
|
||||
url = "v1/sys/policy/{0}".format(name)
|
||||
response = __utils__['vault.make_request']('PUT', url, json=payload)
|
||||
if response.status_code != 204:
|
||||
if response.status_code not in [200, 204]:
|
||||
return {
|
||||
'name': name,
|
||||
'changes': {},
|
||||
|
@ -108,7 +108,7 @@ def _handle_existing_policy(name, new_rules, existing_rules):
|
|||
|
||||
url = "v1/sys/policy/{0}".format(name)
|
||||
response = __utils__['vault.make_request']('PUT', url, json=payload)
|
||||
if response.status_code != 204:
|
||||
if response.status_code not in [200, 204]:
|
||||
return {
|
||||
'name': name,
|
||||
'changes': {},
|
||||
|
|
Loading…
Add table
Reference in a new issue