-
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 a generic Role model #1063
Comments
Yeah we talked about this back pre-1.0 for things like "profiles" e.g. "interface profiles" but just using roles generically. I'm a fan. |
This would probably be difficult to implement in a non-breaking / backwards compatible way. Need to consider impact to the REST API, plugins potentially consuming these data models, etc. Setting that aside, it would be worth looking at whether we even need separate data models for "status" and "role" or whether these are just two different groupings/uses of the same generic model type behind the scenes? (In theory even "tag" could be subsumed into this as well...) Currently we're leaning towards targeting this as a 2.x feature - not to rule out implementing it before then if these sorts of concerns can be addressed in a backwards-compatible way. |
Understood, retrofitting the existing models wouldn't be backward compatible It might be possible to introduce the new Role model first, to allow plugins to leverage it and retrofit the existing models later as part of a major release. |
This is probably something that could be implemented across the boards, including supplanting Location Type. @bryanculver |
I can also see use in this as a feature for plugin developers, if all I need is an extendable list of possible types otherwise I would have to define a custom model with lots of extra overhead, if we had this and it was extendable to plugin models that could save me as a plugin developer some time. One example from a currently open-sourced plugin would be |
Another candidate model for rolling into a generic |
Implemented for 2.0 by #2822. |
Environment
Proposed Functionality
Add a generic Role model, similar to Status to avoid creating multiple models that are describing pretty much the same things.
Currently in Core, we are leveraging roles in multiple places :
ipam:Role
,dcim:DeviceRole
,dcim: RackRole
ipam ? IPAddressRoleChoices
Use Case
Database Changes
Yes
At a minimum we need to add a new role model, most likely as part of Extras that will be very similar to Status.
At some point, it would be good to migrate all existing roles to this new model but it would most likely be a breaking change
External Dependencies
No
The text was updated successfully, but these errors were encountered: