From ed700d6603dfa65d8b46798505e4f3c1ebfce980 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Fri, 25 Sep 2015 09:15:36 -0400 Subject: [PATCH] Use alert set 1 unconditionally The 'policy number' appears to be indicating a set rather than a specific rule. Since PEF from various manufacturers tend to use alert set 1, use alert set 1 for now when creating a new policy. Change-Id: I646c81baa3167f3fc076140494f7e8e564e7c0bd --- pyghmi/ipmi/command.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pyghmi/ipmi/command.py b/pyghmi/ipmi/command.py index 558881d4..18f64e95 100644 --- a/pyghmi/ipmi/command.py +++ b/pyghmi/ipmi/command.py @@ -871,8 +871,12 @@ class Command(object): # If chandest did not equal desiredchandest ever, we need to use a slot if availpolnum is None: raise Exception("No available alert policy entry") + # 24 = 1 << 4 | 8 + # 1 == set to which this rule belongs + # 8 == 0b1000, in other words, enable this policy, always send to + # indicated destination self.xraw_command(netfn=4, command=0x12, - data=(9, availpolnum, (availpolnum << 4) | 0x8, + data=(9, availpolnum, 24, desiredchandest, 0)) def get_alert_community(self, channel=None):