- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
Pull an array from an Issue in Triggered Job?
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
10-20-2017 08:06 AM
I have a raw xml policy that fires an issue with a list of all ports on a switch that don't match the configuration in the policy. Initially, the list was more informational and a repair job was scheduled to reset the entire range of user ports, based on the switch size - int range gi1/0/3-48 or int range gi1/0/3-24. We now have trunks scattered through out the switches for APs, so I need to only reset the ports listed in the issue.
Is there a way to take the list from Issue and use as an input into the script? I can change the error message to make it easier to use, if this is possiblity. Perl/Python/CCS- script type doesn't matter.
Sample Issue output:
The following switchports are incorrectly configured: 3,4,5,6,7,8,9,10,11,12,13,14,15,16,18.
Solved! Go to Solution.
Re: Pull an array from an Issue in Triggered Job?
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
10-25-2017 06:52 AM
So, from what i can find, this isn't possible.
Is it possible to find the Message data via rest?
I have found the policy rule and status, but nothing with the message data in it.
Thanks.
Re: Pull an array from an Issue in Triggered Job?
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
10-25-2017 07:14 AM
Found it if anyone else needs it-
/api/3.0/device_policy_rules/search?PolicyRuleStatus=error&DevicePolicyID=#####
{
"total": 1,
"start": 0,
"limit": 1000,
"current": 1,
"device_policy_rules": [
{
"DataSourceID": 4,
"DevicePolicyID": "8950473071153901931",
"DevicePolicyRuleChangedCols": "PolicyRuleStatus,PolicyRuleMessage",
"DevicePolicyRuleEndTime": null,
"DevicePolicyRuleID": "8421571587965439406",
"DevicePolicyRuleStartTime": "2016-09-01 10:59:21",
"DevicePolicyRuleTimestamp": "2017-10-24 15:00:26",
"PolicyRuleContext": null,
"PolicyRuleID": "4559690170655260362",
"PolicyRuleLineNo": null,
"PolicyRuleMessage": "The following switchports are incorrectly configured: 3,4,5,6,7,8.",
"PolicyRuleStatus": "error",
"_class": "DevicePolicyRule"
}
]
}
Re: Pull an array from an Issue in Triggered Job?
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
10-25-2017 07:30 AM
Re: Pull an array from an Issue in Triggered Job?
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
11-09-2017 10:52 AM
It took care of most of the question. I'm still working on the solution to take the results and act upon them.