Skip to content

netbox_ip_address: support for FHRP group assignment #1429

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: devel
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
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
5 changes: 5 additions & 0 deletions plugins/module_utils/netbox_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -1076,6 +1076,11 @@ def _build_query_params(
query_dict.update(
{"interface_id": module_data.get("assigned_object_id")}
)
elif module_data["assigned_object_type"] == "ipam.fhrpgroup":
query_dict.update(
{"???": module_data.get("assigned_object_id")}
Copy link
Contributor

@sc68cal sc68cal Jun 19, 2025

Choose a reason for hiding this comment

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

I'm just guessing here but it might be group_id or group. It's hard to tell, looking at https://github.com/netbox-community/netbox/blob/c660f1c019ddb46713f830c360dd5804784c73df/netbox/ipam/api/serializers_/fhrpgroups.py#L5.

Virtual Chassis uses master which is defined here - https://github.com/netbox-community/netbox/blob/main/netbox/dcim/api/serializers_/virtualchassis.py#L12 so that's the pattern I'm using to guess.

)


elif parent == "virtual_chassis":
query_dict.update({"master": self.module.params["data"].get("master")})
Expand Down
1 change: 1 addition & 0 deletions plugins/modules/netbox_ip_address.py
Original file line number Diff line number Diff line change
Expand Up @@ -340,6 +340,7 @@ def main():
name=dict(required=False, type="str"),
device=dict(required=False, type="str"),
virtual_machine=dict(required=False, type="str"),
fhrp_group=dict(required=False, type="str"),
),
),
comments=dict(required=False, type="str"),
Expand Down
Loading