本文整理汇总了Python中OpenIPMI.channel_access_mode_string方法的典型用法代码示例。如果您正苦于以下问题:Python OpenIPMI.channel_access_mode_string方法的具体用法?Python OpenIPMI.channel_access_mode_string怎么用?Python OpenIPMI.channel_access_mode_string使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类OpenIPMI
的用法示例。
在下文中一共展示了OpenIPMI.channel_access_mode_string方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: add_access
# 需要导入模块: import OpenIPMI [as 别名]
# 或者: from OpenIPMI import channel_access_mode_string [as 别名]
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
示例2: setval
# 需要导入模块: import OpenIPMI [as 别名]
# 或者: from OpenIPMI import channel_access_mode_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.mcchan.SetColumn(self.item,
OpenIPMI.channel_access_mode_string(val),
1)
return