From 28a03813e3d23fdeeea2d4bf0cf1eed9ff577206 Mon Sep 17 00:00:00 2001 From: itdependsnetworks Date: Sat, 18 Feb 2017 12:05:07 -0500 Subject: [PATCH] Update NXOS port-channel sum --- ...co_nxos_show_port-channel_summary.template | 51 +++- ...isco_nxos_show_port-channel_summary.parsed | 71 ++++-- ...sco_nxos_show_port-channel_summary2.parsed | 241 ++++++++++++++++++ .../cisco_nxos_show_port-channel_summary2.raw | 37 +++ 4 files changed, 372 insertions(+), 28 deletions(-) create mode 100644 tests/cisco_nxos/show_port-channel_summary/cisco_nxos_show_port-channel_summary2.parsed create mode 100644 tests/cisco_nxos/show_port-channel_summary/cisco_nxos_show_port-channel_summary2.raw diff --git a/templates/cisco_nxos_show_port-channel_summary.template b/templates/cisco_nxos_show_port-channel_summary.template index 574e6ecd88..128a830633 100644 --- a/templates/cisco_nxos_show_port-channel_summary.template +++ b/templates/cisco_nxos_show_port-channel_summary.template @@ -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 diff --git a/tests/cisco_nxos/show_port-channel_summary/cisco_nxos_show_port-channel_summary.parsed b/tests/cisco_nxos/show_port-channel_summary/cisco_nxos_show_port-channel_summary.parsed index f024fa985a..409dddc3b2 100644 --- a/tests/cisco_nxos/show_port-channel_summary/cisco_nxos_show_port-channel_summary.parsed +++ b/tests/cisco_nxos/show_port-channel_summary/cisco_nxos_show_port-channel_summary.parsed @@ -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+) diff --git a/tests/cisco_nxos/show_port-channel_summary/cisco_nxos_show_port-channel_summary2.parsed b/tests/cisco_nxos/show_port-channel_summary/cisco_nxos_show_port-channel_summary2.parsed new file mode 100644 index 0000000000..b2577a7b3d --- /dev/null +++ b/tests/cisco_nxos/show_port-channel_summary/cisco_nxos_show_port-channel_summary2.parsed @@ -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) diff --git a/tests/cisco_nxos/show_port-channel_summary/cisco_nxos_show_port-channel_summary2.raw b/tests/cisco_nxos/show_port-channel_summary/cisco_nxos_show_port-channel_summary2.raw new file mode 100644 index 0000000000..e03460a842 --- /dev/null +++ b/tests/cisco_nxos/show_port-channel_summary/cisco_nxos_show_port-channel_summary2.raw @@ -0,0 +1,37 @@ +Flags: D - Down P - Up in port-channel (members) + I - Individual H - Hot-standby (LACP only) + s - Suspended r - Module-removed + S - Switched R - Routed + U - Up (port-channel) + M - Not in use. Min-links not met +-------------------------------------------------------------------------------- +Group Port- Type Protocol Member Ports + Channel +-------------------------------------------------------------------------------- +1 Po1(RU) Eth LACP Eth1/1(P) Eth2/1(P) +2 Po2(RU) Eth LACP Eth1/2(P) Eth2/2(P) +3 Po3(RU) Eth LACP Eth1/3(P) Eth2/3(P) +4 Po4(RU) Eth LACP Eth1/4(P) Eth2/4(P) +12 Po12(RU) Eth LACP Eth1/5(P) Eth2/5(P) +13 Po13(RU) Eth LACP Eth1/6(P) Eth2/6(P) +14 Po14(RU) Eth LACP Eth1/7(P) Eth2/7(P) +801 Po801(RU) Eth LACP Eth5/6(P) Eth6/6(P) +802 Po802(RU) Eth LACP Eth5/7(P) Eth6/7(P) +803 Po803(RU) Eth LACP Eth15/17(P) Eth16/17(P) +804 Po804(RU) Eth LACP Eth15/24(P) Eth16/24(P) +811 Po811(RU) Eth LACP Eth15/8(P) Eth15/28(P) Eth16/8(P) + Eth16/28(P) +812 Po812(RU) Eth LACP Eth15/36(P) Eth16/36(P) Eth17/8(P) + Eth18/8(P) +813 Po813(RU) Eth LACP Eth15/15(P) Eth16/15(P) +814 Po814(RU) Eth LACP Eth15/22(P) Eth16/22(P) +821 Po821(RU) Eth LACP Eth15/30(P) Eth16/30(P) Eth17/29(P) + Eth18/29(P) +822 Po822(RU) Eth LACP Eth15/38(P) Eth16/38(P) Eth17/30(P) + Eth18/30(P) +823 Po823(RU) Eth LACP Eth3/9(P) Eth4/9(P) +824 Po824(RU) Eth LACP Eth3/10(P) Eth4/10(P) +825 Po825(RU) Eth LACP Eth3/3(P) +826 Po826(RU) Eth LACP Eth4/3(P) +827 Po827(RU) Eth LACP Eth5/3(P) +828 Po828(RU) Eth LACP Eth6/3(P)