def add_info(self, ch, oinfo): info = oinfo.info item = self.Append(ch, "Info", []) v = [0] rv = info.get_medium(v) if (not rv): self.add_data(item, "Medium", [OpenIPMI.channel_medium_string(v[0])]) pass rv = info.get_protocol_type(v) if (not rv): self.add_data(item, "Protocol Type", [OpenIPMI.channel_protocol_string(v[0])]) pass rv = info.get_session_support(v) if (not rv): self.add_data(item, "Session Support", [OpenIPMI.channel_session_support_string(v[0])]) pass v = info.get_vendor_id() if (v): self.add_data(item, "Vendor ID", [v]) pass v = info.get_aux_info() if (v): self.add_data(item, "Aux Info", [v]) pass return
def ok(self, vals): rv = self.node.set_field(self.aidx, self.ptype, str(vals[0])) if (rv != 0): self.glist.SetError("Invalid data value: " + OpenIPMI.get_error_string(rv)) return try: if (self.reiniter != None): if self.reiniter.reinit(self, self.currval, vals[0]): return pass pass except: pass name_s = [ "" ] type_s = [ "" ] value_s = [ "" ] node_s = [ None ] rv = self.node.get_field(self.aidx, name_s, type_s, value_s, node_s) if (rv != 0): self.glist.SetError("Could not re-get field: " + OpenIPMI.get_error_string(rv)) return self.glist.cleanup_field(type_s[0], value_s) self.currval = value_s[0] self.glist.SetColumn(self.item, self.currval, 1) return
def quit(self): del self.mc OpenIPMI.set_log_handler(DummyLogHandler()) OpenIPMI.shutdown_everything() print "done" sys.exit(0) return
def __init__(self, parent, ui): global init_history Tix.ScrolledText.__init__(self, parent) self.ui = ui self.currow = 0 self.max_lines = 1000 self.max_history = 100 self.text.bind("<Key>", self.HandleChar) self.text.bind("<Control-Key>", self.HandleCtrlChar) self.text.insert("end", "> ") self.history = [ ] self.lasthist = 0 for cmd in init_history: self.history.append(cmd[1]) self.lasthist += 1 pass self.history.append("") init_history = None self.currhist = self.lasthist self.cmdlang = OpenIPMI.alloc_cmdlang(self) self.indent = 0; self.cmd_in_progress = False self.bind("<Destroy>", self.OnDestroy) OpenIPMI.set_cmdlang_global_err_handler(self) return
def RestoreDomains(mainhandler): for i in defaultDomains: name = i[0] attrhashes = i[1] other = i[2] connects = [] for attrhash in attrhashes: if ("contype" not in attrhash): continue args = OpenIPMI.alloc_empty_args(str(attrhash["contype"])) if (args == None): continue for attr in attrhash.items(): vname = str(attr[0]) if (vname == "contype"): continue value = str(attr[1]) args.set_val(0, vname, value) pass connects.append(args) pass domain_id = OpenIPMI.open_domain3(name, [], connects, None, None) if (domain_id != None): DomainInfoSetup(other, domain_id) pass else: _oi_logging.error("Error making domain connection for " + name) pass pass return
def __init__(self, parent, ui): global init_history Tix.ScrolledText.__init__(self, parent) self.ui = ui self.currow = 0 self.max_lines = 1000 self.max_history = 100 self.text.bind("<Key>", self.HandleChar) self.text.bind("<Control-Key>", self.HandleCtrlChar) self.text.insert("end", "> ") self.history = [] self.lasthist = 0 for cmd in init_history: self.history.append(cmd[1]) self.lasthist += 1 pass self.history.append("") init_history = None self.currhist = self.lasthist self.cmdlang = OpenIPMI.alloc_cmdlang(self) self.indent = 0 self.cmd_in_progress = False self.bind("<Destroy>", self.OnDestroy) OpenIPMI.set_cmdlang_global_err_handler(self) return
def ok(self, vals): rv = self.node.set_field(self.aidx, self.ptype, str(vals[0])) if (rv != 0): self.glist.SetError("Invalid data value: " + OpenIPMI.get_error_string(rv)) return try: if (self.reiniter != None): if self.reiniter.reinit(self, self.currval, vals[0]): return pass pass except: pass name_s = [""] type_s = [""] value_s = [""] node_s = [None] rv = self.node.get_field(self.aidx, name_s, type_s, value_s, node_s) if (rv != 0): self.glist.SetError("Could not re-get field: " + OpenIPMI.get_error_string(rv)) return self.glist.cleanup_field(type_s[0], value_s) self.currval = value_s[0] self.glist.SetColumn(self.item, self.currval, 1) return
def RestoreDomains(mainhandler): for i in defaultDomains: name = i[0] attrhashes = i[1] other = i[2] connects = [ ] for attrhash in attrhashes: if ("contype" not in attrhash): continue args = OpenIPMI.alloc_empty_args(str(attrhash["contype"])) if (args == None): continue for attr in attrhash.items(): vname = str(attr[0]) if (vname == "contype"): continue value = str(attr[1]) args.set_val(0, vname, value) pass connects.append(args) pass domain_id = OpenIPMI.open_domain3(name, [], connects, None, None) if (domain_id != None): DomainInfoSetup(other, domain_id) pass else: _oi_logging.error("Error making domain connection for " + name) pass pass return
def add_access(self, ch, oinfo): info = oinfo.access item = self.Append(ch, "User Access (" + oinfo.tstr + ")", [], oinfo) v = [0] rv = info.get_alerting_enabled(v) if (not rv): mitem = self.add_data(item, "Alerting Enabled", [str(v[0] != 0)], BoolSetter(self, info.set_alerting_enabled)) pass rv = info.get_per_msg_auth(v) if (not rv): mitem = self.add_data(item, "Per Msg Auth", [str(v[0] != 0)], BoolSetter(self, info.set_per_msg_auth)) pass rv = info.get_user_auth(v) if (not rv): mitem = self.add_data(item, "User Auth", [str(v[0] != 0)], BoolSetter(self, info.set_user_auth)) pass rv = info.get_access_mode(v) if (not rv): mitem = self.add_data(item, "Access Mode", [OpenIPMI.channel_access_mode_string(v[0])], AccessSetter(self, info.set_access_mode)) pass rv = info.get_privilege_limit(v) if (not rv): mitem = self.add_data(item, "Privilege Limit", [OpenIPMI.privilege_string(v[0])], PrivSetter(self, info.set_privilege_limit)) pass return
def add_info(self, ch, oinfo): info = oinfo.info item = self.Append(ch, "Info", []) v = [ 0 ] rv = info.get_medium(v) if (not rv): self.add_data(item, "Medium", [OpenIPMI.channel_medium_string(v[0])]) pass rv = info.get_protocol_type(v) if (not rv): self.add_data(item, "Protocol Type", [OpenIPMI.channel_protocol_string(v[0])]) pass rv = info.get_session_support(v) if (not rv): self.add_data(item, "Session Support", [OpenIPMI.channel_session_support_string(v[0])]) pass v = info.get_vendor_id() if (v): self.add_data(item, "Vendor ID", [v]) pass v = info.get_aux_info() if (v): self.add_data(item, "Aux Info", [v]) pass return
def add_access(self, ch, oinfo): info = oinfo.access item = self.Append(ch, "User Access (" + oinfo.tstr + ")", [], oinfo) v = [ 0 ] rv = info.get_alerting_enabled(v) if (not rv): mitem = self.add_data(item, "Alerting Enabled", [str(v[0] != 0)], BoolSetter(self, info.set_alerting_enabled)) pass rv = info.get_per_msg_auth(v) if (not rv): mitem = self.add_data(item, "Per Msg Auth", [str(v[0] != 0)], BoolSetter(self, info.set_per_msg_auth)) pass rv = info.get_user_auth(v) if (not rv): mitem = self.add_data(item, "User Auth", [str(v[0] != 0)], BoolSetter(self, info.set_user_auth)) pass rv = info.get_access_mode(v) if (not rv): mitem = self.add_data(item, "Access Mode", [OpenIPMI.channel_access_mode_string(v[0])], AccessSetter(self, info.set_access_mode)) pass rv = info.get_privilege_limit(v) if (not rv): mitem = self.add_data(item, "Privilege Limit", [OpenIPMI.privilege_string(v[0])], PrivSetter(self, info.set_privilege_limit)) pass return
def setval(self, val): rv = self.setter(val) if (rv): mcchan.SetError("Could not set value: " + OpenIPMI.get_error_string(rv)) return self.mcchanSetColumn(self.item, OpenIPMI.privilege_string(val), 1) return
def got_pef_cb(self, pef, err): if err: self.ui.ReportError("Error fetching PEF: " + OpenIPMI.get_error_string(err)) return rv = pef.get_config(self) if rv: self.ui.ReportError("Error starting PEF config fetch: " + OpenIPMI.get_error_string(rv)) pass return
def got_pef_cb(self, pef, err): if (err): self.ui.ReportError("Error fetching PEF: " + OpenIPMI.get_error_string(err)) return rv = pef.get_config(self) if (rv): self.ui.ReportError("Error starting PEF config fetch: " + OpenIPMI.get_error_string(rv)) pass return
def setenum(self, val): rv = self.lpc.set_val(self.parm, self.aidx, "integer", str(val)) if (rv != 0): self.glist.SetError("Could not set value to " + str(val) + ": " + OpenIPMI.get_error_string(rv)) return self.currval = val nval = [0] sval = [""] OpenIPMI.lanconfig_enum_val(self.parm, val, nval, sval) self.glist.SetColumn(self.idx, 1, sval[0]) return
def setenum(self, val): rv = self.solc.set_val(self.parm, self.aidx, "integer", str(val)) if (rv != 0): self.glist.SetError("Could not set value to " + str(val) + ": " + OpenIPMI.get_error_string(rv)) return self.currval = val nval = [ 0 ] sval = [ "" ] OpenIPMI.solconfig_enum_val(self.parm, val, nval, sval) self.glib.SetColumn(self.idx, 1, sval[0]) return
def quit(self): global shutdown_thread shutdown_thread = True gui_cmdwin._HistorySave(self.ui.mainhandler, self.histfile) OpenIPMI.set_log_handler(DummyLogHandler()) OpenIPMI.shutdown_everything() if (self.debug_mem): print("OpenIPMI is shutdown, memory problems (SEGVs) after this") print(" are likely due to OpenIPMI data not being freed until") print(" after this point due to the python garbage collector") pass sys.exit() return
def quit(self): global shutdown_thread shutdown_thread = True; gui_cmdwin._HistorySave(self.histfile) OpenIPMI.set_log_handler(DummyLogHandler()) OpenIPMI.shutdown_everything() if (self.debug_mem): print "OpenIPMI is shutdown, memory problems (SEGVs) after this" print " are likely due to OpenIPMI data not being freed until" print " after this point due to the python garbage collector" pass sys.exit() return
def fru_written(self, domain, fru, err): if (err): self.glist.SetError("Could not write FRU: " + OpenIPMI.get_error_string(err)) return self.Close() return
def mc_events_enable_cb(self, mc, err): if (err): _oi_logging.error("Error setting MC events for " + self.name + ": " + OpenIPMI.get_error_string(err)) return self.ee_refr.DoUpdate()
def mc_get_event_log_enable_cb(self, mc, err, val): if (err): _oi_logging.error("Error getting MC event log enable for " + self.name + ": " + OpenIPMI.get_error_string(err)) return self.ui.set_item_text(self.el_item, str(val != 0))
def conn_change_cb(self, domain, err, connum, portnum, anything_connected): if (err): self.ui.new_log("Connection error for " + self.name + "(" + str(connum) + "," + str(portnum) + "): " + OpenIPMI.get_error_string(err)) pass if (not self.first_conn): self.first_conn = True self.ipmb_rescan_time = domain.get_ipmb_rescan_time() self.sel_rescan_time = domain.get_sel_rescan_time() domain.iterate_connections(self) pass if (connum not in self.connections): self.ui.new_log("Got connection for invalid connection number") return self.connections[connum].SetPortUp(domain, portnum, err) any_con_up = False for c in self.connections.itervalues(): any_con_up = c.IsUp() or any_con_up pass if (any_con_up): if (not self.any_con_up): self.ui.decr_item_critical(self.treeroot) pass pass else: if (self.any_con_up): self.ui.incr_item_critical(self.treeroot) pass pass self.any_con_up = any_con_up return
def ok(self, vals): tlist = [ ] if (vals[0]): tlist.append("events") pass del vals[0] if (vals[0]): tlist.append("scanning") pass del vals[0] for en in self.enables: if vals[0]: tlist.append(en) pass del vals[0] pass self.event_enable_str = " ".join(tlist) self.setting = True rv = self.s.sensor_id.to_sensor(self) if (rv == 0): rv = self.err pass if (rv != 0): return ("Error setting sensor event enables: " + OpenIPMI.get_error_string(rv)) return
def setup(self): for i in range(0, OpenIPMI.MAX_USED_CHANNELS) + [15]: chi = self.info[i] if (len(chi) > 0): cdata = MCChanData(self, i) ch = self.Append(self.treeroot, str(i), [], cdata) if ("info" in chi): info = chi["info"] v = [0] rv = info.info.get_medium(v) if (not rv): cdata.medium = v[0] s = OpenIPMI.channel_medium_string(v[0]) self.SetColumn(ch, s, 1) pass self.add_info(ch, info) pass if ("v" in chi): self.add_access(ch, chi["v"]) pass if ("n" in chi): self.add_access(ch, chi["n"]) pass pass pass self.AfterDone() return
def SetupArgs(self): self.errstr.SetError("") args = self.args for f in self.fields: idx = f[0] vtype = f[2] fw = f[3] if (vtype == "bool"): if (fw.get()): val = "true" else: val = "false" pass pass elif (vtype == "enum"): val = str(fw.get()) pass elif ((vtype == "str") or (vtype == "int")): val = str(fw.get()) if (val == ""): val = None pass pass else: continue rv = args.set_val(idx, None, val) if (rv != 0): err = ("Error setting field " + f[1] + ": " + OpenIPMI.get_error_string(rv)) self.errstr.SetError(err) raise Exception(err) pass return args
def SetupArgs(self): self.errstr.SetError("") args = self.args for f in self.fields: idx = f[0] vtype = f[2] fw = f[3] if (vtype == "bool"): if (fw.get()): val = "true" else: val = "false" pass pass elif (vtype == "enum"): val = str(fw.get()) pass elif ((vtype == "str") or (vtype == "int")): val = str(fw.get()) if (val == ""): val = None pass pass else: continue rv = args.set_val(idx, None, val); if (rv != 0): err = ("Error setting field " + f[1] + ": " + OpenIPMI.get_error_string(rv)) self.errstr.SetError(err) raise Exception(err) pass return args
def ok(self): self.status.SetError("") name = str(self.name.entry.get()) if (name == ""): self.status.SetError("No name specified") return try: args = [self.conn[0].FillinConn()] arg = self.conn[1].FillinConn() if (arg != None): args.append(arg) pass pass except Exception as e: self.status.SetError("Error handling connection arguments") import sys, traceback t, v, b = sys.exc_info() bl = traceback.format_tb(b) b = "" for x in bl: b += "\n" + x self.mainhandler.log( "EINF", "Connection Argument Handling error: " + str(t) + ":" + str(v) + ":" + b) return domain_id = OpenIPMI.open_domain3(name, [], args, None, None) if (domain_id == None): self.status.SetError("Error opening domain") return self.destroy() return
def mc_get_event_log_enable_cb(self, mc, err, val): if err: _oi_logging.error( "Error getting MC event log enable for " + self.name + ": " + OpenIPMI.get_error_string(err) ) return self.ui.set_item_text(self.el_item, str(val != 0))
def setup(self): for i in range(0, OpenIPMI.MAX_USED_CHANNELS) + [15]: chi = self.info[i] if (len(chi) > 0): cdata = MCChanData(self, i) ch = self.Append(self.treeroot, str(i), [], cdata) if ("info" in chi): info = chi["info"] v = [ 0 ] rv = info.info.get_medium(v) if (not rv): cdata.medium = v[0] s = OpenIPMI.channel_medium_string(v[0]) self.SetColumn(ch, s, 1) pass self.add_info(ch, info) pass if ("v" in chi): self.add_access(ch, chi["v"]) pass if ("n" in chi): self.add_access(ch, chi["n"]) pass pass pass self.AfterDone() return
def ok(self, vals): tlist = [] if (vals[0]): tlist.append("events") pass del vals[0] if (vals[0]): tlist.append("scanning") pass del vals[0] for en in self.enables: if vals[0]: tlist.append(en) pass del vals[0] pass self.event_enable_str = " ".join(tlist) self.setting = True rv = self.s.sensor_id.to_sensor(self) if (rv == 0): rv = self.err pass if (rv != 0): return ("Error setting sensor event enables: " + OpenIPMI.get_error_string(rv)) return
def ok(self, val): self.ival = int(val[0]) self.init = False rv = self.d.domain_id.to_domain(self) if (rv != 0): return ("Error setting SEL rescan time: " + OpenIPMI.get_error_string(rv)) return
def Connect(self): self.already_up = False self.domain_id = OpenIPMI.open_domain3(self.name, [], self.connection, self, self) del self.connection if (self.domain_id == None): raise InvalidDomainError("Open domain failed, invalid parms") return
def mc_set_event_log_enable_cb(self, mc, err): if err: _oi_logging.error( "Error setting MC event log enable for" + self.name + ": " + OpenIPMI.get_error_string(err) ) return self.el_refr.DoUpdate() return
def __init__(self, parent, mainhandler, enable=True): self.contypes = {} OpenIPMI.parse_args_iter_help(self) if (len(self.contypes) == 0): return Tix.ScrolledWindow.__init__(self, parent, height=300, width=600) self.parent = parent self.enable = enable if (not enable): self.enablevar = Tix.BooleanVar() self.enable_box = Tix.Checkbutton(self.window, text="Enable", variable=self.enablevar) self.enable_box.pack(side=Tix.TOP) pass self.contype = Tix.Select(self.window, label="Connection Type", radio=1, allowzero=0, command=self.selectType) for key in self.contypes.keys(): self.contype.add(key, text=key) pass self.contype.pack(side=Tix.TOP) self.coninfos = [] show = True panel = Tix.Frame(self.window) panel.pack(side=Tix.TOP, fill=Tix.BOTH, expand=1) for ct in self.contypes.keys(): cti = ConnTypeInfo(ct, panel) if (show): cti.pack() self.currcon = cti show = False pass self.coninfos.append(cti) pass self.contype.invoke(list(self.contypes.keys())[0]) return
def sol_connection_state_change(self, conn, state, err): if (self.in_destroy): return if (err != 0): self.errstr.SetError("Connection change: " + OpenIPMI.sol_state_string(state) + " " + OpenIPMI.get_error_string(err)) pass self.statestr.SetError(OpenIPMI.sol_state_string(state)) if ((self.state != OpenIPMI.sol_state_closed) and (state == OpenIPMI.sol_state_closed)): self.filemenu.entryconfigure("Open", state="normal") self.filemenu.entryconfigure("Close", state="disabled") self.filemenu.entryconfigure("Force Close", state="disabled") self.ctrlmenu.entryconfigure("Use Encryption", state="normal") self.ctrlmenu.entryconfigure("Use Authentication", state="normal") self.ctrlmenu.entryconfigure("Deassert CTS/DCD/DSR on connect", state="normal") self.ctrlmenu.entryconfigure("CTS Assertable", state="disabled") self.ctrlmenu.entryconfigure("DCD/DSR Asserted", state="disabled") self.ctrlmenu.entryconfigure("RI Asserted", state="disabled") self.ctrlmenu.entryconfigure("Send Break", state="disabled") for f in self.fmenus: self.flushmenu.entryconfigure(f, state="disabled") pass pass elif ((self.state == OpenIPMI.sol_state_closed) and (state != OpenIPMI.sol_state_closed)): self.filemenu.entryconfigure("Open", state="disabled") self.filemenu.entryconfigure("Close", state="normal") self.filemenu.entryconfigure("Force Close", state="normal") self.ctrlmenu.entryconfigure("Use Encryption", state="disabled") self.ctrlmenu.entryconfigure("Use Authentication", state="disabled") self.ctrlmenu.entryconfigure("Deassert CTS/DCD/DSR on connect", state="disabled") self.ctrlmenu.entryconfigure("CTS Assertable", state="normal") self.ctrlmenu.entryconfigure("DCD/DSR Asserted", state="normal") self.ctrlmenu.entryconfigure("RI Asserted", state="normal") self.ctrlmenu.entryconfigure("Send Break", state="normal") for f in self.fmenus: self.flushmenu.entryconfigure(f, state="normal") pass pass self.state = state return
def setval(self, val): rv = self.setter(val) if rv: mcusers.SetError("Could not set value: " + OpenIPMI.get_error_string(rv)) return self.user.changed = True self.mcusers.SetColumn(self.item, GetPrivilegeString(val), 1) return
def ok(self, vals): rv = self.lpc.set_val(self.parm, self.aidx, self.ptype, str(vals[0])) if (rv != 0): self.glist.SetError("Invalid data value: " + OpenIPMI.get_error_string(rv)) return self.currval = vals[0] self.glist.SetColumn(self.idx, 1, vals[0]) return
def ok(self, vals): rv = self.solc.set_val(self.parm, self.aidx, self.ptype, str(vals[0])) if (rv != 0): self.glist.SetError("Invalid data value: " + OpenIPMI.get_error_string(rv)) return self.currval = vals[0] self.glist.SetColumn(self.idx, 1, vals[0]) return
def ok(self, vals): val = str(vals[0]) rv = self.setter(val) if (rv): return ("Could not set value: " + OpenIPMI.get_error_string(rv)) self.user.changed = True self.mcusers.SetColumn(self.item, str(val), 1) self.currval = val return
def setval(self, val): rv = self.setter(val) if (rv): mcusers.SetError("Could not set value: " + OpenIPMI.get_error_string(rv)) return self.user.changed = True self.mcusers.SetColumn(self.item, GetPrivilegeString(val), 1) return
def ok(self, vals): val = int(vals[0]) rv = self.setter(val) if rv: return "Could not set value: " + OpenIPMI.get_error_string(rv) self.user.changed = True self.mcusers.SetColumn(self.item, str(val), 1) self.currval = val return
def ok(self, val): self.acttime = int(val) rv = self.e.entity_id.to_entity(self) if (rv == 0): rv = self.err pass if (rv != 0): return ("Error setting activation time: " + OpenIPMI.get_error_string(rv)) return
def insert_element(self, child): rv = self.node.set_field(self.aidx, "integer", str(child.aidx)) if (rv != 0): self.glist.SetError("Could not insert item: " + OpenIPMI.get_error_string(rv)) return self.redisplay_item(child.aidx, child.item) self.reidx_children() self.length += 1 return
def __init__(self, parent, mainhandler, enable=True): self.contypes = { } OpenIPMI.parse_args_iter_help(self) if (len(self.contypes) == 0): return Tix.ScrolledWindow.__init__(self, parent, height=300, width=600) self.parent = parent self.enable = enable; if (not enable): self.enablevar = Tix.BooleanVar() self.enable_box = Tix.Checkbutton(self.window, text="Enable", variable=self.enablevar) self.enable_box.pack(side=Tix.TOP) pass self.contype = Tix.Select(self.window, label="Connection Type", radio=1, allowzero=0, command=self.selectType) for key in self.contypes.keys(): self.contype.add(key, text=key) pass self.contype.pack(side=Tix.TOP) self.coninfos = [ ] show = True panel = Tix.Frame(self.window) panel.pack(side=Tix.TOP, fill=Tix.BOTH, expand=1) for ct in self.contypes.keys(): cti = ConnTypeInfo(ct, panel) if (show): cti.pack() self.currcon = cti show = False pass self.coninfos.append(cti) pass self.contype.invoke(self.contypes.keys()[0]) return
def ok(self, vals): self.ival = int(vals[0]) self.init = False rv = self.m.mc_id.to_mc(self) if rv == 0: rv = self.err pass if rv != 0: return "Error setting SEL rescan time: " + OpenIPMI.get_error_string(rv) return
def delete_element(self, child): rv = self.node.set_field(self.aidx, "integer", str(-(child.aidx+1))) if (rv != 0): self.glist.SetError("Could not delete item: " + OpenIPMI.get_error_string(rv)) return self.glist.Remove(child.item) del self.children[child.aidx] self.reidx_children() self.length -= 1 return
def delete_element(self, child): rv = self.node.set_field(self.aidx, "integer", str(-(child.aidx + 1))) if (rv != 0): self.glist.SetError("Could not delete item: " + OpenIPMI.get_error_string(rv)) return self.glist.Remove(child.item) del self.children[child.aidx] self.reidx_children() self.length -= 1 return
def pef_got_config_cb(self, pef, err, pefconfig): if err: if err == OpenIPMI.eagain: self.ui.ReportError("PEF already locked by another user, " "Try clearing the lock.") pass else: self.ui.ReportError("Error fetching PEF config: " + OpenIPMI.get_error_string(err)) pass return _mc_pefparm.MCPefParm(self, pef, pefconfig) return
def ok(self, vals): self.positive = int(vals[0]) self.negative = int(vals[1]) rv = self.s.sensor_id.to_sensor(self) if (rv == 0): rv = self.err pass if (rv != 0): return ("Error setting sensor thresholds: " + OpenIPMI.get_error_string(rv)) return
def ok(self, vals): self.ival = int(vals[0]) self.init = False rv = self.m.mc_id.to_mc(self) if (rv == 0): rv = self.err pass if (rv != 0): return ("Error setting SEL rescan time: " + OpenIPMI.get_error_string(rv)) return