1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

32 lines
1.4 KiB
Markdown
Raw Normal View History

2022-08-10 14:07:51 -04:00
# Configuration Contexts
2022-08-12 16:00:04 -04:00
Context data is made available to [devices](../dcim/device.md) and/or [virtual machines](../virtualization/virtualmachine.md) based on their relationships to other objects in NetBox. For example, context data can be associated only with devices assigned to a particular site, or only to virtual machines in a certain cluster.
2022-08-10 14:07:51 -04:00
2022-08-12 16:00:04 -04:00
See the [context data documentation](../../features/context-data.md) for more information.
2022-08-10 14:07:51 -04:00
2022-08-12 16:00:04 -04:00
## Fields
2022-08-10 14:07:51 -04:00
2022-08-12 16:00:04 -04:00
### Name
2022-08-10 14:07:51 -04:00
2022-08-12 16:00:04 -04:00
A unique human-friendly name.
2022-08-10 14:07:51 -04:00
2022-08-12 16:00:04 -04:00
### Weight
2022-08-10 14:07:51 -04:00
2022-08-12 16:00:04 -04:00
A numeric value which influences the order in which context data is merged. Contexts with a lower weight are merged before those with a higher weight.
2022-08-10 14:07:51 -04:00
2022-08-12 16:00:04 -04:00
### Data
2022-08-10 14:07:51 -04:00
2022-08-12 16:00:04 -04:00
The context data expressed in JSON format.
2022-08-10 14:07:51 -04:00
### Data File
Config context data may optionally be sourced from a remote [data file](../core/datafile.md), which is synchronized from a remote data source. When designating a data file, there is no need to specify local data for the config context: It will be populated automatically from the data file.
2022-08-12 16:00:04 -04:00
### Is Active
2022-08-10 14:07:51 -04:00
2022-08-12 16:00:04 -04:00
If not selected, this config context will be excluded from rendering. This can be convenient to temporarily disable a config context.
2022-08-10 14:07:51 -04:00
2022-08-12 16:00:04 -04:00
### Object Assignment
2022-08-10 14:07:51 -04:00
2022-08-12 16:00:04 -04:00
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.