Skip to content

ConfigContext doesn't evaluate parent locations #20272

@alehaa

Description

@alehaa

Deployment Type

Self-hosted

NetBox Version

v4.4.0

Python Version

3.11

Steps to Reproduce

  1. Create Location A with child location B
  2. Create a Device in location B
  3. Create a ConfigContext for location A

Expected Behavior

ConfigContext is evaluated for device.

Observed Behavior

ConfigContext will only be evaluated when applied directly to location B. Since this is an organizational model that allows nesting, I would assume that ancestors would be covered in the ConfigContextQuerySet, similar to how site groups, regions, and device roles are handled. A practical use case would be assigning configuration for a specific room divided into multiple sub-locations, such as datacenter pods.

Relevant code: https://github.com/netbox-community/netbox/blob/main/netbox/extras/querysets.py#L27

Metadata

Metadata

Assignees

Labels

severity: lowDoes not significantly disrupt application functionality, or a workaround is availablestatus: acceptedThis issue has been accepted for implementationtype: bugA confirmed report of unexpected behavior in the application

Type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions