Skip to content

Commit

Permalink
Update NXOS port-channel sum
Browse files Browse the repository at this point in the history
  • Loading branch information
itdependsnetworks authored and GGabriele committed Feb 21, 2017
1 parent 64c5b1b commit 28a0381
Show file tree
Hide file tree
Showing 4 changed files with 372 additions and 28 deletions.
51 changes: 42 additions & 9 deletions templates/cisco_nxos_show_port-channel_summary.template
Original file line number Diff line number Diff line change
@@ -1,12 +1,45 @@
Value BUNDLE_IFACE (Po\d+)
Value BUNDLE_STATUS (\(\w\))
Value BUNDLE_PROTO (\w+)
Value BUNDLE_PROTO_STATE (\(\w+\))
# Value List PHYS_IFACE (Et\d+\/\S+)
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 (Et.+?)
Value List PHYS_IFACE_STATUS (\(.+?\))


Start
^.*------------ -> Routes
^\s+Flag -> CASE1
^Flags: -> CASE2


CASE1
^.*------------ -> CASE1_RTE

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


CASE2
^Group\s+Port -> CASE2_RTE

Routes
^.+ -> Continue.Record
^${BUNDLE_IFACE}${BUNDLE_STATUS}\s+${BUNDLE_PROTO}${BUNDLE_PROTO_STATE}\s+
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
Original file line number Diff line number Diff line change
@@ -1,22 +1,55 @@
---
parsed_sample:

- bundle_iface: 'Po1'
bundle_status: '(U)'
bundle_proto: 'LACP'
bundle_proto_state: '(a)'

- bundle_iface: 'Po25'
bundle_status: '(D)'
bundle_proto: 'LACP'
bundle_proto_state: '(a)'

- bundle_iface: 'Po101'
bundle_status: '(U)'
bundle_proto: 'LACP'
bundle_proto_state: '(a)'

- bundle_iface: 'Po102'
bundle_status: '(U)'
bundle_proto: 'LACP'
bundle_proto_state: '(a)'
- bundle_iface: Po1
bundle_proto: LACP
bundle_proto_state: (a)
bundle_status: (U)
phys_iface:
- Et3/36/1
phys_iface_status:
- (PG+)
- bundle_iface: Po25
bundle_proto: LACP
bundle_proto_state: (a)
bundle_status: (D)
phys_iface:
- Et3/12/1
phys_iface_status:
- (G-)
- bundle_iface: Po101
bundle_proto: LACP
bundle_proto_state: (a)
bundle_status: (U)
phys_iface:
- Et3/1/1
- Et3/1/2
- Et3/1/3
- Et3/1/4
- Et3/3/1
- Et3/3/2
- Et3/3/3
- Et3/3/4
phys_iface_status:
- (PSG+)
- (PSG+)
- (PSG+)
- (PSG+)
- (PSG+)
- (PSG+)
- (PSG+)
- (PSG+)
- bundle_iface: Po102
bundle_proto: LACP
bundle_proto_state: (a)
bundle_status: (U)
phys_iface:
- Et3/2/1
- Et3/2/2
- Et3/2/3
- Et3/2/4
phys_iface_status:
- (PSG+)
- (PSG+)
- (PSG+)
- (PSG+)
Original file line number Diff line number Diff line change
@@ -0,0 +1,241 @@
---
parsed_sample:

- bundle_iface: Po1
bundle_proto: LACP
bundle_proto_state: ''
bundle_status: (RU)
phys_iface:
- Eth1/1
- Eth2/1
phys_iface_status:
- (P)
- (P)
- bundle_iface: Po2
bundle_proto: LACP
bundle_proto_state: ''
bundle_status: (RU)
phys_iface:
- Eth1/2
- Eth2/2
phys_iface_status:
- (P)
- (P)
- bundle_iface: Po3
bundle_proto: LACP
bundle_proto_state: ''
bundle_status: (RU)
phys_iface:
- Eth1/3
- Eth2/3
phys_iface_status:
- (P)
- (P)
- bundle_iface: Po4
bundle_proto: LACP
bundle_proto_state: ''
bundle_status: (RU)
phys_iface:
- Eth1/4
- Eth2/4
phys_iface_status:
- (P)
- (P)
- bundle_iface: Po12
bundle_proto: LACP
bundle_proto_state: ''
bundle_status: (RU)
phys_iface:
- Eth1/5
- Eth2/5
phys_iface_status:
- (P)
- (P)
- bundle_iface: Po13
bundle_proto: LACP
bundle_proto_state: ''
bundle_status: (RU)
phys_iface:
- Eth1/6
- Eth2/6
phys_iface_status:
- (P)
- (P)
- bundle_iface: Po14
bundle_proto: LACP
bundle_proto_state: ''
bundle_status: (RU)
phys_iface:
- Eth1/7
- Eth2/7
phys_iface_status:
- (P)
- (P)
- bundle_iface: Po801
bundle_proto: LACP
bundle_proto_state: ''
bundle_status: (RU)
phys_iface:
- Eth5/6
- Eth6/6
phys_iface_status:
- (P)
- (P)
- bundle_iface: Po802
bundle_proto: LACP
bundle_proto_state: ''
bundle_status: (RU)
phys_iface:
- Eth5/7
- Eth6/7
phys_iface_status:
- (P)
- (P)
- bundle_iface: Po803
bundle_proto: LACP
bundle_proto_state: ''
bundle_status: (RU)
phys_iface:
- Eth15/17
- Eth16/17
phys_iface_status:
- (P)
- (P)
- bundle_iface: Po804
bundle_proto: LACP
bundle_proto_state: ''
bundle_status: (RU)
phys_iface:
- Eth15/24
- Eth16/24
phys_iface_status:
- (P)
- (P)
- bundle_iface: Po811
bundle_proto: LACP
bundle_proto_state: ''
bundle_status: (RU)
phys_iface:
- Eth15/8
- Eth15/28
- Eth16/8
- Eth16/28
phys_iface_status:
- (P)
- (P)
- (P)
- (P)
- bundle_iface: Po812
bundle_proto: LACP
bundle_proto_state: ''
bundle_status: (RU)
phys_iface:
- Eth15/36
- Eth16/36
- Eth17/8
- Eth18/8
phys_iface_status:
- (P)
- (P)
- (P)
- (P)
- bundle_iface: Po813
bundle_proto: LACP
bundle_proto_state: ''
bundle_status: (RU)
phys_iface:
- Eth15/15
- Eth16/15
phys_iface_status:
- (P)
- (P)
- bundle_iface: Po814
bundle_proto: LACP
bundle_proto_state: ''
bundle_status: (RU)
phys_iface:
- Eth15/22
- Eth16/22
phys_iface_status:
- (P)
- (P)
- bundle_iface: Po821
bundle_proto: LACP
bundle_proto_state: ''
bundle_status: (RU)
phys_iface:
- Eth15/30
- Eth16/30
- Eth17/29
- Eth18/29
phys_iface_status:
- (P)
- (P)
- (P)
- (P)
- bundle_iface: Po822
bundle_proto: LACP
bundle_proto_state: ''
bundle_status: (RU)
phys_iface:
- Eth15/38
- Eth16/38
- Eth17/30
- Eth18/30
phys_iface_status:
- (P)
- (P)
- (P)
- (P)
- bundle_iface: Po823
bundle_proto: LACP
bundle_proto_state: ''
bundle_status: (RU)
phys_iface:
- Eth3/9
- Eth4/9
phys_iface_status:
- (P)
- (P)
- bundle_iface: Po824
bundle_proto: LACP
bundle_proto_state: ''
bundle_status: (RU)
phys_iface:
- Eth3/10
- Eth4/10
phys_iface_status:
- (P)
- (P)
- bundle_iface: Po825
bundle_proto: LACP
bundle_proto_state: ''
bundle_status: (RU)
phys_iface:
- Eth3/3
phys_iface_status:
- (P)
- bundle_iface: Po826
bundle_proto: LACP
bundle_proto_state: ''
bundle_status: (RU)
phys_iface:
- Eth4/3
phys_iface_status:
- (P)
- bundle_iface: Po827
bundle_proto: LACP
bundle_proto_state: ''
bundle_status: (RU)
phys_iface:
- Eth5/3
phys_iface_status:
- (P)
- bundle_iface: Po828
bundle_proto: LACP
bundle_proto_state: ''
bundle_status: (RU)
phys_iface:
- Eth6/3
phys_iface_status:
- (P)
Loading

0 comments on commit 28a0381

Please sign in to comment.