Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
b080e44
stops ip addresses assigned to FHRP groups from being reassigned
Noah418 Aug 25, 2025
049655a
worded the log better
Noah418 Aug 25, 2025
5f16691
added skipping_fhrp_group_ips config option to enable or disable fhrp…
Noah418 Aug 25, 2025
960680c
limited skipping_fhrp_group_ips to vmware since I can't test redfish …
Noah418 Aug 25, 2025
dae2911
tweaked comment
Noah418 Aug 25, 2025
21db416
Merge branch 'bb-Ricardo:main' into 445-sync-overwriting-FHRP-Group-a…
Noah418 Aug 25, 2025
b61a34b
limited skip_fhrp_group_ips to vmware since I can't test redfish pres…
Noah418 Aug 25, 2025
b853384
Merge remote-tracking branch 'origin/445-sync-overwriting-FHRP-Group-…
Noah418 Aug 26, 2025
7e0fde9
modified: module/sources/vmware/connection.py
Noah418 Aug 26, 2025
ee80b80
modified: module/sources/vmware/connection.py
Noah418 Aug 26, 2025
0be0669
changed the NBIPAddress data model entry 'assigned_object_type' to ha…
Noah418 Aug 26, 2025
2e3fb45
modified: module/netbox/object_classes.py
Noah418 Aug 26, 2025
6ffa661
modified: module/netbox/object_classes.py
Noah418 Aug 27, 2025
3a22fc2
Undid part of a previous commit, to undo a mistake
Noah418 Aug 28, 2025
3d9a189
Added a dev document for explaining how the code works for the benefi…
Noah418 Aug 28, 2025
3f5af8c
Added/changed where the fhrp group ip address updating prevention occ…
Noah418 Aug 28, 2025
a7acdac
removed the dev doc since it's not related to this bug
Noah418 Aug 28, 2025
11ed756
Removed the last of the unnecessary things (hopefully)
Noah418 Aug 28, 2025
bd3d882
one last tiny thing
Noah418 Aug 28, 2025
409642d
cleanup unnecessary code
Noah418 Aug 29, 2025
1e865b7
removed the readme note not in the dev branch
Noah418 Aug 29, 2025
c04587c
Merge pull request #6 from sol1/445-sync-overwriting-FHRP-Group-assig…
afoster Sep 1, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions module/sources/check_redfish/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,12 @@ def __init__(self):
via check_redfish if False only data which is not preset in NetBox will be added""",
default_value=False),

ConfigOption("skip_fhrp_group_ips",
bool,
description="""define if an IP address assigned to a FHRP group (like HSRP, VRRP, GLBP) will be skipped.
If True this IP address will be skipped and not synced to NetBox to prevent incorrect syncing.""",
default_value=False),

ConfigOption(**config_option_ip_tenant_inheritance_order_definition),
]

Expand Down
6 changes: 6 additions & 0 deletions module/sources/common/source_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -443,6 +443,12 @@ def add_update_interface(self, interface_object, device_object, interface_data,
this_ip_object = None
skip_this_ip = False
for ip in self.inventory.get_all_items(NBIPAddress):
# stops fhrp group assigned ip addresses from being overridden and assigned to another object type
# if the config skip_fhrp_group_ips is set to True
if grab(ip, "data.assigned_object_type", fallback="") == "ipam.fhrpgroup" and self.settings.skip_fhrp_group_ips:
log.info(f"Ip address {grab(ip, "data.address")} is assigned to an FHRP Group and skip_fhrp_group_ips is set to {self.settings.skip_fhrp_group_ips}, skipping.")
skip_this_ip = True
continue

# check if address matches (without prefix length)
ip_address_string = grab(ip, "data.address", fallback="")
Expand Down
5 changes: 5 additions & 0 deletions module/sources/vmware/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,11 @@ def __init__(self):
description="""If the VMware Site Recovery Manager is used to can skip syncing
placeholder/replicated VMs from fail-over site to NetBox.""",
default_value=False),
ConfigOption("skip_fhrp_group_ips",
bool,
description="""If an IP address is assigned to a FHRP group (like HSRP, VRRP, GLBP)
then this IP address will be skipped and not synced to NetBox to prevent incorrect syncing.""",
default_value=False),
ConfigOption("strip_host_domain_name",
bool,
description="strip domain part from host name before syncing device to NetBox",
Expand Down