-
Notifications
You must be signed in to change notification settings - Fork 782
Add sros show lag port #1897
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
Add sros show lag port #1897
Conversation
| ^----------- | ||
| ^=========== |
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.
| ^----------- | |
| ^=========== | |
| ^-+ | |
| ^=+ |
Reduce characters in the horizontal separator lines by using regex with a plus sign
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.
Fixed!
| Start | ||
| ^----------- -> LagPort |
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.
| Start | |
| ^----------- -> LagPort | |
| Start | |
| ^-+ -> LagPort | |
| ^=+ | |
| ^Lag\s+Port\s+States | |
| ^LACP\s+Status: | |
| ^Lag-id\s+ | |
| ^\s+Stdby\s* | |
| ^\s*$$ | |
| ^. -> Error |
I'd reduce the characters for the horizontal separators by using a regex with a plus sign.
Also add in the extra lines (before the state transition to LagPort) and Error rule for the Start state.
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.
Not looking to rag on you -- simply inform.
https://github.com/networktocode/ntc-templates/blob/master/docs/user/faq.md#why-is-there-a-requirement-to-use-error-in-every-template
https://github.com/networktocode/ntc-templates/blob/master/docs/dev/dev_parser.md#error-directive
Precedent template with Error in each state.
https://github.com/networktocode/ntc-templates/blob/master/ntc_templates/templates/alcatel_sros_show_router_mpls_interface.textfsm
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.
Thanks, was not aware! I've incorporated these changes 👍
ntc_templates/templates/index
Outdated
| alcatel_sros_show_service_id_base.textfsm, .*, alcatel_sros, sh[[ow]] serv[[ice]] id ba[[se]] | ||
| alcatel_sros_show_service_sdp.textfsm, .*, alcatel_sros, sh[[ow]] service sdp | ||
| alcatel_sros_show_system_cpu.textfsm, .*, alcatel_sros, sh[[ow]] system cpu | ||
| alcatel_sros_show_lag_port.textfsm, .*, alcatel_sros, sh[[ow]] lag (\d+ )?port |
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.
@bennnnnnnn
I don't have any Alcatel/Nokia SROS gear to poke at so I'm going to pose questions below.
After the show word, does lag always need spelled out fully? Or is there a shortcut of say la.
Similarly for port after the interface number, from the CLI is it possible to issue a shorter keyword?
(If yes port could be changed to accept abbreviations.)
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.
Tried it out on our gear, shorter syntax is indeed allowed, I've updated the index file!
| ^----------- | ||
| ^=========== | ||
| ^Total | ||
| ^. -> Error No newline at end of file |
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.
| ^. -> Error | |
| ^. -> Error | |
| Value ADM (up|down) | ||
| Value ACT_STD (active|standby) | ||
| Value OPR (up|down) |
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.
| Value ADM (up|down) | |
| Value ACT_STD (active|standby) | |
| Value OPR (up|down) | |
| Value ADMIN_STATUS (up|down) | |
| Value ACTIVE_STATUS (active|standby) | |
| Value OPERATIONAL_STATUS (up|down) |
| Value PRIMARY (yes|no) | ||
| Value SUB_GROUP (\d+) | ||
| Value FORCED (-) | ||
| Value PRIO (\d+) |
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.
| Value PRIO (\d+) | |
| Value PRIORITY (\d+) |
| ^${LAG_ID}\s+${PORT_ID}\s+${ADM}\s+${ACT_STD}\s+${OPR}\s+${PRIMARY}\s+${SUB_GROUP}\s+${FORCED}\s+${PRIO}(\s|$$) -> Record | ||
| ^\s+${PORT_ID}\s+${ADM}\s+${ACT_STD}\s+${OPR}\s+${SUB_GROUP}\s+${FORCED}\s+${PRIO}(\s|$$) -> Record |
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.
| ^${LAG_ID}\s+${PORT_ID}\s+${ADM}\s+${ACT_STD}\s+${OPR}\s+${PRIMARY}\s+${SUB_GROUP}\s+${FORCED}\s+${PRIO}(\s|$$) -> Record | |
| ^\s+${PORT_ID}\s+${ADM}\s+${ACT_STD}\s+${OPR}\s+${SUB_GROUP}\s+${FORCED}\s+${PRIO}(\s|$$) -> Record | |
| ^${LAG_ID}\s+${PORT_ID}\s+${ADMIN_STATUS}\s+${ACTIVE_STATUS}\s+${OPERATIONAL_STATUS}\s+${PRIMARY}\s+${SUB_GROUP}\s+${FORCED}\s+${PRIORITY}(\s|$$) -> Record | |
| ^\s+${PORT_ID}\s+${ADMIN_STATUS}\s+${ACTIVE_STATUS}\s+${OPR}\s+${SUB_GROUP}\s+${FORCED}\s+${PRIORITY}(\s|$$) -> Record |
| - act_std: "active" | ||
| adm: "up" | ||
| forced: "-" | ||
| lag_id: "5(d)" | ||
| opr: "down" | ||
| port_id: "1/1/15" | ||
| primary: "yes" | ||
| prio: "32768" | ||
| sub_group: "1" |
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.
| - act_std: "active" | |
| adm: "up" | |
| forced: "-" | |
| lag_id: "5(d)" | |
| opr: "down" | |
| port_id: "1/1/15" | |
| primary: "yes" | |
| prio: "32768" | |
| sub_group: "1" | |
| - active_status: "active" | |
| admin_status: "up" | |
| forced: "-" | |
| lag_id: "5(d)" | |
| operational_status: "down" | |
| port_id: "1/1/15" | |
| primary: "yes" | |
| priority: "32768" | |
| sub_group: "1" |
Add the show lag port command for Alcatel SROS