diff --git a/docs/dev/data_model.md b/docs/dev/data_model.md index ec082e0892..af1a28fb30 100644 --- a/docs/dev/data_model.md +++ b/docs/dev/data_model.md @@ -52,6 +52,7 @@ Example: Imagine the extra programming logic needed to consume structured data w | `NEIGHBOR_NAME` | often represents neighbor name for CDP or LLDP | | `NETMASK` | for IPv4 dotted quad masks | | `NETWORK` | for network numbers or subnet address (without the mask or prefix/slash notation); in place of ROUTE | +| `PID` | represents Part IDs (PIDs), Stock Keeping Units (SKUs), and in some cases Models or Model Numbers | `PLATFORM` | often represents CDP or LLDP neighbor's platform or model name/number | | `PREFIX_LENGTH` | instead of PREFIX or CIDR for the numbers of a slash notation or CIDR mask | | `PROTOCOL` | instead of PROTO | diff --git a/ntc_templates/templates/arista_eos_show_inventory.textfsm b/ntc_templates/templates/arista_eos_show_inventory.textfsm index e824075662..ea31328e15 100644 --- a/ntc_templates/templates/arista_eos_show_inventory.textfsm +++ b/ntc_templates/templates/arista_eos_show_inventory.textfsm @@ -1,5 +1,5 @@ Value PORT ([0-9\/]+) -Value NAME (\S+) +Value PID (\S+) Value SN (\S+) Value DESCR (.+) Value VID (\d+\.\d+|\d+) @@ -12,20 +12,20 @@ Chassis ^\s+- ^\s+HW ^\s+${VID}\s+${SN}\s+\d+-\d+-\d+ -> Record - ^\s+${NAME}?\s+${DESCR}$$ + ^\s+${PID}?\s+${DESCR}$$ ^\s*System.+(power supply|power-supply) -> Power_Supply Power_Supply ^\s+Slot ^\s+- - ^\s+${PORT}\s+${NAME}\s+${SN} -> Record + ^\s+${PORT}\s+${PID}\s+${SN} -> Record ^\s*System.+(fan) -> Fan Fan ^\s+Module ^\s+- - ^\s+${PORT}?\s+\d+?\s+${NAME}?\s+${SN} -> Record + ^\s+${PORT}?\s+\d+?\s+${PID}?\s+${SN} -> Record ^\s*System.+ports -> Ports Ports @@ -33,4 +33,4 @@ Ports ^\s*System.+transceiver -> Transceiver Transceiver - ^\s+${PORT}\s+${DESCR}\s+${NAME}\s+${SN}\s+${VID} -> Record \ No newline at end of file + ^\s+${PORT}\s+${DESCR}\s+${PID}\s+${SN}\s+${VID} -> Record diff --git a/tests/arista_eos/show_inventory/arista_eos_show_inventory.yml b/tests/arista_eos/show_inventory/arista_eos_show_inventory.yml index c1deb91fe6..b5e5a2f15d 100644 --- a/tests/arista_eos/show_inventory/arista_eos_show_inventory.yml +++ b/tests/arista_eos/show_inventory/arista_eos_show_inventory.yml @@ -1,67 +1,67 @@ --- parsed_sample: - - port: "" - name: "DCS-7150S-52-CL" + - descr: "52-port SFP+ 10GigE 1RU + Clock" + pid: "DCS-7150S-52-CL" + port: "" sn: "JPE13120702" - descr: "52-port SFP+ 10GigE 1RU + Clock" vid: "02.00" - - port: "1" - name: "PWR-460AC-F" + - descr: "" + pid: "PWR-460AC-F" + port: "1" sn: "K192KU00241CZ" - descr: "" vid: "" - - port: "2" - name: "PWR-460AC-F" + - descr: "" + pid: "PWR-460AC-F" + port: "2" sn: "K192L200751CZ" - descr: "" vid: "" - - port: "1" - name: "FAN-7000-F" + - descr: "" + pid: "FAN-7000-F" + port: "1" sn: "N/A" - descr: "" vid: "" - - port: "2" - name: "FAN-7000-F" + - descr: "" + pid: "FAN-7000-F" + port: "2" sn: "N/A" - descr: "" vid: "" - - port: "3" - name: "FAN-7000-F" + - descr: "" + pid: "FAN-7000-F" + port: "3" sn: "N/A" - descr: "" vid: "" - - port: "4" - name: "FAN-7000-F" + - descr: "" + pid: "FAN-7000-F" + port: "4" sn: "N/A" - descr: "" vid: "" - - port: "1" - name: "" + - descr: "Management" + pid: "" + port: "1" sn: "" - descr: "Management" vid: "" - - port: "52" - name: "" + - descr: "Switched" + pid: "" + port: "52" sn: "" - descr: "Switched" vid: "" - - port: "1" - name: "SFP-10G-SR" + - descr: "Arista Networks" + pid: "SFP-10G-SR" + port: "1" sn: "XCW1225FD753" - descr: "Arista Networks" vid: "0002" - - port: "2" - name: "SFP-10G-SR" + - descr: "Arista Networks" + pid: "SFP-10G-SR" + port: "2" sn: "XCW1225FD753" - descr: "Arista Networks" vid: "0002" - - port: "51" - name: "SFP-10G-SR" + - descr: "Arista Networks" + pid: "SFP-10G-SR" + port: "51" sn: "XCW1225FD753" - descr: "Arista Networks" vid: "0002" - - port: "52" - name: "SFP-10G-SR" + - descr: "Arista Networks" + pid: "SFP-10G-SR" + port: "52" sn: "XCW1225FD753" - descr: "Arista Networks" vid: "0002" diff --git a/tests/arista_eos/show_inventory/arista_eos_show_inventory1.yml b/tests/arista_eos/show_inventory/arista_eos_show_inventory1.yml index 4c8a4a1f58..56454e1a1f 100644 --- a/tests/arista_eos/show_inventory/arista_eos_show_inventory1.yml +++ b/tests/arista_eos/show_inventory/arista_eos_show_inventory1.yml @@ -1,67 +1,67 @@ --- parsed_sample: - - port: "" - name: "DCS-7150S-52-CL" + - descr: "52-port SFP+ 10GigE 1RU + Clock " + pid: "DCS-7150S-52-CL" + port: "" sn: "JPE13120702" - descr: "52-port SFP+ 10GigE 1RU + Clock " vid: "02.00" - - port: "1" - name: "PWR-460AC-F" + - descr: "" + pid: "PWR-460AC-F" + port: "1" sn: "K192KU00241CZ" - descr: "" vid: "" - - port: "2" - name: "PWR-460AC-F" + - descr: "" + pid: "PWR-460AC-F" + port: "2" sn: "K192L200751CZ" - descr: "" vid: "" - - port: "1" - name: "FAN-7000-F" + - descr: "" + pid: "FAN-7000-F" + port: "1" sn: "N/A" - descr: "" vid: "" - - port: "2" - name: "FAN-7000-F" + - descr: "" + pid: "FAN-7000-F" + port: "2" sn: "N/A" - descr: "" vid: "" - - port: "3" - name: "FAN-7000-F" + - descr: "" + pid: "FAN-7000-F" + port: "3" sn: "N/A" - descr: "" vid: "" - - port: "4" - name: "FAN-7000-F" + - descr: "" + pid: "FAN-7000-F" + port: "4" sn: "N/A" - descr: "" vid: "" - - port: "1" - name: "" + - descr: "Management" + pid: "" + port: "1" sn: "" - descr: "Management" vid: "" - - port: "52" - name: "" + - descr: "Switched" + pid: "" + port: "52" sn: "" - descr: "Switched" vid: "" - - port: "1" - name: "SFP-10G-SR" + - descr: "Arista Networks" + pid: "SFP-10G-SR" + port: "1" sn: "XCW1225FD753" - descr: "Arista Networks" vid: "0002" - - port: "2" - name: "SFP-10G-SR" + - descr: "Arista Networks" + pid: "SFP-10G-SR" + port: "2" sn: "XCW1225FD753" - descr: "Arista Networks" vid: "0002" - - port: "51" - name: "SFP-10G-SR" + - descr: "Arista Networks" + pid: "SFP-10G-SR" + port: "51" sn: "XCW1225FD753" - descr: "Arista Networks" vid: "0002" - - port: "52" - name: "SFP-10G-SR" + - descr: "Arista Networks" + pid: "SFP-10G-SR" + port: "52" sn: "XCW1225FD753" - descr: "Arista Networks" vid: "0002"