Skip to content

Commit b37467e

Browse files
authored
Merge pull request #18 from draios/opsgenie
Add support for getting IDs of OpsGenie Notification Channels
2 parents f31f6f0 + 21701b6 commit b37467e

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

.travis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ script:
1111
- examples/dashboard.py XXX
1212
- examples/create_dashboard.py XXX
1313
- examples/delete_dashboard.py XXX
14-
- examples/get_data_advanced.py XXX ip-10-0-1-110.ec2.internal
14+
- examples/get_data_advanced.py XXX ip-10-0-1-140.ec2.internal
1515
- examples/get_data_datasource.py XXX
1616
- examples/get_data_simple.py XXX
1717
- examples/list_alerts.py XXX
@@ -28,7 +28,7 @@ script:
2828
- examples/print_explore_grouping.py XXX
2929
- examples/print_user_info.py XXX
3030
- examples/list_sysdig_captures.py XXX
31-
- examples/create_sysdig_capture.py XXX ip-10-0-1-110.ec2.internal apicapture 10
31+
- examples/create_sysdig_capture.py XXX ip-10-0-1-140.ec2.internal apicapture 10
3232
- examples/notification_channels.py XXX
3333
- examples/user_team_mgmt.py XXX example-team [email protected]
3434
- echo "Testing pip version"

sdcclient/_client.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,11 @@ def get_notification_ids(self, channels):
223223
if 'channel' in opt and opt['channel'] == c['channel']:
224224
found = True
225225
ids.append(ch['id'])
226+
elif c['type'] == 'OPSGENIE':
227+
if 'name' in c:
228+
if c['name'] == ch['name']:
229+
found = True
230+
ids.append(ch['id'])
226231
if not found:
227232
return [False, "Channel not found: " + str(c)]
228233

0 commit comments

Comments
 (0)