Skip to content
This repository has been archived by the owner on Nov 21, 2024. It is now read-only.

Commit

Permalink
Merge pull request #709 from cisco-open/alarms-20.15
Browse files Browse the repository at this point in the history
alarms-20.15
  • Loading branch information
JimOverholt authored May 28, 2024
2 parents ed8795b + e8286e6 commit 01085ea
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion catalystwan/api/alarms_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,12 @@ def get(self, from_time: Optional[int] = None) -> DataSequence[AlarmData]:
>>> alarms = AlarmsAPI(session).get()
>>> critical_alarms = alarms.filter(severity=Severity.CRITICAL)
"""
query: Dict[str, Any] = {"query": {"condition": "AND", "rules": []}}
query: Dict[str, Any] = {
"query": {
"condition": "AND",
"rules": [{"field": "active", "type": "boolean", "value": ["true"], "operator": "equal"}],
}
}
if from_time:
query["query"]["rules"].append(
{
Expand Down

0 comments on commit 01085ea

Please sign in to comment.