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

InterfaceForm does not filter VRFs by device #4709

Closed
grahamjohnston opened this issue Oct 25, 2023 · 0 comments · Fixed by #4758
Closed

InterfaceForm does not filter VRFs by device #4709

grahamjohnston opened this issue Oct 25, 2023 · 0 comments · Fixed by #4758
Assignees
Labels
type: bug Something isn't working as expected

Comments

@grahamjohnston
Copy link

Environment

  • Nautobot version (Docker tag too if applicable): 2.x
  • Python version: 3.9
  • Database platform, version: Postgres 13
  • Middleware(s): N/A

Steps to Reproduce

  1. Have some number of VRFs defined.
  2. Have a subnet of those VRFs applied to a device.
  3. Edit an existing interface and see the full list of VRFs, not just what is assigned to the device.

Expected Behavior

I should only see VRFs that are already assigned to the device. The expect behavior is present in InterfaceCreateForm.

Observed Behavior

I see every VRF in the system.

@grahamjohnston grahamjohnston added triage This issue is new and has not been reviewed. type: bug Something isn't working as expected labels Oct 25, 2023
@timizuoebideri1 timizuoebideri1 removed the triage This issue is new and has not been reviewed. label Oct 26, 2023
@glennmatthews glennmatthews self-assigned this Nov 6, 2023
glennmatthews added a commit that referenced this issue Nov 6, 2023
Fixes #4709.
Change a number of DCIM forms `ModelChoiceField` to `DynamicModelChoiceField`.
Make device-component edit forms include the device as a regular form field so that it can be used in query_params.
Make VMInterface edit form include the VM as a regular form field so that it can be used in query_params.
Add missing ip_addresses field to InterfaceCreateForm.
Add missing label/help_text to `mtu` field in InterfaceCreateForm.
Change order of fields in interface edit template to match the order in the interface create view.
glennmatthews added a commit that referenced this issue Nov 8, 2023
* Add correct VRF field to InterfaceForm.

Fixes #4709.
Change a number of DCIM forms `ModelChoiceField` to `DynamicModelChoiceField`.
Make device-component edit forms include the device as a regular form field so that it can be used in query_params.
Make VMInterface edit form include the VM as a regular form field so that it can be used in query_params.
Add missing ip_addresses field to InterfaceCreateForm.
Add missing label/help_text to `mtu` field in InterfaceCreateForm.
Change order of fields in interface edit template to match the order in the interface create view.

* Disable device/virtual_machine field when editing an existing component

* Fix test data
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 7, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: bug Something isn't working as expected
Projects
No open projects
Status: Done
Development

Successfully merging a pull request may close this issue.

3 participants