nautobot-app-bgp-models icon indicating copy to clipboard operation
nautobot-app-bgp-models copied to clipboard

Add RoutingInstanceType, modify PeerGroupTemplate behaviour

Open mzbroch opened this issue 2 years ago • 1 comments
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 RoutingInstanceTemplate model
  • Add PeerGroupTemplate, AddressFamilyTemplate, and PeerGroupAddressFamilyTemplate models that can be created as children of a RoutingInstanceTemplate in order to fully model a "template" BGP configuration. This will work similarly to how DeviceType and InterfaceTemplate/ConsolePortTemplate/etc. work in core, i.e. instantiating a RoutingInstance from a RoutingInstanceTemplate will also create PeerGroups corresponding to its PeerGroupTemplates, etc.
  • Automatically create RoutingInstance components based on its RoutingInstanceTemplate : add AddressFamily, PeerGroup, and AddressFamilyPeerGroup objects automatically as defined under RoutingInstanceTemplate , 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 RoutingInstanceTemplate and its descendant models later will not retroactively result in updates to existing instances that were originally based on this template.
  • Remove any existing peergroup_template references in extra_attributes_inheritance or property_inheritance
  • Remove existing PeerGroupTemplate model as the related PeerGroup parent - 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

mzbroch avatar Sep 27 '23 11:09 mzbroch

  • I'd propose RoutingInstanceTemplate rather than RoutingInstanceType as a clearer name.
  • Will probably need PeerGroupTemplate, AddressFamilyTemplate, and PeerGroupAddressFamilyTemplate models that can be created as children of a RoutingInstanceTemplate in order to fully model a "template" BGP configuration. This will work similarly to how DeviceType and InterfaceTemplate/ConsolePortTemplate/etc. work in core, i.e. instantiating a RoutingInstance from a RoutingInstanceTemplate will also create PeerGroups corresponding to its PeerGroupTemplates, etc.
  • Also similar to core, creation from a template is a one-time event; changing a RoutingInstanceTemplate and its descendant models later will not retroactively result in updates to existing instances that were originally based on this template.

glennmatthews avatar Sep 27 '23 12:09 glennmatthews