548
Views
2
Helpful
1
Replies
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-09-2023 02:38 AM
Is it possible to generate an alarm with python for nso 6.1.2.
I cannot find a good example here: ncs.alarm - Network Services Orchestrator (NSO) API v6.1 - Document - Cisco DevNet
Solved! Go to Solution.
Labels:
- Labels:
-
DevOps
-
Other NSO Topics
1 Accepted Solution
Accepted Solutions
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-09-2023 03:59 AM
Managed to make it work:
def create_alarm(alarm_content, device):
_alarm = ncs.alarm.Alarm(managed_device=device,
managed_object=ncs.alarm.managed_object_instance("/ncs:devices/ncs:device[ncs:name='" + device + "']"),
alarm_type='revision-error',
specific_problem='error',
severity='warning',
alarm_text='error')
ncs.alarm.raise_alarm(_alarm)
1 Reply 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-09-2023 03:59 AM
Managed to make it work:
def create_alarm(alarm_content, device):
_alarm = ncs.alarm.Alarm(managed_device=device,
managed_object=ncs.alarm.managed_object_instance("/ncs:devices/ncs:device[ncs:name='" + device + "']"),
alarm_type='revision-error',
specific_problem='error',
severity='warning',
alarm_text='error')
ncs.alarm.raise_alarm(_alarm)
