Config Context for hardware devices interferes with virtual machines in confusing way #7674
Labels
status: accepted
This issue has been accepted for implementation
type: bug
A confirmed report of unexpected behavior in the application
NetBox version
v3.0.8
Python version
3.8
Steps to Reproduce
The following issue was completely reproduced in the netbox test environment (https://demo.netbox.dev/).
For example:
{ "category": { "value 1": 10, "value 2": 20 } }
For example:
{ "category": { "value 2": 200, "value 3": 300, "value 4": 400 } }
Expected Behavior
The rendered config context should only contain the combined source contents, which match the given context. Especially a context, which is set to apply to a specific device type only should never appear in a virtual machine.
Observed Behavior
Values from the device type config context gets mixed into the rendered context, without even appearing in source context, and without matching:
There is an additional thing; I don't know if it is the same Bug, or another issue.
{% for vm in queryset %}
NAME {{ vm.name }}
{% set data = vm.get_config_context().get("category",{}) %}
{% for key, value in data.items() %}
{{ key }} {{ value }}
{% endfor %}
{% endfor %}
What happens: The export, which is called without /api/ shows the values how they should be. When calling it via the /api/-Link, the same problem happens as above.
I would expect the export to always be the same, regardless of the way it is called.
The text was updated successfully, but these errors were encountered: