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

Fixes #790 - new template cisco_nxos_show_environment.textfsm #838

Merged
merged 31 commits into from
Dec 28, 2020

Conversation

diepes
Copy link
Contributor

@diepes diepes commented Dec 5, 2020

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT

cisco_nxos
cisco_nxos_show_environments.textfsm (Current broken)
cisco_nxos_show_environment.textfsm (New)

SUMMARY

Fixes #790
Current template "cisco_nxos_show_environments.textfsm" not fixable, notice extra "s" and it tries to extract two tables, Power and Fan from output.
Create new template "cisco_nxos_show_environment.textfsm" that handle old .raw and new #790 output, but only extracts the power table.

Will request from user output of more specific commands to be added as additional templates.
e.g. show environment fan

See: tests/cisco_nxos/show_environments/cisco_nxos_show_environments.yml
vs: tests/cisco_nxos/show_environment/cisco_nxos_show_environment.yml
Same .raw parsed.


Pieter E Smit and others added 18 commits October 9, 2020 00:38
scrape SERIAL form show ver, end on -> Error, match all junk in between.
remove extra space at end of capabilities match
add match for vrf <> to be parsed by same template
add test case for new index match + vrf all
revert IOS XE match but leave SERIAL
revert more of the unneccesary changes leaving only uptime.
add missing newline at end of file
accept review suggestion, match multiple spaces not just one.

Co-authored-by: Jacob McGill <9847006+jmcgill298@users.noreply.github.com>
match multiple spaces not just one.

Co-authored-by: Jacob McGill <9847006+jmcgill298@users.noreply.github.com>
templates/index Show resolved Hide resolved
templates/cisco_nxos_show_environment.textfsm Outdated Show resolved Hide resolved
templates/cisco_nxos_show_environment.textfsm Outdated Show resolved Hide resolved
@FragmentedPacket FragmentedPacket added the changes_requested Waiting on user to address feedback label Dec 6, 2020
diepes and others added 3 commits December 6, 2020 15:28
Co-authored-by: Mikhail Yohman <mikhail.yohman@gmail.com>
…m to parse new test - still broken mashing two tables.
4tables into one long list, its a mess.
templates/index Outdated Show resolved Hide resolved
templates/cisco_nxos_show_environment.textfsm Outdated Show resolved Hide resolved
templates/cisco_nxos_show_environment.textfsm Show resolved Hide resolved
templates/cisco_nxos_show_environment.textfsm Show resolved Hide resolved
Copy link
Contributor Author

@diepes diepes left a comment

Choose a reason for hiding this comment

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

The only change in the original output now is the addition of Value.
power_supply_input: ""
That is matched in new test template.

This template is still fundamentally broken in mashing together 3 different tables into one. (Power supply's, Fans's, Temperatures)

templates/cisco_nxos_show_environment.textfsm Show resolved Hide resolved
@FragmentedPacket
Copy link
Contributor

@diepes It appears the second .raw is not capturing correctly and needs some more template modification. If you look at it, it is not capturing the input and then capturing the wrong values for the others after.

make Power supply capture more specific to differentiate between two samples
Exclude value captured as unknown fan.
@diepes
Copy link
Contributor Author

diepes commented Dec 19, 2020

@diepes It appears the second .raw is not capturing correctly and needs some more template modification. If you look at it, it is not capturing the input and then capturing the wrong values for the others after.

tests/cisco_nxos/show_environment/cisco_nxos_show_environment2.yml
Made 1st capture for Power supply values more specific adding line end to prevent it matching values in second 2.raw file.
Also unknown FAN being captured, fixed.

@diepes diepes closed this Dec 19, 2020
@FragmentedPacket
Copy link
Contributor

Did you mean to close this? I'll try and review later tonight if you re-open it.

Thanks again for all your work into these templates.

@diepes
Copy link
Contributor Author

diepes commented Dec 20, 2020

no sorry, i thought it was close the reply/request

@diepes diepes reopened this Dec 20, 2020
@FragmentedPacket FragmentedPacket merged commit a8389f5 into networktocode:master Dec 28, 2020
mjbear added a commit to mjbear/ntc-templates that referenced this pull request Jan 13, 2021
New Template - cisco_nxos_show_environment.textfsm  (networktocode#838)
mjbear added a commit to mjbear/ntc-templates that referenced this pull request Jan 13, 2021
mjbear added a commit to mjbear/ntc-templates that referenced this pull request Jan 13, 2021
Revert "New Template - cisco_nxos_show_environment.textfsm  (networktocode#838)"
jvanderaa pushed a commit that referenced this pull request Nov 10, 2021
Removed `cisco_nxos_show_environments.textfsm` as it's not a valid command.
guillaume-mbali pushed a commit to unyc-io/ntc-templates that referenced this pull request Apr 12, 2023
Removed `cisco_nxos_show_environments.textfsm` as it's not a valid command.
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

cisco_nxos_show_environment return an empty list
2 participants