Skip to content

Commit

Permalink
Normalize etherchannel, lacp, and portchannel capture groups (#1585)
Browse files Browse the repository at this point in the history
* normalize PO_NAME > BUNDLE_NAME

* normalize PORT_CHANNEL > BUNDLE_NAME (arista_eos)

* normalize BUNDLE_IFACE > BUNDLE_NAME

* normalize AGGREGATED_INTERFACE > BUNDLE_NAME (juniper_junos)

* normalize PO_STATUS > BUNDLE_STATUS

* normalize PORT_CHANNEL_STATUS > BUNDLE_STATUS (arista_eos)

* normalize BUNDLE_PROTO > BUNDLE_PROTOCOL (cisco_nxos)

* normalize port/etherchannel PROTOCOL > BUNDLE_PROTOCOL

* normalize PROTOCOL_STATE > BUNDLE_PROTOCOL_STATE (arista_eos)

* normalize BUNDLE_PROTO_STATE > BUNDLE_PROTOCOL_STATE (cisco_nxos)

* normalize port/etherchannel PHYS_IFACE > MEMBER_INTERFACE

* normalize port/etherchannel INTERFACES > MEMBER_INTERFACE

* normalize port/etherchannel INTERFACES_STATUS > MEMBER_INTERFACE_STATUS

* normalize port/etherchannel PHYS_IFACE_STATUS > MEMBER_INTERFACE_STATUS

* normalize - nxos - remove parentheses from several capture groups
(aligns with ios/asa and arista_eos)
    -- adjust BUNDLE_STATUS
    -- adjust BUNDLE_PROTOCOL_STATE
    -- adjust MEMBER_INTERFACE_STATUS

* add capture group names to data model docs
  • Loading branch information
mjbear authored Feb 22, 2024
1 parent 911b942 commit 876120c
Show file tree
Hide file tree
Showing 14 changed files with 773 additions and 767 deletions.
54 changes: 30 additions & 24 deletions docs/dev/data_model.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,27 +18,33 @@ Example: Imagine the extra programming logic needed to consume structured data w

# Common Capture Groups

| Capture Group | Usage Description |
|--------------------|:------------------|
| `BIA` | use this if the template already has MAC_ADDRESS in use for the active MAC address |
| `DESCRIPTION` | often used for port or interface descriptions |
| `GATEWAY` | gateway address for a subnet |
| `INTERFACE` | full word instead of IFACE, INTF, INTFC, etc |
| `IP_ADDRESS` | for a single IP address, often IPv4 |
| `IP_ADDRESSES` | for lists of IPv4 addresses, but in the case of some templates there may be a mix of IP protocol versions |
| `IP_HELPER` | for lists DHCP IP helper addresses |
| `IP_VERSION` | Internet Protocol (IP) version in the case of multiple versions appearing in output (use where necessary) |
| `IPV6_ADDRESS` | for a single IPv6 address |
| `IPV6_ADDRESSES` | for lists of IPv6 addresses |
| `IPV6_GATEWAY` | for IPv6 gateway address |
| `LOCAL_IP_ADDRESS` | local IP address in the case of First Hop Redundancy Protocols (FHRP)
| `MAC_ADDRESS` | instead of MAC or MACADDR |
| `MGMT_IP_ADDRESS` | instead of MGMT_IP or MGMT_ADDRESS or MANAGEMENT_IP or REMOTE_MANAGEMENT_ADDRESS |
| `NEIGHBOR_ID` | for router IDs remote to the system being parsed |
| `NETMASK` | for IPv4 dotted quad masks |
| `NETWORK` | for network numbers or subnet address (without the mask or prefix/slash notation); in place of ROUTE |
| `PREFIX_LENGTH` | instead of PREFIX or CIDR for the numbers of a slash notation or CIDR mask |
| `PROTOCOL` | instead of PROTO |
| `ROUTER_ID` | for local router IDs (local to the device being parsed) |
| `VLAN_ID` | instead of VLAN or TAG |
| `VLAN_NAME` | VLAN name or description |
| Capture Group | Usage Description |
|---------------------------|:------------------|
| `BIA` | use this if the template already has MAC_ADDRESS in use for the active MAC address |
| `BUNDLE_NAME` | virtual interface name for etherchannel, LACP, LAG, or port-channel interfaces |
| `BUNDLE_PROTOCOL` | virtual interface protocol type (LACP, PAgP) for etherchannel or port-channel interfaces |
| `BUNDLE_PROTOCOL_STATE` | virtual interface protocol state for etherchannel or port-channel interfaces |
| `BUNDLE_STATUS` | virtual interface status for etherchannel, LACP, LAG, or port-channel interfaces |
| `DESCRIPTION` | often used for port or interface descriptions |
| `GATEWAY` | gateway address for a subnet |
| `INTERFACE` | full word instead of IFACE, INTF, INTFC, etc |
| `IP_ADDRESS` | for a single IP address, often IPv4 |
| `IP_ADDRESSES` | for lists of IPv4 addresses, but in the case of some templates there may be a mix of IP protocol versions |
| `IP_HELPER` | for lists DHCP IP helper addresses |
| `IP_VERSION` | Internet Protocol (IP) version in the case of multiple versions appearing in output (use where necessary) |
| `IPV6_ADDRESS` | for a single IPv6 address |
| `IPV6_ADDRESSES` | for lists of IPv6 addresses |
| `IPV6_GATEWAY` | for IPv6 gateway address |
| `LOCAL_IP_ADDRESS` | local IP address in the case of First Hop Redundancy Protocols (FHRP)
| `MAC_ADDRESS` | instead of MAC or MACADDR |
| `MEMBER_INTERFACE` | list of physical member interface names that are bundled to make an etherchannel, LACP, LAG, or port-channel interface |
| `MEMBER_INTERFACE_STATUS` | list of member interface statuses for an etherchannel, LACP, LAG, or port-channel interface |
| `MGMT_IP_ADDRESS` | instead of MGMT_IP or MGMT_ADDRESS or MANAGEMENT_IP or REMOTE_MANAGEMENT_ADDRESS |
| `NEIGHBOR_ID` | for router IDs remote to the system being parsed |
| `NETMASK` | for IPv4 dotted quad masks |
| `NETWORK` | for network numbers or subnet address (without the mask or prefix/slash notation); in place of ROUTE |
| `PREFIX_LENGTH` | instead of PREFIX or CIDR for the numbers of a slash notation or CIDR mask |
| `PROTOCOL` | instead of PROTO |
| `ROUTER_ID` | for local router IDs (local to the device being parsed) |
| `VLAN_ID` | instead of VLAN or TAG |
| `VLAN_NAME` | VLAN name or description |
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
Value PORT_CHANNEL (Po\d+)
Value PORT_CHANNEL_STATUS (\S+)
Value PROTOCOL (\w+)
Value PROTOCOL_STATE (\S+)
Value List PHYS_IFACE (Et\S+)
Value List PHYS_IFACE_STATUS (\S+)
Value BUNDLE_NAME (Po\d+)
Value BUNDLE_STATUS (\S+)
Value BUNDLE_PROTOCOL (\w+)
Value BUNDLE_PROTOCOL_STATE (\S+)
Value List MEMBER_INTERFACE (Et\S+)
Value List MEMBER_INTERFACE_STATUS (\S+)


Start
Expand All @@ -19,14 +19,14 @@ Start

PCS
^\s*Po\d+ -> Continue.Record
^\s*${PORT_CHANNEL}\(${PORT_CHANNEL_STATUS}\)\s+${PROTOCOL}\(${PROTOCOL_STATE}\)\s+${PHYS_IFACE}\(${PHYS_IFACE_STATUS}\)(\s|$$) -> Continue
^\s*Po\d+.+(Et.+?\(.+?\)\s){1}${PHYS_IFACE}\(${PHYS_IFACE_STATUS}\)(\s|$$) -> Continue
^\s*Po\d+.+(Et.+?\(.+?\)\s){2}${PHYS_IFACE}\(${PHYS_IFACE_STATUS}\)(\s|$$) -> Continue
^\s*Po\d+.+(Et.+?\(.+?\)\s){3}${PHYS_IFACE}\(${PHYS_IFACE_STATUS}\)(\s|$$) -> Continue
^\s*Po\d+.+(Et.+?\(.+?\)\s){4}${PHYS_IFACE}\(${PHYS_IFACE_STATUS}\)(\s|$$) -> Continue
^\s+${PHYS_IFACE}\(${PHYS_IFACE_STATUS}\)(\s|$$) -> Continue
^\s+(Et.+?\(.+?\)\s){1}${PHYS_IFACE}\(${PHYS_IFACE_STATUS}\)(\s|$$) -> Continue
^\s+(Et.+?\(.+?\)\s){2}${PHYS_IFACE}\(${PHYS_IFACE_STATUS}\)(\s|$$) -> Continue
^\s+(Et.+?\(.+?\)\s){3}${PHYS_IFACE}\(${PHYS_IFACE_STATUS}\)(\s|$$) -> Continue
^\s+(Et.+?\(.+?\)\s){4}${PHYS_IFACE}\(${PHYS_IFACE_STATUS}\)(\s|$$) -> Continue
^\s*${BUNDLE_NAME}\(${BUNDLE_STATUS}\)\s+${BUNDLE_PROTOCOL}\(${BUNDLE_PROTOCOL_STATE}\)\s+${MEMBER_INTERFACE}\(${MEMBER_INTERFACE_STATUS}\)(\s|$$) -> Continue
^\s*Po\d+.+(Et.+?\(.+?\)\s){1}${MEMBER_INTERFACE}\(${MEMBER_INTERFACE_STATUS}\)(\s|$$) -> Continue
^\s*Po\d+.+(Et.+?\(.+?\)\s){2}${MEMBER_INTERFACE}\(${MEMBER_INTERFACE_STATUS}\)(\s|$$) -> Continue
^\s*Po\d+.+(Et.+?\(.+?\)\s){3}${MEMBER_INTERFACE}\(${MEMBER_INTERFACE_STATUS}\)(\s|$$) -> Continue
^\s*Po\d+.+(Et.+?\(.+?\)\s){4}${MEMBER_INTERFACE}\(${MEMBER_INTERFACE_STATUS}\)(\s|$$) -> Continue
^\s+${MEMBER_INTERFACE}\(${MEMBER_INTERFACE_STATUS}\)(\s|$$) -> Continue
^\s+(Et.+?\(.+?\)\s){1}${MEMBER_INTERFACE}\(${MEMBER_INTERFACE_STATUS}\)(\s|$$) -> Continue
^\s+(Et.+?\(.+?\)\s){2}${MEMBER_INTERFACE}\(${MEMBER_INTERFACE_STATUS}\)(\s|$$) -> Continue
^\s+(Et.+?\(.+?\)\s){3}${MEMBER_INTERFACE}\(${MEMBER_INTERFACE_STATUS}\)(\s|$$) -> Continue
^\s+(Et.+?\(.+?\)\s){4}${MEMBER_INTERFACE}\(${MEMBER_INTERFACE_STATUS}\)(\s|$$) -> Continue

28 changes: 14 additions & 14 deletions ntc_templates/templates/cisco_asa_show_port-channel_summary.textfsm
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
Value Required GROUP (\d+)
Value PO_NAME (\S+)
Value PO_STATUS (\D+)
Value PROTOCOL (\S+)
Value List INTERFACES ([\w\.\/]+)
Value List INTERFACES_STATUS (\D+)
Value BUNDLE_NAME (\S+)
Value BUNDLE_STATUS (\D+)
Value BUNDLE_PROTOCOL (\S+)
Value List MEMBER_INTERFACE ([\w\.\/]+)
Value List MEMBER_INTERFACE_STATUS (\D+)

Start
^Group\s+Port-channel\s+Protocol\s+Span-cluster\s+Ports -> PortChannel
^\s*$$

PortChannel
^\d+ -> Continue.Record
^${GROUP}\s+${PO_NAME}\(${PO_STATUS}\)\s+${PROTOCOL}\s* -> Continue
^.+(-|LACP|PAgP)\s+${INTERFACES}\(${INTERFACES_STATUS}\) -> Continue
^.+(-|LACP|PAgP)\s+[\w\.\/\(\)]+\s+${INTERFACES}\(${INTERFACES_STATUS}\) -> Continue
^.+(-|LACP|PAgP)\s+[\w\.\/\(\)]+\s+[\w\.\/\(\)]+\s+${INTERFACES}\(${INTERFACES_STATUS}\) -> Continue
^.+(-|LACP|PAgP)\s+[\w\.\/\(\)]+\s+[\w\.\/\(\)]+\s+[\w\.\/\(\)]+\s+${INTERFACES}\(${INTERFACES_STATUS}\) -> Continue
^\s+${INTERFACES}\(${INTERFACES_STATUS}\) -> Continue
^\s+[\w\.\/\(\)]+\s+${INTERFACES}\(${INTERFACES_STATUS}\) -> Continue
^\s+[\w\.\/\(\)]+\s+[\w\.\/\(\)]+\s+${INTERFACES}\(${INTERFACES_STATUS}\) -> Continue
^\s+[\w\.\/\(\)]+\s+[\w\.\/\(\)]+\s+[\w\.\/\(\)]+\s+${INTERFACES}\(${INTERFACES_STATUS}\) -> Continue
^${GROUP}\s+${BUNDLE_NAME}\(${BUNDLE_STATUS}\)\s+${BUNDLE_PROTOCOL}\s* -> Continue
^.+(-|LACP|PAgP)\s+${MEMBER_INTERFACE}\(${MEMBER_INTERFACE_STATUS}\) -> Continue
^.+(-|LACP|PAgP)\s+[\w\.\/\(\)]+\s+${MEMBER_INTERFACE}\(${MEMBER_INTERFACE_STATUS}\) -> Continue
^.+(-|LACP|PAgP)\s+[\w\.\/\(\)]+\s+[\w\.\/\(\)]+\s+${MEMBER_INTERFACE}\(${MEMBER_INTERFACE_STATUS}\) -> Continue
^.+(-|LACP|PAgP)\s+[\w\.\/\(\)]+\s+[\w\.\/\(\)]+\s+[\w\.\/\(\)]+\s+${MEMBER_INTERFACE}\(${MEMBER_INTERFACE_STATUS}\) -> Continue
^\s+${MEMBER_INTERFACE}\(${MEMBER_INTERFACE_STATUS}\) -> Continue
^\s+[\w\.\/\(\)]+\s+${MEMBER_INTERFACE}\(${MEMBER_INTERFACE_STATUS}\) -> Continue
^\s+[\w\.\/\(\)]+\s+[\w\.\/\(\)]+\s+${MEMBER_INTERFACE}\(${MEMBER_INTERFACE_STATUS}\) -> Continue
^\s+[\w\.\/\(\)]+\s+[\w\.\/\(\)]+\s+[\w\.\/\(\)]+\s+${MEMBER_INTERFACE}\(${MEMBER_INTERFACE_STATUS}\) -> Continue
^\d+
^\s+
^-+\++
Expand Down
28 changes: 14 additions & 14 deletions ntc_templates/templates/cisco_ios_show_etherchannel_summary.textfsm
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
Value Required GROUP (\d+)
Value PO_NAME (\S+)
Value PO_STATUS (\D+)
Value PROTOCOL (\S+)
Value List INTERFACES ([\w\.\/]+)
Value List INTERFACES_STATUS (\D+)
Value BUNDLE_NAME (\S+)
Value BUNDLE_STATUS (\D+)
Value BUNDLE_PROTOCOL (\S+)
Value List MEMBER_INTERFACE ([\w\.\/]+)
Value List MEMBER_INTERFACE_STATUS (\D+)

Start
^Group\s+Port-channel\s+Protocol -> PortChannel
Expand All @@ -13,15 +13,15 @@ Start

PortChannel
^\d+ -> Continue.Record
^${GROUP}\s+${PO_NAME}\(${PO_STATUS}\)\s+${PROTOCOL}\s* -> Continue
^.+(-|LACP|PAgP)\s+${INTERFACES}\(${INTERFACES_STATUS}\) -> Continue
^.+(-|LACP|PAgP)\s+[\w\.\/\(\)]+\s+${INTERFACES}\(${INTERFACES_STATUS}\) -> Continue
^.+(-|LACP|PAgP)\s+[\w\.\/\(\)]+\s+[\w\.\/\(\)]+\s+${INTERFACES}\(${INTERFACES_STATUS}\) -> Continue
^.+(-|LACP|PAgP)\s+[\w\.\/\(\)]+\s+[\w\.\/\(\)]+\s+[\w\.\/\(\)]+\s+${INTERFACES}\(${INTERFACES_STATUS}\) -> Continue
^\s+${INTERFACES}\(${INTERFACES_STATUS}\) -> Continue
^\s+[\w\.\/\(\)]+\s+${INTERFACES}\(${INTERFACES_STATUS}\) -> Continue
^\s+[\w\.\/\(\)]+\s+[\w\.\/\(\)]+\s+${INTERFACES}\(${INTERFACES_STATUS}\) -> Continue
^\s+[\w\.\/\(\)]+\s+[\w\.\/\(\)]+\s+[\w\.\/\(\)]+\s+${INTERFACES}\(${INTERFACES_STATUS}\) -> Continue
^${GROUP}\s+${BUNDLE_NAME}\(${BUNDLE_STATUS}\)\s+${BUNDLE_PROTOCOL}\s* -> Continue
^.+(-|LACP|PAgP)\s+${MEMBER_INTERFACE}\(${MEMBER_INTERFACE_STATUS}\) -> Continue
^.+(-|LACP|PAgP)\s+[\w\.\/\(\)]+\s+${MEMBER_INTERFACE}\(${MEMBER_INTERFACE_STATUS}\) -> Continue
^.+(-|LACP|PAgP)\s+[\w\.\/\(\)]+\s+[\w\.\/\(\)]+\s+${MEMBER_INTERFACE}\(${MEMBER_INTERFACE_STATUS}\) -> Continue
^.+(-|LACP|PAgP)\s+[\w\.\/\(\)]+\s+[\w\.\/\(\)]+\s+[\w\.\/\(\)]+\s+${MEMBER_INTERFACE}\(${MEMBER_INTERFACE_STATUS}\) -> Continue
^\s+${MEMBER_INTERFACE}\(${MEMBER_INTERFACE_STATUS}\) -> Continue
^\s+[\w\.\/\(\)]+\s+${MEMBER_INTERFACE}\(${MEMBER_INTERFACE_STATUS}\) -> Continue
^\s+[\w\.\/\(\)]+\s+[\w\.\/\(\)]+\s+${MEMBER_INTERFACE}\(${MEMBER_INTERFACE_STATUS}\) -> Continue
^\s+[\w\.\/\(\)]+\s+[\w\.\/\(\)]+\s+[\w\.\/\(\)]+\s+${MEMBER_INTERFACE}\(${MEMBER_INTERFACE_STATUS}\) -> Continue
^\d+
^\s+
^-+\++
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
Value Required,Filldown BUNDLE_IFACE (Po\d+)
Value Filldown BUNDLE_STATUS (\(\w+\))
Value Filldown BUNDLE_PROTO (\w+)
Value Filldown BUNDLE_PROTO_STATE (\(\w+\))
Value List PHYS_IFACE ([\w\/]+|\-\-)
Value List PHYS_IFACE_STATUS (\(.+?\))
Value Required,Filldown BUNDLE_NAME (Po\d+)
Value Filldown BUNDLE_STATUS (\w+)
Value Filldown BUNDLE_PROTOCOL (\w+)
Value Filldown BUNDLE_PROTOCOL_STATE (\w+)
Value List MEMBER_INTERFACE ([\w\/]+|\-\-)
Value List MEMBER_INTERFACE_STATUS (.+?)


Start
Expand All @@ -16,17 +16,17 @@ CASE1

CASE1_RTE
^Po -> Continue.Record
^${BUNDLE_IFACE}${BUNDLE_STATUS}\s+${BUNDLE_PROTO}${BUNDLE_PROTO_STATE}\s+${PHYS_IFACE}${PHYS_IFACE_STATUS}(\s|$$) -> Continue
^Po\d+\(\w+\)\s+\w+\(\w+\)\s+Et.+?\(.+?\)\s+${PHYS_IFACE}${PHYS_IFACE_STATUS}(\s|$$) -> Continue
^Po\d+\(\w+\)\s+\w+\(\w+\)\s+Et.+?\(.+?\)\s+Et.+?\(.+?\)\s+${PHYS_IFACE}${PHYS_IFACE_STATUS}(\s|$$) -> Continue
^Po\d+\(\w+\)\s+\w+\(\w+\)\s+Et.+?\(.+?\)\s+Et.+?\(.+?\)\s+Et.+?\(.+?\)\s+${PHYS_IFACE}${PHYS_IFACE_STATUS}(\s|$$) -> Continue
^Po\d+\(\w+\)\s+\w+\(\w+\)\s+Et.+?\(.+?\)\s+Et.+?\(.+?\)\s+Et.+?\(.+?\)\s+Et.+?\(.+?\)\s+${PHYS_IFACE}${PHYS_IFACE_STATUS}(\s|$$) -> Continue
^Po\d+\(\w+\)\s+\w+\(\w+\)\s+Et.+?\(.+?\)\s+Et.+?\(.+?\)\s+Et.+?\(.+?\)\s+Et.+?\(.+?\)\s+Et.+?\(.+?\)\s+${PHYS_IFACE}${PHYS_IFACE_STATUS}(\s|$$) -> Continue
^\s{24}${PHYS_IFACE}${PHYS_IFACE_STATUS}(\s|$$) -> Continue
^\s{24}Et.+?\s+${PHYS_IFACE}${PHYS_IFACE_STATUS}(\s|$$) -> Continue
^\s{24}Et.+?\s+Et.+?\s+${PHYS_IFACE}${PHYS_IFACE_STATUS}(\s|$$) -> Continue
^\s{24}Et.+?\s+Et.+?\s+Et.+?\s+${PHYS_IFACE}${PHYS_IFACE_STATUS}(\s|$$) -> Continue
^\s{24}Et.+?\s+Et.+?\s+Et.+?\s+Et.+?\s+${PHYS_IFACE}${PHYS_IFACE_STATUS}(\s|$$) -> Continue
^${BUNDLE_NAME}\(${BUNDLE_STATUS}\)\s+${BUNDLE_PROTOCOL}\(${BUNDLE_PROTOCOL_STATE}\)\s+${MEMBER_INTERFACE}\(${MEMBER_INTERFACE_STATUS}\)(\s|$$) -> Continue
^Po\d+\(\w+\)\s+\w+\(\w+\)\s+Et.+?\(.+?\)\s+${MEMBER_INTERFACE}\(${MEMBER_INTERFACE_STATUS}\)(\s|$$) -> Continue
^Po\d+\(\w+\)\s+\w+\(\w+\)\s+Et.+?\(.+?\)\s+Et.+?\(.+?\)\s+${MEMBER_INTERFACE}\(${MEMBER_INTERFACE_STATUS}\)(\s|$$) -> Continue
^Po\d+\(\w+\)\s+\w+\(\w+\)\s+Et.+?\(.+?\)\s+Et.+?\(.+?\)\s+Et.+?\(.+?\)\s+${MEMBER_INTERFACE}\(${MEMBER_INTERFACE_STATUS}\)(\s|$$) -> Continue
^Po\d+\(\w+\)\s+\w+\(\w+\)\s+Et.+?\(.+?\)\s+Et.+?\(.+?\)\s+Et.+?\(.+?\)\s+Et.+?\(.+?\)\s+${MEMBER_INTERFACE}\(${MEMBER_INTERFACE_STATUS}\)(\s|$$) -> Continue
^Po\d+\(\w+\)\s+\w+\(\w+\)\s+Et.+?\(.+?\)\s+Et.+?\(.+?\)\s+Et.+?\(.+?\)\s+Et.+?\(.+?\)\s+Et.+?\(.+?\)\s+${MEMBER_INTERFACE}\(${MEMBER_INTERFACE_STATUS}\)(\s|$$) -> Continue
^\s{24}${MEMBER_INTERFACE}\(${MEMBER_INTERFACE_STATUS}\)(\s|$$) -> Continue
^\s{24}Et.+?\s+${MEMBER_INTERFACE}\(${MEMBER_INTERFACE_STATUS}\)(\s|$$) -> Continue
^\s{24}Et.+?\s+Et.+?\s+${MEMBER_INTERFACE}\(${MEMBER_INTERFACE_STATUS}\)(\s|$$) -> Continue
^\s{24}Et.+?\s+Et.+?\s+Et.+?\s+${MEMBER_INTERFACE}\(${MEMBER_INTERFACE_STATUS}\)(\s|$$) -> Continue
^\s{24}Et.+?\s+Et.+?\s+Et.+?\s+Et.+?\s+${MEMBER_INTERFACE}\(${MEMBER_INTERFACE_STATUS}\)(\s|$$) -> Continue


CASE2
Expand All @@ -35,12 +35,12 @@ CASE2
CASE2_RTE
^------------ -> Next
^\d+ -> Continue.Record
^\d+\s+${BUNDLE_IFACE}${BUNDLE_STATUS}\s+\w+\s+${BUNDLE_PROTO}\s+${PHYS_IFACE}${PHYS_IFACE_STATUS}(\s|$$) -> Continue
^\d+\s+Po\d+\(\w+\)\s+\w+\s+\w+\s+Et.+?\s+${PHYS_IFACE}${PHYS_IFACE_STATUS}(\s|$$) -> Continue
^\d+\s+Po\d+\(\w+\)\s+\w+\s+\w+\s+Et.+?\s+Et.+?\s+${PHYS_IFACE}${PHYS_IFACE_STATUS}(\s|$$) -> Continue
^\d+\s+Po\d+\(\w+\)\s+\w+\s+\w+\s+Et.+?\s+Et.+?\s+Et.+?\s+${PHYS_IFACE}${PHYS_IFACE_STATUS}(\s|$$) -> Continue
^\s{37}${PHYS_IFACE}${PHYS_IFACE_STATUS}(\s|$$) -> Continue
^\s{37}Et.+?\s+${PHYS_IFACE}${PHYS_IFACE_STATUS}(\s|$$) -> Continue
^\s{37}Et.+?\s+Et.+?\s+${PHYS_IFACE}${PHYS_IFACE_STATUS}(\s|$$) -> Continue
^\s{37}Et.+?\s+Et.+?\s+Et.+?\s+${PHYS_IFACE}${PHYS_IFACE_STATUS}(\s|$$) -> Continue
^\d+\s+${BUNDLE_IFACE}${BUNDLE_STATUS}\s+\w+\s+${BUNDLE_PROTO}\s+${PHYS_IFACE}($$) -> Next
^\d+\s+${BUNDLE_NAME}\(${BUNDLE_STATUS}\)\s+\w+\s+${BUNDLE_PROTOCOL}\s+${MEMBER_INTERFACE}\(${MEMBER_INTERFACE_STATUS}\)(\s|$$) -> Continue
^\d+\s+Po\d+\(\w+\)\s+\w+\s+\w+\s+Et.+?\s+${MEMBER_INTERFACE}\(${MEMBER_INTERFACE_STATUS}\)(\s|$$) -> Continue
^\d+\s+Po\d+\(\w+\)\s+\w+\s+\w+\s+Et.+?\s+Et.+?\s+${MEMBER_INTERFACE}\(${MEMBER_INTERFACE_STATUS}\)(\s|$$) -> Continue
^\d+\s+Po\d+\(\w+\)\s+\w+\s+\w+\s+Et.+?\s+Et.+?\s+Et.+?\s+${MEMBER_INTERFACE}\(${MEMBER_INTERFACE_STATUS}\)(\s|$$) -> Continue
^\s{37}${MEMBER_INTERFACE}\(${MEMBER_INTERFACE_STATUS}\)(\s|$$) -> Continue
^\s{37}Et.+?\s+${MEMBER_INTERFACE}\(${MEMBER_INTERFACE_STATUS}\)(\s|$$) -> Continue
^\s{37}Et.+?\s+Et.+?\s+${MEMBER_INTERFACE}\(${MEMBER_INTERFACE_STATUS}\)(\s|$$) -> Continue
^\s{37}Et.+?\s+Et.+?\s+Et.+?\s+${MEMBER_INTERFACE}\(${MEMBER_INTERFACE_STATUS}\)(\s|$$) -> Continue
^\d+\s+${BUNDLE_NAME}\(${BUNDLE_STATUS}\)\s+\w+\s+${BUNDLE_PROTOCOL}\s+${MEMBER_INTERFACE}($$) -> Next
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
Value Required AGGREGATED_INTERFACE (\S+)
Value Required BUNDLE_NAME (\S+)
Value List MEMBER_INTERFACE (\S+)
Value List RECEIVE_STATE (\S+\s?\w+)
Value List TRANSMIT_STATE (\S+\s?periodic)
Value List MUX_STATE (\S+\s?\S*)

Start
^Aggregated -> Continue.Record
^Aggregated\sinterface:\s${AGGREGATED_INTERFACE}(\s|$$)
^Aggregated\sinterface:\s${BUNDLE_NAME}(\s|$$)
^\s+LACP\s+state:
^\s+LACP\sprotocol: -> LACP_PROTO
^\s+\S+
Expand All @@ -18,6 +18,6 @@ LACP_PROTO
^\s+${MEMBER_INTERFACE}\s+${RECEIVE_STATE}\s+${TRANSMIT_STATE}\s+${MUX_STATE}(\s|$$)
^\s*$$
^Aggregated -> Continue.Record
^Aggregated\sinterface:\s${AGGREGATED_INTERFACE}(\s|$$) -> Start
^Aggregated\sinterface:\s${BUNDLE_NAME}(\s|$$) -> Start
^{master:\d+}
^. -> Error
Loading

0 comments on commit 876120c

Please sign in to comment.