From aa86c5adb295cfd4810c83e8817381d58447b226 Mon Sep 17 00:00:00 2001 From: Brendan S <162735064+b-sheedy@users.noreply.github.com> Date: Wed, 11 Dec 2024 11:09:04 -0700 Subject: [PATCH] Added template for Extreme EXOS `show fdb` --- .../templates/extreme_exos_show_fdb.textfsm | 23 ++++++++++++ ntc_templates/templates/index | 1 + .../show_fdb/extreme_exos_show_fdb.raw | 19 ++++++++++ .../show_fdb/extreme_exos_show_fdb.yml | 37 +++++++++++++++++++ 4 files changed, 80 insertions(+) create mode 100644 ntc_templates/templates/extreme_exos_show_fdb.textfsm create mode 100644 tests/extreme_exos/show_fdb/extreme_exos_show_fdb.raw create mode 100644 tests/extreme_exos/show_fdb/extreme_exos_show_fdb.yml diff --git a/ntc_templates/templates/extreme_exos_show_fdb.textfsm b/ntc_templates/templates/extreme_exos_show_fdb.textfsm new file mode 100644 index 0000000000..fbb24cbfbb --- /dev/null +++ b/ntc_templates/templates/extreme_exos_show_fdb.textfsm @@ -0,0 +1,23 @@ +Value MAC_ADDRESS (\S+) +Value VLAN_NAME (\S+) +Value VLAN_ID (\d+) +Value AGE (\d+) +Value INTERFACE (\S+(\s+\S+)*) + +Start + ^MAC\s+VLAN\s+Name\s*\(\s*Tag\s*\)\s+Age\s+Flags\s+Port\s+\/\s+Virtual\s+Port\s+List -> Start_record + ^. -> Error + +Start_record + ^\s*-+\s*$$ + ^${MAC_ADDRESS}\s+${VLAN_NAME}\(${VLAN_ID}\)\s+${AGE}\D+${INTERFACE}\s*$$ -> Record + ^\s*Flags\s+: + ^\s*x\s+-\s+IPX + ^\s*b\s+-\s+Ingress\s+Blackhole + ^\s*D\s+-\s+drop\s+packet + ^\s*S\s+-\s+Software\s+Controlled\s+Deletion + ^\s*X\s+-\s+VXLAN + ^\s*Total: + ^\s*FDB\s+Aging\s+time: + ^\s*$$ + ^. -> Error diff --git a/ntc_templates/templates/index b/ntc_templates/templates/index index f88cf397f7..71f150c5f3 100644 --- a/ntc_templates/templates/index +++ b/ntc_templates/templates/index @@ -596,6 +596,7 @@ extreme_exos_show_vlan_description.textfsm, .*, extreme_exos, show vlan descript extreme_exos_show_ipconfig.textfsm, .*, extreme_exos, show ipconfig extreme_exos_show_sharing.textfsm, .*, extreme_exos, show sharing extreme_exos_show_iparp.textfsm, .*, extreme_exos, show iparp +extreme_exos_show_fdb.textfsm, .*, extreme_exos, sh[[ow]] fdb extreme_slxos_show_ip_interface_brief.textfsm, .*, extreme_slxos, sh[[ow]] ip int[[erface]] br[[ief]] extreme_slxos_show_clock.textfsm, .*, extreme_slxos, show clock diff --git a/tests/extreme_exos/show_fdb/extreme_exos_show_fdb.raw b/tests/extreme_exos/show_fdb/extreme_exos_show_fdb.raw new file mode 100644 index 0000000000..f26c47ebb1 --- /dev/null +++ b/tests/extreme_exos/show_fdb/extreme_exos_show_fdb.raw @@ -0,0 +1,19 @@ +MAC VLAN Name( Tag) Age Flags Port / Virtual Port List +------------------------------------------------------------------------------------------------------ +00:0c:29:4b:34:cf v101(0101) 0041 d m D 1:2 +00:0c:29:4b:34:cf v100(0100) 0041 d m P 1:2 +00:0c:29:d2:2d:48 v102(0102) 0045 d miM 1:3, 1:45 +00:0c:29:d2:2d:48 v100(0100) 0045 d m P 1:3 +00:0c:29:f1:f2:f5 v100(0100) 0045 d miM 1:51:1, 1:45 +00:0c:29:f1:f2:f5 v102(0102) 0045 d m P 1:1 +00:0c:29:f1:f2:f5 v101(0101) 0000 d m P 1:1 + +Flags : d - Dynamic, s - Static, p - Permanent, n - NetLogin, m - MAC, i - IP, + x - IPX, l - lockdown MAC, L - lockdown-timeout MAC, M- Mirror, B - Egress Blackhole, + b - Ingress Blackhole, v - MAC-Based VLAN, P - Private VLAN, T - VLAN translation, + D - drop packet, h - Hardware Aging (Age=0), o - IEEE 802.1ah Backbone MAC, + S - Software Controlled Deletion, r - MSRP, + X - VXLAN, E - EVPN + +Total: 3 Static: 0 Perm: 0 Dyn: 3 Dropped: 1 Locked: 0 Locked with Timeout: 0 +FDB Aging time: 300 diff --git a/tests/extreme_exos/show_fdb/extreme_exos_show_fdb.yml b/tests/extreme_exos/show_fdb/extreme_exos_show_fdb.yml new file mode 100644 index 0000000000..d2b87d4b19 --- /dev/null +++ b/tests/extreme_exos/show_fdb/extreme_exos_show_fdb.yml @@ -0,0 +1,37 @@ +--- +parsed_sample: + - age: "0041" + interface: "1:2" + mac_address: "00:0c:29:4b:34:cf" + vlan_id: "0101" + vlan_name: "v101" + - age: "0041" + interface: "1:2" + mac_address: "00:0c:29:4b:34:cf" + vlan_id: "0100" + vlan_name: "v100" + - age: "0045" + interface: "1:3, 1:45" + mac_address: "00:0c:29:d2:2d:48" + vlan_id: "0102" + vlan_name: "v102" + - age: "0045" + interface: "1:3" + mac_address: "00:0c:29:d2:2d:48" + vlan_id: "0100" + vlan_name: "v100" + - age: "0045" + interface: "1:51:1, 1:45" + mac_address: "00:0c:29:f1:f2:f5" + vlan_id: "0100" + vlan_name: "v100" + - age: "0045" + interface: "1:1" + mac_address: "00:0c:29:f1:f2:f5" + vlan_id: "0102" + vlan_name: "v102" + - age: "0000" + interface: "1:1" + mac_address: "00:0c:29:f1:f2:f5" + vlan_id: "0101" + vlan_name: "v101"