|
|
@ -79,7 +79,8 @@ class OspfDataTopologyProvider(TopologyProvider):
|
|
|
|
net_id = re.match(r'((network|stubnet|external) [^ ]+)', n).group(1)
|
|
|
|
net_id = re.match(r'((network|stubnet|external) [^ ]+)', n).group(1)
|
|
|
|
if net_id in self.network_renames:
|
|
|
|
if net_id in self.network_renames:
|
|
|
|
net_id = self.network_renames[net_id]
|
|
|
|
net_id = self.network_renames[net_id]
|
|
|
|
metric = int(re.search(r'metric ([0-9]+)', n).group(1))
|
|
|
|
# FIXME: Hacking metric and metric2 together is a bad idea.
|
|
|
|
|
|
|
|
metric = int(re.search(r'metric2? ([0-9]+)', n).group(1))
|
|
|
|
ident = (r.ident, net_id)
|
|
|
|
ident = (r.ident, net_id)
|
|
|
|
# I really hope that one router has at most one link to each network (incl. external)
|
|
|
|
# I really hope that one router has at most one link to each network (incl. external)
|
|
|
|
assert ident not in self.topology.links
|
|
|
|
assert ident not in self.topology.links
|
|
|
|