Skip to content
This repository has been archived by the owner on Dec 26, 2017. It is now read-only.

Commit

Permalink
Arvhive all Alerts
Browse files Browse the repository at this point in the history
Archive all Alerts
TODO: return rc message
  • Loading branch information
xaviertorras committed Jun 13, 2014
1 parent 486f9af commit 2c98a51
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions unifi/controller.py
Expand Up @@ -193,6 +193,14 @@ def restart_ap_name(self, name):
if ap.get('state', 0) == 1 and ap.get('name', None) == name:
self.restart_ap(ap['mac'])

def archive_all_alerts(self):
"""Archive all Alerts
"""
js = json.dumps({'cmd': 'archive-all-alarms'})
params = urllib.urlencode({'json': js})
answer = self._read(self.api_url + 'cmd/evtmgr', params)
print "Archived all Alerts"

def create_backup(self):
"""Ask controller to create a backup archive file, response contains the path to the backup file.
Expand Down

0 comments on commit 2c98a51

Please sign in to comment.