Skip to content

Commit 380f1be

Browse files
caribouHYmjbear
andauthored
Add new template for Fsas Si-R show ether (#1971)
Co-authored-by: Michael Bear <38406045+mjbear@users.noreply.github.com>
1 parent cecf1ea commit 380f1be

6 files changed

Lines changed: 272 additions & 0 deletions

File tree

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
Value Required ETHER_GROUP (\d+)
2+
Value Required ETHER_PORT (\d+)
3+
Value DESCRIPTION (.+?)
4+
Value STATUS (.+?)
5+
Value STATUS_SPEED (\d+[A-Z])
6+
Value STATUS_DUPLEX (Full|Half)
7+
Value STATUS_MDI (MDI(-X)?)
8+
Value MEDIA (\S+)
9+
Value FLOW_CONTROL_SEND (\w+)
10+
Value FLOW_CONTROL_RECEIVE (\w+)
11+
Value TYPE (.+?)
12+
Value SINCE (.+?)
13+
Value CONFIG_MODE (\S+)
14+
Value CONFIG_MDI (\S+)
15+
Value CONFIG_MEDIA (\S+)
16+
17+
Start
18+
^\[ETHER -> Continue.Record
19+
^\[ETHER\s+GROUP\-${ETHER_GROUP}\s+PORT\-${ETHER_PORT}\]\s*$$
20+
^description\s+:(\s+${DESCRIPTION})?\s*$$
21+
^status\s+:\s+(${STATUS}\s+)?${STATUS_SPEED}\s+${STATUS_DUPLEX}\s+${STATUS_MDI}\s*$$
22+
^status\s+:\s+${STATUS}\s*$$
23+
^media\s+:\s+${MEDIA}s*$$
24+
^flow\s+control\s+:\s+(-|send\s+${FLOW_CONTROL_SEND},\s+receive\s+${FLOW_CONTROL_RECEIVE})\s*$$
25+
^type\s+:\s+${TYPE}\s*$$
26+
^since\s+:\s+${SINCE}\s*$$
27+
^config\s+:\s+mode\(${CONFIG_MODE}\),\s+mdi\(${CONFIG_MDI}\),\s+media\(${CONFIG_MEDIA}\)\s*$$
28+
^\s*$$
29+
^. -> Error

ntc_templates/templates/index

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -633,6 +633,7 @@ fortinet_execute_ping.textfsm, .*, fortinet, exec[[ute]] ping
633633
fortinet_execute_time.textfsm, .*, fortinet, exec[[ute]] ti[[me]]
634634

635635
fsas_sir_show_system_information.textfsm, .*, fsas_sir, sh[[ow]] sys[[tem]] i[[nformation]]
636+
fsas_sir_show_ether.textfsm, .*, fsas_sir, sh[[ow]] eth[[er]]
636637

637638
hp_comware_display_lldp_neighbor-information_verbose.textfsm, .*, hp_comware, di[[splay]] ll[[dp]] n[[eighbor-information]] v[[erbose]]
638639
hp_comware_display_lldp_neighbor-information_list.textfsm, .*, hp_comware, di[[splay]] ll[[dp]] n[[eighbor-information]] l[[ist]]
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
[ETHER GROUP-1 PORT-1]
2+
description : __@@foo
3+
status : 100M Full MDI
4+
media : Metal
5+
flow control : send off, receive on
6+
type : Normal
7+
since : Feb 16 21:28:21 2024
8+
config : mode(100M), mdi(mdi), media(-)
9+
10+
[ETHER GROUP-2 PORT-1]
11+
description :
12+
status : auto 1000M Full MDI
13+
media : Metal
14+
flow control : send off, receive on
15+
type : Backup (group 1, master)
16+
since : Feb 16 21:31:40 2024
17+
config : mode(auto), mdi(auto), media(-)
18+
19+
[ETHER GROUP-2 PORT-2]
20+
description :
21+
status : auto 100M Half MDI-X
22+
media : Metal
23+
flow control : send off, receive off
24+
type : Normal
25+
since : Feb 16 21:28:19 2024
26+
config : mode(auto), mdi(auto), media(-)
27+
28+
[ETHER GROUP-2 PORT-3]
29+
description : ##backup_port##
30+
status : offline (backup)
31+
media : -
32+
flow control : -
33+
type : Backup (group 1, backup)
34+
since : Feb 16 21:36:55 2024
35+
config : mode(auto), mdi(auto), media(-)
36+
37+
[ETHER GROUP-2 PORT-4]
38+
description :
39+
status : disable
40+
media : -
41+
flow control : -
42+
type : Normal
43+
since : Feb 16 21:22:33 2024
44+
config : mode(auto), mdi(auto), media(-)
Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
---
2+
parsed_sample:
3+
- config_mdi: "mdi"
4+
config_media: "-"
5+
config_mode: "100M"
6+
description: "__@@foo"
7+
ether_group: "1"
8+
ether_port: "1"
9+
flow_control_receive: "on"
10+
flow_control_send: "off"
11+
media: "Metal"
12+
since: "Feb 16 21:28:21 2024"
13+
status: ""
14+
status_duplex: "Full"
15+
status_mdi: "MDI"
16+
status_speed: "100M"
17+
type: "Normal"
18+
- config_mdi: "auto"
19+
config_media: "-"
20+
config_mode: "auto"
21+
description: ""
22+
ether_group: "2"
23+
ether_port: "1"
24+
flow_control_receive: "on"
25+
flow_control_send: "off"
26+
media: "Metal"
27+
since: "Feb 16 21:31:40 2024"
28+
status: "auto"
29+
status_duplex: "Full"
30+
status_mdi: "MDI"
31+
status_speed: "1000M"
32+
type: "Backup (group 1, master)"
33+
- config_mdi: "auto"
34+
config_media: "-"
35+
config_mode: "auto"
36+
description: ""
37+
ether_group: "2"
38+
ether_port: "2"
39+
flow_control_receive: "off"
40+
flow_control_send: "off"
41+
media: "Metal"
42+
since: "Feb 16 21:28:19 2024"
43+
status: "auto"
44+
status_duplex: "Half"
45+
status_mdi: "MDI-X"
46+
status_speed: "100M"
47+
type: "Normal"
48+
- config_mdi: "auto"
49+
config_media: "-"
50+
config_mode: "auto"
51+
description: "##backup_port##"
52+
ether_group: "2"
53+
ether_port: "3"
54+
flow_control_receive: ""
55+
flow_control_send: ""
56+
media: "-"
57+
since: "Feb 16 21:36:55 2024"
58+
status: "offline (backup)"
59+
status_duplex: ""
60+
status_mdi: ""
61+
status_speed: ""
62+
type: "Backup (group 1, backup)"
63+
- config_mdi: "auto"
64+
config_media: "-"
65+
config_mode: "auto"
66+
description: ""
67+
ether_group: "2"
68+
ether_port: "4"
69+
flow_control_receive: ""
70+
flow_control_send: ""
71+
media: "-"
72+
since: "Feb 16 21:22:33 2024"
73+
status: "disable"
74+
status_duplex: ""
75+
status_mdi: ""
76+
status_speed: ""
77+
type: "Normal"
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
[ETHER GROUP-1 PORT-1]
2+
description :
3+
status : offline
4+
media : -
5+
flow control : -
6+
type : Normal
7+
since : Jan 14 12:39:44 2025
8+
config : mode(auto), mdi(auto), media(-)
9+
10+
[ETHER GROUP-2 PORT-1]
11+
description :
12+
status : auto 1000M Full MDI-X
13+
media : Metal
14+
flow control : send off, receive off
15+
type : Backup (group 1, master)
16+
since : Jan 14 12:38:44 2025
17+
config : mode(auto), mdi(auto), media(-)
18+
19+
[ETHER GROUP-2 PORT-2]
20+
description :
21+
status : offline (backup)
22+
media : -
23+
flow control : -
24+
type : Backup (group 1, backup)
25+
since : Jan 14 12:41:09 2025
26+
config : mode(auto), mdi(auto), media(-)
27+
28+
[ETHER GROUP-2 PORT-3]
29+
description :
30+
status : down
31+
media : -
32+
flow control : -
33+
type : Normal
34+
since : Jan 14 12:41:46 2025
35+
config : mode(auto), mdi(auto), media(-)
36+
37+
[ETHER GROUP-2 PORT-4]
38+
description :
39+
status : offline (startup down)
40+
media : -
41+
flow control : -
42+
type : Normal
43+
since : Jan 14 12:34:59 2025
44+
config : mode(auto), mdi(auto), media(-)
Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
---
2+
parsed_sample:
3+
- config_mdi: "auto"
4+
config_media: "-"
5+
config_mode: "auto"
6+
description: ""
7+
ether_group: "1"
8+
ether_port: "1"
9+
flow_control_receive: ""
10+
flow_control_send: ""
11+
media: "-"
12+
since: "Jan 14 12:39:44 2025"
13+
status: "offline"
14+
status_duplex: ""
15+
status_mdi: ""
16+
status_speed: ""
17+
type: "Normal"
18+
- config_mdi: "auto"
19+
config_media: "-"
20+
config_mode: "auto"
21+
description: ""
22+
ether_group: "2"
23+
ether_port: "1"
24+
flow_control_receive: "off"
25+
flow_control_send: "off"
26+
media: "Metal"
27+
since: "Jan 14 12:38:44 2025"
28+
status: "auto"
29+
status_duplex: "Full"
30+
status_mdi: "MDI-X"
31+
status_speed: "1000M"
32+
type: "Backup (group 1, master)"
33+
- config_mdi: "auto"
34+
config_media: "-"
35+
config_mode: "auto"
36+
description: ""
37+
ether_group: "2"
38+
ether_port: "2"
39+
flow_control_receive: ""
40+
flow_control_send: ""
41+
media: "-"
42+
since: "Jan 14 12:41:09 2025"
43+
status: "offline (backup)"
44+
status_duplex: ""
45+
status_mdi: ""
46+
status_speed: ""
47+
type: "Backup (group 1, backup)"
48+
- config_mdi: "auto"
49+
config_media: "-"
50+
config_mode: "auto"
51+
description: ""
52+
ether_group: "2"
53+
ether_port: "3"
54+
flow_control_receive: ""
55+
flow_control_send: ""
56+
media: "-"
57+
since: "Jan 14 12:41:46 2025"
58+
status: "down"
59+
status_duplex: ""
60+
status_mdi: ""
61+
status_speed: ""
62+
type: "Normal"
63+
- config_mdi: "auto"
64+
config_media: "-"
65+
config_mode: "auto"
66+
description: ""
67+
ether_group: "2"
68+
ether_port: "4"
69+
flow_control_receive: ""
70+
flow_control_send: ""
71+
media: "-"
72+
since: "Jan 14 12:34:59 2025"
73+
status: "offline (startup down)"
74+
status_duplex: ""
75+
status_mdi: ""
76+
status_speed: ""
77+
type: "Normal"

0 commit comments

Comments
 (0)