Juniper Hardware Inventory Fix (issue 1865) #2466

Merged
merged 3 commits into from Nov 20, 2015

Projects

None yet

3 participants

@Tatermen
Contributor

Related to issue 1865, this should fix the issue of the hardware inventory being discovered multiple times.

@Tatermen Tatermen Issue 1865, Juniper hardware inventory fix
8b1dc95
@Tatermen Tatermen changed the title from Committer: Rick Hodger <rick@fuzzi.org.uk> to Juniper Hardware Inventory Fix (issue 1865) Nov 20, 2015
@laf
Member
laf commented Nov 20, 2015

Is it not just easier to leave most of the code as is and just remove the '.' (dots) from the juniper results? Changing the entPhysicalIndex means that existing graphs break for everyone rather than just those with juniper which would be more preferred.

@Tatermen
Contributor

There is already a specific exemption within the code for JunOS devices, so I placed the fix within that loop. It should only remove the dots for Juniper devices.

foreach ($entity_array as $entPhysicalIndex => $entry) {
    if ($device['os'] == 'junos') {
         ...
        $entPhysicalIndex = str_replace('.','',$entPhysicalIndex);
    }
@laf
Member
laf commented Nov 20, 2015

Ah yeah, sorry it was with you commenting out the junos check later I wrong assumed it was now doing it on all.

So just two things now then:

@Tatermen Tatermen Removed commented code.
8c4baaa
@Tatermen Tatermen I agree to the conditions of the Contributor Agreement contained in d…
…oc/General/Contributing.md.
22f8456
@Tatermen
Contributor

Sorry about the comments - force of habit. I think I've done the contributors thing correctly now?

@laf laf merged commit 69c4f8b into librenms:master Nov 20, 2015

2 checks passed

Auto-Deploy Build finished. No test results found.
Details
Scrutinizer No new issues
Details
@Tatermen Tatermen deleted the Tatermen:1865 branch Nov 20, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment