Skip to content

Commit 8f076fb

Browse files
authored
Merge pull request #58 from jyaworski/add_victorops_notification_channel
Add VICTOROPS to valid notification channel types
2 parents 8868265 + 8d3cfc4 commit 8f076fb

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

sdcclient/_client.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ def get_notification_ids(self, channels=None):
116116
Get an array of all configured Notification Channel IDs, or a filtered subset of them.
117117
118118
**Arguments**
119-
- **channels**: an optional array of dictionaries to limit the set of Notification Channel IDs returned. If not specified, IDs for all configured Notification Channels are returned. Each dictionary contains a ``type`` field that can be one of the available types of Notification Channel (``EMAIL``, ``SNS``, ``PAGER_DUTY``, ``SLACK``, ``OPSGENIE``, ``WEBHOOK``) as well as additional elements specific to each channel type.
119+
- **channels**: an optional array of dictionaries to limit the set of Notification Channel IDs returned. If not specified, IDs for all configured Notification Channels are returned. Each dictionary contains a ``type`` field that can be one of the available types of Notification Channel (``EMAIL``, ``SNS``, ``PAGER_DUTY``, ``SLACK``, ``OPSGENIE``, ``VICTOROPS``, ``WEBHOOK``) as well as additional elements specific to each channel type.
120120
121121
**Success Return Value**
122122
An array of Notification Channel IDs (integers).
@@ -176,6 +176,11 @@ def get_notification_ids(self, channels=None):
176176
if c['name'] == ch.get('name'):
177177
found = True
178178
ids.append(ch['id'])
179+
elif c['type'] == 'VICTOROPS':
180+
if 'name' in c:
181+
if c['name'] == ch.get('name'):
182+
found = True
183+
ids.append(ch['id'])
179184
elif c['type'] == 'WEBHOOK':
180185
if 'name' in c:
181186
if c['name'] == ch.get('name'):

0 commit comments

Comments
 (0)