Commit f7a6a7f2 authored by Simon Redman's avatar Simon Redman

Finish plumbing through OSPF sniffer server port

parent bc9bb90f
......@@ -126,6 +126,7 @@ def start_sniffer_on_network(graph: networkx.Graph,
path:str=DEFAULT_CLONE_PATH,
executable: str=DEFAULT_EXECUTABLE,
controller: str=DEFAULT_CONTROLLER,
port: int=DEFAULT_CONTROLLER_PORT,
pidfile: str=DEFAULT_PIDFILE,
ignore_nodes: List[str]=None):
"""
......@@ -135,12 +136,13 @@ def start_sniffer_on_network(graph: networkx.Graph,
:param path: path into which the repository has been cloned
:param executable: executable to execute
:param controller: node which is listening for the OSPF reports
:param port: port on the controller listening for OSPF updates
:param pidfile: file to write the PID of the daemon
:param ignore_nodes: nodes which should not have the daemon run on them
:return:
"""
if ignore_nodes is None: ignore_nodes = []
command = _generate_start_command(path=path, executable=executable, controller=controller, pidfile=pidfile)
command = _generate_start_command(path=path, executable=executable, controller=controller, port=port, pidfile=pidfile)
hosts = [host for host in graph.nodes if host not in ignore_nodes]
commands = [command for host in hosts]
......@@ -240,6 +242,7 @@ if __name__ == "__main__":
start_sniffer_on_network(netgraph.graph,
path=args.clone_path,
controller=args.controller_name,
port=args.controller_port,
pidfile=args.pid_file,
ignore_nodes=ignore_nodes)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment