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

New Template: juniper_junos_show_lacp_interfaces #713

Conversation

ichisuke55
Copy link
Contributor

ISSUE TYPE
  • New Template Pull Request
COMPONENT
  • juniper_junos_show_lacp_interfaces
SUMMARY

This template can parse show lacp interfaces on juniper devices.

Start
^Aggre -> Continue.Record
^Aggregated\sinterface:\s${AGGREGATED_INTERFACE}(\s|$$) -> Continue
^\s+${MEMBER_INTERFACE}\s+${RECEIVE_STATE}\s+${TRANSMIT_STATE}\s+${MUX_STATE}(\s|$$) -> Continue
Copy link
Contributor

Choose a reason for hiding this comment

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

Do you mind restructuring this template a bit?

I think it may be good to act off the headers within the output for both the LACP state and LACP protocol.

Something like:

Value Required,Filldown AGGREGATED_INTERFACE (\S+)
Value List MEMBER_INTERFACE (\S+)
Value List RECEIVE_STATE (\S+\s?\w+)
Value List TRANSMIT_STATE (\S+\s?periodic)
Value List MUX_STATE (\S+\s?\S*)

Start
  ^Aggregated -> Continue.Record
  ^Aggregated\sinterface:\s${AGGREGATED_INTERFACE}(\s|$$) -> Continue
  ^LACP\s+state
  ^\s+\S+
  ^LACP\s+protocol -> LACP_PROTO
  ^\s*$$
  ^. -> Error

LACP_PROTO
  ^\s+${MEMBER_INTERFACE}\s+${RECEIVE_STATE}\s+${TRANSMIT_STATE}\s+${MUX_STATE}(\s|$$) -> Continue
  ^Aggregated -> Start
  ^\s*$$
  ^. -> Error

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hi, @FragmentedPacket

Thank you for the good suggestions.
I added LACP protocol header in the template.

Start
  ^Aggregated -> Continue.Record
  ^Aggregated\sinterface:\s${AGGREGATED_INTERFACE}(\s|$$) -> Continue
  ^\s+LACP\s+state: -> Continue
  ^\s+LACP\sprotocol: -> LACP_PROTO
  ^\s*$$
  ^{master:\d+}

LACP_PROTO
  ^\s+${MEMBER_INTERFACE}\s+${RECEIVE_STATE}\s+${TRANSMIT_STATE}\s+${MUX_STATE}(\s|$$) -> Continue
  ^\s*$$
  ^Aggregated -> Continue.Record
  ^Aggregated\sinterface:\s${AGGREGATED_INTERFACE}(\s|$$) -> Start

@FragmentedPacket FragmentedPacket added the changes_requested Waiting on user to address feedback label May 21, 2020
@FragmentedPacket FragmentedPacket merged commit 1c7e96d into networktocode:master May 24, 2020
thomasblass pushed a commit to thomasblass/ntc-templates that referenced this pull request Oct 25, 2020
guillaume-mbali pushed a commit to unyc-io/ntc-templates that referenced this pull request Apr 12, 2023
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.

2 participants