This repository has been archived by the owner on Jul 22, 2024. It is now read-only.
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.
Purpose
We noticed an issue with switch module inventory collection. The issue was that each new set of modules over rode the primary key value of the previous set. Effectively only inserting 1 set of module data into CSM database. This pull request resolves that issue. (to the best of my knowledge. I did some minor testing. It seems to be working as expected on my machine.)
Approach
In this pull request I added a
rolling_total_module_counter
which keeps track of how many modules came before. This is used to offset the index when grabbing the module data. I used a rolling counter because there may not be the same number of modules on each switch. We can't offset by the same number for each switch.Future approach: This current approach should be removed when we re-work this process to read in the pure json and build a key-value tree.
Origin
How to Test
This issue request should cover how to test this new pull request. Eventually we need to add it into some sort of regression bucket. I'm working with @pdlun92 on how to do regression testing for big data. As I gain more knowledge, I'll eventually create a test case for this.
#686
Reviewers