Config context added to all devices without assignment #8158

Closed
opened 2025-12-29 20:33:12 +01:00 by adam · 5 comments
Owner

Originally created by @MarianRychtecky on GitHub (Jun 2, 2023).

NetBox version

v3.5.1

Python version

3.9

Steps to Reproduce

  1. Create config context under Provisioning with no assignments
    image
  2. Every device has a newly created context shown under "Config Context" and "Rendered Context"
  3. Disabling config context will remove config context from all devices

Expected Behavior

Do not show Config context on the device without the assignment

Observed Behavior

Displayed with every device, even without assignment

Originally created by @MarianRychtecky on GitHub (Jun 2, 2023). ### NetBox version v3.5.1 ### Python version 3.9 ### Steps to Reproduce 1. Create config context under Provisioning with no assignments ![image](https://github.com/netbox-community/netbox/assets/36925394/c5eb2216-da7e-4d6a-987d-013fa8806337) 2. Every device has a newly created context shown under "Config Context" and "Rendered Context" 3. Disabling config context will remove config context from all devices ### Expected Behavior Do not show Config context on the device without the assignment ### Observed Behavior Displayed with every device, even without assignment
adam closed this issue 2025-12-29 20:33:12 +01:00
Author
Owner

@kkthxbye-code commented on GitHub (Jun 2, 2023):

I'm pretty sure this is intended, and as such should be a feature request. However even as a feature request I'm not sure I see why it should be changed.

@kkthxbye-code commented on GitHub (Jun 2, 2023): I'm pretty sure this is intended, and as such should be a feature request. However even as a feature request I'm not sure I see why it should be changed.
Author
Owner

@MarianRychtecky commented on GitHub (Jun 2, 2023):

I understand what you mean. But how can I create a "Config context" not assigned to any device?

@MarianRychtecky commented on GitHub (Jun 2, 2023): I understand what you mean. But how can I create a "Config context" not assigned to any device?
Author
Owner

@kkthxbye-code commented on GitHub (Jun 2, 2023):

Just remove the checkmark from "Is active" and it wont render for any devices.

@kkthxbye-code commented on GitHub (Jun 2, 2023): Just remove the checkmark from "Is active" and it wont render for any devices.
Author
Owner

@MarianRychtecky commented on GitHub (Jun 2, 2023):

Yes, that is how we solved it (marking Config context as inactive). It seems to me not logical to include Config context with no assignment to all devices (it goes against the assignment logic).

@MarianRychtecky commented on GitHub (Jun 2, 2023): Yes, that is how we solved it (marking Config context as inactive). It seems to me not logical to include Config context with no assignment to all devices (it goes against the assignment logic).
Author
Owner

@kkthxbye-code commented on GitHub (Jun 2, 2023):

It makes decent sense to me and is explained in the documentation:

https://docs.netbox.dev/en/stable/models/extras/configcontext/

Object Assignment
Each configuration context may be assigned with any number of objects of the supported types. If no related objects are selected, it will be considered a "global" config context and apply to all devices and virtual machines.

As this is intended I'll close this out, but you are welcome to open a feature request. Just make sure you specify exactly what changing this would solve and why it would be a positive change.

@kkthxbye-code commented on GitHub (Jun 2, 2023): It makes decent sense to me and is explained in the documentation: https://docs.netbox.dev/en/stable/models/extras/configcontext/ >**Object Assignment** Each configuration context may be assigned with any number of objects of the supported types. **If no related objects are selected, it will be considered a "global" config context and apply to all devices and virtual machines.** As this is intended I'll close this out, but you are welcome to open a feature request. Just make sure you specify exactly what changing this would solve and why it would be a positive change.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#8158