Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Arista eos show port channel summary #757

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions templates/arista_eos_show_port-channel_summary.textfsm
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
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+)


Start
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Start
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+)

I would say to make the values like this and account for the parenthesis in the states instead of capturing them as well. You just capture the value in-between them.

Suggested change
Start
Start
^\s*Flags
^-+
^\s+\S\s+-
^Number
^\s+Port-Channel\s+Protocol\s+Ports\s+$$ -> PCS
^\s*$$
^. -> Error

Just to be more verbose in what we're attempting to account for in the data.

Here are two other suggestions:
^\s*Po\d+.+(Et.+?\(.+?\)\s){1}${PHYS_IFACE}\(${PHYS_IFACE_STATUS}\)(\s|$$) -> Continue
instead of:
^\s*Po\d+\(\w+\)\s+\w+(\(\w+\*\)|\(\w+\))\s+(Et.+?\(.+?\)\s){1}${PHYS_IFACE}${PHYS_IFACE_STATUS}(\s|$$) -> Continue for each of those lines.

^\s+(Et.+?\(.+?\)\s){1}${PHYS_IFACE}${PHYS_IFACE_STATUS}(\s|$$) -> Continue
instead of:
^\s+\s+(Et.+?\(.+?\)\s){1}${PHYS_IFACE}${PHYS_IFACE_STATUS}(\s|$$) -> Continue for each of those lines.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I copied and modified the cisco_nxos_show_port-channel_summary so that captures the parenthesis as well. I will change it in mine but please note that this is the way it is is in Cisco NXOS so you guys should probably change that as well.

^\s*Flags
^-+
^\s+\S\s+-
^Number
^\s+Port-Channel\s+Protocol\s+Ports\s+$$ -> PCS
^\s*$$
^. -> Error



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

2 changes: 2 additions & 0 deletions templates/index
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ arista_eos_show_environment_temperature.textfsm, .*, arista_eos, sh[[ow]] en[[vi
arista_eos_show_interfaces_transceiver.textfsm, .*, arista_eos, sh[[ow]] inte[[rfaces]] tr[[ansceiver]]
arista_eos_show_mac_security_interface.textfsm, .*, arista_eos, sh[[ow]] ma[[c]] secu[[rity]] int[[erface]]
arista_eos_show_lldp_neighbors_detail.textfsm, .*, arista_eos, sh[[ow]] ll[[dp]] nei[[ghbors]] d[[etail]]
arista_eos_show_port-channel_summary.textfsm, .*, arista_eos, sh[[ow]] port-c[[hannel]] s[[ummary]]
arista_eos_show_environment_cooling.textfsm, .*, arista_eos, sh[[ow]] en[[vironment]] c[[ooling]]
arista_eos_show_ip_interface_brief.textfsm, .*, arista_eos, sh[[ow]] i[[p]] int[[erface]] br[[ief]]
arista_eos_show_interfaces_status.textfsm, .*, arista_eos, sh[[ow]] int[[erfaces]] st[[atus]]
Expand Down Expand Up @@ -53,6 +54,7 @@ arista_eos_show_mlag.textfsm, .*, arista_eos, sh[[ow]] ml[[ag]]
arista_eos_show_vlan.textfsm, .*, arista_eos, sh[[ow]] vl[[an]]
arista_eos_show_vrf.textfsm, .*, arista_eos, sh[[ow]] vrf


aruba_os_show_ipv6_interface_brief.textfsm, .*, aruba_os, sh[[ow]] ipv6 in[[terface]] b[[rief]]
aruba_os_show_ip_interface_brief.textfsm, .*, aruba_os, sh[[ow]] ip in[[terface]] b[[rief]]
aruba_os_show_arp.textfsm, .*, aruba_os, sh[[ow]] arp
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
Flags
-------------------------- ----------------------------- -------------------------
a - LACP Active p - LACP Passive * - static fallback
F - Fallback enabled f - Fallback configured ^ - individual fallback
U - In Use D - Down
+ - In-Sync - - Out-of-Sync i - incompatible with agg
P - bundled in Po s - suspended G - Aggregable
I - Individual S - ShortTimeout w - wait for agg

Number of channels in use: 1
Number of aggregators: 1

Port-Channel Protocol Ports
------------------ --------------- --------------------------------
Po105(D) LACP(aF*) Et5(D)
Po106(D) LACP(aF*) Et6(D)
Po107(D) LACP(aF*) Et7(D)
Po108(D) LACP(aF*) Et8(D)
Po109(D) LACP(aF*) Et9(D)
Po110(D) LACP(aF*) Et10(D)
Po111(D) LACP(aF*) Et11(D)
Po112(D) LACP(aF*) Et12(D)
Po113(D) LACP(aF*) Et13(D)
Po114(D) LACP(aF*) Et14(D)
Po115(D) LACP(aF*) Et15(D)
Po116(D) LACP(aF*) Et16(D)
Po117(D) LACP(aF*) Et17(D)
Po118(D) LACP(aF*) Et18(D)
Po119(D) LACP(aF*) Et19(D)
Po120(D) LACP(aF*) Et20(D)
Po121(D) LACP(aF*) Et21(D)
Po122(D) LACP(aF*) Et22(D)
Po123(D) LACP(aF*) Et23(D)
Po124(D) LACP(aF*) Et24(D)
Po125(D) LACP(aF*) Et25(D)
Po126(D) LACP(aF*) Et26(D)
Po127(D) LACP(aF*) Et27(D)
Po128(D) LACP(aF*) Et28(D)
Po129(D) LACP(aF*) Et29(D)
Po130(D) LACP(aF*) Et30(D)
Po131(D) LACP(aF*) Et31(D)
Po132(D) LACP(aF*) Et32(D)
Po133(D) LACP(aF*) Et33(D)
Po134(D) LACP(aF*) Et34(D)
Po135(D) LACP(aF*) Et35(D)
Po136(D) LACP(aF*) Et36(D)
Po137(D) LACP(aF*) Et37(D)
Po138(D) LACP(aF*) Et38(D)
Po139(D) LACP(aF*) Et39(D)
Po140(D) LACP(aF*) Et40(D)
Po141(D) LACP(aF*) Et41(D)
Po142(D) LACP(aF*) Et42(D)
Po146(D) LACP(aF*) Et43(D) Et44(D) Et45(D) Et46(D)
Et47(D)
Po2000(U) LACP(a) Et54/1(PG+)
Loading