Repository navigation
feat(check_redfish): add option to skip OS reported IP addresses - #583
Merged
semx merged 1 commit intoOct 8, 2026
Merged
Conversation
Some BMCs (i.e. HPE iLO with AMS) report the IP addresses of the operating system on the physical NICs. If the same server is also synced by another source (i.e. as an ESXi host by the VMware source), both sources move these IPs back and forth between the VMkernel interface and the physical NIC on every run, and the primary IP of the device gets unset each time. The new option 'skip_os_reported_ips' (default: False) syncs only the IP addresses of the BMC ports. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
semx
reviewed
Oct 8, 2026
semx
left a comment
Collaborator
There was a problem hiding this comment.
Reproduced #582 on a NetBox 4.7.2 with vcsim and a check_redfish inventory that reports the vmk0 address on a physical NIC port of the same host: with the option off the one IP object moves between vmk0 and the NIC on every run; with it on, the VMware source moves it back to vmk0 once and the next two runs change nothing, primary_ip4 stays. The suite is green with this merged onto development, and settings-example.ini regenerated there is identical to yours.
Three things, none blocks:
- The PR targets
main, which only receives releases. I'll switch the base todevelopment; the diff stays the same. - "i.e." in the option description should be "e.g.", iLO with AMS is one example.
- The part that makes this converge is
keep_undiscovered_ips=Trueon the check_redfish call: the source does not remove IPs it no longer reports, the other source moves them. The new tests start from interfaces without IPs, so flipping that flag toFalsestill passes them. A case that seeds the NIC with an IP, enables the option and asserts the IP is neither moved nor unassigned would pin it. And a sentence in the option description that OS IPs synced by earlier runs stay where they are until another source moves them would save the next person a question.
Whether it ships in 1.9.1 or waits for the next minor is @bb-Ricardo's call: it is a new option rather than a fix. I'll merge into development once CI has run.
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Adds the check_redfish option
skip_os_reported_ips(defaultFalse, so existing setups behave as before). When it's enabled, only the IP addresses of BMC ports are synced. The IPs that a BMC such as HPE iLO with AMS reports for the server's own NICs are skipped.This stops the check_redfish source and the VMware source from moving an ESXi host's IPs between the VMkernel interface and the physical NIC on every run, which also unset the device's primary IP each time.
Changes:
module/sources/check_redfish/config.py: the new optionmodule/sources/check_redfish/import_inventory.py: skip the IPs of non-BMC ports when the option is enabledsettings-example.ini: regenerated with-g; the only change is the new optiontests/test_check_redfish_interface_ips.py: one test with the option off (all IPs synced) and one with it on (only BMC IPs synced)Tested against NetBox 4.7.2 with 59 HPE/Lenovo inventory files and a vCenter 8.0.3 source: the host IPs stay on
vmk0and the primary IP is kept.pytest: 217 passed, 42 skipped (vcsim not installed).Fixes #582
🤖 Generated with Claude Code