fabfile.py 文件源码

python
阅读 21 收藏 0 点赞 0 评论 0

项目:loopix 作者: UCL-InfoSec 项目源码 文件源码
def run_clients(num):
    for i in range(int(num)):
        dirc = 'client%s' % i
        with cd(dirc+'/loopix/loopix'):
            run("git checkout %s" % BRANCH)
            run('twistd -y run_client.py')
            pid = run('cat twistd.pid')
            print "Run Client on %s with PID %s" % (env.host, pid)
#
# @roles("mixnodes", "providers")
# @parallel
# def reset_config_servers(branch):
#     with cd("loopix/loopix"):
#         run("git checkout %s" % branch)
#         run('git reset --hard')
#
# @roles("clients")
# @parallel
# def reset_config_clients(num, branch):
#     for i in range(int(num)):
#         dirc = 'client%s' % i
#         with cd(dirc+'/loopix/loopix'):
#             #sudo('rm -f config.json')
#             run("git checkout %s" % branch)
#             run('git reset --hard')
#
#
# @roles("mixnodes", "providers")
# @parallel
# def update_git_servers(branch):
#     with cd("loopix/loopix"):
#         run("git checkout %s" % branch)
#         run("git pull")
#
# @roles("clients")
# @parallel
# def update_git_clients(num, branch):
#     for i in range(int(num)):
#         dirc = 'client%s' % i
#         with cd(dirc+'/loopix/loopix'):
#             run("git checkout %s" % branch)
#             run('git pull')
#
# def update_git(numClients, branch):
#     execute(update_git_servers, branch)
#     execute(update_git_clients, int(numClients), branch)
#
#
#
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号