From bf86d7a3afe338f4bc33f02f639c16845022333d Mon Sep 17 00:00:00 2001 From: Alejandro Suarez Date: Sat, 6 Jun 2020 19:36:54 -0400 Subject: [PATCH] New Template: broadcom_icos_show_lldp_remote-device_all.textfsm (#749) --- ...m_icos_show_lldp_remote-device_all.textfsm | 19 +++ templates/index | 1 + ...adcom_icos_show_lldp_remote-device_all.raw | 37 +++++ ...adcom_icos_show_lldp_remote-device_all.yml | 157 ++++++++++++++++++ 4 files changed, 214 insertions(+) create mode 100644 templates/broadcom_icos_show_lldp_remote-device_all.textfsm create mode 100644 tests/broadcom_icos/show_lldp_remote-device_all/broadcom_icos_show_lldp_remote-device_all.raw create mode 100644 tests/broadcom_icos/show_lldp_remote-device_all/broadcom_icos_show_lldp_remote-device_all.yml diff --git a/templates/broadcom_icos_show_lldp_remote-device_all.textfsm b/templates/broadcom_icos_show_lldp_remote-device_all.textfsm new file mode 100644 index 0000000000..f4f7283733 --- /dev/null +++ b/templates/broadcom_icos_show_lldp_remote-device_all.textfsm @@ -0,0 +1,19 @@ +Value LOCAL_INTERFACE (\S+) +Value REMOTE_ID (\S+) +Value CHASSIS_ID (\S+) +Value PORT_ID (\S+) +Value SYSTEM_NAME (\S+) + +Start + # Captures show lldp remote-device all for: + # Accton AS4610-54P, Accton AS5610-52X, Quanta LY2R, Quanta LB9, DNI AG3448P-R + # Raw data is the same in the case of all those devices + ^LLDP + ^Local + ^\s*Interface\s+RemID\s+Chassis\s+ID\s+Port\s+ID\s+System\s+Name$$ + ^-+ + ^\s*${LOCAL_INTERFACE}\s+${REMOTE_ID}\s+${CHASSIS_ID}\s+${PORT_ID}\s+${SYSTEM_NAME} -> Record + # Match records that only include the interface value + ^\s*${LOCAL_INTERFACE} -> Record + ^\s*$$ + ^. -> Error \ No newline at end of file diff --git a/templates/index b/templates/index index 063b0bcd67..d22609a1c9 100644 --- a/templates/index +++ b/templates/index @@ -67,6 +67,7 @@ avaya_ers_show_mlt.textfsm, .*, avaya_ers, sh[[ow]] ml[[t]] avaya_vsp_show_software.textfsm, .*, avaya_vsp, sho[[w]] so[[ftware]] +broadcom_icos_show_lldp_remote-device_all.textfsm, .*, broadcom_icos, sh[[ow]] lld[[p]] r[[emote-device]] a[[ll]] broadcom_icos_show_mac-address-table.textfsm, .*, broadcom_icos, sh[[ow]] mac[[-adress-table]] broadcom_icos_show_isdp_neighbors.textfsm, .*, broadcom_icos, sh[[ow]] is[[dp]] n[[eighbors]] broadcom_icos_show_version.textfsm, .*, broadcom_icos, sh[[ow]] ver[[sion]] diff --git a/tests/broadcom_icos/show_lldp_remote-device_all/broadcom_icos_show_lldp_remote-device_all.raw b/tests/broadcom_icos/show_lldp_remote-device_all/broadcom_icos_show_lldp_remote-device_all.raw new file mode 100644 index 0000000000..93d303f419 --- /dev/null +++ b/tests/broadcom_icos/show_lldp_remote-device_all/broadcom_icos_show_lldp_remote-device_all.raw @@ -0,0 +1,37 @@ + +LLDP Remote Device Summary + +Local +Interface RemID Chassis ID Port ID System Name +--------- ------- -------------------- ------------------ ------------------ +0/1 17 84:3D:C6:00:12:E0 Gi0 abc-1-00001.y ... +0/2 16 00:A6:CA:00:53:C0 Gi0 abc-1-00002.y ... +0/3 18 F4:DB:E6:00:9F:46 0 abc-1-00003M +0/4 19 F4:DB:E6:00:44:9E 0 abc-1-00004M +0/5 20 F4:DB:E6:00:AC:FE Te2/1 abc-1-00005M +0/25 +0/26 +0/27 +0/28 +0/29 +0/30 +0/31 +0/32 +0/33 +0/34 +0/35 8 6C:00:C5:4D:86:3A 6C:00:C5:4D:86:3B abc-aa-acc-sw ... +0/36 +0/37 7 6C:00:C5:49:E7:40 6C:00:C5:49:E7:41 abc-bb-acc-sw ... +0/38 +0/39 29 6C:00:C5:49:08:8A 6C:00:C5:49:08:8B abc-cc-acc-sw ... +0/40 +0/41 +0/42 26 00:00:64:4D:00:68 00:00:64:4D:6E:68 u0030644d6e685 ... +0/43 9 6C:00:C5:49:8D:DE 6C:00:C5:49:8D:DF abc-dd-acc-sw ... +0/44 +0/45 24 00:00:64:4D:D7:F0 00:00:64:4D:D7:F0 u0030644dd7f05 ... +0/46 +0/47 4 00:00:64:4D:72:8A 00:00:64:4D:72:8A u0030644d728a5 ... +0/48 +0/49 1 A8:00:B5:57:CC:8D A8:00:B5:57:CC:8E abc-ee-abc-sw0101 +0/50 2 A8:00:B5:57:CB:01 A8:00:B5:57:CB:02 abc-ff-abc-sw0102 diff --git a/tests/broadcom_icos/show_lldp_remote-device_all/broadcom_icos_show_lldp_remote-device_all.yml b/tests/broadcom_icos/show_lldp_remote-device_all/broadcom_icos_show_lldp_remote-device_all.yml new file mode 100644 index 0000000000..eb01c84ed4 --- /dev/null +++ b/tests/broadcom_icos/show_lldp_remote-device_all/broadcom_icos_show_lldp_remote-device_all.yml @@ -0,0 +1,157 @@ +--- +parsed_sample: + - local_interface: "0/1" + remote_id: "17" + chassis_id: "84:3D:C6:00:12:E0" + port_id: "Gi0" + system_name: "abc-1-00001.y" + - local_interface: "0/2" + remote_id: "16" + chassis_id: "00:A6:CA:00:53:C0" + port_id: "Gi0" + system_name: "abc-1-00002.y" + - local_interface: "0/3" + remote_id: "18" + chassis_id: "F4:DB:E6:00:9F:46" + port_id: "0" + system_name: "abc-1-00003M" + - local_interface: "0/4" + remote_id: "19" + chassis_id: "F4:DB:E6:00:44:9E" + port_id: "0" + system_name: "abc-1-00004M" + - local_interface: "0/5" + remote_id: "20" + chassis_id: "F4:DB:E6:00:AC:FE" + port_id: "Te2/1" + system_name: "abc-1-00005M" + - local_interface: "0/25" + remote_id: "" + chassis_id: "" + port_id: "" + system_name: "" + - local_interface: "0/26" + remote_id: "" + chassis_id: "" + port_id: "" + system_name: "" + - local_interface: "0/27" + remote_id: "" + chassis_id: "" + port_id: "" + system_name: "" + - local_interface: "0/28" + remote_id: "" + chassis_id: "" + port_id: "" + system_name: "" + - local_interface: "0/29" + remote_id: "" + chassis_id: "" + port_id: "" + system_name: "" + - local_interface: "0/30" + remote_id: "" + chassis_id: "" + port_id: "" + system_name: "" + - local_interface: "0/31" + remote_id: "" + chassis_id: "" + port_id: "" + system_name: "" + - local_interface: "0/32" + remote_id: "" + chassis_id: "" + port_id: "" + system_name: "" + - local_interface: "0/33" + remote_id: "" + chassis_id: "" + port_id: "" + system_name: "" + - local_interface: "0/34" + remote_id: "" + chassis_id: "" + port_id: "" + system_name: "" + - local_interface: "0/35" + remote_id: "8" + chassis_id: "6C:00:C5:4D:86:3A" + port_id: "6C:00:C5:4D:86:3B" + system_name: "abc-aa-acc-sw" + - local_interface: "0/36" + remote_id: "" + chassis_id: "" + port_id: "" + system_name: "" + - local_interface: "0/37" + remote_id: "7" + chassis_id: "6C:00:C5:49:E7:40" + port_id: "6C:00:C5:49:E7:41" + system_name: "abc-bb-acc-sw" + - local_interface: "0/38" + remote_id: "" + chassis_id: "" + port_id: "" + system_name: "" + - local_interface: "0/39" + remote_id: "29" + chassis_id: "6C:00:C5:49:08:8A" + port_id: "6C:00:C5:49:08:8B" + system_name: "abc-cc-acc-sw" + - local_interface: "0/40" + remote_id: "" + chassis_id: "" + port_id: "" + system_name: "" + - local_interface: "0/41" + remote_id: "" + chassis_id: "" + port_id: "" + system_name: "" + - local_interface: "0/42" + remote_id: "26" + chassis_id: "00:00:64:4D:00:68" + port_id: "00:00:64:4D:6E:68" + system_name: "u0030644d6e685" + - local_interface: "0/43" + remote_id: "9" + chassis_id: "6C:00:C5:49:8D:DE" + port_id: "6C:00:C5:49:8D:DF" + system_name: "abc-dd-acc-sw" + - local_interface: "0/44" + remote_id: "" + chassis_id: "" + port_id: "" + system_name: "" + - local_interface: "0/45" + remote_id: "24" + chassis_id: "00:00:64:4D:D7:F0" + port_id: "00:00:64:4D:D7:F0" + system_name: "u0030644dd7f05" + - local_interface: "0/46" + remote_id: "" + chassis_id: "" + port_id: "" + system_name: "" + - local_interface: "0/47" + remote_id: "4" + chassis_id: "00:00:64:4D:72:8A" + port_id: "00:00:64:4D:72:8A" + system_name: "u0030644d728a5" + - local_interface: "0/48" + remote_id: "" + chassis_id: "" + port_id: "" + system_name: "" + - local_interface: "0/49" + remote_id: "1" + chassis_id: "A8:00:B5:57:CC:8D" + port_id: "A8:00:B5:57:CC:8E" + system_name: "abc-ee-abc-sw0101" + - local_interface: "0/50" + remote_id: "2" + chassis_id: "A8:00:B5:57:CB:01" + port_id: "A8:00:B5:57:CB:02" + system_name: "abc-ff-abc-sw0102"