本文整理汇总了Python中nepi.execution.ec.ExperimentController.get_attribute方法的典型用法代码示例。如果您正苦于以下问题:Python ExperimentController.get_attribute方法的具体用法?Python ExperimentController.get_attribute怎么用?Python ExperimentController.get_attribute使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类nepi.execution.ec.ExperimentController
的用法示例。
在下文中一共展示了ExperimentController.get_attribute方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1:
# 需要导入模块: from nepi.execution.ec import ExperimentController [as 别名]
# 或者: from nepi.execution.ec.ExperimentController import get_attribute [as 别名]
ec.set(node1, "minBandwidth", minBandwidth)
ec.set(node1, "username", slicename)
ec.set(node1, "pluser", pl_user)
ec.set(node1, "plpassword", pl_password)
ec.set(node1, "cleanHome", True)
ec.set(node1, "cleanProcesses", True)
node2 = ec.register_resource("PlanetlabNode")
ec.set(node2, "country", "Spain")
ec.set(node2, "username", slicename)
ec.set(node2, "pluser", pl_user)
ec.set(node2, "plpassword", pl_password)
ec.set(node2, "cleanHome", True)
ec.set(node2, "cleanProcesses", True)
remote_hostname = ec.get_attribute(node1, "hostname")
destination = "%[email protected]%s" % (slicename, remote_hostname)
app1 = ec.register_resource("LinuxApplication")
file = "../big_file.geo"
ec.set(app1, "sources", file)
command = "scp $SRC/big_file.geo %s" % destination
ec.set(app1, "command", command)
ec.register_connection(app1, node1)
app2 = ec.register_resource("LinuxApplication")
ec.set(app, "sudo", sudo)
ec.set(app, "depends", "ifstat")
command = "ifstat -b eth0 > ifstat.txt"
command = "iperf ..."
ec.set(app2, "command", command)