Skip to content

Commit 4408bed

Browse files
author
Phil Rzewski
committed
Add support for getting IDs of OpsGenie Notification Channels
1 parent 34c5e65 commit 4408bed

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

sdcclient/_client.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,11 @@ def get_notification_ids(self, channels):
213213
if 'channel' in opt and opt['channel'] == c['channel']:
214214
found = True
215215
ids.append(ch['id'])
216+
elif c['type'] == 'OPSGENIE':
217+
if 'name' in c:
218+
if c['name'] == ch['name']:
219+
found = True
220+
ids.append(ch['id'])
216221
if not found:
217222
return [False, "Channel not found: " + str(c)]
218223

0 commit comments

Comments
 (0)