Skip to content

Commit

Permalink
Mikrotik routeros ip address print FLAGS value fix (networktocode#1574)
Browse files Browse the repository at this point in the history
* Template + test
* Fix template for Mikrotik's command '/ip address print'
  • Loading branch information
PavloSkliarenko authored and mjbear committed Jan 7, 2024
1 parent 51fd255 commit 379593f
Show file tree
Hide file tree
Showing 5 changed files with 75 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Value NUM (\d+)
Value FLAGS (X|I|D)
Value FLAGS ((?:X|I|D)+)
Value COMMENT (.*)
Value IP (\S+)
Value SUBNET (\d+)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Flags: X - disabled, I - invalid, D - dynamic
# ADDRESS NETWORK INTERFACE
0 1.2.3.6/30 1.2.3.4 ether1
1 ;;; test ip1
192.167.1.5/27 192.167.1.0 eth2_vlan1
2 D 192.168.1.53/24 192.168.1.0 lte1
3 X ;;; test ip2
192.167.1.99/27 192.167.1.0 eth2_vlan2
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
---
parsed_sample:
- num: "0"
flags: ""
comment: ""
ip: "1.2.3.6"
subnet: "30"
network: "1.2.3.4"
interface: "ether1"
- num: "1"
flags: ""
comment: "test ip1"
ip: "192.167.1.5"
subnet: "27"
network: "192.167.1.0"
interface: "eth2_vlan1"
- num: "2"
flags: "D"
comment: ""
ip: "192.168.1.53"
subnet: "24"
network: "192.168.1.0"
interface: "lte1"
- num: "3"
flags: "X"
comment: "test ip2"
ip: "192.167.1.99"
subnet: "27"
network: "192.167.1.0"
interface: "eth2_vlan2"
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Flags: X - disabled, I - invalid, D - dynamic
# ADDRESS NETWORK INTERFACE
0 10.156.1.229/30 10.156.1.228 ether4_CiscoPhone3
1 10.152.1.229/30 10.152.1.228 ether5_KFCcisco
2 10.160.1.229/30 10.160.1.228 ether2_BOX
3 XI 10.100.3.200/27 10.100.3.192 bridge70
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
---
parsed_sample:
- comment: ""
flags: ""
interface: "ether4_CiscoPhone3"
ip: "10.156.1.229"
network: "10.156.1.228"
num: "0"
subnet: "30"
- comment: ""
flags: ""
interface: "ether5_KFCcisco"
ip: "10.152.1.229"
network: "10.152.1.228"
num: "1"
subnet: "30"
- comment: ""
flags: ""
interface: "ether2_BOX"
ip: "10.160.1.229"
network: "10.160.1.228"
num: "2"
subnet: "30"
- comment: ""
flags: "XI"
interface: "bridge70"
ip: "10.100.3.200"
network: "10.100.3.192"
num: "3"
subnet: "27"

0 comments on commit 379593f

Please sign in to comment.