Skip to content

FHRP group ID is misrepresented on the group assignments API endpoint when brief mode is used #15133

@jeremystretch

Description

@jeremystretch

Deployment Type

NetBox Cloud

NetBox Version

v3.7.2

Python Version

3.11

Steps to Reproduce

  1. Create an FHRP group
  2. Assigned FHRP group to a device interface (details are unimportant)
  3. Query the /api/ipam/fhrp-group-assignments/ REST API endpoint
  4. Make a second query to the endpoint, this time using brief mode ?brief=true
  5. Compare the results, specifically the group field

Example results for reference:

Normal mode

{
    "id": 1,
    "url": "http://netbox:8000/api/ipam/fhrp-group-assignments/1/",
    "display": "GigabitEthernet1/0/3: foobar123 VRRPv3: 10 (1)",
    "group": {
        "id": 1,
        "url": "http://netbox:8000/api/ipam/fhrp-groups/1/",
        "display": "foobar123 VRRPv3: 10",
        "protocol": "vrrp3",
        "group_id": 10
    },
    "interface_type": "dcim.interface",
    "interface_id": 172,
    "interface": {
        ...
    },
    "priority": 1,
    "created": "2024-02-13T13:55:10.906366Z",
    "last_updated": "2024-02-13T13:55:10.906373Z"
}

Brief mode

{
    "id": 1,
    "url": "http://netbox:8000/api/ipam/fhrp-group-assignments/1/",
    "display": "GigabitEthernet1/0/3: foobar123 VRRPv3: 10 (1)",
    "interface_type": 39,
    "interface_id": 172,
    "group_id": 1,
    "priority": 1
}

Expected Behavior

The group field should be present in and consistent between both responses.

Observed Behavior

The group field is omitted in the brief mode response, and a group_id field is included instead. Note that this is not the numeric group ID assigned by the user to the FHRP group, but rather the unique database ID for the group object.

Metadata

Metadata

Assignees

Labels

severity: mediumResults in substantial degraded or broken functionality for specfic workflowsstatus: acceptedThis issue has been accepted for implementationtype: bugA confirmed report of unexpected behavior in the application

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions