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 support for broadcom_icos as a new OS and added show_version command #733

Merged
merged 2 commits into from
Jun 1, 2020

Conversation

alepodj
Copy link
Contributor

@alepodj alepodj commented May 29, 2020

Added support for broadcom_icos as a new OS and added show_version command

ISSUE TYPE
  • New Template Pull Request
COMPONENT
template --> broadcom_icos_show_version.textfsm
os --> broadcom_icos
cmd --> show version
SUMMARY

As discussed in #726 support for Broadcom Icos devices is not present current in ntc_templates. This is the first attemp at adding the os all together as well as the 1st command: show version.

Even tho the following models share the same OS(icos), is expected, much like anywhere else, that each hardware model may display different values based on the model the command is ran on. For that i included 5 different outputs from 5 different hardware models in order to be as inclusive with the captures as possible. The models available to me are below and the all run ICOS in a version or another, as described in the show version command itself:

1- Accton AS4610-54P
2- Data Center Switch Software AS5610-52X(technically Accton AS5610-52X)
3- Quanta LY2R
4- Quanta LB9
5- DNI-3448P

Potentially i may also be able to get a Quanta LB8 to be even more inclusive

@alepodj alepodj changed the title Added support for broadcom_icos as a new OS and added show_version command New Template support for broadcom_icos as a new OS and added show_version command May 29, 2020
# Accton AS4610-54P, Accton AS5610-52X, Quanta LY2R, Quanta LB9, DNI AG3448P-R
# The following can be an empty value as it doesnt exist in all the models:
# FruNumber, PartNumber, CPLDversion, BoardRevision
^\s*$$
Copy link
Contributor

Choose a reason for hiding this comment

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

You can remove one of these \s*$$

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed 1st: ^\s*$$

^\s*Board\s*Revision\s*\.+\s*${Board_Revision}$$
^\S \S\S -> Continue.Record
^\s*Additional\s*Packages\s*\.+\s*${Additional_Packages}$$
^\s*${Additional_Packages}$$
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you add a ^. -> Error to the end of this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added ^. -> Error

^\s*Board\s*Revision\s*\.+\s*${Board_Revision}$$
^\S \S\S -> Continue.Record
^\s*Additional\s*Packages\s*\.+\s*${Additional_Packages}$$
^\s*${Additional_Packages}$$
Copy link
Contributor

Choose a reason for hiding this comment

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

Just to be safe, I would do this:

Suggested change
^\s*${Additional_Packages}$$
^\s+${Additional_Packages}$$

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Replaced as suggested

@@ -0,0 +1,41 @@
Value System_Description (.+)
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you please make all the values upper-case?

Value SYSTEM_DESCRIPTION (.+)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Corrected all named values to upper-case

Value System_Description (.+)
Value Machine_Type (.+)
Value Machine_Model (.+)
Value Serial_Number (.+)
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you also look at other show_version from other platforms and make sure you're using the same named values as those? This helps bring our templates more vendor agnostic in the way they return the data. Users can act on the same keys for other platforms.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Went thru several show versions and took a hint on regularly used named values. A recent Ubiquity pull showed very similar patterns so used as a guide, mainly: https://github.com/networktocode/ntc-templates/tree/master/tests/ubiquiti_edgeswitch/show_version but also other common names were replaced. No references were found for the rest so, left as is or shortened if the name made sense still.

^\s*Network\s*Processing\s*Device\s*\.+\s*${Network_Processing_Device}$$
^\s*CPLD\s*version\s*\.+\s*${CPLD_version}$$
^\s*Board\s*Revision\s*\.+\s*${Board_Revision}$$
^\S \S\S -> Continue.Record
Copy link
Contributor

Choose a reason for hiding this comment

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

  ^\S \S\S -> Continue.Record

What does this line account for?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

A misunderstanding and its now removed

Copy link
Contributor

@FragmentedPacket FragmentedPacket left a comment

Choose a reason for hiding this comment

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

Left some comments

@FragmentedPacket FragmentedPacket added changes_requested Waiting on user to address feedback New Template labels Jun 1, 2020
@alepodj
Copy link
Contributor Author

alepodj commented Jun 1, 2020

Corrected and modified as requested and committed the new changes 4832da5

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 New Template
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants