-
Notifications
You must be signed in to change notification settings - Fork 556
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
Initial version for nxos_ssh get_optics #1215
Initial version for nxos_ssh get_optics #1215
Conversation
Implements nxos_ssh get_optics function * | json does not work, we have to parse the Terminal * Extracts current / input / ouput metrics * Also retrieves Gib data * Maps Gbic type to Generic YANG types (Reference the Gbics We own so far)
Hello Vendor Type is pretty useful but I do not know where to place it in the Json file (See |
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.
I think this looks good on the surface, we'll ask you to provide some test data as well.
@ktbyers what was the approach for the nxos/nxos-ssh, do we want feature parity between them, or we look at them as separate drivers?
napalm/nxos_ssh/nxos_ssh.py
Outdated
|
||
port_detail["state"] = state | ||
optics_detail[port] = port_detail | ||
# print(port_detail) |
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 remove this line please?
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.
Spurious print statements have been removed with the last commit.
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.
Updated with a sample test
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.
LGTM. Will defer to @ktbyers if he has any comments or suggestions.
if "transceiver is not present" in port_ts: | ||
continue | ||
if "transceiver is not applicable" in port_ts: |
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 a personal curiosity... what does "transceiver is not applicable" mean in this context? 🤔
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.
@mirceaulinic the not applicable state applies to the ports related to the HP C7000 Enclosure B22 switches.
@mirceaulinic & @ktbyers: A welcome addition would be to have the cisco type of Gbic set in the Json / Dict. Sample are 1000base-LH, 1000base-SX, 10Gbase-LR ...
|
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.
LGTM. As always, thanks again for your contribution @ExaneNetworkTeam.
I don't suppose you have access to any Nexus switches to implement the counter-part API-based get_optics
(in the "main" nxos
driver)?
Implements nxos_ssh get_optics function