Skip to content

Commit 120b9be

Browse files
authored
Merge pull request #2313 from julmanglano/pr/hp-procurve-show-lldp-info-local-device
Add hp_procurve_show_lldp_info_local-device
2 parents 630363d + d23f8c5 commit 120b9be

5 files changed

Lines changed: 172 additions & 1 deletion

File tree

ntc_templates/templates/hp_procurve_show_lldp_info_local-device.textfsm

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
Value Filldown CHASSIS_TYPE (\S+)
2-
Value Filldown CHASSIS_ID (\S+)
2+
Value Filldown CHASSIS_ID (\S.*\S)
33
Value Filldown SYSTEM_NAME (\S+)
44
Value Filldown DESCRIPTION (.+?)
5+
Value Filldown PID (\S+)
56
Value Filldown CAPABILITIES_SUPPORTED (.+?)
67
Value Filldown CAPABILITIES (.+?)
78
Value Filldown MGMT_TYPE (\S+)
@@ -16,6 +17,7 @@ Start
1617
^\s*Chassis\s+Type\s+:\s+${CHASSIS_TYPE}\s*$$
1718
^\s*Chassis\s+Id\s+:\s+${CHASSIS_ID}\s*$$
1819
^\s*System\s+Name\s+:\s+${SYSTEM_NAME}\s*$$
20+
^\s*System\s+Description\s+:\s+(?:HP|Aruba)\s+${PID}\s+\S.*\S\s*$$ -> Continue
1921
^\s*System\s+Description\s+:\s+${DESCRIPTION}\s*$$
2022
^\s*System\s+Capabilities\s+Supported:\s+${CAPABILITIES_SUPPORTED}\s*$$
2123
^\s*System\s+Capabilities\s+Enabled:\s+${CAPABILITIES}\s*$$

tests/hp_procurve/show_lldp_info_local-device/hp_procurve_show_lldp_info_local-device.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ parsed_sample:
88
local_interface: "1/1"
99
mgmt_address: "192.168.1.1"
1010
mgmt_type: "ipv4"
11+
pid: "JL254A"
1112
port_description: "1/1"
1213
port_id: "1"
1314
port_type: "local"
@@ -20,6 +21,7 @@ parsed_sample:
2021
local_interface: "1/2"
2122
mgmt_address: "192.168.1.1"
2223
mgmt_type: "ipv4"
24+
pid: "JL254A"
2325
port_description: "1/2"
2426
port_id: "2"
2527
port_type: "local"
@@ -32,6 +34,7 @@ parsed_sample:
3234
local_interface: "1/3"
3335
mgmt_address: "192.168.1.1"
3436
mgmt_type: "ipv4"
37+
pid: "JL254A"
3538
port_description: "1/3"
3639
port_id: "3"
3740
port_type: "local"
@@ -44,6 +47,7 @@ parsed_sample:
4447
local_interface: "2/1"
4548
mgmt_address: "192.168.1.1"
4649
mgmt_type: "ipv4"
50+
pid: "JL254A"
4751
port_description: "2/1"
4852
port_id: "54"
4953
port_type: "local"
@@ -56,6 +60,7 @@ parsed_sample:
5660
local_interface: "2/2"
5761
mgmt_address: "192.168.1.1"
5862
mgmt_type: "ipv4"
63+
pid: "JL254A"
5964
port_description: "2/2"
6065
port_id: "55"
6166
port_type: "local"

tests/hp_procurve/show_lldp_info_local-device/hp_procurve_show_lldp_info_local-device2.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ parsed_sample:
88
local_interface: "1"
99
mgmt_address: "192.168.2.1"
1010
mgmt_type: "ipv4"
11+
pid: "JL254A"
1112
port_description: "1"
1213
port_id: "1"
1314
port_type: "local"
@@ -20,6 +21,7 @@ parsed_sample:
2021
local_interface: "2"
2122
mgmt_address: "192.168.2.1"
2223
mgmt_type: "ipv4"
24+
pid: "JL254A"
2325
port_description: "2"
2426
port_id: "2"
2527
port_type: "local"
@@ -32,6 +34,7 @@ parsed_sample:
3234
local_interface: "3"
3335
mgmt_address: "192.168.2.1"
3436
mgmt_type: "ipv4"
37+
pid: "JL254A"
3538
port_description: "3"
3639
port_id: "3"
3740
port_type: "local"
@@ -44,6 +47,7 @@ parsed_sample:
4447
local_interface: "4"
4548
mgmt_address: "192.168.2.1"
4649
mgmt_type: "ipv4"
50+
pid: "JL254A"
4751
port_description: "4"
4852
port_id: "4"
4953
port_type: "local"
@@ -56,6 +60,7 @@ parsed_sample:
5660
local_interface: "5"
5761
mgmt_address: "192.168.2.1"
5862
mgmt_type: "ipv4"
63+
pid: "JL254A"
5964
port_description: "5"
6065
port_id: "5"
6166
port_type: "local"
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
LLDP Local Device Information
2+
3+
Chassis Type : mac-address
4+
Chassis Id : 54 80 28 aa bb cd
5+
System Name : SWITCH-2
6+
System Description : HP J9774A 2530-8G-PoEP Switch, revision YA.16.10.002...
7+
System Capabilities Supported: bridge
8+
System Capabilities Enabled: bridge
9+
10+
Management Address :
11+
Type: ipv4
12+
Address: 192.0.2.2
13+
14+
LLDP Port Information
15+
16+
Port PortType PortId PortDesc
17+
-------- -------- -------- --------
18+
1 local 1 1
19+
2 local 2 2
20+
3 local 3 3
21+
4 local 4 4
22+
5 local 5 5
23+
6 local 6 6
24+
7 local 7 7
25+
8 local 8 8
26+
9 local 9 9
27+
10 local 10 10
Lines changed: 132 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,132 @@
1+
---
2+
parsed_sample:
3+
- capabilities: "bridge"
4+
capabilities_supported: "bridge"
5+
chassis_id: "54 80 28 aa bb cd"
6+
chassis_type: "mac-address"
7+
description: "HP J9774A 2530-8G-PoEP Switch, revision YA.16.10.002..."
8+
local_interface: "1"
9+
mgmt_address: "192.0.2.2"
10+
mgmt_type: "ipv4"
11+
pid: "J9774A"
12+
port_description: "1"
13+
port_id: "1"
14+
port_type: "local"
15+
system_name: "SWITCH-2"
16+
- capabilities: "bridge"
17+
capabilities_supported: "bridge"
18+
chassis_id: "54 80 28 aa bb cd"
19+
chassis_type: "mac-address"
20+
description: "HP J9774A 2530-8G-PoEP Switch, revision YA.16.10.002..."
21+
local_interface: "2"
22+
mgmt_address: "192.0.2.2"
23+
mgmt_type: "ipv4"
24+
pid: "J9774A"
25+
port_description: "2"
26+
port_id: "2"
27+
port_type: "local"
28+
system_name: "SWITCH-2"
29+
- capabilities: "bridge"
30+
capabilities_supported: "bridge"
31+
chassis_id: "54 80 28 aa bb cd"
32+
chassis_type: "mac-address"
33+
description: "HP J9774A 2530-8G-PoEP Switch, revision YA.16.10.002..."
34+
local_interface: "3"
35+
mgmt_address: "192.0.2.2"
36+
mgmt_type: "ipv4"
37+
pid: "J9774A"
38+
port_description: "3"
39+
port_id: "3"
40+
port_type: "local"
41+
system_name: "SWITCH-2"
42+
- capabilities: "bridge"
43+
capabilities_supported: "bridge"
44+
chassis_id: "54 80 28 aa bb cd"
45+
chassis_type: "mac-address"
46+
description: "HP J9774A 2530-8G-PoEP Switch, revision YA.16.10.002..."
47+
local_interface: "4"
48+
mgmt_address: "192.0.2.2"
49+
mgmt_type: "ipv4"
50+
pid: "J9774A"
51+
port_description: "4"
52+
port_id: "4"
53+
port_type: "local"
54+
system_name: "SWITCH-2"
55+
- capabilities: "bridge"
56+
capabilities_supported: "bridge"
57+
chassis_id: "54 80 28 aa bb cd"
58+
chassis_type: "mac-address"
59+
description: "HP J9774A 2530-8G-PoEP Switch, revision YA.16.10.002..."
60+
local_interface: "5"
61+
mgmt_address: "192.0.2.2"
62+
mgmt_type: "ipv4"
63+
pid: "J9774A"
64+
port_description: "5"
65+
port_id: "5"
66+
port_type: "local"
67+
system_name: "SWITCH-2"
68+
- capabilities: "bridge"
69+
capabilities_supported: "bridge"
70+
chassis_id: "54 80 28 aa bb cd"
71+
chassis_type: "mac-address"
72+
description: "HP J9774A 2530-8G-PoEP Switch, revision YA.16.10.002..."
73+
local_interface: "6"
74+
mgmt_address: "192.0.2.2"
75+
mgmt_type: "ipv4"
76+
pid: "J9774A"
77+
port_description: "6"
78+
port_id: "6"
79+
port_type: "local"
80+
system_name: "SWITCH-2"
81+
- capabilities: "bridge"
82+
capabilities_supported: "bridge"
83+
chassis_id: "54 80 28 aa bb cd"
84+
chassis_type: "mac-address"
85+
description: "HP J9774A 2530-8G-PoEP Switch, revision YA.16.10.002..."
86+
local_interface: "7"
87+
mgmt_address: "192.0.2.2"
88+
mgmt_type: "ipv4"
89+
pid: "J9774A"
90+
port_description: "7"
91+
port_id: "7"
92+
port_type: "local"
93+
system_name: "SWITCH-2"
94+
- capabilities: "bridge"
95+
capabilities_supported: "bridge"
96+
chassis_id: "54 80 28 aa bb cd"
97+
chassis_type: "mac-address"
98+
description: "HP J9774A 2530-8G-PoEP Switch, revision YA.16.10.002..."
99+
local_interface: "8"
100+
mgmt_address: "192.0.2.2"
101+
mgmt_type: "ipv4"
102+
pid: "J9774A"
103+
port_description: "8"
104+
port_id: "8"
105+
port_type: "local"
106+
system_name: "SWITCH-2"
107+
- capabilities: "bridge"
108+
capabilities_supported: "bridge"
109+
chassis_id: "54 80 28 aa bb cd"
110+
chassis_type: "mac-address"
111+
description: "HP J9774A 2530-8G-PoEP Switch, revision YA.16.10.002..."
112+
local_interface: "9"
113+
mgmt_address: "192.0.2.2"
114+
mgmt_type: "ipv4"
115+
pid: "J9774A"
116+
port_description: "9"
117+
port_id: "9"
118+
port_type: "local"
119+
system_name: "SWITCH-2"
120+
- capabilities: "bridge"
121+
capabilities_supported: "bridge"
122+
chassis_id: "54 80 28 aa bb cd"
123+
chassis_type: "mac-address"
124+
description: "HP J9774A 2530-8G-PoEP Switch, revision YA.16.10.002..."
125+
local_interface: "10"
126+
mgmt_address: "192.0.2.2"
127+
mgmt_type: "ipv4"
128+
pid: "J9774A"
129+
port_description: "10"
130+
port_id: "10"
131+
port_type: "local"
132+
system_name: "SWITCH-2"

0 commit comments

Comments
 (0)