Skip to content

Commit

Permalink
BugFix: NXOS - Update based on additional mock data (#804)
Browse files Browse the repository at this point in the history
  • Loading branch information
yshu95 authored Oct 2, 2020
1 parent 297ea57 commit 7784dd7
Show file tree
Hide file tree
Showing 3 changed files with 115 additions and 1 deletion.
3 changes: 2 additions & 1 deletion templates/cisco_nxos_show_inventory.textfsm
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
Value NAME (.*)
Value DESCR (.*)
Value PID ([^,]\S+)
Value VID (V\d+)
Value VID ([\d+\w-]+)
Value SN ([\d+\w+/]+)

Start
^NAME:\s+"${NAME}",\s+DESCR:\s+"${DESCR}"
^NAME:\s+${NAME},\s+DESCR:\s+${DESCR}
^PID:\s+${PID}.*,.*VID:\s+${VID}.*SN:\s+${SN} -> Record
^PID:\s+,.*VID:\s+${VID}.*SN: -> Record
^PID:\s+${PID}.*,.*VID:\s+${VID}.*SN: -> Record
Expand Down
41 changes: 41 additions & 0 deletions tests/cisco_nxos/show_inventory/cisco_nxos_show_inventory1.raw
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
NAME: "Chassis", DESCR: "Nexus9000 C9396PX Chassis"
PID: N9K-C9396PX , VID: V02 , SN: SAL1819S6LU

NAME: "Slot 1", DESCR: "1/10G SFP+ Ethernet Module"
PID: N9K-C9396PX , VID: V02 , SN: SAL1819S6LU

NAME: "Slot 2", DESCR: "40G Ethernet Expansion Module"
PID: N9K-M12PQ , VID: V01 , SN: SAL1815QCJE

NAME: "Power Supply 1", DESCR: "Nexus9000 C9396PX Chassis Power Supply"
PID: N9K-PAC-650W , VID: V01 , SN: DCB1809X07E

NAME: "Power Supply 2", DESCR: "Nexus9000 C9396PX Chassis Power Supply"
PID: N9K-PAC-650W , VID: V01 , SN: DCB1809X07H

NAME: "Fan 1", DESCR: "Nexus9000 C9396PX Chassis Fan Module"
PID: N9K-C9300-FAN2 , VID: V01 , SN: N/A

NAME: "Fan 2", DESCR: "Nexus9000 C9396PX Chassis Fan Module"
PID: N9K-C9300-FAN2 , VID: V01 , SN: N/A

NAME: "Fan 3", DESCR: "Nexus9000 C9396PX Chassis Fan Module"
PID: N9K-C9300-FAN2 , VID: V01 , SN: N/A

NAME: "Slot 33", DESCR: "Nexus7000 C7009 (9 Slot) Chassis Power Supply"
PID: N7K-AC-6.0KW, VID: V01, SN: DTM141600XT

NAME: "Slot 34", DESCR: "Nexus7000 C7009 (9 Slot) Chassis Power Supply"
PID: N7K-AC-6.0KW, VID: V01, SN: DTM1414007T

NAME: "Slot 35", DESCR: "Nexus7000 C7009 (9 Slot) Chassis Fan Module"
PID: N7K-C7009-FAN, VID: V00, SN: JAF1433DDEJ

NAME: Ethernet1/46, DESCR: CISCO-AVAGO
PID: 10Gbase-SR , VID: SFBR-709SMZ-CS1, SN: AVD42309ABD

NAME: Ethernet1/47, DESCR: CISCO
PID: 1000base-LH , VID: RTXM191-404-C88, SN: ACW315000AD

NAME: Ethernet1/48, DESCR: CISCO-AVAGO
PID: 10Gbase-LR , VID: SFCT-739SMZ, SN: AVD2219K9AO
72 changes: 72 additions & 0 deletions tests/cisco_nxos/show_inventory/cisco_nxos_show_inventory1.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
---
parsed_sample:
- name: "Chassis"
descr: "Nexus9000 C9396PX Chassis"
pid: "N9K-C9396PX"
vid: "V02"
sn: "SAL1819S6LU"
- name: "Slot 1"
descr: "1/10G SFP+ Ethernet Module"
pid: "N9K-C9396PX"
vid: "V02"
sn: "SAL1819S6LU"
- name: "Slot 2"
descr: "40G Ethernet Expansion Module"
pid: "N9K-M12PQ"
vid: "V01"
sn: "SAL1815QCJE"
- name: "Power Supply 1"
descr: "Nexus9000 C9396PX Chassis Power Supply"
pid: "N9K-PAC-650W"
vid: "V01"
sn: "DCB1809X07E"
- name: "Power Supply 2"
descr: "Nexus9000 C9396PX Chassis Power Supply"
pid: "N9K-PAC-650W"
vid: "V01"
sn: "DCB1809X07H"
- name: "Fan 1"
descr: "Nexus9000 C9396PX Chassis Fan Module"
pid: "N9K-C9300-FAN2"
vid: "V01"
sn: "N/A"
- name: "Fan 2"
descr: "Nexus9000 C9396PX Chassis Fan Module"
pid: "N9K-C9300-FAN2"
vid: "V01"
sn: "N/A"
- name: "Fan 3"
descr: "Nexus9000 C9396PX Chassis Fan Module"
pid: "N9K-C9300-FAN2"
vid: "V01"
sn: "N/A"
- name: "Slot 33"
descr: "Nexus7000 C7009 (9 Slot) Chassis Power Supply"
pid: "N7K-AC-6.0KW"
vid: "V01"
sn: "DTM141600XT"
- name: "Slot 34"
descr: "Nexus7000 C7009 (9 Slot) Chassis Power Supply"
pid: "N7K-AC-6.0KW"
vid: "V01"
sn: "DTM1414007T"
- name: "Slot 35"
descr: "Nexus7000 C7009 (9 Slot) Chassis Fan Module"
pid: "N7K-C7009-FAN"
vid: "V00"
sn: "JAF1433DDEJ"
- name: "Ethernet1/46"
descr: "CISCO-AVAGO"
pid: "10Gbase-SR"
vid: "SFBR-709SMZ-CS1"
sn: "AVD42309ABD"
- name: "Ethernet1/47"
descr: "CISCO"
pid: "1000base-LH"
vid: "RTXM191-404-C88"
sn: "ACW315000AD"
- name: "Ethernet1/48"
descr: "CISCO-AVAGO"
pid: "10Gbase-LR"
vid: "SFCT-739SMZ"
sn: "AVD2219K9AO"

0 comments on commit 7784dd7

Please sign in to comment.