-
Notifications
You must be signed in to change notification settings - Fork 721
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
New Template: juniper_junos_show_lacp_interfaces #713
Conversation
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 |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
ISSUE TYPE
COMPONENT
SUMMARY
This template can parse show lacp interfaces on juniper devices.