nautobot-app-bgp-models
nautobot-app-bgp-models copied to clipboard
Add RoutingInstanceType, modify PeerGroupTemplate behaviour
trafficstars
After implementing #26 , we propose a set of changes that will represent last model changes needed to release 1.0 version of the plugin.
- Add
RoutingInstanceTemplatemodel - Add
PeerGroupTemplate,AddressFamilyTemplate, andPeerGroupAddressFamilyTemplatemodels that can be created as children of aRoutingInstanceTemplatein order to fully model a "template" BGP configuration. This will work similarly to howDeviceTypeandInterfaceTemplate/ConsolePortTemplate/etc. work in core, i.e. instantiating aRoutingInstancefrom aRoutingInstanceTemplatewill also createPeerGroupscorresponding to itsPeerGroupTemplates, etc. - Automatically create
RoutingInstancecomponents based on itsRoutingInstanceTemplate: addAddressFamily,PeerGroup, andAddressFamilyPeerGroupobjects automatically as defined underRoutingInstanceTemplate, carry over attributes and copy globally pre-defined extra attributes into device-specific instances - Also similar to core, creation from a template is a one-time event; changing a
RoutingInstanceTemplateand its descendant models later will not retroactively result in updates to existing instances that were originally based on this template. - Remove any existing
peergroup_templatereferences in extra_attributes_inheritance or property_inheritance - Remove existing
PeerGroupTemplatemodel as the relatedPeerGroupparent - this is a last BREAKING change that will impact inheritance/modelling and might result in data loss (plugin will not provide data migration)
This changes will happen after implementation of #26 via #132
- I'd propose
RoutingInstanceTemplaterather thanRoutingInstanceTypeas a clearer name. - Will probably need
PeerGroupTemplate,AddressFamilyTemplate, andPeerGroupAddressFamilyTemplatemodels that can be created as children of aRoutingInstanceTemplatein order to fully model a "template" BGP configuration. This will work similarly to howDeviceTypeandInterfaceTemplate/ConsolePortTemplate/etc. work in core, i.e. instantiating aRoutingInstancefrom aRoutingInstanceTemplatewill also createPeerGroupscorresponding to itsPeerGroupTemplates, etc. - Also similar to core, creation from a template is a one-time event; changing a
RoutingInstanceTemplateand its descendant models later will not retroactively result in updates to existing instances that were originally based on this template.