mirror of
https://github.com/netbox-community/netbox.git
synced 2025-08-26 17:26:10 -06:00
Add ConfigTemplate model documentation
This commit is contained in:
parent
ccaa26343e
commit
7ede4469dd
3
docs/features/configuration-rendering.md
Normal file
3
docs/features/configuration-rendering.md
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
# Configuration Rendering
|
||||||
|
|
||||||
|
## TODO
|
29
docs/models/extras/configtemplate.md
Normal file
29
docs/models/extras/configtemplate.md
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
# Configuration Templates
|
||||||
|
|
||||||
|
Configuration templates can be used to render [devices](../dcim/device.md) configurations from [context data](../../features/context-data.md). Templates are written in the [Jinja2 language](https://jinja.palletsprojects.com/) and can be associated with devices roles, platforms, and/or individual devices.
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
See the [configuration rendering documentation](../../features/configuration-rendering.md) for more information.
|
||||||
|
|
||||||
|
## Fields
|
||||||
|
|
||||||
|
### Name
|
||||||
|
|
||||||
|
A unique human-friendly name.
|
||||||
|
|
||||||
|
### Weight
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
### Data File
|
||||||
|
|
||||||
|
Template code 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 template code: It will be populated automatically from the data file.
|
||||||
|
|
||||||
|
### Template Code
|
||||||
|
|
||||||
|
Jinja2 template code, if being defined locally rather than replicated from a data file.
|
||||||
|
|
||||||
|
### Environment Parameters
|
||||||
|
|
||||||
|
A dictionary of any additional parameters to pass when instantiating the [Jinja2 environment](https://jinja.palletsprojects.com/en/3.1.x/api/#jinja2.Environment). Jinja2 supports various optional parameters which can be used to modify its default behavior.
|
@ -74,6 +74,7 @@ nav:
|
|||||||
- Contacts: 'features/contacts.md'
|
- Contacts: 'features/contacts.md'
|
||||||
- Search: 'features/search.md'
|
- Search: 'features/search.md'
|
||||||
- Context Data: 'features/context-data.md'
|
- Context Data: 'features/context-data.md'
|
||||||
|
- Configuration Rendering: 'features/configuration-rendering.md'
|
||||||
- Change Logging: 'features/change-logging.md'
|
- Change Logging: 'features/change-logging.md'
|
||||||
- Journaling: 'features/journaling.md'
|
- Journaling: 'features/journaling.md'
|
||||||
- Auth & Permissions: 'features/authentication-permissions.md'
|
- Auth & Permissions: 'features/authentication-permissions.md'
|
||||||
@ -196,6 +197,7 @@ nav:
|
|||||||
- Extras:
|
- Extras:
|
||||||
- Branch: 'models/extras/branch.md'
|
- Branch: 'models/extras/branch.md'
|
||||||
- ConfigContext: 'models/extras/configcontext.md'
|
- ConfigContext: 'models/extras/configcontext.md'
|
||||||
|
- ConfigTemplate: 'models/extras/configtemplate.md'
|
||||||
- CustomField: 'models/extras/customfield.md'
|
- CustomField: 'models/extras/customfield.md'
|
||||||
- CustomLink: 'models/extras/customlink.md'
|
- CustomLink: 'models/extras/customlink.md'
|
||||||
- ExportTemplate: 'models/extras/exporttemplate.md'
|
- ExportTemplate: 'models/extras/exporttemplate.md'
|
||||||
|
Loading…
Reference in New Issue
Block a user