Traceback when isolating nodes in simulated topology (partitioned net)
When creating a "brain-split"/"net-split" where one or more nodes are isolated in the topology the application does a traceback.
The issue appears to be triggered then the last path to a node is removed
Initializing model....
PyMetric interactive shell, type 'help' for help
>>> sim
Simulation mode active, type 'stop' or 'simulation stop' to end it
(sim) >>> simplot
(sim) >>> linkfail narvik-gw2
narvik-gw2
(sim) >>> linkfail narvik-gw2
bodo-gw3 ma2-gw narvik-gw1 oslo-gw1 trd-gw utsjok-gw1
(sim) >>> linkfail narvik-gw2 utsjok-gw1
(sim) (1c/0:0:0n/0.13L/1r/1d) >>> linkfail hammerfest-gw1 ma2-gw
(sim) (2c/113:0:0n/0.25L/1r/2d) >>>
(sim) (2c/113:0:0n/0.25L/1r/2d) >>> linkfail tromso-gw alta-gw3
Traceback (most recent call last):
File "metrics.py", line 45, in <module>
cli.cmdloop()
File "/home/runarb/devel/PyMetric-scm/command.py", line 65, in cmdloop
Cmd.cmdloop(self)
File "/usr/lib/python3.6/cmd.py", line 139, in cmdloop
stop = self.postcmd(stop, line)
File "/home/runarb/devel/PyMetric-scm/command.py", line 85, in postcmd
difflen = nx.average_shortest_path_length(self.simulation.graph)\
File "/usr/local/lib/python3.6/dist-packages/networkx/algorithms/shortest_paths/generic.py", line 403, in average_shortest_path_length
raise nx.NetworkXError("Graph is not weakly connected.")
networkx.exception.NetworkXError: Graph is not weakly connected.