Skip to content

Commit 6a96a40

Browse files
authored
Modify display device manuinfo for Comware5/7 (#2196)
1) account for comware5 variation that outputs 'only new chassis supports' 2) account for variation where line could be 'PRODUCT ID' or 'PRODUCT NUMBER Signed-off-by: Cain,Marcus <[email protected]>
1 parent 155da3a commit 6a96a40

5 files changed

+219
-1
lines changed

ntc_templates/templates/hp_comware_display_device_manuinfo.textfsm

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ Start
1212
^\s*Chassis\s+${CHASSIS_ID}
1313
^\s*${SLOT_TYPE}\s+${SLOT_ID}
1414
^\s*DEVICE_ID
15+
^\s*Only\s+new\s+chassis\s+
1516
^\s*The\s+operation\s+is\s+not\s+supported\s+ -> Record
1617
^\s*The\s+card\s+does\s+not\s+support\s+ -> Record
1718
^\s*Failed\s+to\s+display\s+ -> Record
@@ -21,7 +22,7 @@ Start
2122
^\s*MAC_ADDRESS\s*:\s*${MAC_ADDRESS}
2223
^\s*MANUFACTURING_DATE\s*:\s*${MANUFACTURING_DATE}
2324
^\s*VENDOR_NAME\s*:\s*${VENDOR_NAME} -> Record
24-
^\s*PRODUCT\s+NUMBER\s*:
25+
^\s*PRODUCT\s+(ID|NUMBER)\s*:
2526
^\s*$$
2627
^. -> Error
2728

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
Chassis self:
2+
3+
Only new chassis support this command.
4+
The operation is not supported on the specified chassis.
5+
6+
Slot 0:
7+
DEVICE_NAME : LSQM1SRP12GB0
8+
DEVICE_SERIAL_NUMBER : 21023LMAOPOPB113000172
9+
MAC_ADDRESS : 3822-D626-EB2B
10+
MANUFACTURING_DATE : 2011-3-26
11+
VENDOR_NAME : H3C
12+
13+
Slot 2:
14+
DEVICE_NAME : LSQM1GV48SC0
15+
DEVICE_SERIAL_NUMBER : 210231HAHABAB114000645
16+
MAC_ADDRESS : NONE
17+
MANUFACTURING_DATE : 2011-4-20
18+
VENDOR_NAME : H3C
19+
20+
Slot 3:
21+
DEVICE_NAME : HP 48-Port Gig-T A7500 Module JD210A
22+
DEVICE_SERIAL_NUMBER : CNJ1234AB046
23+
MAC_ADDRESS : NONE
24+
MANUFACTURING_DATE : 2012-10-16
25+
VENDOR_NAME : HP
26+
27+
Slot 4:
28+
DEVICE_NAME : HP 48-Port Gig-T A7500 Module JD210A
29+
DEVICE_SERIAL_NUMBER : CMABC12345M042
30+
MAC_ADDRESS : NONE
31+
MANUFACTURING_DATE : 2012-10-16
32+
VENDOR_NAME : HP
33+
34+
Slot 5:
35+
DEVICE_NAME : HP 48-Port Gig-T A7500 Module JD210A
36+
DEVICE_SERIAL_NUMBER : CNABC123456M00H
37+
MAC_ADDRESS : NONE
38+
MANUFACTURING_DATE : 2012-6-26
39+
VENDOR_NAME : HP
40+
41+
Slot 6:
42+
DEVICE_NAME : HP 48-Port Gig-T A7500 Module JD210A
43+
DEVICE_SERIAL_NUMBER : CN2ABCZ32109
44+
MAC_ADDRESS : NONE
45+
MANUFACTURING_DATE : 2012-8-4
46+
VENDOR_NAME : HP
47+
48+
Slot 7:
49+
DEVICE_NAME : HP 48-Port Gig-T A7500 Module JD210A
50+
DEVICE_SERIAL_NUMBER : CN2ABZXY1235M013
51+
MAC_ADDRESS : NONE
52+
MANUFACTURING_DATE : 2012-8-4
53+
VENDOR_NAME : HP
54+
55+
Slot 8:
56+
57+
The operation is not supported on the specified board or subslot.
58+
59+
Power 1:
60+
61+
Only new chassis support this command.
62+
The operation is not supported on the specified power.
63+
64+
Power 2:
65+
66+
Only new chassis support this command.
67+
The operation is not supported on the specified power.
68+
69+
Fan 1:
70+
71+
Only new chassis support this command.
72+
The operation is not supported on the specified fan.
Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
---
2+
parsed_sample:
3+
- chassis_id: ""
4+
device_name: ""
5+
device_serial_number: ""
6+
mac_address: ""
7+
manufacturing_date: ""
8+
slot_id: "self"
9+
slot_type: "Chassis"
10+
vendor_name: ""
11+
- chassis_id: ""
12+
device_name: "LSQM1SRP12GB0"
13+
device_serial_number: "21023LMAOPOPB113000172"
14+
mac_address: "3822-D626-EB2B"
15+
manufacturing_date: "2011-3-26"
16+
slot_id: "0"
17+
slot_type: "Slot"
18+
vendor_name: "H3C"
19+
- chassis_id: ""
20+
device_name: "LSQM1GV48SC0"
21+
device_serial_number: "210231HAHABAB114000645"
22+
mac_address: "NONE"
23+
manufacturing_date: "2011-4-20"
24+
slot_id: "2"
25+
slot_type: "Slot"
26+
vendor_name: "H3C"
27+
- chassis_id: ""
28+
device_name: "HP 48-Port Gig-T A7500 Module JD210A"
29+
device_serial_number: "CNJ1234AB046"
30+
mac_address: "NONE"
31+
manufacturing_date: "2012-10-16"
32+
slot_id: "3"
33+
slot_type: "Slot"
34+
vendor_name: "HP"
35+
- chassis_id: ""
36+
device_name: "HP 48-Port Gig-T A7500 Module JD210A"
37+
device_serial_number: "CMABC12345M042"
38+
mac_address: "NONE"
39+
manufacturing_date: "2012-10-16"
40+
slot_id: "4"
41+
slot_type: "Slot"
42+
vendor_name: "HP"
43+
- chassis_id: ""
44+
device_name: "HP 48-Port Gig-T A7500 Module JD210A"
45+
device_serial_number: "CNABC123456M00H"
46+
mac_address: "NONE"
47+
manufacturing_date: "2012-6-26"
48+
slot_id: "5"
49+
slot_type: "Slot"
50+
vendor_name: "HP"
51+
- chassis_id: ""
52+
device_name: "HP 48-Port Gig-T A7500 Module JD210A"
53+
device_serial_number: "CN2ABCZ32109"
54+
mac_address: "NONE"
55+
manufacturing_date: "2012-8-4"
56+
slot_id: "6"
57+
slot_type: "Slot"
58+
vendor_name: "HP"
59+
- chassis_id: ""
60+
device_name: "HP 48-Port Gig-T A7500 Module JD210A"
61+
device_serial_number: "CN2ABZXY1235M013"
62+
mac_address: "NONE"
63+
manufacturing_date: "2012-8-4"
64+
slot_id: "7"
65+
slot_type: "Slot"
66+
vendor_name: "HP"
67+
- chassis_id: ""
68+
device_name: ""
69+
device_serial_number: ""
70+
mac_address: ""
71+
manufacturing_date: ""
72+
slot_id: "8"
73+
slot_type: "Slot"
74+
vendor_name: ""
75+
- chassis_id: ""
76+
device_name: ""
77+
device_serial_number: ""
78+
mac_address: ""
79+
manufacturing_date: ""
80+
slot_id: "1"
81+
slot_type: "Power"
82+
vendor_name: ""
83+
- chassis_id: ""
84+
device_name: ""
85+
device_serial_number: ""
86+
mac_address: ""
87+
manufacturing_date: ""
88+
slot_id: "2"
89+
slot_type: "Power"
90+
vendor_name: ""
91+
- chassis_id: ""
92+
device_name: ""
93+
device_serial_number: ""
94+
mac_address: ""
95+
manufacturing_date: ""
96+
slot_id: "1"
97+
slot_type: "Fan"
98+
vendor_name: ""
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
Slot 1 CPU 0:
2+
DEVICE_NAME : 5140 48G 4SFP+ 1-slot HI Sw R9L62A
3+
DEVICE_SERIAL_NUMBER : CN2ABC123W11Y
4+
MAC_ADDRESS : 5477-8A40-9BF8
5+
MANUFACTURING_DATE : 2022-05-30
6+
VENDOR_NAME : HPE
7+
PRODUCT ID : R9L62A
8+
Fan 1:
9+
DEVICE_SERIAL_NUMBER : NONE
10+
Fan 2:
11+
DEVICE_SERIAL_NUMBER : NONE
12+
Power 1:
13+
DEVICE_NAME : HPE X361 150W AC Power Supply JD
14+
DEVICE_SERIAL_NUMBER : CN2ABC123545K
15+
MANUFACTURING_DATE : 2022-10-09
16+
VENDOR_NAME : HPE
17+
Power 2:
18+
DEVICE_NAME : HPE X361 150W AC Power Supply JD
19+
DEVICE_SERIAL_NUMBER : CN2ABC1239JW54Y6
20+
MANUFACTURING_DATE : 2022-10-10
21+
VENDOR_NAME : HPE
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
---
2+
parsed_sample:
3+
- chassis_id: ""
4+
device_name: "5140 48G 4SFP+ 1-slot HI Sw R9L62A"
5+
device_serial_number: "CN2ABC123W11Y"
6+
mac_address: "5477-8A40-9BF8"
7+
manufacturing_date: "2022-05-30"
8+
slot_id: "1"
9+
slot_type: "Slot"
10+
vendor_name: "HPE"
11+
- chassis_id: ""
12+
device_name: "HPE X361 150W AC Power Supply JD"
13+
device_serial_number: "CN2ABC123545K"
14+
mac_address: ""
15+
manufacturing_date: "2022-10-09"
16+
slot_id: "1"
17+
slot_type: "Power"
18+
vendor_name: "HPE"
19+
- chassis_id: ""
20+
device_name: "HPE X361 150W AC Power Supply JD"
21+
device_serial_number: "CN2ABC1239JW54Y6"
22+
mac_address: ""
23+
manufacturing_date: "2022-10-10"
24+
slot_id: "2"
25+
slot_type: "Power"
26+
vendor_name: "HPE"

0 commit comments

Comments
 (0)