Skip to content

Conversation

@bennnnnnnn
Copy link
Contributor

Add the show lag port command for Alcatel SROS

Comment on lines 18 to 19
^-----------
^===========
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
^-----------
^===========
^-+
^=+

Reduce characters in the horizontal separator lines by using regex with a plus sign

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed!

Comment on lines 11 to 12
Start
^----------- -> LagPort
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
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.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Copy link
Contributor Author

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 👍

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
Copy link
Collaborator

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.)

Copy link
Contributor Author

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
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
^. -> Error
^. -> Error

Comment on lines 3 to 5
Value ADM (up|down)
Value ACT_STD (active|standby)
Value OPR (up|down)
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
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+)
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
Value PRIO (\d+)
Value PRIORITY (\d+)

Comment on lines 22 to 23
^${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
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
^${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

Comment on lines 3 to 11
- act_std: "active"
adm: "up"
forced: "-"
lag_id: "5(d)"
opr: "down"
port_id: "1/1/15"
primary: "yes"
prio: "32768"
sub_group: "1"
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
- 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"

@jmcgill298 jmcgill298 merged commit ce06768 into networktocode:master Nov 18, 2024
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants