-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Description
NetBox version
v3.3.7
Feature type
Change to existing functionality
Proposed functionality
I'm proposing some way for users to append to existing values in configuration contexts rather than just overwriting. An example of current and desired behavior is explained in the Use Case section below.
Use case
Currently, if I create two tags ["Service-HTTP", "Service-HTTPS"] with the intent of applying these tags to a device that has two services [{"name": "HTTP", "ports": [80]}, {"name": "HTTPS", "ports": [443]}], with the config-contexts:
[
{
"name": "Service-HTTP-config",
"weight": 1000,
"data": {
{"ports:" [80]}
}
},
{
"name": "Service-HTTPS-config",
"weight": 1000,
"data": {
{"ports:" [443]}
}
}
]
then the device's config-context would only render {"ports": [80]}. Likewise, changing with Service-HTTPS-config context weightings would overwrite the config and be {"ports": [443]}.
However, in this example, I want to dynamically render the planned open ports on the device so the firewall can be automatically configured from the context {"ports": [80, 443]}. I've looked at the documentation but did not notice a way to append to existing values - only overwrite.
Database changes
No response
External dependencies
No response