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


Python ExperimentController.wait_deployed方法代码示例

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


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

示例1:

# 需要导入模块: from nepi.execution.ec import ExperimentController [as 别名]
# 或者: from nepi.execution.ec.ExperimentController import wait_deployed [as 别名]
        apps.append(app)

# Set perisent blacklist to True
ec.set_global('PlanetlabNode', 'persist_blacklist', True)

# Deploy the experiment
zero_time = datetime.datetime.now()

# Launch thread to monitor CPU and memory usage
thread_monitor_deploy.start()

# Deploy experiment
ec.deploy()

# Wait until nodes and apps are deployed
ec.wait_deployed(nodes + apps)

# Time to deploy
ttd_time = datetime.datetime.now()

# Launch thread to monitor CPU and memory usage
thread_monitor_start.start()

# Stop deploy monitoring thread
stop_monitor_deploy.append(0)

# Wait until the apps are finished
ec.wait_finished(apps)

# Time to finish
ttr_time = datetime.datetime.now()
开发者ID:phiros,项目名称:nepi,代码行数:33,代码来源:planetlab.py

示例2: range

# 需要导入模块: from nepi.execution.ec import ExperimentController [as 别名]
# 或者: from nepi.execution.ec.ExperimentController import wait_deployed [as 别名]
# Third set of nodes can be any node in Planetlab testbed.
for i in range(70):
    node = create_node(ec, username, pl_user, pl_password, critical=False)
    third_set_nodes.append(node)

# Register conditions

# The nodes that are completely identified by their hostnames have to be provisioned 
# before the rest of the nodes. This assures that no other resource will use the
# identified node even if the constraints matchs. 
# In this example the nodes from the first need to be provisioned before the ones in
# the second and third group. Using the same logic, is convenient that nodes from the
# second group are provisioned before nodes from the third group.

ec.register_condition(second_set_nodes, ResourceAction.DEPLOY, first_set_nodes, ResourceState.PROVISIONED)
ec.register_condition(third_set_nodes, ResourceAction.DEPLOY, second_set_nodes, ResourceState.PROVISIONED)
 
# Deploy the experiment:
ec.deploy()

# Wait until all nodes are provisioned:
ec.wait_deployed(first_set_nodes)
ec.wait_deployed(second_set_nodes)
ec.wait_deployed(third_set_nodes)

# Do the experiment controller shutdown:
ec.shutdown()

# END
开发者ID:phiros,项目名称:nepi,代码行数:31,代码来源:scalability.py

示例3: create_vlc_server

# 需要导入模块: from nepi.execution.ec import ExperimentController [as 别名]
# 或者: from nepi.execution.ec.ExperimentController import wait_deployed [as 别名]
# Register connection ifaces - channel

ec.register_connection(iface_center, chan)
ec.register_connection(iface_client1, chan)
ec.register_connection(iface_client2, chan)
ec.register_connection(iface_client3, chan)
ec.register_connection(iface_client4, chan)
ec.register_connection(iface_client5, chan)

resources = [video_server] + omf_nodes + omf_ifaces + [chan]

# Deploy physical resources and wait until they become provisioned

ec.deploy(resources)

ec.wait_deployed(resources)
  
time.sleep(3)

# Functions for applications registration in the nodes

def create_vlc_server(ec, video_server, mode):
    vlc_server = ec.register_resource("linux::Application")
    ec.set(vlc_server, "depends", "vlc")
    ec.set(vlc_server, "sources", "examples/omf/demo_openlab/big_buck_bunny_240p_mpeg4_lq.ts")
    # Depending on the mode selected to run the experiment, 
    # different configuation files and command to run are
    # uploaded to the server
    if mode == 'vod':
        ec.set(vlc_server, "files", "examples/omf/demo_openlab/conf_VoD.vlm")
        ec.set(vlc_server, "command", "sudo -S dbus-uuidgen --ensure ; cvlc --vlm-conf ${SHARE}/conf_VoD.vlm --rtsp-host 128.232.103.203:5554 2>/tmp/logpl.txt")
开发者ID:phiros,项目名称:nepi,代码行数:33,代码来源:vod_experiment.py

示例4:

# 需要导入模块: from nepi.execution.ec import ExperimentController [as 别名]
# 或者: from nepi.execution.ec.ExperimentController import wait_deployed [as 别名]
ec.set(node2, "sfauser", sfauser)
ec.set(node2, "sfaPrivateKey", sfaPrivateKey)
ec.set(node2, "gatewayUser", "nepi")
ec.set(node2, "gateway", "bastion.test.iminds.be")
ec.set(node2, 'xmppServer', "xmpp.ilabt.iminds.be")
ec.set(node2, 'xmppUser', "nepi")
ec.set(node2, 'xmppPort', "5222")
ec.set(node2, 'xmppPassword', "1234")

node3 = ec.register_resource("WilabtSfaNode")
ec.set(node3, "host", 'zotacG1')
ec.set(node3, "slicename", slicename)
ec.set(node3, "sfauser", sfauser)
ec.set(node3, "sfaPrivateKey", sfaPrivateKey)
ec.set(node3, "gatewayUser", "nepi")
ec.set(node3, "gateway", "bastion.test.iminds.be")
ec.set(node3, 'xmppServer', "xmpp.ilabt.iminds.be")
ec.set(node3, 'xmppUser', "nepi")
ec.set(node3, 'xmppPort', "5222")
ec.set(node3, 'xmppPassword', "1234")


# Deploy
ec.deploy()

ec.wait_deployed([node1, node2, node3])

ec.shutdown()

# End
开发者ID:phiros,项目名称:nepi,代码行数:32,代码来源:wilabt_provision.py

示例5: add_app

# 需要导入模块: from nepi.execution.ec import ExperimentController [as 别名]
# 或者: from nepi.execution.ec.ExperimentController import wait_deployed [as 别名]
        app = add_app(ec, command, node)
        apps.append(app)
        ec.register_condition(apps, ResourceAction.STOP, apps, ResourceState.STARTED , "3s")


# Deploy the experiment
zero_time = datetime.datetime.now()

# Launch thread to monitor CPU and memory usage
thread_monitor_deploy.start()

# Deploy experiment
ec.deploy()

# Wait until nodes and apps are deployed
ec.wait_deployed(nodes + apps + ifaces + [channel])

# Time to deploy
ttd_time = datetime.datetime.now()

# Launch thread to monitor CPU and memory usage
thread_monitor_start.start()

# Stop deploy monitoring thread
stop_monitor_deploy.append(0)

# Wait until the apps are finished
ec.wait_finished(apps)

# Time to finish
ttr_time = datetime.datetime.now()
开发者ID:phiros,项目名称:nepi,代码行数:33,代码来源:omf6.py

示例6:

# 需要导入模块: from nepi.execution.ec import ExperimentController [as 别名]
# 或者: from nepi.execution.ec.ExperimentController import wait_deployed [as 别名]
ec.set(chan, "Delay", "0s")

for dev in devs:
    ec.register_connection(chan, dev)

# Deploy the experiment
zero_time = datetime.datetime.now()

# Launch thread to monitor CPU and memory usage
thread_monitor_deploy.start()

# Deploy experiment
ec.deploy()

# Wait until nodes and apps are deployed
ec.wait_deployed(nodes + apps + devs)

# Time to deploy
ttd_time = datetime.datetime.now()

# Launch thread to monitor CPU and memory usage
thread_monitor_start.start()

# Stop deploy monitoring thread
stop_monitor_deploy.append(0)

# Wait until the apps are finished
ec.wait_finished(apps)

# Time to finish
ttr_time = datetime.datetime.now()
开发者ID:phiros,项目名称:nepi,代码行数:33,代码来源:ns3.py


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