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