OSPF¶
The ospf collector dispatches to a vendor-specific implementation. Only
junos is wired up today.
Junos collection¶
- Runs
driver.cli(["show ospf neighbor"]). - Parses each line with the regex
^(\d+\.\d+\.\d+\.\d+)\s+(\S+)\s+(\S+)\s+(\d+\.\d+\.\d+\.\d+), yielding(neighbor_ip, interface, state, router_id).
What it produces¶
Per neighbor:
Action: confirmed if an IPAddress already exists at <address>/32,
else new.
object_repr is
OSPF neighbor <ip|markdown link> (RID: <router_id>).
Apply behavior¶
- Get-or-create the
IPAddressat<address>/32(auto-discovered tag). - Record a single
JournalEntryper device summarizing all neighbors. - If
netbox_routingis installed, look up the device'sOSPFInstanceand log it (no row creation today).
Limitations¶
- IPv4 only (the regex requires dotted-quad addresses).
- No
OSPFNeighborrow creation; the integration withnetbox-routingis currently informational. Extending it requires registering anOSPFNeighbormodel and adapting_ospf_routing_integration(). - Only Junos is supported. See Vendor Dispatch for adding a vendor.