本文整理汇总了Python中Server.servertest方法的典型用法代码示例。如果您正苦于以下问题:Python Server.servertest方法的具体用法?Python Server.servertest怎么用?Python Server.servertest使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Server
的用法示例。
在下文中一共展示了Server.servertest方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1:
# 需要导入模块: import Server [as 别名]
# 或者: from Server import servertest [as 别名]
# instantiate and test the data file system
import SimFS
myData = SimFS.makefs(myDDisk, data)
data_desc = "%s (on %s)" % (myData.desc, myDDisk.desc)
SimFS.fstest(myData, tests, descr=data_desc)
# instantiate and test the data server
import Server
myServer = Server.makeServer(myData, server)
msg = "%dx%s, %dx%s, %dx%s, %dx%s" % (
myServer.num_cpus, myServer.cpu.desc,
myServer.num_disks, data_desc,
myServer.num_nics, myServer.nic.desc,
myServer.num_hbas, myServer.hba.desc)
Server.servertest(myServer, tests, descr=msg)
# instantiate a DLM
import Dlm
myDlm = Dlm.makeDLM(dlm)
# instantiate and test the gateway server
import Gateway
myGate = Gateway.makeGateway(myServer, myDlm, gateway)
msg = "%dx%s, front=%dx%s, back=%dx%s" % (
myGate.num_cpus, myGate.cpu.desc,
myGate.num_fronts, myGate.front.desc,
myGate.num_backs, myGate.back.desc)
Gateway.gatewaytest(myGate, tests, descr=msg)
# check for warnings