Пример #1
0
def upload_platon(node: Node, platon_bin):
    """
    Upload a binary file to the specified node
    :param node:
    :param platon_bin:
    :return:
    """
    node.run_ssh("rm -rf {}".format(node.remote_bin_file))
    node.upload_file(platon_bin, node.remote_bin_file)
    node.run_ssh("chmod +x {}".format(node.remote_bin_file))
    node.run_ssh("mkdir zlp")
Пример #2
0
def upload_platon(node: Node, platon_bin):
    """
    Upload a binary file to the specified node
    :param node:
    :param platon_bin:
    :return:
    """
    node.run_ssh("rm -rf {}".format(node.remote_bin_file))
    node.upload_file(platon_bin, node.remote_bin_file)
    node.run_ssh("chmod +x {}".format(node.remote_bin_file))
    log.info(f"Node {node.node_mark} upload platon succeed")
    node.restart()
Пример #3
0
 def backup(node: Node):
     return node.backup_log()
Пример #4
0
 def init(node_config):
     return Node(node_config, self.cfg, self.chain_id)
Пример #5
0
 def clean_db(node: Node):
     return node.clean_db()
Пример #6
0
 def clean(node: Node):
     return node.clean()
Пример #7
0
 def restart(node: Node):
     return node.restart()
Пример #8
0
 def stop(node: Node):
     return node.stop()
Пример #9
0
 def prepare(node: Node):
     return node.put_all_file(genesis_file)
Пример #10
0
 def start(node: Node, need_init_chain):
     return node.start(need_init_chain)
Пример #11
0
 def close(node: Node):
     return node.close()
Пример #12
0
def assert_error_deploy(env: Node, genesis_file, msg="Error config"):
    is_success, err_msg = env.deploy_me(genesis_file)
    assert not is_success, "{}-{}".format(msg, err_msg)