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

Parent interface not scoped to device on interface bulk import #6759

Closed
sleepinggenius2 opened this issue Jul 15, 2021 · 1 comment
Closed
Assignees
Labels
status: accepted This issue has been accepted for implementation type: bug A confirmed report of unexpected behavior in the application

Comments

@sleepinggenius2
Copy link
Contributor

NetBox version

v2.11.9

Python version

3.8

Steps to Reproduce

  1. Click on Devices > Interfaces > Import
  2. Enter the following into the CSV input:
device,name,type,parent
dev1,int1,10gbase-x-sfpp,
dev1,int1/1,virtual,int1
dev2,int1,10gbase-x-sfpp,
dev2,int1/1,virtual,int1
  1. Click Submit

Expected Behavior

The import should have completed successfully.

Observed Behavior

* Row 4 parent: "int1" is not a unique value for this field; multiple objects were found

The code only seems to scope the lag field to the device, but not the parent field.

@sleepinggenius2 sleepinggenius2 added the type: bug A confirmed report of unexpected behavior in the application label Jul 15, 2021
@jeremystretch
Copy link
Member

Looks like the __init__() method of dcim.forms.InterfaceCSVForm needs to be extended to limit the queryset of the parent field, as we do for lag. Should be a simple fix; ideal for a new contributor.

@jeremystretch jeremystretch added status: needs owner This issue is tentatively accepted pending a volunteer committed to its implementation status: accepted This issue has been accepted for implementation and removed status: needs owner This issue is tentatively accepted pending a volunteer committed to its implementation labels Jul 19, 2021
@jeremystretch jeremystretch self-assigned this Jul 23, 2021
candlerb pushed a commit to candlerb/netbox that referenced this issue Aug 4, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 22, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status: accepted This issue has been accepted for implementation type: bug A confirmed report of unexpected behavior in the application
Projects
None yet
Development

No branches or pull requests

2 participants