Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Version 1.1.7 #55

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions docs/releasenotes.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
Release notes
#############

Version 1.1.7
=============

- Splunk UCC, SDK and other librairies refresh to very last versions
- Switch http.status_code verification from an explicit list of 2* codes to allow any 2* code, this change is to allow a workaround using Power Automate Flow to allow the deprecation of message cards by Microsoft.

Version 1.1.6
=============

Expand Down
47 changes: 7 additions & 40 deletions globalConfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -99,41 +99,7 @@
"title": "Proxy"
},
{
"name": "logging",
"entity": [
{
"type": "singleSelect",
"label": "Log level",
"options": {
"disableSearch": true,
"autoCompleteFields": [
{
"value": "DEBUG",
"label": "DEBUG"
},
{
"value": "INFO",
"label": "INFO"
},
{
"value": "WARNING",
"label": "WARNING"
},
{
"value": "ERROR",
"label": "ERROR"
},
{
"value": "CRITICAL",
"label": "CRITICAL"
}
]
},
"defaultValue": "INFO",
"field": "loglevel"
}
],
"title": "Logging"
"type": "loggingTab"
},
{
"name": "additional_parameters",
Expand Down Expand Up @@ -199,7 +165,7 @@
"name": "ms_teams_publish_to_channel",
"label": "MS teams publish to channel",
"description": "Publish a message to a Microsoft Teams channel",
"activeResponse": {
"adaptiveResponse": {
"task": [
"Create",
"Update",
Expand All @@ -223,7 +189,8 @@
}
],
"drilldownUri": "search?q=search%20index%3D_internal%20OR%20index%3Dcim_modaction%20sourcetype%3Dta:msteams:alert:log&earliest=0&latest=",
"sourcetype": "ta:msteams:alert:log"
"sourcetype": "ta:msteams:alert:log",
"supportsCloud": true
},
"entity": [
{
Expand Down Expand Up @@ -407,9 +374,9 @@
"meta": {
"name": "TA-ms-teams-alert-action",
"restRoot": "ta_ms_teams_alert_action",
"version": "1.1.6",
"version": "1.1.7",
"displayName": "MS Teams alert action",
"schemaVersion": "0.0.3",
"_uccVersion": "5.39.1"
"schemaVersion": "0.0.7",
"_uccVersion": "5.48.2"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -569,7 +569,7 @@ def process_event(helper, *args, **kwargs):
use_proxy=opt_use_proxy,
)
# No http exception, but http post was not successful
if response.status_code not in (200, 201, 204):
if not (200 <= response.status_code < 300):

helper.log_error(
"Microsoft Teams publish to channel has failed!. "
Expand Down Expand Up @@ -613,7 +613,7 @@ def process_event(helper, *args, **kwargs):
response = requests.post(
record_url, headers=headers, data=record, verify=False
)
if response.status_code not in (200, 201, 204):
if not (200 <= response.status_code < 300):
helper.log_error(
"KVstore saving has failed!. url={}, data={}, HTTP Error={}, "
"content={}".format(
Expand Down Expand Up @@ -668,7 +668,7 @@ def process_event(helper, *args, **kwargs):
response = requests.post(
record_url, headers=headers, data=record, verify=False
)
if response.status_code not in (200, 201, 204):
if not (200 <= response.status_code < 300):
helper.log_error(
"KVstore saving has failed!. url={}, data={}, HTTP Error={}, "
"content={}".format(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ def process_event(helper, *args, **kwargs):
)

# No http exception, but http post was not successful
if response.status_code not in (200, 201, 204):
if not (200 <= response.status_code < 300):
helper.log_error(
"Microsoft Teams publish to channel has failed!. "
"url={}, data={}, HTTP Error={}, HTTP Reason={}, HTTP content={}".format(
Expand Down Expand Up @@ -181,7 +181,7 @@ def process_event(helper, *args, **kwargs):
response = requests.post(
record_url, headers=headers, data=record, verify=False
)
if response.status_code not in (200, 201, 204):
if not (200 <= response.status_code < 300):
helper.log_error(
"KVstore saving has failed!. url={}, data={}, HTTP Error={}, "
"content={}".format(
Expand Down Expand Up @@ -213,7 +213,7 @@ def process_event(helper, *args, **kwargs):
# Splunk Cloud vetting note, this communication is a localhost communication to splunkd
# and does not have to be verified
response = requests.delete(record_url, headers=headers, verify=False)
if response.status_code not in (200, 201, 204):
if not (200 <= response.status_code < 300):
helper.log_error(
"KVstore delete operation has failed!. url={}, HTTP Error={}, "
"content={}".format(
Expand Down Expand Up @@ -265,7 +265,7 @@ def process_event(helper, *args, **kwargs):
response = requests.post(
record_url, headers=headers, data=record, verify=False
)
if response.status_code not in (200, 201, 204):
if not (200 <= response.status_code < 300):
helper.log_error(
"KVstore saving has failed!. url={}, data={}, HTTP Error={}, "
"content={}".format(
Expand Down Expand Up @@ -314,7 +314,7 @@ def process_event(helper, *args, **kwargs):
# Splunk Cloud vetting note, this communication is a localhost communication to splunkd and
# does not have to be verified
response = requests.post(record_url, headers=headers, data=record, verify=False)
if response.status_code not in (200, 201, 204):
if not (200 <= response.status_code < 300):
helper.log_error(
"KVstore saving has failed!. url={}, data={}, HTTP Error={}, "
"content={}".format(
Expand Down Expand Up @@ -352,7 +352,7 @@ def process_event(helper, *args, **kwargs):
# Splunk Cloud vetting note, this communication is a localhost communication to splunkd and
# does not have to be verified
response = requests.delete(record_url, headers=headers, verify=False)
if response.status_code not in (200, 201, 204):
if not (200 <= response.status_code < 300):
helper.log_error(
"KVstore delete operation has failed!. url={}, HTTP Error={}, "
"content={}".format(record_url, response.status_code, response.text)
Expand Down
3 changes: 2 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
splunk-add-on-ucc-framework>=5.44.0
splunk-add-on-ucc-framework>=5.44.0
requests>=2.32.3
2 changes: 1 addition & 1 deletion version.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"version": "1.1.6",
"version": "1.1.7",
"appID": "TA-ms-teams-alert-action"
}
Loading