From 6fdd50706cde95976f6be4a3a033db74350c6743 Mon Sep 17 00:00:00 2001 From: Jack Kraszewski Date: Sun, 30 Dec 2018 01:08:57 -0500 Subject: [PATCH] `brocade_fastiron_show_lldp_neighbors`: Add new template (#291) --- .../brocade_fastiron_show_lldp_neighbors.template | 14 ++++++++++++++ templates/index | 1 + .../brocade_fastiron_show_lldp_neighbors.parsed | 7 +++++++ .../brocade_fastiron_show_lldp_neighbors.raw | 6 ++++++ 4 files changed, 28 insertions(+) create mode 100644 templates/brocade_fastiron_show_lldp_neighbors.template create mode 100644 tests/brocade_fastiron/show_lldp_neighbors/brocade_fastiron_show_lldp_neighbors.parsed create mode 100644 tests/brocade_fastiron/show_lldp_neighbors/brocade_fastiron_show_lldp_neighbors.raw diff --git a/templates/brocade_fastiron_show_lldp_neighbors.template b/templates/brocade_fastiron_show_lldp_neighbors.template new file mode 100644 index 0000000000..efd604cf2e --- /dev/null +++ b/templates/brocade_fastiron_show_lldp_neighbors.template @@ -0,0 +1,14 @@ +Value Required NEIGHBOR (\S+) +Value Required LOCAL_INTERFACE (\S+) +Value Required HOLD_TIME (\d+) +Value Required CAPABILITIES (\S+) +Value Required NEIGHBOR_INTERFACE (\S+) + +Start + ^Capability.* + ^\s+\(.* + ^Device\s+ID\s+Local\s+Intf\s+Hold-time\s+Capability\s+Port\s+ID\s*$$ + ^${NEIGHBOR}\s+${LOCAL_INTERFACE}\s+${HOLD_TIME}\s+${CAPABILITIES}\s+${NEIGHBOR_INTERFACE} -> Record + ^Total.* + ^\s*$$ + ^. -> Error diff --git a/templates/index b/templates/index index dfbe037399..440496d936 100644 --- a/templates/index +++ b/templates/index @@ -63,6 +63,7 @@ avaya_vsp_show_software.template, .*, avaya_vsp, sho[[w]] so[[ftware]] brocade_fastiron_show_lldp_neighbors_detail.template, .*, brocade_fastiron, sh[[ow]] ll[[dp]] n[[eighbors]] d[[etail]] brocade_fastiron_show_running-config_vlan.template, .*, brocade_fastiron, sh[[ow]] ru[[nning-config]] v[[lan]] brocade_fastiron_show_interfaces_brief.template, .*, brocade_fastiron, sh[[ow]] in[[terfaces]] b[[rief]] +brocade_fastiron_show_lldp_neighbors.template, .*, brocade_fastiron, sh[[ow]] ll[[dp]] n[[eighbors]] brocade_fastiron_show_interfaces.template, .*, brocade_fastiron, sh[[ow]] in[[terfaces]] brocade_fastiron_show_lag_brief.template, .*, brocade_fastiron, sh[[ow]] la[[g]] b[[rief]] brocade_fastiron_show_monitor.template, .*, brocade_fastiron, sh[[ow]] mo[[nitor]] diff --git a/tests/brocade_fastiron/show_lldp_neighbors/brocade_fastiron_show_lldp_neighbors.parsed b/tests/brocade_fastiron/show_lldp_neighbors/brocade_fastiron_show_lldp_neighbors.parsed new file mode 100644 index 0000000000..6ebf1a68a0 --- /dev/null +++ b/tests/brocade_fastiron/show_lldp_neighbors/brocade_fastiron_show_lldp_neighbors.parsed @@ -0,0 +1,7 @@ +--- +parsed_sample: +- neighbor: "core-sw01" + local_interface: "Gi1/3" + hold_time: "120" + capabilities: "B,R" + neighbor_interface: "Gi0/3" diff --git a/tests/brocade_fastiron/show_lldp_neighbors/brocade_fastiron_show_lldp_neighbors.raw b/tests/brocade_fastiron/show_lldp_neighbors/brocade_fastiron_show_lldp_neighbors.raw new file mode 100644 index 0000000000..17df92784e --- /dev/null +++ b/tests/brocade_fastiron/show_lldp_neighbors/brocade_fastiron_show_lldp_neighbors.raw @@ -0,0 +1,6 @@ +Capability codes: + (R) Router, (B) Bridge, (T) Telephone, (C) DOCSIS Cable Device + (W) WLAN Access Point, (P) Repeater, (S) Station, (O) Other +Device ID Local Intf Hold-time Capability Port ID +core-sw01 Gi1/3 120 B,R Gi0/3 +Total entries displayed: 1