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

Conversation

JoeyG1973
Copy link
Contributor

ISSUE TYPE
  • New Template Pull Request
COMPONENT

arista_eos_show_port-channel_summary

SUMMARY

added parsing for artists eos show port-channel summary

see the raw file at tests/arista_eos/show_port-channel_summary/arista_eos_show_port-channel_summary.raw

Value List PHYS_IFACE_STATUS (\(.+?\))


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.

@FragmentedPacket FragmentedPacket added the changes_requested Waiting on user to address feedback label Jun 11, 2020
@FragmentedPacket FragmentedPacket merged commit 39d88d4 into networktocode:master Jun 12, 2020
thomasblass pushed a commit to thomasblass/ntc-templates that referenced this pull request Oct 25, 2020
@abahtiti
Copy link

abahtiti commented Feb 18, 2021

I think this line is not correct
^\s+Port-Channel\s+Protocol\s+Ports\s+$$ -> PCS
it should be

^\s+Port-Channel\s+Protocol\s+Ports\s*$$ -> PCS

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changes_requested Waiting on user to address feedback
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants