emaadmanzoor/pyipmi — pull request #1 by emaadmanzoor (2014-08-07 18:17:44+00:00)
Title: LAN Alert Commands

The following pull request adds the `ipmitool lan alert print|set` commands.

Since there are no unit tests (yet), the following is a script that tests this:

```python
#!/usr/bin/env python

from pyipmi import make_bmc
from pyipmi.bmc import LanBMC

hostname = 'hostname'
username = 'username'
password = 'password'

bmc = make_bmc(LanBMC, hostname=hostname,
username=username,
password=password)

def print_alerts():
alerts = bmc.lan_alert_print()
for alert in alerts:
print alert.__dict__

print_alerts()

bmc.lan_alert_set(channel='1', alert_destination='0',
command='ipaddr', param='1.1.1.1')

print_alerts()

bmc.lan_alert_set(channel='1', alert_destination='0',
command='ipaddr', param='0.0.0.0')

print_alerts()
```