Skip to content

Config Context for hardware devices interferes with virtual machines in confusing way #7674

@mburggraf

Description

@mburggraf

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/).

  1. Create a config context with some settings and assign it to any Site.
    For example: { "category": { "value 1": 10, "value 2": 20 } }
  2. Look for a virtual machine, with a cluster matching the assigned Site and verify, that the config context gets correctly applied.
  3. Create an additional config context, with overlapping contents and apply it to any device type only.
    For example: { "category": { "value 2": 200, "value 3": 300, "value 4": 400 } }
  4. Go back to the virtual machine you checked before and see, how the Rendered config context shows data which doesn't match the source contents.

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:
grafik


There is an additional thing; I don't know if it is the same Bug, or another issue.

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.

Metadata

Metadata

Assignees

Labels

status: acceptedThis issue has been accepted for implementationtype: bugA confirmed report of unexpected behavior in the application

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions