Skip to content

Unable to select VLANs on Device Interfaces where they are scoped by Cluster or Cluster Groups #12764

@stuntguy3000

Description

@stuntguy3000

NetBox version

v3.5.3-dev

Python version

3.8

Expected Behavior

I expect the available VLANs to include those defined by Cluster or Cluster Group scopes.

Observed Behavior

They are not shown as available options.


Steps to Reproduce

Create the following Virtualization objects:

  • Create a Cluster Type named Generic Cluster Type
  • Create a Cluster Group named Cluster Group 1
  • Create a Cluster named Ungrouped Cluster
  • Create a Cluster named Grouped Cluster (Group: Cluster Group 1)
    image
  • Create a Virtual Machine named Ungrouped Cluster VM (Cluster: Ungrouped Cluster)
  • Create a Virtual Machine named Grouped Cluster VM (Cluster: Grouped Cluster)
    image

Create the following IPAM objects:

  • Create a VLAN Group named Cluster Group 1 VG (Scope: Cluster Group, Cluster Group 1)
  • Create a VLAN Group named Grouped Cluster VG (Scope: Cluster, Grouped Cluster)
    image
  • Create a VLAN named Alpha (Group: Cluster Group 1 VG)
  • Create a VLAN named Beta (Group: Grouped Cluster VG)
    image

Create the following Organization objects:

  • Create a Site named Generic Site

Create the following Device objects:

  • Create a Manufacturer named Generic Manufacturer
  • Create a Device Type named Generic Model (Manufacturer: Generic Manufacturer)
  • Create a Device Role named Generic Role
  • Create a Device named Grouped Cluster Device (Role: Generic Role, Type: Generic Model, Site: Generic Site, Virtualization Cluster: Grouped Cluster)
  • Create a Device named Ungrouped Cluster Device (Role: Generic Role, Type: Generic Model, Site: Generic Site, Virtualization Cluster: Ungrouped Cluster)
    image
  • Add an Interface (of any type) to Grouped Cluster Device named Generic Interface
  • Add an Interface (of any type) to Ungrouped Cluster Device named Generic Interface

Finally... replicate the issue:

  • Attempt to add a untagged or tagged VLAN to each device's interface
    image
    image

This is the issue - no VLANS will be present, including those which should be


Notes

This issue has been resolved in a branch in my fork. If this issue has been resolved this will be submitted as a new PR addressing this specific issue.

This issue only applies to Devices, but not Virtual Machines.

I hope this isn't death by information, please let me know if I can do anything more to get this accepted and resolved (including a video walkthrough or database object dump).

References

This section of code already exists and performs the correct filtering.

This section of the code are my changes which adds this correct filtering/resolves this issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions