Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add: mikrotik_routeros_routing_ospf_interface_print_terse #1910

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

kwood92
Copy link
Contributor

@kwood92 kwood92 commented Nov 26, 2024

Add support for parsing 'routing ospf interface print terse'


Start
^\s*\d+\s*(${DYNAMIC}\s*)?(${PASSIVE}\s*)?(comment=.+?)?interface=${INTERFACE}\s*cost=${COST}\s*priority=\d+\s*authentication=\S+\s*authentication-key=(?:")?\S+(?:")?\s*authentication-key-id=\d+\s*network-type=\S+\s*instance-id=\d+\s*retransmit-interval=\d+s\s*transmit-delay=\d+s\s*hello-interval=\d+s\s*dead-interval=\d+s\s*use-bfd=\S+$$ -> Record
^\s*\d+\s*(D\s*)?address=\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}%${INTERFACE}\s*area=\S+\s*state=(${PASSIVE}|\S+)\s*network-type=\S+\s*cost=${COST}\s*(priority=\d+\s*)?use-bfd=\S+\s*retransmit-interval=\d+s\s*transmit-delay=\d+s\s*hello-interval=\d+s\s*dead-interval=\d+s\s*$$ -> Record

This comment was marked as outdated.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In RouterOS 7, all interfaces in the 'routing ospf interface print terse' output are marked with 'D' even though the interfaces are not actually dynamically added into OSPF (unlike RouterOS 6), hence why it's ignored.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @kwood92 for the details.
I don't work with RouterOS much these days so I wasn't aware. 🫣

Comment on lines +4 to +12
dynamic: ""
interface: "vlan11@vlan975@sfp-sfpplus1"
passive: ""
- cost: "10"
dynamic: ""
interface: "vlan10@vlan975@sfp-sfpplus1"
passive: ""
- cost: "1"
dynamic: ""

This comment was marked as outdated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants