-
Notifications
You must be signed in to change notification settings - Fork 729
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
kwood92
wants to merge
1
commit into
networktocode:master
Choose a base branch
from
kwood92:mikrotik_routeros_routing_ospf_interface_print_terse
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+45
−0
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
ntc_templates/templates/mikrotik_routeros_routing_ospf_interface_print_terse.textfsm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
Value INTERFACE (\S+) | ||
Value DYNAMIC (D) | ||
Value PASSIVE (P|passive) | ||
Value COST (\d+) | ||
|
||
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 | ||
^\s*$$ | ||
^. -> Error |
3 changes: 3 additions & 0 deletions
3
...krotik_routeros/routing_ospf_interface_print_terse/routing_ospf_interface_print_terse.raw
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
0 P interface=all cost=10 priority=1 authentication=none authentication-key=foo authentication-key-id=1 network-type=broadcast instance-id=0 retransmit-interval=5s transmit-delay=1s hello-interval=10s dead-interval=40s use-bfd=no | ||
1 comment=ospf comment interface=vlan906@bond1 cost=10 priority=1 authentication=none authentication-key="bar" authentication-key-id=1 network-type=broadcast instance-id=0 retransmit-interval=5s transmit-delay=1s hello-interval=10s dead-interval=40s use-bfd=no | ||
2 DP interface=lo0 cost=10 priority=1 authentication=none authentication-key="" authentication-key-id=1 network-type=broadcast instance-id=0 retransmit-interval=5s transmit-delay=1s hello-interval=10s dead-interval=40s use-bfd=no |
14 changes: 14 additions & 0 deletions
14
...krotik_routeros/routing_ospf_interface_print_terse/routing_ospf_interface_print_terse.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
--- | ||
parsed_sample: | ||
- cost: "10" | ||
dynamic: "" | ||
interface: "all" | ||
passive: "P" | ||
- cost: "10" | ||
dynamic: "" | ||
interface: "vlan906@bond1" | ||
passive: "" | ||
- cost: "10" | ||
dynamic: "D" | ||
interface: "lo0" | ||
passive: "P" |
3 changes: 3 additions & 0 deletions
3
...otik_routeros/routing_ospf_interface_print_terse/routing_ospf_interface_print_terse01.raw
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
0 D address=1.1.1.1%vlan11@vlan975@sfp-sfpplus1 area=INET-v2 state=ptp network-type=ptp cost=1400 use-bfd=no retransmit-interval=5s transmit-delay=1s hello-interval=1s dead-interval=4s | ||
1 D address=1.1.1.1%vlan10@vlan975@sfp-sfpplus1 area=MGMT-v2 state=ptp network-type=ptp cost=10 use-bfd=no retransmit-interval=5s transmit-delay=1s hello-interval=10s dead-interval=40s | ||
2 D address=1.1.1.1%Lo0 area=MGMT-v2 state=passive network-type=broadcast cost=1 priority=128 use-bfd=no retransmit-interval=5s transmit-delay=1s hello-interval=10s dead-interval=40s |
14 changes: 14 additions & 0 deletions
14
...otik_routeros/routing_ospf_interface_print_terse/routing_ospf_interface_print_terse01.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
--- | ||
parsed_sample: | ||
- cost: "1400" | ||
dynamic: "" | ||
interface: "vlan11@vlan975@sfp-sfpplus1" | ||
passive: "" | ||
- cost: "10" | ||
dynamic: "" | ||
interface: "vlan10@vlan975@sfp-sfpplus1" | ||
passive: "" | ||
- cost: "1" | ||
dynamic: "" | ||
Comment on lines
+4
to
+12
This comment was marked as outdated.
Sorry, something went wrong. |
||
interface: "Lo0" | ||
passive: "passive" |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This comment was marked as outdated.
Sorry, something went wrong.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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. 🫣