Skip to content
This repository has been archived by the owner on Jul 22, 2024. It is now read-only.

fix module issue? #687

Merged
merged 1 commit into from
May 20, 2019
Merged

fix module issue? #687

merged 1 commit into from
May 20, 2019

Conversation

NickyDaB
Copy link
Contributor

@NickyDaB NickyDaB commented May 16, 2019

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

Copy link
Contributor

@williammorrison2 williammorrison2 left a comment

Choose a reason for hiding this comment

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

Ran regression on P8 and it passes.

@NickyDaB NickyDaB merged commit 2c261c2 into IBM:master May 20, 2019
@NickyDaB NickyDaB deleted the overriding-module-fix branch June 7, 2019 15:25
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants