diff --git a/templates/cisco_ios_show_etherchannel_summary.textfsm b/templates/cisco_ios_show_etherchannel_summary.textfsm new file mode 100644 index 0000000000..dad429577c --- /dev/null +++ b/templates/cisco_ios_show_etherchannel_summary.textfsm @@ -0,0 +1,29 @@ +Value Required GROUP (\d+) +Value PO_NAME (\S+) +Value PO_STATUS (\D+) +Value PROTOCOL (\S+) +Value List INTERFACES ([\w\.\/]+) +Value List INTERFACES_STATUS (\D+) + +Start + ^Group\s+Port-channel\s+Protocol -> 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 + ^\d+ + ^\s+ + ^-+\++ + ^\s*$$ + ^. -> Error diff --git a/templates/index b/templates/index index b0a5dd7c47..0192252c96 100644 --- a/templates/index +++ b/templates/index @@ -150,6 +150,7 @@ cisco_ios_show_interface_transceiver.textfsm, .*, cisco_ios, sh[[ow]] int[[erfac cisco_ios_show_interfaces_switchport.textfsm, .*, cisco_ios, sh[[ow]] int[[erfaces]] sw[[itchport]] cisco_ios_show_lldp_neighbors_detail.textfsm, .*, cisco_ios, sh[[ow]] lld[[p]] neig[[hbors]] det[[ail]] cisco_ios_show_cdp_neighbors_detail.textfsm, .*, cisco_ios, sh[[ow]] c[[dp]] neig[[hbors]] det[[ail]] +cisco_ios_show_etherchannel_summary.textfsm, .*, cisco_ios, sh[[ow]] etherchann[[el]] summ[[ary]] cisco_ios_show_ipv6_interface_brief.textfsm, .*, cisco_ios, sh[[ow]] ipv[[6]] i[[nterface]] b[[rief]] cisco_ios_show_ip_eigrp_neighbors.textfsm, .*, cisco_ios, sh[[ow]] ip ei[[grp]] nei[[ghbors]] cisco_ios_show_ip_flow_toptalkers.textfsm, .*, cisco_ios, sh[[ow]] ip fl[[ow]] top[[-talkers]] diff --git a/tests/cisco_ios/show_etherchannel_summary/show_etherchannel_summary.raw b/tests/cisco_ios/show_etherchannel_summary/show_etherchannel_summary.raw new file mode 100644 index 0000000000..a68c827c8a --- /dev/null +++ b/tests/cisco_ios/show_etherchannel_summary/show_etherchannel_summary.raw @@ -0,0 +1,25 @@ +Flags: D - down P - bundled in port-channel + I - stand-alone s - suspended + H - Hot-standby (LACP only) + R - Layer3 S - Layer2 + U - in use N - not in use, no aggregation + f - failed to allocate aggregator + + M - not in use, no aggregation due to minimum links not met + m - not in use, port not aggregated due to minimum links not met + u - unsuitable for bundling + d - default port + + w - waiting to be aggregated +Number of channel-groups in use: 6 +Number of aggregators: 6 + +Group Port-channel Protocol Ports +------+-------------+-----------+----------------------------------------------- +1 Po1(SU) LACP Te6/4(P) Te3/5(P) Te9/4(P) + Te5/5(P) +3 Po3(SU) LACP Te4/2(P) Te2/2(P) +7 Po7(SU) LACP Te3/3(P) Te1/3(P) +13 Po13(SU) LACP Te2/8(P) +14 Po14(SU) LACP Te1/8(P) +51 Po51(SU) LACP Te2/10(P) Te4/10(P) \ No newline at end of file diff --git a/tests/cisco_ios/show_etherchannel_summary/show_etherchannel_summary.yml b/tests/cisco_ios/show_etherchannel_summary/show_etherchannel_summary.yml new file mode 100644 index 0000000000..b19cea2013 --- /dev/null +++ b/tests/cisco_ios/show_etherchannel_summary/show_etherchannel_summary.yml @@ -0,0 +1,62 @@ +--- +parsed_sample: + - "group": "1" + "po_name": "Po1" + "po_status": "SU" + "protocol": "LACP" + "interfaces": + - "Te6/4" + - "Te3/5" + - "Te9/4" + - "Te5/5" + "interfaces_status": + - "P" + - "P" + - "P" + - "P" + - "group": "3" + "po_name": "Po3" + "po_status": "SU" + "protocol": "LACP" + "interfaces": + - "Te4/2" + - "Te2/2" + "interfaces_status": + - "P" + - "P" + - "group": "7" + "po_name": "Po7" + "po_status": "SU" + "protocol": "LACP" + "interfaces": + - "Te3/3" + - "Te1/3" + "interfaces_status": + - "P" + - "P" + - "group": "13" + "po_name": "Po13" + "po_status": "SU" + "protocol": "LACP" + "interfaces": + - "Te2/8" + "interfaces_status": + - "P" + - "group": "14" + "po_name": "Po14" + "po_status": "SU" + "protocol": "LACP" + "interfaces": + - "Te1/8" + "interfaces_status": + - "P" + - "group": "51" + "po_name": "Po51" + "po_status": "SU" + "protocol": "LACP" + "interfaces": + - "Te2/10" + - "Te4/10" + "interfaces_status": + - "P" + - "P"