Example #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")
Example #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()
Example #3
0
 def backup(node: Node):
     return node.backup_log()
Example #4
0
 def init(node_config):
     return Node(node_config, self.cfg, self.chain_id)
Example #5
0
 def clean_db(node: Node):
     return node.clean_db()
Example #6
0
 def clean(node: Node):
     return node.clean()
Example #7
0
 def restart(node: Node):
     return node.restart()
Example #8
0
 def stop(node: Node):
     return node.stop()
Example #9
0
 def prepare(node: Node):
     return node.put_all_file(genesis_file)
Example #10
0
 def start(node: Node, need_init_chain):
     return node.start(need_init_chain)
Example #11
0
 def close(node: Node):
     return node.close()
Example #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)