cisco_ios_show_environment_temperature.template, iOS, show environment temperature #540
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
ISSUE TYPE
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