-
Notifications
You must be signed in to change notification settings - Fork 264
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add JSON type for custom fields #897
Comments
I think this is a very desirable feature, right now I misuse the comment field for that, as a custom text field cannot be long enough... |
Would the idea here be to use JSON custom fields to store "large"/"complex" data that isn't more suitably represented as a collection of individual value custom fields (text/integer/boolean)? It seems like if we go this direction we'd also want to link JSON custom fields with the JSON schema feature for format validation/enforcement - does this make sense as an additional requirement? |
Yes, and data that inherently has some relationship and hierarchy to it.
I didn't mention that as I thought we would have that as a separate issue and possibly not in the initial implementation. Thoughts? Is it possible to use the implementation of the Context Schemas? |
Yes, for example I have VMs which have multiple assigned SSH Keys, and I don't know how many beforehand. So I have a JSON dict, which has this information. As well the storage information for a VM. The "right" way would be to extend all the models with the relevant stuff, but I'd like to stay with the default nautobot installation, as everything else will cause problems in the future (with updates) etc...
That would be cool - but I think a little bit grander: Why not having the relevant information from the schema available as direct fields, instead as one large JSON blob? I could then define my further required options without "coding", and maybe directly access and search for items in this json? This, however, is a much larger scope then just adding the fields.. |
Yes, 100%. From a practical perspective, we can build out the feature in 3 steps: 1) add JSON support (no schema) 2) add JSON schema support 3) look to auto-generate forms based on the schema. For this FR, it is just 1. |
Initially taking on the JSON support (no schema) per #1 above. |
Does this also need support in pynautobot as well? |
* Updated release notes * Added to release notes overview * Update nautobot/docs/release-notes/version-1.3.md Co-authored-by: Glenn Matthews <glenn.matthews@networktocode.com> * PR suggestions actioned Co-authored-by: Glenn Matthews <glenn.matthews@networktocode.com>
Implemented with #1075. |
Overview
Users often need to support more advanced data structures as a custom field. This would add support for a JSON type to this list of available options when creating a CF.
User Story
As Austin a Network Automation Engineer,
I want to be able to create custom fields that can store JSON data,
so that I am not required to use config contexts. This will allow me to ensure these fields are "required" when adding/editing objects.
Acceptance Criteria
icontains
) of JSON custom fields in UI and APIOut of Scope
The text was updated successfully, but these errors were encountered: