-
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 support for broadcom_icos as a new OS and added show_version command #733
Conversation
…n, updated index file, added raw and ymls
# 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*$$ |
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.
You can remove one of these \s*$$
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.
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}$$ |
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.
Can you add a ^. -> Error
to the end of this?
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.
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}$$ |
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.
Just to be safe, I would do this:
^\s*${Additional_Packages}$$ | |
^\s+${Additional_Packages}$$ |
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.
Replaced as suggested
@@ -0,0 +1,41 @@ | |||
Value System_Description (.+) |
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.
Can you please make all the values upper-case?
Value SYSTEM_DESCRIPTION (.+)
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.
Corrected all named values to upper-case
Value System_Description (.+) | ||
Value Machine_Type (.+) | ||
Value Machine_Model (.+) | ||
Value Serial_Number (.+) |
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.
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.
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.
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 |
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.
^\S \S\S -> Continue.Record
What does this line account for?
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.
A misunderstanding and its now removed
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.
Left some comments
Corrected and modified as requested and committed the new changes 4832da5 |
Added support for broadcom_icos as a new OS and added show_version command
ISSUE TYPE
COMPONENT
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: