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

cisco_ios_show_environment_temperature.template, iOS, show environment temperature #540

Merged
merged 3 commits into from
Nov 12, 2019

Conversation

bobbytayar
Copy link
Contributor

@bobbytayar bobbytayar commented Nov 11, 2019

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT

cisco_ios_show_environment_temperature.template, iOS, show environment temperature

SUMMARY

Fixed requested changes in pull request #535 and tested against two stacked switches (9300-48UXM) provided in tests folder. Also tested locally at GSK on 9500-40X.

Fixes pull request 535
Fix 1: Changed tox back to 36
Fix 2: Added Error to each section as requested but this caused an error. Moved inlet temperature to the instance of "Inlet" and added error under each section.
Fix 3: Non-tabular fixed with Continue.Record
Fix 4: Added second switch to test file and tested changes to filter
Fix 5: \S+ used instead of \w
Fix 6: Removed Record from line 30 and just left start

Old
Start
^Switch\s+${SWITCH}:\s+SYSTEM\s+TEMPERATURE\s+is\s+${SWITCH_TEMPERATURE}\s*$$
^Inlet\s+Temperature\s+Value:\s+${INLET_TEMPERATURE_VALUE}\s+Degree\s+Celsius\s*$$ -> Inlet

Inlet
^Temperature\s+State:\s+${INLET_TEMPERATURE_STATE}\s*$$
^Yellow\s+Threshold\s+:\s+${INLET_YELLOW_THRESHOLD}\s+Degree\s+Celsius\s*$$
^Red\s+Threshold\s+:\s+${INLET_RED_THRESHOLD}\s+Degree\s+Celsius\s*$$ -> Hotspot

Hotspot
^Hotspot\s+Temperature\s+Value:\s+${HOTSPOT_TEMPERATURE_VALUE}\s+Degree\s+Celsius\s*$$
^Temperature\s+State:\s+${HOTSPOT_TEMPERATURE_STATE}\s*$$
^Yellow\s+Threshold\s+:\s+${HOTSPOT_YELLOW_THRESHOLD}\s+Degree\s+Celsius\s*$$
^Red\s+Threshold\s+:\s+${HOTSPOT_RED_THRESHOLD}\s+Degree\s+Celsius\s*$$ -> Record Start

New
Start
^Switch\s+\d -> Continue.Record
^Switch\s+${SWITCH}:\s+SYSTEM\s+TEMPERATURE\s+is\s+${SWITCH_TEMPERATURE}\s*$$ -> Inlet
^\s*$$
^. -> Error

Inlet
^Inlet\s+Temperature\s+Value:\s+${INLET_TEMPERATURE_VALUE}\s+Degree\s+Celsius\s*$$
^Temperature\s+State:\s+${INLET_TEMPERATURE_STATE}\s*$$
^Yellow\s+Threshold\s+:\s+${INLET_YELLOW_THRESHOLD}\s+Degree\s+Celsius\s*$$
^Red\s+Threshold\s+:\s+${INLET_RED_THRESHOLD}\s+Degree\s+Celsius\s*$$ -> Hotspot
^\s*$$
^. -> Error

Hotspot
^Hotspot\s+Temperature\s+Value:\s+${HOTSPOT_TEMPERATURE_VALUE}\s+Degree\s+Celsius\s*$$
^Temperature\s+State:\s+${HOTSPOT_TEMPERATURE_STATE}\s*$$
^Yellow\s+Threshold\s+:\s+${HOTSPOT_YELLOW_THRESHOLD}\s+Degree\s+Celsius\s*$$
^Red\s+Threshold\s+:\s+${HOTSPOT_RED_THRESHOLD}\s+Degree\s+Celsius\s*$$ -> Record Start
^\s*$$
^. -> Error


rlt28368 added 2 commits November 7, 2019 17:34
…36, 2. Added error checking but in order for it to work I moved inlet temp to Inlet, 3. Changed \w to \S, etc.
@bobbytayar
Copy link
Contributor Author

Added recommended changes. See comments for details.

@bobbytayar bobbytayar changed the title Updated Template with Requested Changes cisco_ios_show_environment_temperature.template, iOS, show environment temperature Nov 12, 2019
@FragmentedPacket FragmentedPacket merged commit 03f50fe into networktocode:master Nov 12, 2019
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.

2 participants