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

MikroTik RouterOS '/interface print terse without-paging' fix #1588

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,12 @@ Value ACTUAL_MTU (\d+)
Value L2MTU (\d+|auto)
Value MAX_L2MTU (\d+)
Value MAC_ADDRESS ([a-zA-Z0-9]{2}(:[a-zA-Z0-9]{2}){5})
Value FAST_PATH (\S+)
Value LAST_LINK_DOWN_TIME ([a-z]{3}\/\d+\/\d+\s\d+\:\d+\:\d+)
Value LAST_LINK_UP_TIME ([a-z]{3}\/\d+\/\d+\s\d+\:\d+\:\d+)
Value LINK_DOWNS (\d+)

Start
^\s*${ID}\s+(?:${DYNAMIC})?(?:${STATUS}|\s)?(?:${SLAVE})?\s+(comment=${COMMENT}\s+)?name=${NAME}(\s+default-name=${DEFAULT_NAME})?\s+type=${TYPE}(\s+mtu=${MTU})?(\s+actual-mtu=${ACTUAL_MTU})?(\s+l2mtu=${L2MTU})?(\s+max-l2mtu=${MAX_L2MTU})?(\s+mac-address=${MAC_ADDRESS})?(\s+last-link-down-time=${LAST_LINK_DOWN_TIME})?(\s+last-link-up-time=${LAST_LINK_UP_TIME})?(\s+link-downs=${LINK_DOWNS})?\s*$$ -> Record
^\s*${ID}\s+(?:${DYNAMIC})?(?:${STATUS}|\s)?(?:${SLAVE})?\s+(comment=${COMMENT}\s+)?name=${NAME}(\s+default-name=${DEFAULT_NAME})?\s+type=${TYPE}(\s+mtu=${MTU})?(\s+actual-mtu=${ACTUAL_MTU})?(\s+l2mtu=${L2MTU})?(\s+max-l2mtu=${MAX_L2MTU})?(\s+mac-address=${MAC_ADDRESS})?(\s+fast-path=${FAST_PATH})?(\s+last-link-down-time=${LAST_LINK_DOWN_TIME})?(\s+last-link-up-time=${LAST_LINK_UP_TIME})?(\s+link-downs=${LINK_DOWNS})?\s*$$ -> Record
^\s*$$
^. -> Error
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@
7 RS name=eth4_vlan3 type=vlan mtu=1500 actual-mtu=1500 l2mtu=1594 mac-address=12:34:56:78:90:BB link-downs=0
8 D S name=eth4_vlan4 type=vlan mtu=1500 actual-mtu=1500 l2mtu=1594 mac-address=12:34:56:78:90:BC link-downs=0
9 DXS name=eth5_vlan5 type=vlan mtu=1500 actual-mtu=1500 l2mtu=1594 mac-address=12:34:56:78:90:BD last-link-up-time=aug/16/1970 13:05:43 link-downs=0
10 R name=eth6_vlan6 type=vlan mtu=1500 actual-mtu=1500 l2mtu=1598 mac-address=12:34:56:78:90:BE fast-path=yes last-link-down-time=sep/08/2023 01:07:00 last-link-up-time=sep/08/2023 01:07:09 link-downs=7
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ parsed_sample:
l2mtu: "1598"
max_l2mtu: "2028"
mac_address: "12:34:56:78:90:AA"
fast_path: ""
last_link_down_time: ""
last_link_up_time: "aug/16/1970 13:05:43"
link_downs: "0"
Expand All @@ -29,6 +30,7 @@ parsed_sample:
l2mtu: "1598"
max_l2mtu: "2028"
mac_address: "12:34:56:78:90:AB"
fast_path: ""
last_link_down_time: "aug/17/1970 13:33:01"
last_link_up_time: "aug/17/1970 13:23:11"
link_downs: "3"
Expand All @@ -45,6 +47,7 @@ parsed_sample:
l2mtu: "1598"
max_l2mtu: "2028"
mac_address: "12:34:56:78:90:AC"
fast_path: ""
last_link_down_time: ""
last_link_up_time: ""
link_downs: "0"
Expand All @@ -61,6 +64,7 @@ parsed_sample:
l2mtu: "1594"
max_l2mtu: ""
mac_address: "12:34:56:78:90:AD"
fast_path: ""
last_link_down_time: ""
last_link_up_time: "aug/16/1970 13:05:35"
link_downs: "0"
Expand All @@ -77,6 +81,7 @@ parsed_sample:
l2mtu: ""
max_l2mtu: ""
mac_address: "12:34:56:78:90:AE"
fast_path: ""
last_link_down_time: ""
last_link_up_time: ""
link_downs: "0"
Expand All @@ -93,6 +98,7 @@ parsed_sample:
l2mtu: "1594"
max_l2mtu: ""
mac_address: "12:34:56:78:90:AF"
fast_path: ""
last_link_down_time: "aug/17/1970 13:33:01"
last_link_up_time: "aug/17/1970 13:23:11"
link_downs: "3"
Expand All @@ -109,6 +115,7 @@ parsed_sample:
l2mtu: "1594"
max_l2mtu: ""
mac_address: "12:34:56:78:90:BA"
fast_path: ""
last_link_down_time: ""
last_link_up_time: ""
link_downs: "0"
Expand All @@ -125,6 +132,7 @@ parsed_sample:
l2mtu: "1594"
max_l2mtu: ""
mac_address: "12:34:56:78:90:BB"
fast_path: ""
last_link_down_time: ""
last_link_up_time: ""
link_downs: "0"
Expand All @@ -141,6 +149,7 @@ parsed_sample:
l2mtu: "1594"
max_l2mtu: ""
mac_address: "12:34:56:78:90:BC"
fast_path: ""
last_link_down_time: ""
last_link_up_time: ""
link_downs: "0"
Expand All @@ -157,6 +166,24 @@ parsed_sample:
l2mtu: "1594"
max_l2mtu: ""
mac_address: "12:34:56:78:90:BD"
fast_path: ""
last_link_down_time: ""
last_link_up_time: "aug/16/1970 13:05:43"
link_downs: "0"
- id: "10"
dynamic: ""
status: "R"
slave: ""
comment: ""
name: "eth6_vlan6"
default_name: ""
type: "vlan"
mtu: "1500"
actual_mtu: "1500"
l2mtu: "1598"
max_l2mtu: ""
mac_address: "12:34:56:78:90:BE"
fast_path: "yes"
last_link_down_time: "sep/08/2023 01:07:00"
last_link_up_time: "sep/08/2023 01:07:09"
link_downs: "7"