当前位置: 首页>>代码示例>>Python>>正文


Python OpenIPMI.get_error_string方法代码示例

本文整理汇总了Python中OpenIPMI.get_error_string方法的典型用法代码示例。如果您正苦于以下问题:Python OpenIPMI.get_error_string方法的具体用法?Python OpenIPMI.get_error_string怎么用?Python OpenIPMI.get_error_string使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在OpenIPMI的用法示例。


在下文中一共展示了OpenIPMI.get_error_string方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: ok

# 需要导入模块: import OpenIPMI [as 别名]
# 或者: from OpenIPMI import get_error_string [as 别名]
    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
开发者ID:sharkconi,项目名称:openipmi,代码行数:31,代码来源:_fru.py

示例2: got_pef_cb

# 需要导入模块: import OpenIPMI [as 别名]
# 或者: from OpenIPMI import get_error_string [as 别名]
 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
开发者ID:wrouesnel,项目名称:openipmi,代码行数:11,代码来源:_mc.py

示例3: conn_change_cb

# 需要导入模块: import OpenIPMI [as 别名]
# 或者: from OpenIPMI import get_error_string [as 别名]
 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
开发者ID:sharkconi,项目名称:openipmi,代码行数:34,代码来源:_domain.py

示例4: fru_written

# 需要导入模块: import OpenIPMI [as 别名]
# 或者: from OpenIPMI import get_error_string [as 别名]
 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
开发者ID:sharkconi,项目名称:openipmi,代码行数:9,代码来源:_fru.py

示例5: mc_get_event_log_enable_cb

# 需要导入模块: import OpenIPMI [as 别名]
# 或者: from OpenIPMI import get_error_string [as 别名]
 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))
开发者ID:wrouesnel,项目名称:openipmi,代码行数:9,代码来源:_mc.py

示例6: ok

# 需要导入模块: import OpenIPMI [as 别名]
# 或者: from OpenIPMI import get_error_string [as 别名]
    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
开发者ID:sharkconi,项目名称:openipmi,代码行数:29,代码来源:_sensor.py

示例7: SetupArgs

# 需要导入模块: import OpenIPMI [as 别名]
# 或者: from OpenIPMI import get_error_string [as 别名]
 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
开发者ID:sharkconi,项目名称:openipmi,代码行数:35,代码来源:gui_domainDialog.py

示例8: ok

# 需要导入模块: import OpenIPMI [as 别名]
# 或者: from OpenIPMI import get_error_string [as 别名]
 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
开发者ID:sharkconi,项目名称:openipmi,代码行数:10,代码来源:_domain.py

示例9: mc_set_event_log_enable_cb

# 需要导入模块: import OpenIPMI [as 别名]
# 或者: from OpenIPMI import get_error_string [as 别名]
 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
开发者ID:wrouesnel,项目名称:openipmi,代码行数:10,代码来源:_mc.py

示例10: setval

# 需要导入模块: import OpenIPMI [as 别名]
# 或者: from OpenIPMI import get_error_string [as 别名]
 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
开发者ID:wrouesnel,项目名称:openipmi,代码行数:10,代码来源:_mc_user.py

示例11: ok

# 需要导入模块: import OpenIPMI [as 别名]
# 或者: from OpenIPMI import get_error_string [as 别名]
 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
开发者ID:sharkconi,项目名称:openipmi,代码行数:11,代码来源:_mc_solparm.py

示例12: ok

# 需要导入模块: import OpenIPMI [as 别名]
# 或者: from OpenIPMI import get_error_string [as 别名]
 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
开发者ID:wrouesnel,项目名称:openipmi,代码行数:11,代码来源:_mc_user.py

示例13: insert_element

# 需要导入模块: import OpenIPMI [as 别名]
# 或者: from OpenIPMI import get_error_string [as 别名]
 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
开发者ID:sharkconi,项目名称:openipmi,代码行数:12,代码来源:_fru.py

示例14: setval

# 需要导入模块: import OpenIPMI [as 别名]
# 或者: from OpenIPMI import get_error_string [as 别名]
 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
开发者ID:sharkconi,项目名称:openipmi,代码行数:12,代码来源:_mc_chan.py

示例15: ok

# 需要导入模块: import OpenIPMI [as 别名]
# 或者: from OpenIPMI import get_error_string [as 别名]
 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
开发者ID:wrouesnel,项目名称:openipmi,代码行数:12,代码来源:_mc.py


注:本文中的OpenIPMI.get_error_string方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。