netbox-community / netbox

The premier source of truth powering network automation. Open source under Apache 2. Try NetBox Cloud free: https://netboxlabs.com/free-netbox-cloud/
http://netboxlabs.com/oss/netbox/
Apache License 2.0
15.77k stars 2.54k forks source link

Local Config Context on Tenant #7262

Closed ziggekatten closed 2 years ago

ziggekatten commented 3 years ago

NetBox version

v3.0.2

Feature type

New functionality

Proposed functionality

Just as individual objects have their local context specific for the object, there are from an automation perspective cases where parameters are needed related to Tenants.

Use case

An example, different Tenants have different asset management systems that automation code should talk to. Fetching this from Config Context on an Tenant instead of clogging down the Global Config Contexts with a lot of Tenant specific things would be beneficial.

Another is Tenant specific security and monitoring parameters, that from an automation perspective would be great to have in a Config Context

Database changes

Probably the architecture for Config Context could be reused on the Tenant object

External dependencies

No response

jeremystretch commented 3 years ago

Config context only applies to devices and virtual machines. It sounds like what you want is custom fields, which is already supported.

ziggekatten commented 3 years ago

Of course my first aproach was custom fields. However, when needing a list of items, which in a custom field would be of type selection, these cant be unique for a tenant.

One solution would be a custom field if type JSON was available.

jeremystretch commented 2 years ago

One solution would be a custom field if type JSON was available.

Sounds like that could be a solid feature request. However, I don't think it makes sense to extend configuration contexts to the Tenant model.

ziggekatten commented 2 years ago

A JSON type custom field would solve the usecases we struggle with. If that seems like a reasonable festure request, I open a new one for that and we close this one.