-
Notifications
You must be signed in to change notification settings - Fork 745
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0c83b26
commit e6be40d
Showing
4 changed files
with
67 additions
and
0 deletions.
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
17 changes: 17 additions & 0 deletions
17
ntc_templates/templates/mikrotik_routeros_interface_ethernet_print.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,17 @@ | ||
Value ID (\d+) | ||
Value STATUS (X|R) | ||
Value SLAVE (S) | ||
Value NAME (\S+) | ||
Value MTU (\d+) | ||
Value MAC_ADDRESS ([a-zA-Z0-9]{2}(:[a-zA-Z0-9]{2}){5}) | ||
Value ARP (\S+) | ||
Value SWITCH (\S+) | ||
|
||
Start | ||
^\s*Flags:\s+X\s+-\s+disabled,\s+R\s+-\s+running,\s+S\s+-\s+slave\s*$$ | ||
^\s*#\s+NAME\s+MTU\s+MAC-ADDRESS\s+ARP\s+SWITCH\s*$$ -> IfacesTable | ||
|
||
IfacesTable | ||
^\s*${ID}\s+(?:${STATUS})?(?:${SLAVE})?\s+${NAME}\s+${MTU}\s+${MAC_ADDRESS}\s+${ARP}\s+${SWITCH}\s*$$ -> Record | ||
^\s*$$ | ||
^. -> Error |
7 changes: 7 additions & 0 deletions
7
...mikrotik_routeros/interface_ethernet_print/mikrotik_routeros_interface_ethernet_print.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,7 @@ | ||
Flags: X - disabled, R - running, S - slave | ||
# NAME MTU MAC-ADDRESS ARP SWITCH | ||
0 ether1 1500 12:34:56:78:90:AA enabled switch1 | ||
1 R ether2 1500 12:34:56:78:90:AB enabled switch1 | ||
2 XS ether3 1500 12:34:56:78:90:AC enabled switch1 | ||
3 S ether4 1500 12:34:56:78:90:AD enabled switch1 | ||
4 R ether5 1500 12:34:56:78:90:AE enabled switch1 |
42 changes: 42 additions & 0 deletions
42
...mikrotik_routeros/interface_ethernet_print/mikrotik_routeros_interface_ethernet_print.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,42 @@ | ||
--- | ||
parsed_sample: | ||
- id: "0" | ||
status: "" | ||
slave: "" | ||
name: "ether1" | ||
mtu: "1500" | ||
mac_address: "12:34:56:78:90:AA" | ||
arp: "enabled" | ||
switch: "switch1" | ||
- id: "1" | ||
status: "R" | ||
slave: "" | ||
name: "ether2" | ||
mtu: "1500" | ||
mac_address: "12:34:56:78:90:AB" | ||
arp: "enabled" | ||
switch: "switch1" | ||
- id: "2" | ||
status: "X" | ||
slave: "S" | ||
name: "ether3" | ||
mtu: "1500" | ||
mac_address: "12:34:56:78:90:AC" | ||
arp: "enabled" | ||
switch: "switch1" | ||
- id: "3" | ||
status: "" | ||
slave: "S" | ||
name: "ether4" | ||
mtu: "1500" | ||
mac_address: "12:34:56:78:90:AD" | ||
arp: "enabled" | ||
switch: "switch1" | ||
- id: "4" | ||
status: "R" | ||
slave: "" | ||
name: "ether5" | ||
mtu: "1500" | ||
mac_address: "12:34:56:78:90:AE" | ||
arp: "enabled" | ||
switch: "switch1" |