Commit b60a23af authored by Simon Redman's avatar Simon Redman

Add ignore option to frr_configurator stop_servies

parent b3d1662a
......@@ -229,14 +229,14 @@ def start_frr_on_network(netgraph, ignore_nodes=[]):
ssh_helper.run_commands_on_many_hosts(sessions, commands)
def stop_frr_on_network(netgraph):
def stop_frr_on_network(netgraph, ignore_nodes=[]):
Stop frr on all nodes in the network
:param netgraph: networkx graph representing the network
:return: None
sessions = [session for session in map(lambda host : netgraph._node[host]['session'], netgraph.nodes)]
sessions = list(map(lambda host : netgraph._node[host]['session'], [host for host in netgraph.nodes if host not in ignore_nodes]))
commands = [STOP_DAEMON_COMMAND for session in sessions]
ssh_helper.run_commands_on_many_hosts(sessions, commands)
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