Unable to assign existing IP address to VM interface #4052

Closed
opened 2025-12-29 18:32:51 +01:00 by adam · 4 comments
Owner

Originally created by @abrahamvegh on GitHub (Sep 1, 2020).

Originally assigned to: @jeremystretch on GitHub.

Environment

  • Python version: 3.7.3
  • NetBox version: 2.9.2

Steps to Reproduce

  1. Create a VM with an interface
  2. Click the ‘+’ button on the interface to add an IP address
  3. Click the ‘Assign IP’ tab

Expected Behavior

The ‘Select IP Address’ form appears and functions correctly, as it does for non-VM interfaces.

Observed Behavior

The page redirects to /ipam/ip-addresses/add/, with no query parameters.

Notes

This is the same issue as #5041, but as it seems I cannot re-open that issue, here’s a new one. 😅

Originally created by @abrahamvegh on GitHub (Sep 1, 2020). Originally assigned to: @jeremystretch on GitHub. ### Environment * Python version: 3.7.3 * NetBox version: 2.9.2 ### Steps to Reproduce 1. Create a VM with an interface 2. Click the ‘+’ button on the interface to add an IP address 3. Click the ‘Assign IP’ tab ### Expected Behavior The ‘Select IP Address’ form appears and functions correctly, as it does for non-VM interfaces. ### Observed Behavior The page redirects to `/ipam/ip-addresses/add/`, with no query parameters. ### Notes This is the same issue as #5041, but as it seems I cannot re-open that issue, here’s a new one. 😅
adam added the type: bugstatus: accepted labels 2025-12-29 18:32:51 +01:00
adam closed this issue 2025-12-29 18:32:51 +01:00
Author
Owner

@bartdebruijn commented on GitHub (Sep 1, 2020):

This also applies to regular devices, e.g. /ipam/ip-addresses/ doesn't seem to retrieve information.
You can add an IP to an interface on a device, but it won't show up here.

@bartdebruijn commented on GitHub (Sep 1, 2020): This also applies to regular devices, e.g. /ipam/ip-addresses/ doesn't seem to retrieve information. You can add an IP to an interface on a device, but it won't show up here.
Author
Owner

@bartdebruijn commented on GitHub (Sep 1, 2020):

Specifically, the "assigned*" fields from /api/ipam/ip-addresses/ are not displayed on screen:

  "assigned_object_type": "dcim.interface",
  "assigned_object_id": 1,
  "assigned_object": {
    "id": 1,
    "url": "http://127.0.0.1:8000/api/dcim/interfaces/1/",
    "device": {
      "id": 1,
      "url": "http://127.0.0.1:8000/api/dcim/devices/1/",
      "name": "switch1",
      "display_name": "switch1"
    },
    "name": "Vlan99",
Screenshot 2020-09-01 at 16 00 56
@bartdebruijn commented on GitHub (Sep 1, 2020): Specifically, the "assigned*" fields from /api/ipam/ip-addresses/ are not displayed on screen: "assigned_object_type": "dcim.interface", "assigned_object_id": 1, "assigned_object": { "id": 1, "url": "http://127.0.0.1:8000/api/dcim/interfaces/1/", "device": { "id": 1, "url": "http://127.0.0.1:8000/api/dcim/devices/1/", "name": "switch1", "display_name": "switch1" }, "name": "Vlan99", <img width="931" alt="Screenshot 2020-09-01 at 16 00 56" src="https://user-images.githubusercontent.com/340639/91860771-5ed71b00-ec6c-11ea-8e9e-ad7c7b982f32.png">
Author
Owner

@abrahamvegh commented on GitHub (Sep 1, 2020):

@bartdebruijn Something seems to be very wrong here. I went looking at what you’re talking about (the maintainers will probably require you to open a separate issue for that), but I then bumped into #5085 — core functionality seems to be broken.

@abrahamvegh commented on GitHub (Sep 1, 2020): @bartdebruijn Something seems to be very wrong here. I went looking at what you’re talking about (the maintainers will probably require you to open a separate issue for that), but I then bumped into #5085 — core functionality seems to be broken.
Author
Owner

@jeremystretch commented on GitHub (Sep 1, 2020):

#5085 is unrelated to this issue.

The root problem stems from having to handle both interface and vmitnerface query parameters, as there are now two separate models for device and VM interfaces. However, given the limited and redundant functionality of the assignment view, it may be more prudent to simply remove it entirely: IP address assignment is arguably done more directly via the normal IP address edit view, as opposed to following a separate obscure workflow.

@jeremystretch commented on GitHub (Sep 1, 2020): #5085 is unrelated to this issue. The root problem stems from having to handle both `interface` and `vmitnerface` query parameters, as there are now two separate models for device and VM interfaces. However, given the limited and redundant functionality of the assignment view, it may be more prudent to simply remove it entirely: IP address assignment is arguably done more directly via the normal IP address edit view, as opposed to following a separate obscure workflow.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#4052