From 03e73c51d698ee512d80224dd569d8f2032bccaf Mon Sep 17 00:00:00 2001 From: Andrea Dainese Date: Wed, 10 Jul 2019 09:42:15 +0200 Subject: [PATCH 1/9] added template for cisco ios and nxos (show interface switchport), procurve (show mac-address), paloalto (show arp) --- .../cisco_ios_show_interface_switchport.template | 16 ++++++++++++++++ ...cisco_nxos_show_interface_switchport.template | 16 ++++++++++++++++ templates/hp_procurve_show_mac-address.template | 9 +++++++++ templates/index | 6 +++++- templates/paloalto_panos_show_arp.template | 9 +++++++++ 5 files changed, 55 insertions(+), 1 deletion(-) create mode 100644 templates/cisco_ios_show_interface_switchport.template create mode 100644 templates/cisco_nxos_show_interface_switchport.template create mode 100644 templates/hp_procurve_show_mac-address.template create mode 100644 templates/paloalto_panos_show_arp.template diff --git a/templates/cisco_ios_show_interface_switchport.template b/templates/cisco_ios_show_interface_switchport.template new file mode 100644 index 0000000000..1305e4f409 --- /dev/null +++ b/templates/cisco_ios_show_interface_switchport.template @@ -0,0 +1,16 @@ +Value Required INTERFACE (\S+) +Value SWITCHPORT (.+) +Value SWITCHPORT_MONITOR (.+) +Value MODE (\S+) +Value ACCESS_VLAN (\d+) +Value NATIVE_VLAN (\d+) +Value TRUNKING_VLANS (\S+) + +Start + ^Name: ${INTERFACE} + ^ Switchport: ${SWITCHPORT} + ^ Switchport Monitor: ${SWITCHPORT_MONITOR} + ^ Operational Mode: ${MODE} + ^ Access Mode VLAN: ${ACCESS_VLAN} + ^ Trunking Native Mode VLAN: ${NATIVE_VLAN} + ^ Trunking VLANs Allowed: ${TRUNKING_VLANS} -> Record diff --git a/templates/cisco_nxos_show_interface_switchport.template b/templates/cisco_nxos_show_interface_switchport.template new file mode 100644 index 0000000000..1305e4f409 --- /dev/null +++ b/templates/cisco_nxos_show_interface_switchport.template @@ -0,0 +1,16 @@ +Value Required INTERFACE (\S+) +Value SWITCHPORT (.+) +Value SWITCHPORT_MONITOR (.+) +Value MODE (\S+) +Value ACCESS_VLAN (\d+) +Value NATIVE_VLAN (\d+) +Value TRUNKING_VLANS (\S+) + +Start + ^Name: ${INTERFACE} + ^ Switchport: ${SWITCHPORT} + ^ Switchport Monitor: ${SWITCHPORT_MONITOR} + ^ Operational Mode: ${MODE} + ^ Access Mode VLAN: ${ACCESS_VLAN} + ^ Trunking Native Mode VLAN: ${NATIVE_VLAN} + ^ Trunking VLANs Allowed: ${TRUNKING_VLANS} -> Record diff --git a/templates/hp_procurve_show_mac-address.template b/templates/hp_procurve_show_mac-address.template new file mode 100644 index 0000000000..3d737ea415 --- /dev/null +++ b/templates/hp_procurve_show_mac-address.template @@ -0,0 +1,9 @@ +Value MAC ([0-9a-fA-F]{6}-[0-9a-fA-F]{6}) +Value PORT (\S+) +Value VLAN (\d+) + +Start + ^.*MAC Address -> MAC + +MAC + ^\s+${MAC}\s+${PORT}\s+${VLAN} -> Record diff --git a/templates/index b/templates/index index c9f14fc1af..e8a15d80b8 100644 --- a/templates/index +++ b/templates/index @@ -91,7 +91,7 @@ brocade_netiron_show_span.template, .*, brocade_netiron, sh[[ow]] sp[[anning-tre brocade_netiron_show_topo.template, .*, brocade_netiron, sh[[ow]] to[[pology-group]] checkpoint_gaia_show_interfaces_all.template, .*, checkpoint_gaia, show interfaces all -checkpoint_gaia_show_ntp_servers.template, .*, checkpoint_gaia, show ntp servers +checkpoint_gaia_show_ntp_servers.template, .*, checkpoint_gaia, show ntp servers checkpoint_gaia_show_version_all.template, .*, checkpoint_gaia, show version all checkpoint_gaia_show_domainname.template, .*, checkpoint_gaia, show domainname checkpoint_gaia_show_ipv6_route.template, .*, checkpoint_gaia, show ipv6 route @@ -137,6 +137,7 @@ cisco_ios_show_environment_power_all.template, .*, cisco_ios, sh[[ow]] envi[[ron cisco_ios_show_interface_transceiver.template, .*, cisco_ios, sh[[ow]] int[[erface]] trans[[ceiver]] cisco_ios_show_lldp_neighbors_detail.template, .*, cisco_ios, sh[[ow]] lld[[p]] neig[[hbors]] det[[ail]] cisco_ios_show_cdp_neighbors_detail.template, .*, cisco_ios, sh[[ow]] c[[dp]] neig[[hbors]] det[[ail]] +cisco_ios_show_interface_switchport.template, .*, cisco_ios, sh[[ow]] int[[erface]] sw[[itchport]] cisco_ios_show_ipv6_interface_brief.template, .*, cisco_ios, sh[[ow]] ipv[[6]] i[[nterface]] b[[rief]] cisco_ios_show_ip_eigrp_neighbors.template, .*, cisco_ios, sh[[ow]] ip ei[[grp]] nei[[ghbors]] cisco_ios_show_ip_interface_brief.template, .*, cisco_ios, sh[[ow]] ip int[[erface]] br[[ief]] @@ -191,6 +192,7 @@ cisco_nxos_show_environment_temperature.template, .*, cisco_nxos, sh[[ow]] env[[ cisco_nxos_show_ip_dhcp_relay_address.template, .*, cisco_nxos, sh[[ow]] ip dh[[cp]] r[[elay]] a[[ddress]] cisco_nxos_show_lldp_neighbors_detail.template, .*, cisco_nxos, sh[[ow]] ll[[dp]] nei[[ghbors]] d[[etail]] cisco_nxos_show_cdp_neighbors_detail.template, .*, cisco_nxos, sh[[ow]] c[[dp]] neig[[hbors]] det[[ail]] +cisco_nxos_show_interface_switchport.template, .*, cisco_nxos, sh[[ow]] int[[erface]] sw[[itchport]] cisco_nxos_show_ip_ospf_neighbor_vrf.template, .*, cisco_nxos, sh[[ow]] ip ospf nei[[ghbor]] vrf (\S+) cisco_nxos_show_ipv6_interface_brief.template, .*, cisco_nxos, sh[[ow]] ipv[[6]] interf[[ace]] b[[rief]] cisco_nxos_show_port-channel_summary.template, .*, cisco_nxos, sh[[ow]] po[[rt-channel]] sum[[mary]] @@ -270,6 +272,7 @@ hp_comware_display_clock.template, .*, hp_comware, di[[splay]] clo[[ck]] hp_comware_display_arp.template, .*, hp_comware, di[[splay]] a[[rp]] hp_procurve_show_tech_buffers.template, .*, hp_procurve, sh[[ow]] tec[[h]] buf[[ffers]] +hp_procurve_show_mac-address.template, .*, hp_procurve, sh[[ow]] mac-a[[ddress]] hp_procurve_show_system.template, .*, hp_procurve, sh[[ow]] syst[[em]] hp_procurve_show_vlans.template, .*, hp_procurve, sh[[ow]] vl[[ans]] hp_procurve_show_arp.template, .*, hp_procurve, sh[[ow]] ar[[p]] @@ -293,6 +296,7 @@ paloalto_panos_show_interface_logical.template, .*, paloalto_panos, sh[[ow]] int paloalto_panos_show_counter_global.template, .*, paloalto_panos, sh[[ow]] coun[[ter]] glo[[bal]] paloalto_panos_show_system_info.template, .*, paloalto_panos, sh[[ow]] sys[[tem]] in[[fo]] paloalto_panos_show_jobs_all.template, .*, paloalto_panos, sh[[ow]] jo[[bs]] all +paloalto_panos_show_arp.template, .*, paloalto_panos, sh[[ow]] ar[[p]] all ubiquiti_edgeswitch_show_vlan.template, .*, ubiquiti_edgeswitch, sh[[ow]] vl[[an]] ubiquiti_edgeswitch_show_arp.template, .*, ubiquiti_edgeswitch, sh[[ow]] ar[[p]] diff --git a/templates/paloalto_panos_show_arp.template b/templates/paloalto_panos_show_arp.template new file mode 100644 index 0000000000..246a34a540 --- /dev/null +++ b/templates/paloalto_panos_show_arp.template @@ -0,0 +1,9 @@ +Value INTERFACE (\S+) +Value IP (\S+) +Value MAC (\S+) +Value PORT (\S+) +Value STATUS (\S+) +Value TTL (\S+) + +Start + ^${INTERFACE}\s+${IP}\s+${MAC}\s+${PORT}\s+${STATUS}\s+${TTL} -> Record From 3bdf302d5531fd029405edc70e93314c922f8557 Mon Sep 17 00:00:00 2001 From: Andrea Dainese Date: Mon, 15 Jul 2019 21:58:09 +0200 Subject: [PATCH 2/9] pre-commit for tests --- ...o_ios_show_interfaces_switchport.template} | 0 ..._nxos_show_interfaces_switchport.template} | 0 templates/index | 5 +- templates/paloalto_panos_show_mac.template | 8 + ...isco_ios_show_interfaces_switchport.parsed | 33 +++++ .../cisco_ios_show_interfaces_switchport.raw | 140 ++++++++++++++++++ ...sco_nxos_show_interfaces_switchport.parsed | 0 .../cisco_nxos_show_interfaces_switchport.raw | 140 ++++++++++++++++++ .../hp_procurve_show_mac-address.parsed | 15 ++ .../hp_procurve_show_mac-address.raw | 9 ++ .../show_arp/paloalto_panos_show_arp.parsed | 18 +++ .../show_arp/paloalto_panos_show_arp.raw | 12 ++ .../show_mac/paloalto_panos_show_mac.parsed | 18 +++ .../show_mac/paloalto_panos_show_mac.raw | 12 ++ 14 files changed, 408 insertions(+), 2 deletions(-) rename templates/{cisco_ios_show_interface_switchport.template => cisco_ios_show_interfaces_switchport.template} (100%) rename templates/{cisco_nxos_show_interface_switchport.template => cisco_nxos_show_interfaces_switchport.template} (100%) create mode 100644 templates/paloalto_panos_show_mac.template create mode 100644 tests/cisco_ios/show_interfaces_switchport/cisco_ios_show_interfaces_switchport.parsed create mode 100644 tests/cisco_ios/show_interfaces_switchport/cisco_ios_show_interfaces_switchport.raw create mode 100644 tests/cisco_nxos/show_interfaces_switchport/cisco_nxos_show_interfaces_switchport.parsed create mode 100644 tests/cisco_nxos/show_interfaces_switchport/cisco_nxos_show_interfaces_switchport.raw create mode 100644 tests/hp_procurve/show_mac-address/hp_procurve_show_mac-address.parsed create mode 100644 tests/hp_procurve/show_mac-address/hp_procurve_show_mac-address.raw create mode 100644 tests/paloalto_panos/show_arp/paloalto_panos_show_arp.parsed create mode 100644 tests/paloalto_panos/show_arp/paloalto_panos_show_arp.raw create mode 100644 tests/paloalto_panos/show_mac/paloalto_panos_show_mac.parsed create mode 100644 tests/paloalto_panos/show_mac/paloalto_panos_show_mac.raw diff --git a/templates/cisco_ios_show_interface_switchport.template b/templates/cisco_ios_show_interfaces_switchport.template similarity index 100% rename from templates/cisco_ios_show_interface_switchport.template rename to templates/cisco_ios_show_interfaces_switchport.template diff --git a/templates/cisco_nxos_show_interface_switchport.template b/templates/cisco_nxos_show_interfaces_switchport.template similarity index 100% rename from templates/cisco_nxos_show_interface_switchport.template rename to templates/cisco_nxos_show_interfaces_switchport.template diff --git a/templates/index b/templates/index index e8a15d80b8..1bd81fd4eb 100644 --- a/templates/index +++ b/templates/index @@ -135,9 +135,9 @@ cisco_ios_show_interfaces_description.template, .*, cisco_ios, sh[[ow]] int[[erf cisco_ios_show_ip_device_tracking_all.template, .*, cisco_ios, sh[[ow]] ip de[[vice]] t[[racking]] a[[ll]] cisco_ios_show_environment_power_all.template, .*, cisco_ios, sh[[ow]] envi[[ronment]] p[[ower]] a[[ll]] cisco_ios_show_interface_transceiver.template, .*, cisco_ios, sh[[ow]] int[[erface]] trans[[ceiver]] +cisco_ios_show_interfaces_switchport.template, .*, cisco_ios, sh[[ow]] int[[erface]] sw[[itchport]] cisco_ios_show_lldp_neighbors_detail.template, .*, cisco_ios, sh[[ow]] lld[[p]] neig[[hbors]] det[[ail]] cisco_ios_show_cdp_neighbors_detail.template, .*, cisco_ios, sh[[ow]] c[[dp]] neig[[hbors]] det[[ail]] -cisco_ios_show_interface_switchport.template, .*, cisco_ios, sh[[ow]] int[[erface]] sw[[itchport]] cisco_ios_show_ipv6_interface_brief.template, .*, cisco_ios, sh[[ow]] ipv[[6]] i[[nterface]] b[[rief]] cisco_ios_show_ip_eigrp_neighbors.template, .*, cisco_ios, sh[[ow]] ip ei[[grp]] nei[[ghbors]] cisco_ios_show_ip_interface_brief.template, .*, cisco_ios, sh[[ow]] ip int[[erface]] br[[ief]] @@ -189,10 +189,10 @@ cisco_nxos_show_l2rib_internal_permanently-frozen-list.template, .*, cisco_nxos, cisco_nxos_show_configuration_session_summary.template, .*, cisco_nxos, sh[[ow]] configu[[ration]] s[[ession]] su[[mmary]] cisco_nxos_show_interface_transceiver_details.template, .*, cisco_nxos, sh[[ow]] int[[erface]] tra[[nsceiver]] de[[tails]] cisco_nxos_show_environment_temperature.template, .*, cisco_nxos, sh[[ow]] env[[ironment]] t[[emperature]] +cisco_nxos_show_interfaces_switchport.template, .*, cisco_nxos, sh[[ow]] int[[erface]] sw[[itchport]] cisco_nxos_show_ip_dhcp_relay_address.template, .*, cisco_nxos, sh[[ow]] ip dh[[cp]] r[[elay]] a[[ddress]] cisco_nxos_show_lldp_neighbors_detail.template, .*, cisco_nxos, sh[[ow]] ll[[dp]] nei[[ghbors]] d[[etail]] cisco_nxos_show_cdp_neighbors_detail.template, .*, cisco_nxos, sh[[ow]] c[[dp]] neig[[hbors]] det[[ail]] -cisco_nxos_show_interface_switchport.template, .*, cisco_nxos, sh[[ow]] int[[erface]] sw[[itchport]] cisco_nxos_show_ip_ospf_neighbor_vrf.template, .*, cisco_nxos, sh[[ow]] ip ospf nei[[ghbor]] vrf (\S+) cisco_nxos_show_ipv6_interface_brief.template, .*, cisco_nxos, sh[[ow]] ipv[[6]] interf[[ace]] b[[rief]] cisco_nxos_show_port-channel_summary.template, .*, cisco_nxos, sh[[ow]] po[[rt-channel]] sum[[mary]] @@ -297,6 +297,7 @@ paloalto_panos_show_counter_global.template, .*, paloalto_panos, sh[[ow]] coun[[ paloalto_panos_show_system_info.template, .*, paloalto_panos, sh[[ow]] sys[[tem]] in[[fo]] paloalto_panos_show_jobs_all.template, .*, paloalto_panos, sh[[ow]] jo[[bs]] all paloalto_panos_show_arp.template, .*, paloalto_panos, sh[[ow]] ar[[p]] all +paloalto_panos_show_mac.template, .*, paloalto_panos, sh[[ow]] mac all ubiquiti_edgeswitch_show_vlan.template, .*, ubiquiti_edgeswitch, sh[[ow]] vl[[an]] ubiquiti_edgeswitch_show_arp.template, .*, ubiquiti_edgeswitch, sh[[ow]] ar[[p]] diff --git a/templates/paloalto_panos_show_mac.template b/templates/paloalto_panos_show_mac.template new file mode 100644 index 0000000000..bfbc66214e --- /dev/null +++ b/templates/paloalto_panos_show_mac.template @@ -0,0 +1,8 @@ +Value VLAN (\S+) +Value MAC (\S+) +Value INTERFACE (\S+) +Value STATUS (\S+) +Value TTL (\S+) + +Start + ^${VLAN}\s+${MAC}\s+${INTERFACE}\s+${STATUS}\s+${TTL} -> Record diff --git a/tests/cisco_ios/show_interfaces_switchport/cisco_ios_show_interfaces_switchport.parsed b/tests/cisco_ios/show_interfaces_switchport/cisco_ios_show_interfaces_switchport.parsed new file mode 100644 index 0000000000..ea4878b724 --- /dev/null +++ b/tests/cisco_ios/show_interfaces_switchport/cisco_ios_show_interfaces_switchport.parsed @@ -0,0 +1,33 @@ +--- +parsed_sample: + +- access_vlan: '1' + interface: Gi0/1 + mode: trunk + native_vlan: '1' + switchport: Enabled + switchport_monitor: '' +- access_vlan: '100' + interface: Gi0/2 + mode: static access + native_vlan: '1' + switchport: Enabled + switchport_monitor: '' +- access_vlan: '101' + interface: Gi0/3 + mode: static access + native_vlan: '1' + switchport: Enabled + switchport_monitor: '' +- access_vlan: '110' + interface: Gi1/0 + mode: static access + native_vlan: '1' + switchport: Enabled + switchport_monitor: '' +- access_vlan: '111' + interface: Gi1/1 + mode: static access + native_vlan: '1' + switchport: Enabled + switchport_monitor: '' diff --git a/tests/cisco_ios/show_interfaces_switchport/cisco_ios_show_interfaces_switchport.raw b/tests/cisco_ios/show_interfaces_switchport/cisco_ios_show_interfaces_switchport.raw new file mode 100644 index 0000000000..7d31d5940b --- /dev/null +++ b/tests/cisco_ios/show_interfaces_switchport/cisco_ios_show_interfaces_switchport.raw @@ -0,0 +1,140 @@ + +Name: Gi0/1 +Switchport: Enabled +Administrative Mode: trunk +Operational Mode: trunk +Administrative Trunking Encapsulation: dot1q +Operational Trunking Encapsulation: dot1q +Negotiation of Trunking: Off +Access Mode VLAN: 1 (default) +Trunking Native Mode VLAN: 1 (default) +Administrative Native VLAN tagging: enabled +Voice VLAN: none +Administrative private-vlan host-association: none +Administrative private-vlan mapping: none +Administrative private-vlan trunk native VLAN: none +Administrative private-vlan trunk Native VLAN tagging: enabled +Administrative private-vlan trunk encapsulation: dot1q +Administrative private-vlan trunk normal VLANs: none +Administrative private-vlan trunk associations: none +Administrative private-vlan trunk mappings: none +Operational private-vlan: none +Trunking VLANs Enabled: ALL +Pruning VLANs Enabled: 2-1001 +Capture Mode Disabled +Capture VLANs Allowed: ALL + +Protected: false +Appliance trust: none + +Name: Gi0/2 +Switchport: Enabled +Administrative Mode: dynamic auto +Operational Mode: static access +Administrative Trunking Encapsulation: negotiate +Operational Trunking Encapsulation: native +Negotiation of Trunking: On +Access Mode VLAN: 100 (PLC1) +Trunking Native Mode VLAN: 1 (default) +Administrative Native VLAN tagging: enabled +Voice VLAN: none +Administrative private-vlan host-association: none +Administrative private-vlan mapping: none +Administrative private-vlan trunk native VLAN: none +Administrative private-vlan trunk Native VLAN tagging: enabled +Administrative private-vlan trunk encapsulation: dot1q +Administrative private-vlan trunk normal VLANs: none +Administrative private-vlan trunk associations: none +Administrative private-vlan trunk mappings: none +Operational private-vlan: none +Trunking VLANs Enabled: ALL +Pruning VLANs Enabled: 2-1001 +Capture Mode Disabled +Capture VLANs Allowed: ALL + +Protected: false +Appliance trust: none + +Name: Gi0/3 +Switchport: Enabled +Administrative Mode: dynamic auto +Operational Mode: static access +Administrative Trunking Encapsulation: negotiate +Operational Trunking Encapsulation: native +Negotiation of Trunking: On +Access Mode VLAN: 101 (HMI1) +Trunking Native Mode VLAN: 1 (default) +Administrative Native VLAN tagging: enabled +Voice VLAN: none +Administrative private-vlan host-association: none +Administrative private-vlan mapping: none +Administrative private-vlan trunk native VLAN: none +Administrative private-vlan trunk Native VLAN tagging: enabled +Administrative private-vlan trunk encapsulation: dot1q +Administrative private-vlan trunk normal VLANs: none +Administrative private-vlan trunk associations: none +Administrative private-vlan trunk mappings: none +Operational private-vlan: none +Trunking VLANs Enabled: ALL +Pruning VLANs Enabled: 2-1001 +Capture Mode Disabled +Capture VLANs Allowed: ALL + +Protected: false +Appliance trust: none + +Name: Gi1/0 +Switchport: Enabled +Administrative Mode: dynamic auto +Operational Mode: static access +Administrative Trunking Encapsulation: negotiate +Operational Trunking Encapsulation: native +Negotiation of Trunking: On +Access Mode VLAN: 110 (PLC2) +Trunking Native Mode VLAN: 1 (default) +Administrative Native VLAN tagging: enabled +Voice VLAN: none +Administrative private-vlan host-association: none +Administrative private-vlan mapping: none +Administrative private-vlan trunk native VLAN: none +Administrative private-vlan trunk Native VLAN tagging: enabled +Administrative private-vlan trunk encapsulation: dot1q +Administrative private-vlan trunk normal VLANs: none +Administrative private-vlan trunk associations: none +Administrative private-vlan trunk mappings: none +Operational private-vlan: none +Trunking VLANs Enabled: ALL +Pruning VLANs Enabled: 2-1001 +Capture Mode Disabled +Capture VLANs Allowed: ALL + +Protected: false +Appliance trust: none + +Name: Gi1/1 +Switchport: Enabled +Administrative Mode: dynamic auto +Operational Mode: static access +Administrative Trunking Encapsulation: negotiate +Operational Trunking Encapsulation: native +Negotiation of Trunking: On +Access Mode VLAN: 111 (HMI2) +Trunking Native Mode VLAN: 1 (default) +Administrative Native VLAN tagging: enabled +Voice VLAN: none +Administrative private-vlan host-association: none +Administrative private-vlan mapping: none +Administrative private-vlan trunk native VLAN: none +Administrative private-vlan trunk Native VLAN tagging: enabled +Administrative private-vlan trunk encapsulation: dot1q +Administrative private-vlan trunk normal VLANs: none +Administrative private-vlan trunk associations: none +Administrative private-vlan trunk mappings: none +Operational private-vlan: none +Trunking VLANs Enabled: ALL +Pruning VLANs Enabled: 2-1001 +Capture Mode Disabled +Capture VLANs Allowed: ALL + +Protected: false +Appliance trust: none diff --git a/tests/cisco_nxos/show_interfaces_switchport/cisco_nxos_show_interfaces_switchport.parsed b/tests/cisco_nxos/show_interfaces_switchport/cisco_nxos_show_interfaces_switchport.parsed new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tests/cisco_nxos/show_interfaces_switchport/cisco_nxos_show_interfaces_switchport.raw b/tests/cisco_nxos/show_interfaces_switchport/cisco_nxos_show_interfaces_switchport.raw new file mode 100644 index 0000000000..7d31d5940b --- /dev/null +++ b/tests/cisco_nxos/show_interfaces_switchport/cisco_nxos_show_interfaces_switchport.raw @@ -0,0 +1,140 @@ + +Name: Gi0/1 +Switchport: Enabled +Administrative Mode: trunk +Operational Mode: trunk +Administrative Trunking Encapsulation: dot1q +Operational Trunking Encapsulation: dot1q +Negotiation of Trunking: Off +Access Mode VLAN: 1 (default) +Trunking Native Mode VLAN: 1 (default) +Administrative Native VLAN tagging: enabled +Voice VLAN: none +Administrative private-vlan host-association: none +Administrative private-vlan mapping: none +Administrative private-vlan trunk native VLAN: none +Administrative private-vlan trunk Native VLAN tagging: enabled +Administrative private-vlan trunk encapsulation: dot1q +Administrative private-vlan trunk normal VLANs: none +Administrative private-vlan trunk associations: none +Administrative private-vlan trunk mappings: none +Operational private-vlan: none +Trunking VLANs Enabled: ALL +Pruning VLANs Enabled: 2-1001 +Capture Mode Disabled +Capture VLANs Allowed: ALL + +Protected: false +Appliance trust: none + +Name: Gi0/2 +Switchport: Enabled +Administrative Mode: dynamic auto +Operational Mode: static access +Administrative Trunking Encapsulation: negotiate +Operational Trunking Encapsulation: native +Negotiation of Trunking: On +Access Mode VLAN: 100 (PLC1) +Trunking Native Mode VLAN: 1 (default) +Administrative Native VLAN tagging: enabled +Voice VLAN: none +Administrative private-vlan host-association: none +Administrative private-vlan mapping: none +Administrative private-vlan trunk native VLAN: none +Administrative private-vlan trunk Native VLAN tagging: enabled +Administrative private-vlan trunk encapsulation: dot1q +Administrative private-vlan trunk normal VLANs: none +Administrative private-vlan trunk associations: none +Administrative private-vlan trunk mappings: none +Operational private-vlan: none +Trunking VLANs Enabled: ALL +Pruning VLANs Enabled: 2-1001 +Capture Mode Disabled +Capture VLANs Allowed: ALL + +Protected: false +Appliance trust: none + +Name: Gi0/3 +Switchport: Enabled +Administrative Mode: dynamic auto +Operational Mode: static access +Administrative Trunking Encapsulation: negotiate +Operational Trunking Encapsulation: native +Negotiation of Trunking: On +Access Mode VLAN: 101 (HMI1) +Trunking Native Mode VLAN: 1 (default) +Administrative Native VLAN tagging: enabled +Voice VLAN: none +Administrative private-vlan host-association: none +Administrative private-vlan mapping: none +Administrative private-vlan trunk native VLAN: none +Administrative private-vlan trunk Native VLAN tagging: enabled +Administrative private-vlan trunk encapsulation: dot1q +Administrative private-vlan trunk normal VLANs: none +Administrative private-vlan trunk associations: none +Administrative private-vlan trunk mappings: none +Operational private-vlan: none +Trunking VLANs Enabled: ALL +Pruning VLANs Enabled: 2-1001 +Capture Mode Disabled +Capture VLANs Allowed: ALL + +Protected: false +Appliance trust: none + +Name: Gi1/0 +Switchport: Enabled +Administrative Mode: dynamic auto +Operational Mode: static access +Administrative Trunking Encapsulation: negotiate +Operational Trunking Encapsulation: native +Negotiation of Trunking: On +Access Mode VLAN: 110 (PLC2) +Trunking Native Mode VLAN: 1 (default) +Administrative Native VLAN tagging: enabled +Voice VLAN: none +Administrative private-vlan host-association: none +Administrative private-vlan mapping: none +Administrative private-vlan trunk native VLAN: none +Administrative private-vlan trunk Native VLAN tagging: enabled +Administrative private-vlan trunk encapsulation: dot1q +Administrative private-vlan trunk normal VLANs: none +Administrative private-vlan trunk associations: none +Administrative private-vlan trunk mappings: none +Operational private-vlan: none +Trunking VLANs Enabled: ALL +Pruning VLANs Enabled: 2-1001 +Capture Mode Disabled +Capture VLANs Allowed: ALL + +Protected: false +Appliance trust: none + +Name: Gi1/1 +Switchport: Enabled +Administrative Mode: dynamic auto +Operational Mode: static access +Administrative Trunking Encapsulation: negotiate +Operational Trunking Encapsulation: native +Negotiation of Trunking: On +Access Mode VLAN: 111 (HMI2) +Trunking Native Mode VLAN: 1 (default) +Administrative Native VLAN tagging: enabled +Voice VLAN: none +Administrative private-vlan host-association: none +Administrative private-vlan mapping: none +Administrative private-vlan trunk native VLAN: none +Administrative private-vlan trunk Native VLAN tagging: enabled +Administrative private-vlan trunk encapsulation: dot1q +Administrative private-vlan trunk normal VLANs: none +Administrative private-vlan trunk associations: none +Administrative private-vlan trunk mappings: none +Operational private-vlan: none +Trunking VLANs Enabled: ALL +Pruning VLANs Enabled: 2-1001 +Capture Mode Disabled +Capture VLANs Allowed: ALL + +Protected: false +Appliance trust: none diff --git a/tests/hp_procurve/show_mac-address/hp_procurve_show_mac-address.parsed b/tests/hp_procurve/show_mac-address/hp_procurve_show_mac-address.parsed new file mode 100644 index 0000000000..3ea105177d --- /dev/null +++ b/tests/hp_procurve/show_mac-address/hp_procurve_show_mac-address.parsed @@ -0,0 +1,15 @@ +--- +parsed_sample: + +- mac: 500000-260000 + port: Trk1 + vlan: '17' +- mac: 500000-a80009 + port: Trk1 + vlan: '10' +- mac: 500000-260000 + port: Trk1 + vlan: '50' +- mac: 500000-b70008 + port: '25' + vlan: '50' diff --git a/tests/hp_procurve/show_mac-address/hp_procurve_show_mac-address.raw b/tests/hp_procurve/show_mac-address/hp_procurve_show_mac-address.raw new file mode 100644 index 0000000000..e11e1c22fd --- /dev/null +++ b/tests/hp_procurve/show_mac-address/hp_procurve_show_mac-address.raw @@ -0,0 +1,9 @@ + + Status and Counters - Port Address Table + + MAC Address Port VLAN + ----------------- ------------------------------- ---- + 500000-260000 Trk1 17 + 500000-a80009 Trk1 10 + 500000-260000 Trk1 50 + 500000-b70008 25 50 diff --git a/tests/paloalto_panos/show_arp/paloalto_panos_show_arp.parsed b/tests/paloalto_panos/show_arp/paloalto_panos_show_arp.parsed new file mode 100644 index 0000000000..2df144dab1 --- /dev/null +++ b/tests/paloalto_panos/show_arp/paloalto_panos_show_arp.parsed @@ -0,0 +1,18 @@ +--- +parsed_sample: + +- interface: ethernet1/1 + ip: 172.25.1.254 + mac: 08:30:6b:26:43:30 + port: ethernet1/1 + status: c +- interface: vlan.1 + ip: 172.25.2.195 + mac: 00:50:00:00:07:00 + port: ethernet1/2.110 + status: c +- interface: vlan.1 + ip: 172.25.2.196 + mac: 00:50:00:00:08:00 + port: ethernet1/2.111 + status: c diff --git a/tests/paloalto_panos/show_arp/paloalto_panos_show_arp.raw b/tests/paloalto_panos/show_arp/paloalto_panos_show_arp.raw new file mode 100644 index 0000000000..96c3ace656 --- /dev/null +++ b/tests/paloalto_panos/show_arp/paloalto_panos_show_arp.raw @@ -0,0 +1,12 @@ + +maximum of entries supported : 1500 +default timeout: 1800 seconds +total ARP entries in table : 5 +total ARP entries shown : 5 +status: s - static, c - complete, e - expiring, i - incomplete + +interface ip address hw address port status ttl +-------------------------------------------------------------------------------- +ethernet1/1 172.25.1.254 08:30:6b:26:43:30 ethernet1/1 c 627 +vlan.1 172.25.2.195 00:50:00:00:07:00 ethernet1/2.110 c 1012 +vlan.1 172.25.2.196 00:50:00:00:08:00 ethernet1/2.111 c 1016 diff --git a/tests/paloalto_panos/show_mac/paloalto_panos_show_mac.parsed b/tests/paloalto_panos/show_mac/paloalto_panos_show_mac.parsed new file mode 100644 index 0000000000..dfdc2ec332 --- /dev/null +++ b/tests/paloalto_panos/show_mac/paloalto_panos_show_mac.parsed @@ -0,0 +1,18 @@ +--- +parsed_sample: + +- vlan: Test + mac: 00:50:00:00:07:00 + interface: ethernet1/2.110 + status: c + ttl: '1778' +- vlan: Test + mac: 00:50:00:00:08:00 + interface: ethernet1/2.111 + status: ethernet1/1 + ttl: c +- vlan: '1796' + mac: 50:00:00:02:00:01 + interface: ethernet1/2.110 + status: c + ttl: '704' diff --git a/tests/paloalto_panos/show_mac/paloalto_panos_show_mac.raw b/tests/paloalto_panos/show_mac/paloalto_panos_show_mac.raw new file mode 100644 index 0000000000..f5fcfd78cc --- /dev/null +++ b/tests/paloalto_panos/show_mac/paloalto_panos_show_mac.raw @@ -0,0 +1,12 @@ + +maximum of entries supported : 1500 +default timeout : 1800 seconds +total MAC entries in table : 3 +total MAC entries shown : 3 +status: s - static, c - complete, i - incomplete + +vlan hw address interface status ttl +-------------------------------------------------------------------------------- +Test 00:50:00:00:07:00 ethernet1/2.110 c 1778 +Test 00:50:00:00:08:00 ethernet1/2.111 c 1796 +Test 50:00:00:02:00:01 ethernet1/2.110 c 704 From b33bb5d1f328e918147e4ab9070fb567ba6a2163 Mon Sep 17 00:00:00 2001 From: Andrea Dainese Date: Tue, 16 Jul 2019 06:32:53 +0200 Subject: [PATCH 3/9] palo alto: test ok --- templates/index | 7 ++----- ...template => paloalto_panos_show_arp_all.template} | 4 ++-- ...template => paloalto_panos_show_mac_all.template} | 5 +++-- .../paloalto_panos_show_arp_all.parsed} | 9 ++++++--- .../paloalto_panos_show_arp_all.raw} | 0 .../paloalto_panos_show_mac_all.parsed} | 12 ++++++------ .../paloalto_panos_show_mac_all.raw} | 0 7 files changed, 19 insertions(+), 18 deletions(-) rename templates/{paloalto_panos_show_arp.template => paloalto_panos_show_arp_all.template} (78%) rename templates/{paloalto_panos_show_mac.template => paloalto_panos_show_mac_all.template} (72%) rename tests/paloalto_panos/{show_arp/paloalto_panos_show_arp.parsed => show_arp_all/paloalto_panos_show_arp_all.parsed} (66%) rename tests/paloalto_panos/{show_arp/paloalto_panos_show_arp.raw => show_arp_all/paloalto_panos_show_arp_all.raw} (100%) rename tests/paloalto_panos/{show_mac/paloalto_panos_show_mac.parsed => show_mac_all/paloalto_panos_show_mac_all.parsed} (60%) rename tests/paloalto_panos/{show_mac/paloalto_panos_show_mac.raw => show_mac_all/paloalto_panos_show_mac_all.raw} (100%) diff --git a/templates/index b/templates/index index 1bd81fd4eb..5104f9e9b6 100644 --- a/templates/index +++ b/templates/index @@ -135,7 +135,6 @@ cisco_ios_show_interfaces_description.template, .*, cisco_ios, sh[[ow]] int[[erf cisco_ios_show_ip_device_tracking_all.template, .*, cisco_ios, sh[[ow]] ip de[[vice]] t[[racking]] a[[ll]] cisco_ios_show_environment_power_all.template, .*, cisco_ios, sh[[ow]] envi[[ronment]] p[[ower]] a[[ll]] cisco_ios_show_interface_transceiver.template, .*, cisco_ios, sh[[ow]] int[[erface]] trans[[ceiver]] -cisco_ios_show_interfaces_switchport.template, .*, cisco_ios, sh[[ow]] int[[erface]] sw[[itchport]] cisco_ios_show_lldp_neighbors_detail.template, .*, cisco_ios, sh[[ow]] lld[[p]] neig[[hbors]] det[[ail]] cisco_ios_show_cdp_neighbors_detail.template, .*, cisco_ios, sh[[ow]] c[[dp]] neig[[hbors]] det[[ail]] cisco_ios_show_ipv6_interface_brief.template, .*, cisco_ios, sh[[ow]] ipv[[6]] i[[nterface]] b[[rief]] @@ -189,7 +188,6 @@ cisco_nxos_show_l2rib_internal_permanently-frozen-list.template, .*, cisco_nxos, cisco_nxos_show_configuration_session_summary.template, .*, cisco_nxos, sh[[ow]] configu[[ration]] s[[ession]] su[[mmary]] cisco_nxos_show_interface_transceiver_details.template, .*, cisco_nxos, sh[[ow]] int[[erface]] tra[[nsceiver]] de[[tails]] cisco_nxos_show_environment_temperature.template, .*, cisco_nxos, sh[[ow]] env[[ironment]] t[[emperature]] -cisco_nxos_show_interfaces_switchport.template, .*, cisco_nxos, sh[[ow]] int[[erface]] sw[[itchport]] cisco_nxos_show_ip_dhcp_relay_address.template, .*, cisco_nxos, sh[[ow]] ip dh[[cp]] r[[elay]] a[[ddress]] cisco_nxos_show_lldp_neighbors_detail.template, .*, cisco_nxos, sh[[ow]] ll[[dp]] nei[[ghbors]] d[[etail]] cisco_nxos_show_cdp_neighbors_detail.template, .*, cisco_nxos, sh[[ow]] c[[dp]] neig[[hbors]] det[[ail]] @@ -272,7 +270,6 @@ hp_comware_display_clock.template, .*, hp_comware, di[[splay]] clo[[ck]] hp_comware_display_arp.template, .*, hp_comware, di[[splay]] a[[rp]] hp_procurve_show_tech_buffers.template, .*, hp_procurve, sh[[ow]] tec[[h]] buf[[ffers]] -hp_procurve_show_mac-address.template, .*, hp_procurve, sh[[ow]] mac-a[[ddress]] hp_procurve_show_system.template, .*, hp_procurve, sh[[ow]] syst[[em]] hp_procurve_show_vlans.template, .*, hp_procurve, sh[[ow]] vl[[ans]] hp_procurve_show_arp.template, .*, hp_procurve, sh[[ow]] ar[[p]] @@ -296,8 +293,8 @@ paloalto_panos_show_interface_logical.template, .*, paloalto_panos, sh[[ow]] int paloalto_panos_show_counter_global.template, .*, paloalto_panos, sh[[ow]] coun[[ter]] glo[[bal]] paloalto_panos_show_system_info.template, .*, paloalto_panos, sh[[ow]] sys[[tem]] in[[fo]] paloalto_panos_show_jobs_all.template, .*, paloalto_panos, sh[[ow]] jo[[bs]] all -paloalto_panos_show_arp.template, .*, paloalto_panos, sh[[ow]] ar[[p]] all -paloalto_panos_show_mac.template, .*, paloalto_panos, sh[[ow]] mac all +paloalto_panos_show_arp_all.template, .*, paloalto_panos, sh[[ow]] ar[[p]] all +paloalto_panos_show_mac_all.template, .*, paloalto_panos, sh[[ow]] mac all ubiquiti_edgeswitch_show_vlan.template, .*, ubiquiti_edgeswitch, sh[[ow]] vl[[an]] ubiquiti_edgeswitch_show_arp.template, .*, ubiquiti_edgeswitch, sh[[ow]] ar[[p]] diff --git a/templates/paloalto_panos_show_arp.template b/templates/paloalto_panos_show_arp_all.template similarity index 78% rename from templates/paloalto_panos_show_arp.template rename to templates/paloalto_panos_show_arp_all.template index 246a34a540..b9cfa9e81d 100644 --- a/templates/paloalto_panos_show_arp.template +++ b/templates/paloalto_panos_show_arp_all.template @@ -1,9 +1,9 @@ Value INTERFACE (\S+) Value IP (\S+) -Value MAC (\S+) +Value MAC ([0-9a-fA-F:]+) Value PORT (\S+) Value STATUS (\S+) -Value TTL (\S+) +Value TTL (\d+) Start ^${INTERFACE}\s+${IP}\s+${MAC}\s+${PORT}\s+${STATUS}\s+${TTL} -> Record diff --git a/templates/paloalto_panos_show_mac.template b/templates/paloalto_panos_show_mac_all.template similarity index 72% rename from templates/paloalto_panos_show_mac.template rename to templates/paloalto_panos_show_mac_all.template index bfbc66214e..ad46ea31a0 100644 --- a/templates/paloalto_panos_show_mac.template +++ b/templates/paloalto_panos_show_mac_all.template @@ -1,8 +1,9 @@ Value VLAN (\S+) -Value MAC (\S+) +Value MAC ([0-9a-fA-F:]+) Value INTERFACE (\S+) Value STATUS (\S+) -Value TTL (\S+) +Value TTL (\d+) Start + ^--- ^${VLAN}\s+${MAC}\s+${INTERFACE}\s+${STATUS}\s+${TTL} -> Record diff --git a/tests/paloalto_panos/show_arp/paloalto_panos_show_arp.parsed b/tests/paloalto_panos/show_arp_all/paloalto_panos_show_arp_all.parsed similarity index 66% rename from tests/paloalto_panos/show_arp/paloalto_panos_show_arp.parsed rename to tests/paloalto_panos/show_arp_all/paloalto_panos_show_arp_all.parsed index 2df144dab1..08952968b8 100644 --- a/tests/paloalto_panos/show_arp/paloalto_panos_show_arp.parsed +++ b/tests/paloalto_panos/show_arp_all/paloalto_panos_show_arp_all.parsed @@ -3,16 +3,19 @@ parsed_sample: - interface: ethernet1/1 ip: 172.25.1.254 - mac: 08:30:6b:26:43:30 + mac: '08:30:6b:26:43:30' port: ethernet1/1 status: c + ttl: '627' - interface: vlan.1 ip: 172.25.2.195 - mac: 00:50:00:00:07:00 + mac: '00:50:00:00:07:00' port: ethernet1/2.110 status: c + ttl: '1012' - interface: vlan.1 ip: 172.25.2.196 - mac: 00:50:00:00:08:00 + mac: '00:50:00:00:08:00' port: ethernet1/2.111 status: c + ttl: '1016' diff --git a/tests/paloalto_panos/show_arp/paloalto_panos_show_arp.raw b/tests/paloalto_panos/show_arp_all/paloalto_panos_show_arp_all.raw similarity index 100% rename from tests/paloalto_panos/show_arp/paloalto_panos_show_arp.raw rename to tests/paloalto_panos/show_arp_all/paloalto_panos_show_arp_all.raw diff --git a/tests/paloalto_panos/show_mac/paloalto_panos_show_mac.parsed b/tests/paloalto_panos/show_mac_all/paloalto_panos_show_mac_all.parsed similarity index 60% rename from tests/paloalto_panos/show_mac/paloalto_panos_show_mac.parsed rename to tests/paloalto_panos/show_mac_all/paloalto_panos_show_mac_all.parsed index dfdc2ec332..e95b162037 100644 --- a/tests/paloalto_panos/show_mac/paloalto_panos_show_mac.parsed +++ b/tests/paloalto_panos/show_mac_all/paloalto_panos_show_mac_all.parsed @@ -2,17 +2,17 @@ parsed_sample: - vlan: Test - mac: 00:50:00:00:07:00 + mac: '00:50:00:00:07:00' interface: ethernet1/2.110 status: c ttl: '1778' - vlan: Test - mac: 00:50:00:00:08:00 + mac: '00:50:00:00:08:00' interface: ethernet1/2.111 - status: ethernet1/1 - ttl: c -- vlan: '1796' - mac: 50:00:00:02:00:01 + status: c + ttl: '1796' +- vlan: Test + mac: '50:00:00:02:00:01' interface: ethernet1/2.110 status: c ttl: '704' diff --git a/tests/paloalto_panos/show_mac/paloalto_panos_show_mac.raw b/tests/paloalto_panos/show_mac_all/paloalto_panos_show_mac_all.raw similarity index 100% rename from tests/paloalto_panos/show_mac/paloalto_panos_show_mac.raw rename to tests/paloalto_panos/show_mac_all/paloalto_panos_show_mac_all.raw From 180d635bceec1e16a779c1c756061c6606730980 Mon Sep 17 00:00:00 2001 From: Andrea Dainese Date: Tue, 16 Jul 2019 06:37:13 +0200 Subject: [PATCH 4/9] test procurve hp -> ok --- templates/index | 1 + .../show_mac-address/hp_procurve_show_mac-address.parsed | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/templates/index b/templates/index index 5104f9e9b6..cb9d407d6b 100644 --- a/templates/index +++ b/templates/index @@ -270,6 +270,7 @@ hp_comware_display_clock.template, .*, hp_comware, di[[splay]] clo[[ck]] hp_comware_display_arp.template, .*, hp_comware, di[[splay]] a[[rp]] hp_procurve_show_tech_buffers.template, .*, hp_procurve, sh[[ow]] tec[[h]] buf[[ffers]] +hp_procurve_show_mac-address.template, .*, hp_procurve, sh[[ow]] mac-a[[ddress]] hp_procurve_show_system.template, .*, hp_procurve, sh[[ow]] syst[[em]] hp_procurve_show_vlans.template, .*, hp_procurve, sh[[ow]] vl[[ans]] hp_procurve_show_arp.template, .*, hp_procurve, sh[[ow]] ar[[p]] diff --git a/tests/hp_procurve/show_mac-address/hp_procurve_show_mac-address.parsed b/tests/hp_procurve/show_mac-address/hp_procurve_show_mac-address.parsed index 3ea105177d..863ce43bc7 100644 --- a/tests/hp_procurve/show_mac-address/hp_procurve_show_mac-address.parsed +++ b/tests/hp_procurve/show_mac-address/hp_procurve_show_mac-address.parsed @@ -1,15 +1,15 @@ --- parsed_sample: -- mac: 500000-260000 +- mac: '500000-260000' port: Trk1 vlan: '17' -- mac: 500000-a80009 +- mac: '500000-a80009' port: Trk1 vlan: '10' -- mac: 500000-260000 +- mac: '500000-260000' port: Trk1 vlan: '50' -- mac: 500000-b70008 +- mac: '500000-b70008' port: '25' vlan: '50' From 84d0126525778023c4b3382a85aae828fa51759f Mon Sep 17 00:00:00 2001 From: Andrea Dainese Date: Tue, 16 Jul 2019 08:41:37 +0200 Subject: [PATCH 5/9] cisco ios tests -> ok --- ...sco_ios_show_interfaces_switchport.template | 18 ++++++++++-------- templates/index | 1 + ...cisco_ios_show_interfaces_switchport.parsed | 10 ++++++++++ 3 files changed, 21 insertions(+), 8 deletions(-) diff --git a/templates/cisco_ios_show_interfaces_switchport.template b/templates/cisco_ios_show_interfaces_switchport.template index 1305e4f409..2bb1d380e9 100644 --- a/templates/cisco_ios_show_interfaces_switchport.template +++ b/templates/cisco_ios_show_interfaces_switchport.template @@ -1,16 +1,18 @@ Value Required INTERFACE (\S+) Value SWITCHPORT (.+) Value SWITCHPORT_MONITOR (.+) -Value MODE (\S+) +Value SWITCHPORT_NEGOTIATION (.+) +Value MODE (.+) Value ACCESS_VLAN (\d+) Value NATIVE_VLAN (\d+) -Value TRUNKING_VLANS (\S+) +Value TRUNKING_VLANS (.+) Start ^Name: ${INTERFACE} - ^ Switchport: ${SWITCHPORT} - ^ Switchport Monitor: ${SWITCHPORT_MONITOR} - ^ Operational Mode: ${MODE} - ^ Access Mode VLAN: ${ACCESS_VLAN} - ^ Trunking Native Mode VLAN: ${NATIVE_VLAN} - ^ Trunking VLANs Allowed: ${TRUNKING_VLANS} -> Record + ^\S*Switchport: ${SWITCHPORT} + ^\S*Switchport Monitor: ${SWITCHPORT_MONITOR} + ^\S*Operational Mode: ${MODE} + ^\S*Negotiation of Trunking: ${SWITCHPORT_NEGOTIATION} + ^\S*Access Mode VLAN: ${ACCESS_VLAN} + ^\S*Trunking Native Mode VLAN: ${NATIVE_VLAN} + ^\S*Trunking VLANs Enabled: ${TRUNKING_VLANS} -> Record diff --git a/templates/index b/templates/index index cb9d407d6b..f98a2391ac 100644 --- a/templates/index +++ b/templates/index @@ -135,6 +135,7 @@ cisco_ios_show_interfaces_description.template, .*, cisco_ios, sh[[ow]] int[[erf cisco_ios_show_ip_device_tracking_all.template, .*, cisco_ios, sh[[ow]] ip de[[vice]] t[[racking]] a[[ll]] cisco_ios_show_environment_power_all.template, .*, cisco_ios, sh[[ow]] envi[[ronment]] p[[ower]] a[[ll]] cisco_ios_show_interface_transceiver.template, .*, cisco_ios, sh[[ow]] int[[erface]] trans[[ceiver]] +cisco_ios_show_interfaces_switchport.template, .*, cisco_ios, sh[[ow]] int[[erfaces]] sw[[itchport]] cisco_ios_show_lldp_neighbors_detail.template, .*, cisco_ios, sh[[ow]] lld[[p]] neig[[hbors]] det[[ail]] cisco_ios_show_cdp_neighbors_detail.template, .*, cisco_ios, sh[[ow]] c[[dp]] neig[[hbors]] det[[ail]] cisco_ios_show_ipv6_interface_brief.template, .*, cisco_ios, sh[[ow]] ipv[[6]] i[[nterface]] b[[rief]] diff --git a/tests/cisco_ios/show_interfaces_switchport/cisco_ios_show_interfaces_switchport.parsed b/tests/cisco_ios/show_interfaces_switchport/cisco_ios_show_interfaces_switchport.parsed index ea4878b724..391219aef4 100644 --- a/tests/cisco_ios/show_interfaces_switchport/cisco_ios_show_interfaces_switchport.parsed +++ b/tests/cisco_ios/show_interfaces_switchport/cisco_ios_show_interfaces_switchport.parsed @@ -6,28 +6,38 @@ parsed_sample: mode: trunk native_vlan: '1' switchport: Enabled + switchport_negotiation: 'Off' switchport_monitor: '' + trunking_vlans: ALL - access_vlan: '100' interface: Gi0/2 mode: static access native_vlan: '1' switchport: Enabled + switchport_negotiation: 'On' switchport_monitor: '' + trunking_vlans: ALL - access_vlan: '101' interface: Gi0/3 mode: static access native_vlan: '1' switchport: Enabled + switchport_negotiation: 'On' switchport_monitor: '' + trunking_vlans: ALL - access_vlan: '110' interface: Gi1/0 mode: static access native_vlan: '1' switchport: Enabled + switchport_negotiation: 'On' switchport_monitor: '' + trunking_vlans: ALL - access_vlan: '111' interface: Gi1/1 mode: static access native_vlan: '1' switchport: Enabled + switchport_negotiation: 'On' switchport_monitor: '' + trunking_vlans: ALL From 9f9df34647d5647c4ba6dfd4f7fb3b66bfe7e148 Mon Sep 17 00:00:00 2001 From: Andrea Dainese Date: Tue, 16 Jul 2019 09:03:59 +0200 Subject: [PATCH 6/9] tests for ios and nxos -> ok --- ...co_ios_show_interfaces_switchport.template | 14 +- ...o_nxos_show_interfaces_switchport.template | 14 +- templates/index | 1 + ...sco_nxos_show_interfaces_switchport.parsed | 24 +++ .../cisco_nxos_show_interfaces_switchport.raw | 203 ++++++------------ 5 files changed, 102 insertions(+), 154 deletions(-) diff --git a/templates/cisco_ios_show_interfaces_switchport.template b/templates/cisco_ios_show_interfaces_switchport.template index 2bb1d380e9..70446c7405 100644 --- a/templates/cisco_ios_show_interfaces_switchport.template +++ b/templates/cisco_ios_show_interfaces_switchport.template @@ -9,10 +9,10 @@ Value TRUNKING_VLANS (.+) Start ^Name: ${INTERFACE} - ^\S*Switchport: ${SWITCHPORT} - ^\S*Switchport Monitor: ${SWITCHPORT_MONITOR} - ^\S*Operational Mode: ${MODE} - ^\S*Negotiation of Trunking: ${SWITCHPORT_NEGOTIATION} - ^\S*Access Mode VLAN: ${ACCESS_VLAN} - ^\S*Trunking Native Mode VLAN: ${NATIVE_VLAN} - ^\S*Trunking VLANs Enabled: ${TRUNKING_VLANS} -> Record + ^\s*Switchport: ${SWITCHPORT} + ^\s*Switchport Monitor: ${SWITCHPORT_MONITOR} + ^\s*Operational Mode: ${MODE} + ^\s*Negotiation of Trunking: ${SWITCHPORT_NEGOTIATION} + ^\s*Access Mode VLAN: ${ACCESS_VLAN} + ^\s*Trunking Native Mode VLAN: ${NATIVE_VLAN} + ^\s*Trunking VLANs Enabled: ${TRUNKING_VLANS} -> Record diff --git a/templates/cisco_nxos_show_interfaces_switchport.template b/templates/cisco_nxos_show_interfaces_switchport.template index 1305e4f409..2d9f9b974d 100644 --- a/templates/cisco_nxos_show_interfaces_switchport.template +++ b/templates/cisco_nxos_show_interfaces_switchport.template @@ -1,16 +1,16 @@ Value Required INTERFACE (\S+) Value SWITCHPORT (.+) Value SWITCHPORT_MONITOR (.+) -Value MODE (\S+) +Value MODE (.+) Value ACCESS_VLAN (\d+) Value NATIVE_VLAN (\d+) Value TRUNKING_VLANS (\S+) Start ^Name: ${INTERFACE} - ^ Switchport: ${SWITCHPORT} - ^ Switchport Monitor: ${SWITCHPORT_MONITOR} - ^ Operational Mode: ${MODE} - ^ Access Mode VLAN: ${ACCESS_VLAN} - ^ Trunking Native Mode VLAN: ${NATIVE_VLAN} - ^ Trunking VLANs Allowed: ${TRUNKING_VLANS} -> Record + ^\s*Switchport: ${SWITCHPORT} + ^\s*Switchport Monitor: ${SWITCHPORT_MONITOR} + ^\s*Operational Mode: ${MODE} + ^\s*Access Mode VLAN: ${ACCESS_VLAN} + ^\s*Trunking Native Mode VLAN: ${NATIVE_VLAN} + ^\s*Trunking VLANs Allowed: ${TRUNKING_VLANS} -> Record diff --git a/templates/index b/templates/index index f98a2391ac..0d7eaa403f 100644 --- a/templates/index +++ b/templates/index @@ -189,6 +189,7 @@ cisco_nxos_show_l2rib_internal_permanently-frozen-list.template, .*, cisco_nxos, cisco_nxos_show_configuration_session_summary.template, .*, cisco_nxos, sh[[ow]] configu[[ration]] s[[ession]] su[[mmary]] cisco_nxos_show_interface_transceiver_details.template, .*, cisco_nxos, sh[[ow]] int[[erface]] tra[[nsceiver]] de[[tails]] cisco_nxos_show_environment_temperature.template, .*, cisco_nxos, sh[[ow]] env[[ironment]] t[[emperature]] +cisco_nxos_show_interfaces_switchport.template, .*, cisco_nxos, sh[[ow]] int[[erfaces]] sw[[itchport]] cisco_nxos_show_ip_dhcp_relay_address.template, .*, cisco_nxos, sh[[ow]] ip dh[[cp]] r[[elay]] a[[ddress]] cisco_nxos_show_lldp_neighbors_detail.template, .*, cisco_nxos, sh[[ow]] ll[[dp]] nei[[ghbors]] d[[etail]] cisco_nxos_show_cdp_neighbors_detail.template, .*, cisco_nxos, sh[[ow]] c[[dp]] neig[[hbors]] det[[ail]] diff --git a/tests/cisco_nxos/show_interfaces_switchport/cisco_nxos_show_interfaces_switchport.parsed b/tests/cisco_nxos/show_interfaces_switchport/cisco_nxos_show_interfaces_switchport.parsed index e69de29bb2..f48016af54 100644 --- a/tests/cisco_nxos/show_interfaces_switchport/cisco_nxos_show_interfaces_switchport.parsed +++ b/tests/cisco_nxos/show_interfaces_switchport/cisco_nxos_show_interfaces_switchport.parsed @@ -0,0 +1,24 @@ +--- +parsed_sample: + + - interface: Ethernet1/1 + switchport: Enabled + switchport_monitor: Not enabled + mode: access + access_vlan: '3' + native_vlan: '1' + trunking_vlans: '1-4094' + - interface: Ethernet1/2 + switchport: Enabled + switchport_monitor: Not enabled + mode: trunk + access_vlan: '1' + native_vlan: '5' + trunking_vlans: '1-4094' + - interface: Ethernet1/3 + switchport: Enabled + switchport_monitor: Not enabled + mode: trunk + access_vlan: '1' + native_vlan: '1' + trunking_vlans: '1-4094' diff --git a/tests/cisco_nxos/show_interfaces_switchport/cisco_nxos_show_interfaces_switchport.raw b/tests/cisco_nxos/show_interfaces_switchport/cisco_nxos_show_interfaces_switchport.raw index 7d31d5940b..a9fe82f43c 100644 --- a/tests/cisco_nxos/show_interfaces_switchport/cisco_nxos_show_interfaces_switchport.raw +++ b/tests/cisco_nxos/show_interfaces_switchport/cisco_nxos_show_interfaces_switchport.raw @@ -1,140 +1,63 @@ - -Name: Gi0/1 -Switchport: Enabled -Administrative Mode: trunk -Operational Mode: trunk -Administrative Trunking Encapsulation: dot1q -Operational Trunking Encapsulation: dot1q -Negotiation of Trunking: Off -Access Mode VLAN: 1 (default) -Trunking Native Mode VLAN: 1 (default) -Administrative Native VLAN tagging: enabled -Voice VLAN: none -Administrative private-vlan host-association: none -Administrative private-vlan mapping: none -Administrative private-vlan trunk native VLAN: none -Administrative private-vlan trunk Native VLAN tagging: enabled -Administrative private-vlan trunk encapsulation: dot1q -Administrative private-vlan trunk normal VLANs: none -Administrative private-vlan trunk associations: none -Administrative private-vlan trunk mappings: none -Operational private-vlan: none -Trunking VLANs Enabled: ALL -Pruning VLANs Enabled: 2-1001 -Capture Mode Disabled -Capture VLANs Allowed: ALL - -Protected: false -Appliance trust: none - -Name: Gi0/2 -Switchport: Enabled -Administrative Mode: dynamic auto -Operational Mode: static access -Administrative Trunking Encapsulation: negotiate -Operational Trunking Encapsulation: native -Negotiation of Trunking: On -Access Mode VLAN: 100 (PLC1) -Trunking Native Mode VLAN: 1 (default) -Administrative Native VLAN tagging: enabled -Voice VLAN: none -Administrative private-vlan host-association: none -Administrative private-vlan mapping: none -Administrative private-vlan trunk native VLAN: none -Administrative private-vlan trunk Native VLAN tagging: enabled -Administrative private-vlan trunk encapsulation: dot1q -Administrative private-vlan trunk normal VLANs: none -Administrative private-vlan trunk associations: none -Administrative private-vlan trunk mappings: none -Operational private-vlan: none -Trunking VLANs Enabled: ALL -Pruning VLANs Enabled: 2-1001 -Capture Mode Disabled -Capture VLANs Allowed: ALL - -Protected: false -Appliance trust: none - -Name: Gi0/3 -Switchport: Enabled -Administrative Mode: dynamic auto -Operational Mode: static access -Administrative Trunking Encapsulation: negotiate -Operational Trunking Encapsulation: native -Negotiation of Trunking: On -Access Mode VLAN: 101 (HMI1) -Trunking Native Mode VLAN: 1 (default) -Administrative Native VLAN tagging: enabled -Voice VLAN: none -Administrative private-vlan host-association: none -Administrative private-vlan mapping: none -Administrative private-vlan trunk native VLAN: none -Administrative private-vlan trunk Native VLAN tagging: enabled -Administrative private-vlan trunk encapsulation: dot1q -Administrative private-vlan trunk normal VLANs: none -Administrative private-vlan trunk associations: none -Administrative private-vlan trunk mappings: none -Operational private-vlan: none -Trunking VLANs Enabled: ALL -Pruning VLANs Enabled: 2-1001 -Capture Mode Disabled -Capture VLANs Allowed: ALL - -Protected: false -Appliance trust: none - -Name: Gi1/0 -Switchport: Enabled -Administrative Mode: dynamic auto -Operational Mode: static access -Administrative Trunking Encapsulation: negotiate -Operational Trunking Encapsulation: native -Negotiation of Trunking: On -Access Mode VLAN: 110 (PLC2) -Trunking Native Mode VLAN: 1 (default) -Administrative Native VLAN tagging: enabled -Voice VLAN: none -Administrative private-vlan host-association: none -Administrative private-vlan mapping: none -Administrative private-vlan trunk native VLAN: none -Administrative private-vlan trunk Native VLAN tagging: enabled -Administrative private-vlan trunk encapsulation: dot1q -Administrative private-vlan trunk normal VLANs: none -Administrative private-vlan trunk associations: none -Administrative private-vlan trunk mappings: none -Operational private-vlan: none -Trunking VLANs Enabled: ALL -Pruning VLANs Enabled: 2-1001 -Capture Mode Disabled -Capture VLANs Allowed: ALL - -Protected: false -Appliance trust: none - -Name: Gi1/1 -Switchport: Enabled -Administrative Mode: dynamic auto -Operational Mode: static access -Administrative Trunking Encapsulation: negotiate -Operational Trunking Encapsulation: native -Negotiation of Trunking: On -Access Mode VLAN: 111 (HMI2) -Trunking Native Mode VLAN: 1 (default) -Administrative Native VLAN tagging: enabled -Voice VLAN: none -Administrative private-vlan host-association: none -Administrative private-vlan mapping: none -Administrative private-vlan trunk native VLAN: none -Administrative private-vlan trunk Native VLAN tagging: enabled -Administrative private-vlan trunk encapsulation: dot1q -Administrative private-vlan trunk normal VLANs: none -Administrative private-vlan trunk associations: none -Administrative private-vlan trunk mappings: none -Operational private-vlan: none -Trunking VLANs Enabled: ALL -Pruning VLANs Enabled: 2-1001 -Capture Mode Disabled -Capture VLANs Allowed: ALL - -Protected: false -Appliance trust: none +Name: Ethernet1/1 + Switchport: Enabled + Switchport Monitor: Not enabled + Switchport Isolated : Not enabled + Switchport Block Multicast: Not enabled + Switchport Block Unicast: Not enabled + Operational Mode: access + Access Mode VLAN: 3 (Vlan not created) + Trunking Native Mode VLAN: 1 (default) + Trunking VLANs Allowed: 1-4094 + Voice VLAN: none + Extended Trust State : not trusted [COS = 0] + Administrative private-vlan primary host-association: none + Administrative private-vlan secondary host-association: none + Administrative private-vlan primary mapping: none + Administrative private-vlan secondary mapping: none + Administrative private-vlan trunk native VLAN: none + Administrative private-vlan trunk encapsulation: dot1q + Administrative private-vlan trunk normal VLANs: none + Administrative private-vlan trunk private VLANs: none + Operational private-vlan: none +Name: Ethernet1/2 + Switchport: Enabled + Switchport Monitor: Not enabled + Switchport Isolated : Not enabled + Switchport Block Multicast: Not enabled + Switchport Block Unicast: Not enabled + Operational Mode: trunk + Access Mode VLAN: 1 (default) + Trunking Native Mode VLAN: 5 (Vlan not created) + Trunking VLANs Allowed: 1-4094 + Voice VLAN: none + Extended Trust State : not trusted [COS = 0] + Administrative private-vlan primary host-association: none + Administrative private-vlan secondary host-association: none + Administrative private-vlan primary mapping: none + Administrative private-vlan secondary mapping: none + Administrative private-vlan trunk native VLAN: none + Administrative private-vlan trunk encapsulation: dot1q + Administrative private-vlan trunk normal VLANs: none + Administrative private-vlan trunk private VLANs: none + Operational private-vlan: none +Name: Ethernet1/3 + Switchport: Enabled + Switchport Monitor: Not enabled + Switchport Isolated : Not enabled + Switchport Block Multicast: Not enabled + Switchport Block Unicast: Not enabled + Operational Mode: trunk + Access Mode VLAN: 1 (default) + Trunking Native Mode VLAN: 1 (default) + Trunking VLANs Allowed: 1-4094 + Voice VLAN: none + Extended Trust State : not trusted [COS = 0] + Administrative private-vlan primary host-association: none + Administrative private-vlan secondary host-association: none + Administrative private-vlan primary mapping: none + Administrative private-vlan secondary mapping: none + Administrative private-vlan trunk native VLAN: none + Administrative private-vlan trunk encapsulation: dot1q + Administrative private-vlan trunk normal VLANs: none + Administrative private-vlan trunk private VLANs: none + Operational private-vlan: none From 8b1c45f91247fd130934c6d35b6de150898801b2 Mon Sep 17 00:00:00 2001 From: Andrea Dainese Date: Mon, 22 Jul 2019 10:22:03 +0200 Subject: [PATCH 7/9] test -> ok --- templates/index | 4 - ...isco_ios_show_interfaces_switchport.parsed | 43 ------ .../cisco_ios_show_interfaces_switchport.raw | 140 ------------------ ...sco_nxos_show_interfaces_switchport.parsed | 24 --- .../cisco_nxos_show_interfaces_switchport.raw | 63 -------- .../paloalto_panos_show_arp_all.parsed | 21 --- .../paloalto_panos_show_arp_all.raw | 12 -- .../paloalto_panos_show_mac_all.parsed | 18 --- .../paloalto_panos_show_mac_all.raw | 12 -- 9 files changed, 337 deletions(-) delete mode 100644 tests/cisco_ios/show_interfaces_switchport/cisco_ios_show_interfaces_switchport.parsed delete mode 100644 tests/cisco_ios/show_interfaces_switchport/cisco_ios_show_interfaces_switchport.raw delete mode 100644 tests/cisco_nxos/show_interfaces_switchport/cisco_nxos_show_interfaces_switchport.parsed delete mode 100644 tests/cisco_nxos/show_interfaces_switchport/cisco_nxos_show_interfaces_switchport.raw delete mode 100644 tests/paloalto_panos/show_arp_all/paloalto_panos_show_arp_all.parsed delete mode 100644 tests/paloalto_panos/show_arp_all/paloalto_panos_show_arp_all.raw delete mode 100644 tests/paloalto_panos/show_mac_all/paloalto_panos_show_mac_all.parsed delete mode 100644 tests/paloalto_panos/show_mac_all/paloalto_panos_show_mac_all.raw diff --git a/templates/index b/templates/index index 0d7eaa403f..96964141f2 100644 --- a/templates/index +++ b/templates/index @@ -135,7 +135,6 @@ cisco_ios_show_interfaces_description.template, .*, cisco_ios, sh[[ow]] int[[erf cisco_ios_show_ip_device_tracking_all.template, .*, cisco_ios, sh[[ow]] ip de[[vice]] t[[racking]] a[[ll]] cisco_ios_show_environment_power_all.template, .*, cisco_ios, sh[[ow]] envi[[ronment]] p[[ower]] a[[ll]] cisco_ios_show_interface_transceiver.template, .*, cisco_ios, sh[[ow]] int[[erface]] trans[[ceiver]] -cisco_ios_show_interfaces_switchport.template, .*, cisco_ios, sh[[ow]] int[[erfaces]] sw[[itchport]] cisco_ios_show_lldp_neighbors_detail.template, .*, cisco_ios, sh[[ow]] lld[[p]] neig[[hbors]] det[[ail]] cisco_ios_show_cdp_neighbors_detail.template, .*, cisco_ios, sh[[ow]] c[[dp]] neig[[hbors]] det[[ail]] cisco_ios_show_ipv6_interface_brief.template, .*, cisco_ios, sh[[ow]] ipv[[6]] i[[nterface]] b[[rief]] @@ -189,7 +188,6 @@ cisco_nxos_show_l2rib_internal_permanently-frozen-list.template, .*, cisco_nxos, cisco_nxos_show_configuration_session_summary.template, .*, cisco_nxos, sh[[ow]] configu[[ration]] s[[ession]] su[[mmary]] cisco_nxos_show_interface_transceiver_details.template, .*, cisco_nxos, sh[[ow]] int[[erface]] tra[[nsceiver]] de[[tails]] cisco_nxos_show_environment_temperature.template, .*, cisco_nxos, sh[[ow]] env[[ironment]] t[[emperature]] -cisco_nxos_show_interfaces_switchport.template, .*, cisco_nxos, sh[[ow]] int[[erfaces]] sw[[itchport]] cisco_nxos_show_ip_dhcp_relay_address.template, .*, cisco_nxos, sh[[ow]] ip dh[[cp]] r[[elay]] a[[ddress]] cisco_nxos_show_lldp_neighbors_detail.template, .*, cisco_nxos, sh[[ow]] ll[[dp]] nei[[ghbors]] d[[etail]] cisco_nxos_show_cdp_neighbors_detail.template, .*, cisco_nxos, sh[[ow]] c[[dp]] neig[[hbors]] det[[ail]] @@ -296,8 +294,6 @@ paloalto_panos_show_interface_logical.template, .*, paloalto_panos, sh[[ow]] int paloalto_panos_show_counter_global.template, .*, paloalto_panos, sh[[ow]] coun[[ter]] glo[[bal]] paloalto_panos_show_system_info.template, .*, paloalto_panos, sh[[ow]] sys[[tem]] in[[fo]] paloalto_panos_show_jobs_all.template, .*, paloalto_panos, sh[[ow]] jo[[bs]] all -paloalto_panos_show_arp_all.template, .*, paloalto_panos, sh[[ow]] ar[[p]] all -paloalto_panos_show_mac_all.template, .*, paloalto_panos, sh[[ow]] mac all ubiquiti_edgeswitch_show_vlan.template, .*, ubiquiti_edgeswitch, sh[[ow]] vl[[an]] ubiquiti_edgeswitch_show_arp.template, .*, ubiquiti_edgeswitch, sh[[ow]] ar[[p]] diff --git a/tests/cisco_ios/show_interfaces_switchport/cisco_ios_show_interfaces_switchport.parsed b/tests/cisco_ios/show_interfaces_switchport/cisco_ios_show_interfaces_switchport.parsed deleted file mode 100644 index 391219aef4..0000000000 --- a/tests/cisco_ios/show_interfaces_switchport/cisco_ios_show_interfaces_switchport.parsed +++ /dev/null @@ -1,43 +0,0 @@ ---- -parsed_sample: - -- access_vlan: '1' - interface: Gi0/1 - mode: trunk - native_vlan: '1' - switchport: Enabled - switchport_negotiation: 'Off' - switchport_monitor: '' - trunking_vlans: ALL -- access_vlan: '100' - interface: Gi0/2 - mode: static access - native_vlan: '1' - switchport: Enabled - switchport_negotiation: 'On' - switchport_monitor: '' - trunking_vlans: ALL -- access_vlan: '101' - interface: Gi0/3 - mode: static access - native_vlan: '1' - switchport: Enabled - switchport_negotiation: 'On' - switchport_monitor: '' - trunking_vlans: ALL -- access_vlan: '110' - interface: Gi1/0 - mode: static access - native_vlan: '1' - switchport: Enabled - switchport_negotiation: 'On' - switchport_monitor: '' - trunking_vlans: ALL -- access_vlan: '111' - interface: Gi1/1 - mode: static access - native_vlan: '1' - switchport: Enabled - switchport_negotiation: 'On' - switchport_monitor: '' - trunking_vlans: ALL diff --git a/tests/cisco_ios/show_interfaces_switchport/cisco_ios_show_interfaces_switchport.raw b/tests/cisco_ios/show_interfaces_switchport/cisco_ios_show_interfaces_switchport.raw deleted file mode 100644 index 7d31d5940b..0000000000 --- a/tests/cisco_ios/show_interfaces_switchport/cisco_ios_show_interfaces_switchport.raw +++ /dev/null @@ -1,140 +0,0 @@ - -Name: Gi0/1 -Switchport: Enabled -Administrative Mode: trunk -Operational Mode: trunk -Administrative Trunking Encapsulation: dot1q -Operational Trunking Encapsulation: dot1q -Negotiation of Trunking: Off -Access Mode VLAN: 1 (default) -Trunking Native Mode VLAN: 1 (default) -Administrative Native VLAN tagging: enabled -Voice VLAN: none -Administrative private-vlan host-association: none -Administrative private-vlan mapping: none -Administrative private-vlan trunk native VLAN: none -Administrative private-vlan trunk Native VLAN tagging: enabled -Administrative private-vlan trunk encapsulation: dot1q -Administrative private-vlan trunk normal VLANs: none -Administrative private-vlan trunk associations: none -Administrative private-vlan trunk mappings: none -Operational private-vlan: none -Trunking VLANs Enabled: ALL -Pruning VLANs Enabled: 2-1001 -Capture Mode Disabled -Capture VLANs Allowed: ALL - -Protected: false -Appliance trust: none - -Name: Gi0/2 -Switchport: Enabled -Administrative Mode: dynamic auto -Operational Mode: static access -Administrative Trunking Encapsulation: negotiate -Operational Trunking Encapsulation: native -Negotiation of Trunking: On -Access Mode VLAN: 100 (PLC1) -Trunking Native Mode VLAN: 1 (default) -Administrative Native VLAN tagging: enabled -Voice VLAN: none -Administrative private-vlan host-association: none -Administrative private-vlan mapping: none -Administrative private-vlan trunk native VLAN: none -Administrative private-vlan trunk Native VLAN tagging: enabled -Administrative private-vlan trunk encapsulation: dot1q -Administrative private-vlan trunk normal VLANs: none -Administrative private-vlan trunk associations: none -Administrative private-vlan trunk mappings: none -Operational private-vlan: none -Trunking VLANs Enabled: ALL -Pruning VLANs Enabled: 2-1001 -Capture Mode Disabled -Capture VLANs Allowed: ALL - -Protected: false -Appliance trust: none - -Name: Gi0/3 -Switchport: Enabled -Administrative Mode: dynamic auto -Operational Mode: static access -Administrative Trunking Encapsulation: negotiate -Operational Trunking Encapsulation: native -Negotiation of Trunking: On -Access Mode VLAN: 101 (HMI1) -Trunking Native Mode VLAN: 1 (default) -Administrative Native VLAN tagging: enabled -Voice VLAN: none -Administrative private-vlan host-association: none -Administrative private-vlan mapping: none -Administrative private-vlan trunk native VLAN: none -Administrative private-vlan trunk Native VLAN tagging: enabled -Administrative private-vlan trunk encapsulation: dot1q -Administrative private-vlan trunk normal VLANs: none -Administrative private-vlan trunk associations: none -Administrative private-vlan trunk mappings: none -Operational private-vlan: none -Trunking VLANs Enabled: ALL -Pruning VLANs Enabled: 2-1001 -Capture Mode Disabled -Capture VLANs Allowed: ALL - -Protected: false -Appliance trust: none - -Name: Gi1/0 -Switchport: Enabled -Administrative Mode: dynamic auto -Operational Mode: static access -Administrative Trunking Encapsulation: negotiate -Operational Trunking Encapsulation: native -Negotiation of Trunking: On -Access Mode VLAN: 110 (PLC2) -Trunking Native Mode VLAN: 1 (default) -Administrative Native VLAN tagging: enabled -Voice VLAN: none -Administrative private-vlan host-association: none -Administrative private-vlan mapping: none -Administrative private-vlan trunk native VLAN: none -Administrative private-vlan trunk Native VLAN tagging: enabled -Administrative private-vlan trunk encapsulation: dot1q -Administrative private-vlan trunk normal VLANs: none -Administrative private-vlan trunk associations: none -Administrative private-vlan trunk mappings: none -Operational private-vlan: none -Trunking VLANs Enabled: ALL -Pruning VLANs Enabled: 2-1001 -Capture Mode Disabled -Capture VLANs Allowed: ALL - -Protected: false -Appliance trust: none - -Name: Gi1/1 -Switchport: Enabled -Administrative Mode: dynamic auto -Operational Mode: static access -Administrative Trunking Encapsulation: negotiate -Operational Trunking Encapsulation: native -Negotiation of Trunking: On -Access Mode VLAN: 111 (HMI2) -Trunking Native Mode VLAN: 1 (default) -Administrative Native VLAN tagging: enabled -Voice VLAN: none -Administrative private-vlan host-association: none -Administrative private-vlan mapping: none -Administrative private-vlan trunk native VLAN: none -Administrative private-vlan trunk Native VLAN tagging: enabled -Administrative private-vlan trunk encapsulation: dot1q -Administrative private-vlan trunk normal VLANs: none -Administrative private-vlan trunk associations: none -Administrative private-vlan trunk mappings: none -Operational private-vlan: none -Trunking VLANs Enabled: ALL -Pruning VLANs Enabled: 2-1001 -Capture Mode Disabled -Capture VLANs Allowed: ALL - -Protected: false -Appliance trust: none diff --git a/tests/cisco_nxos/show_interfaces_switchport/cisco_nxos_show_interfaces_switchport.parsed b/tests/cisco_nxos/show_interfaces_switchport/cisco_nxos_show_interfaces_switchport.parsed deleted file mode 100644 index f48016af54..0000000000 --- a/tests/cisco_nxos/show_interfaces_switchport/cisco_nxos_show_interfaces_switchport.parsed +++ /dev/null @@ -1,24 +0,0 @@ ---- -parsed_sample: - - - interface: Ethernet1/1 - switchport: Enabled - switchport_monitor: Not enabled - mode: access - access_vlan: '3' - native_vlan: '1' - trunking_vlans: '1-4094' - - interface: Ethernet1/2 - switchport: Enabled - switchport_monitor: Not enabled - mode: trunk - access_vlan: '1' - native_vlan: '5' - trunking_vlans: '1-4094' - - interface: Ethernet1/3 - switchport: Enabled - switchport_monitor: Not enabled - mode: trunk - access_vlan: '1' - native_vlan: '1' - trunking_vlans: '1-4094' diff --git a/tests/cisco_nxos/show_interfaces_switchport/cisco_nxos_show_interfaces_switchport.raw b/tests/cisco_nxos/show_interfaces_switchport/cisco_nxos_show_interfaces_switchport.raw deleted file mode 100644 index a9fe82f43c..0000000000 --- a/tests/cisco_nxos/show_interfaces_switchport/cisco_nxos_show_interfaces_switchport.raw +++ /dev/null @@ -1,63 +0,0 @@ -Name: Ethernet1/1 - Switchport: Enabled - Switchport Monitor: Not enabled - Switchport Isolated : Not enabled - Switchport Block Multicast: Not enabled - Switchport Block Unicast: Not enabled - Operational Mode: access - Access Mode VLAN: 3 (Vlan not created) - Trunking Native Mode VLAN: 1 (default) - Trunking VLANs Allowed: 1-4094 - Voice VLAN: none - Extended Trust State : not trusted [COS = 0] - Administrative private-vlan primary host-association: none - Administrative private-vlan secondary host-association: none - Administrative private-vlan primary mapping: none - Administrative private-vlan secondary mapping: none - Administrative private-vlan trunk native VLAN: none - Administrative private-vlan trunk encapsulation: dot1q - Administrative private-vlan trunk normal VLANs: none - Administrative private-vlan trunk private VLANs: none - Operational private-vlan: none -Name: Ethernet1/2 - Switchport: Enabled - Switchport Monitor: Not enabled - Switchport Isolated : Not enabled - Switchport Block Multicast: Not enabled - Switchport Block Unicast: Not enabled - Operational Mode: trunk - Access Mode VLAN: 1 (default) - Trunking Native Mode VLAN: 5 (Vlan not created) - Trunking VLANs Allowed: 1-4094 - Voice VLAN: none - Extended Trust State : not trusted [COS = 0] - Administrative private-vlan primary host-association: none - Administrative private-vlan secondary host-association: none - Administrative private-vlan primary mapping: none - Administrative private-vlan secondary mapping: none - Administrative private-vlan trunk native VLAN: none - Administrative private-vlan trunk encapsulation: dot1q - Administrative private-vlan trunk normal VLANs: none - Administrative private-vlan trunk private VLANs: none - Operational private-vlan: none -Name: Ethernet1/3 - Switchport: Enabled - Switchport Monitor: Not enabled - Switchport Isolated : Not enabled - Switchport Block Multicast: Not enabled - Switchport Block Unicast: Not enabled - Operational Mode: trunk - Access Mode VLAN: 1 (default) - Trunking Native Mode VLAN: 1 (default) - Trunking VLANs Allowed: 1-4094 - Voice VLAN: none - Extended Trust State : not trusted [COS = 0] - Administrative private-vlan primary host-association: none - Administrative private-vlan secondary host-association: none - Administrative private-vlan primary mapping: none - Administrative private-vlan secondary mapping: none - Administrative private-vlan trunk native VLAN: none - Administrative private-vlan trunk encapsulation: dot1q - Administrative private-vlan trunk normal VLANs: none - Administrative private-vlan trunk private VLANs: none - Operational private-vlan: none diff --git a/tests/paloalto_panos/show_arp_all/paloalto_panos_show_arp_all.parsed b/tests/paloalto_panos/show_arp_all/paloalto_panos_show_arp_all.parsed deleted file mode 100644 index 08952968b8..0000000000 --- a/tests/paloalto_panos/show_arp_all/paloalto_panos_show_arp_all.parsed +++ /dev/null @@ -1,21 +0,0 @@ ---- -parsed_sample: - -- interface: ethernet1/1 - ip: 172.25.1.254 - mac: '08:30:6b:26:43:30' - port: ethernet1/1 - status: c - ttl: '627' -- interface: vlan.1 - ip: 172.25.2.195 - mac: '00:50:00:00:07:00' - port: ethernet1/2.110 - status: c - ttl: '1012' -- interface: vlan.1 - ip: 172.25.2.196 - mac: '00:50:00:00:08:00' - port: ethernet1/2.111 - status: c - ttl: '1016' diff --git a/tests/paloalto_panos/show_arp_all/paloalto_panos_show_arp_all.raw b/tests/paloalto_panos/show_arp_all/paloalto_panos_show_arp_all.raw deleted file mode 100644 index 96c3ace656..0000000000 --- a/tests/paloalto_panos/show_arp_all/paloalto_panos_show_arp_all.raw +++ /dev/null @@ -1,12 +0,0 @@ - -maximum of entries supported : 1500 -default timeout: 1800 seconds -total ARP entries in table : 5 -total ARP entries shown : 5 -status: s - static, c - complete, e - expiring, i - incomplete - -interface ip address hw address port status ttl --------------------------------------------------------------------------------- -ethernet1/1 172.25.1.254 08:30:6b:26:43:30 ethernet1/1 c 627 -vlan.1 172.25.2.195 00:50:00:00:07:00 ethernet1/2.110 c 1012 -vlan.1 172.25.2.196 00:50:00:00:08:00 ethernet1/2.111 c 1016 diff --git a/tests/paloalto_panos/show_mac_all/paloalto_panos_show_mac_all.parsed b/tests/paloalto_panos/show_mac_all/paloalto_panos_show_mac_all.parsed deleted file mode 100644 index e95b162037..0000000000 --- a/tests/paloalto_panos/show_mac_all/paloalto_panos_show_mac_all.parsed +++ /dev/null @@ -1,18 +0,0 @@ ---- -parsed_sample: - -- vlan: Test - mac: '00:50:00:00:07:00' - interface: ethernet1/2.110 - status: c - ttl: '1778' -- vlan: Test - mac: '00:50:00:00:08:00' - interface: ethernet1/2.111 - status: c - ttl: '1796' -- vlan: Test - mac: '50:00:00:02:00:01' - interface: ethernet1/2.110 - status: c - ttl: '704' diff --git a/tests/paloalto_panos/show_mac_all/paloalto_panos_show_mac_all.raw b/tests/paloalto_panos/show_mac_all/paloalto_panos_show_mac_all.raw deleted file mode 100644 index f5fcfd78cc..0000000000 --- a/tests/paloalto_panos/show_mac_all/paloalto_panos_show_mac_all.raw +++ /dev/null @@ -1,12 +0,0 @@ - -maximum of entries supported : 1500 -default timeout : 1800 seconds -total MAC entries in table : 3 -total MAC entries shown : 3 -status: s - static, c - complete, i - incomplete - -vlan hw address interface status ttl --------------------------------------------------------------------------------- -Test 00:50:00:00:07:00 ethernet1/2.110 c 1778 -Test 00:50:00:00:08:00 ethernet1/2.111 c 1796 -Test 50:00:00:02:00:01 ethernet1/2.110 c 704 From 588dabe52d7861d02b96a30ba45dc69598aa29a3 Mon Sep 17 00:00:00 2001 From: Andrea Dainese Date: Wed, 24 Jul 2019 11:58:51 +0200 Subject: [PATCH 8/9] fixed template and removed not applicable files --- ...sco_ios_show_interfaces_switchport.template | 18 ------------------ ...co_nxos_show_interfaces_switchport.template | 16 ---------------- .../hp_procurve_show_mac-address.template | 5 +++-- templates/paloalto_panos_show_arp_all.template | 9 --------- templates/paloalto_panos_show_mac_all.template | 9 --------- 5 files changed, 3 insertions(+), 54 deletions(-) delete mode 100644 templates/cisco_ios_show_interfaces_switchport.template delete mode 100644 templates/cisco_nxos_show_interfaces_switchport.template delete mode 100644 templates/paloalto_panos_show_arp_all.template delete mode 100644 templates/paloalto_panos_show_mac_all.template diff --git a/templates/cisco_ios_show_interfaces_switchport.template b/templates/cisco_ios_show_interfaces_switchport.template deleted file mode 100644 index 70446c7405..0000000000 --- a/templates/cisco_ios_show_interfaces_switchport.template +++ /dev/null @@ -1,18 +0,0 @@ -Value Required INTERFACE (\S+) -Value SWITCHPORT (.+) -Value SWITCHPORT_MONITOR (.+) -Value SWITCHPORT_NEGOTIATION (.+) -Value MODE (.+) -Value ACCESS_VLAN (\d+) -Value NATIVE_VLAN (\d+) -Value TRUNKING_VLANS (.+) - -Start - ^Name: ${INTERFACE} - ^\s*Switchport: ${SWITCHPORT} - ^\s*Switchport Monitor: ${SWITCHPORT_MONITOR} - ^\s*Operational Mode: ${MODE} - ^\s*Negotiation of Trunking: ${SWITCHPORT_NEGOTIATION} - ^\s*Access Mode VLAN: ${ACCESS_VLAN} - ^\s*Trunking Native Mode VLAN: ${NATIVE_VLAN} - ^\s*Trunking VLANs Enabled: ${TRUNKING_VLANS} -> Record diff --git a/templates/cisco_nxos_show_interfaces_switchport.template b/templates/cisco_nxos_show_interfaces_switchport.template deleted file mode 100644 index 2d9f9b974d..0000000000 --- a/templates/cisco_nxos_show_interfaces_switchport.template +++ /dev/null @@ -1,16 +0,0 @@ -Value Required INTERFACE (\S+) -Value SWITCHPORT (.+) -Value SWITCHPORT_MONITOR (.+) -Value MODE (.+) -Value ACCESS_VLAN (\d+) -Value NATIVE_VLAN (\d+) -Value TRUNKING_VLANS (\S+) - -Start - ^Name: ${INTERFACE} - ^\s*Switchport: ${SWITCHPORT} - ^\s*Switchport Monitor: ${SWITCHPORT_MONITOR} - ^\s*Operational Mode: ${MODE} - ^\s*Access Mode VLAN: ${ACCESS_VLAN} - ^\s*Trunking Native Mode VLAN: ${NATIVE_VLAN} - ^\s*Trunking VLANs Allowed: ${TRUNKING_VLANS} -> Record diff --git a/templates/hp_procurve_show_mac-address.template b/templates/hp_procurve_show_mac-address.template index 3d737ea415..0421bf46f0 100644 --- a/templates/hp_procurve_show_mac-address.template +++ b/templates/hp_procurve_show_mac-address.template @@ -3,7 +3,8 @@ Value PORT (\S+) Value VLAN (\d+) Start - ^.*MAC Address -> MAC + ^\s*--- -> Start_record -MAC +Start_record ^\s+${MAC}\s+${PORT}\s+${VLAN} -> Record + ^.* -> Error diff --git a/templates/paloalto_panos_show_arp_all.template b/templates/paloalto_panos_show_arp_all.template deleted file mode 100644 index b9cfa9e81d..0000000000 --- a/templates/paloalto_panos_show_arp_all.template +++ /dev/null @@ -1,9 +0,0 @@ -Value INTERFACE (\S+) -Value IP (\S+) -Value MAC ([0-9a-fA-F:]+) -Value PORT (\S+) -Value STATUS (\S+) -Value TTL (\d+) - -Start - ^${INTERFACE}\s+${IP}\s+${MAC}\s+${PORT}\s+${STATUS}\s+${TTL} -> Record diff --git a/templates/paloalto_panos_show_mac_all.template b/templates/paloalto_panos_show_mac_all.template deleted file mode 100644 index ad46ea31a0..0000000000 --- a/templates/paloalto_panos_show_mac_all.template +++ /dev/null @@ -1,9 +0,0 @@ -Value VLAN (\S+) -Value MAC ([0-9a-fA-F:]+) -Value INTERFACE (\S+) -Value STATUS (\S+) -Value TTL (\d+) - -Start - ^--- - ^${VLAN}\s+${MAC}\s+${INTERFACE}\s+${STATUS}\s+${TTL} -> Record From 43503d0091c62ea5b7c3b4d33da9ecb9bb9b4310 Mon Sep 17 00:00:00 2001 From: Andrea Dainese Date: Thu, 25 Jul 2019 09:32:54 +0200 Subject: [PATCH 9/9] updated Error match --- templates/hp_procurve_show_mac-address.template | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/templates/hp_procurve_show_mac-address.template b/templates/hp_procurve_show_mac-address.template index 0421bf46f0..d9b8f2e0d8 100644 --- a/templates/hp_procurve_show_mac-address.template +++ b/templates/hp_procurve_show_mac-address.template @@ -7,4 +7,5 @@ Start Start_record ^\s+${MAC}\s+${PORT}\s+${VLAN} -> Record - ^.* -> Error + ^\s*$$ + ^. -> Error