Skip to content
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

Pushing ip-address linked to an interface created inside the branch doesn't work via REST API #174

Open
LucaNicosia opened this issue Nov 13, 2024 · 0 comments
Labels
type: bug A confirmed report of unexpected behavior in the application

Comments

@LucaNicosia
Copy link

LucaNicosia commented Nov 13, 2024

Plugin Version

0.5.2

NetBox Version

4.1.6

Python Version

3.10.2

Steps to Reproduce

  1. Create a branch
  2. Switch to the branch
  3. Follow all the steps to create an interface (create site, manufacturer, devtype, device, interface)
  4. Run a POST to <netbox-url>/api/ipam/ip-addresses/ with the following body
[
    {
        "assigned_object_id": <interface-id>,
        "assigned_object_type": "dcim.interface",
        "address": "<ip-address>",
        "site": <site-id>
    }
]

and the following header

{
    "Authorization": "Token <api-token>",
    "X-NetBox-Branch": "<branch-schema-id>"
}

Expected Behavior

Create the ip-address inside the branch

Observed Behavior

The API request returns the following error static that it couldn't find the interface

{
    "error": "Interface matching query does not exist.",
    "exception": "DoesNotExist",
    "netbox_version": "4.1.6",
    "python_version": "3.10.12"
}

Doing a GET of <netbox-url>/api/dcim/interfaces/<interface-id> with the X-NetBox-Branch set properly, I can see the interface correctly.

I've also tried the following:

  • If I open the GUI and follow the same steps, the ip-address is created properly.
  • If I try to link the ip-address to an interface present in the Main branch, the POST I reported above works correctly and the ip-address is created.
@LucaNicosia LucaNicosia added the type: bug A confirmed report of unexpected behavior in the application label Nov 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug A confirmed report of unexpected behavior in the application
Projects
None yet
Development

No branches or pull requests

1 participant