Bad link from VM to interface #1964

Closed
opened 2025-12-29 17:20:58 +01:00 by adam · 2 comments
Owner

Originally created by @candlerb on GitHub (Aug 22, 2018).

Environment

  • Python version: 3.5.2
  • NetBox version: 2.4.3

Steps to Reproduce

  • Open a VM
  • Click the interface name e.g. "eth0". This takes you to /dcim/interfaces/NN/
  • Click "Edit this interface"

Expected Behavior

Be able to edit interface

Observed Behavior

The link takes you to /dcim/interfaces/NN/edit/ which raises the following exception:

<class 'AttributeError'>

'NoneType' object has no attribute 'get_vc_master'

Note, however, that it works if you go directly to the VM interface edit page by clicking the pencil icon next to the interface. This takes you instead to /virtualization/vm-interfaces/NN/edit/?return_url=/virtualization/virtual-machines/MM/

Analysis

I think there are two problems here.

  1. In the VM listing of interfaces, clicking on the interface name should take you to /virtualization/vm-interfaces/NN/ instead of /dcim/interfaces/NN/
  2. That page hasn't been created yet (gives 404), although the version with /edit/ appended does.

Alternatively, /dcim/interfaces/NN/ needs to generate different links depending on whether the interface in question is a device interface or a VM interface.

Originally created by @candlerb on GitHub (Aug 22, 2018). ### Environment * Python version: 3.5.2 * NetBox version: 2.4.3 ### Steps to Reproduce * Open a VM * Click the interface *name* e.g. "eth0". This takes you to `/dcim/interfaces/NN/` * Click "Edit this interface" ### Expected Behavior Be able to edit interface ### Observed Behavior The link takes you to `/dcim/interfaces/NN/edit/` which raises the following exception: ``` <class 'AttributeError'> 'NoneType' object has no attribute 'get_vc_master' ``` Note, however, that it works if you go directly to the VM interface edit page by clicking the pencil icon next to the interface. This takes you instead to `/virtualization/vm-interfaces/NN/edit/?return_url=/virtualization/virtual-machines/MM/` ### Analysis I think there are two problems here. 1. In the VM listing of interfaces, clicking on the interface name should take you to `/virtualization/vm-interfaces/NN/` instead of `/dcim/interfaces/NN/` 2. That page hasn't been created yet (gives 404), although the version with `/edit/` appended does. Alternatively, `/dcim/interfaces/NN/` needs to generate different links depending on whether the interface in question is a device interface or a VM interface.
adam closed this issue 2025-12-29 17:20:58 +01:00
Author
Owner

@vzaletny commented on GitHub (Aug 22, 2018):

I have got the same issue - https://github.com/digitalocean/netbox/issues/2378

@vzaletny commented on GitHub (Aug 22, 2018): I have got the same issue - https://github.com/digitalocean/netbox/issues/2378
Author
Owner

@candlerb commented on GitHub (Aug 22, 2018):

Duplicate of #2378

@candlerb commented on GitHub (Aug 22, 2018): Duplicate of #2378
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#1964