sawtooth.manage.subproc module

class sawtooth.manage.subproc.SubprocessNodeController(host_name='localhost', verbose=False)[source]

Bases: sawtooth.manage.node.NodeController

is_running(node_name)[source]

Authority on whether a node is in fact running. On discovering that a node no longer exists, it removes the node from _nodes. We do this here rather than in stop/kill in order to allow stop/kill to be non-blocking. Thus, our internal model of nodes (_nodes) will always be correct for a particular node the next time someone asks if it ‘is_running’. :param node_name: :type node_name: str

Returns:
Return type:ret_val (bool)
create_genesis_block(node_args)[source]

Creates a key, then uses this key to author a genesis block. The node corresponding to node_args must be initially available on the network in order to serve this genesis block. :param node_args: :type node_args: NodeArguments

do_start(node_args, stdout, stderr)[source]
start(node_args)[source]

Start a node if it is not already running. :param node_args: :type node_args: NodeArguments

stop(node_name)[source]

Send a non-blocking termination request to a node if it appears to be running. OSError is caught and logged because the process may die between is_running and our signal transmission attempt. :param node_name: :type node_name: str

kill(node_name)[source]

Send a non-blocking kill (9) to a node if it appears to be running. OSError is caught and logged because the process may die between is_running and our signal transmission attempt. :param node_name: :type node_name: str

get_node_names()[source]
get_ip(node_name)[source]