diff --git a/netbox_routing/models/eigrp.py b/netbox_routing/models/eigrp.py index dd199ab..5799633 100644 --- a/netbox_routing/models/eigrp.py +++ b/netbox_routing/models/eigrp.py @@ -36,6 +36,10 @@ class EIGRPRouter(PrimaryModel): ) rid = IPAddressField(verbose_name=_('Router ID'), blank=True, null=True) + clone_fields = ('device', 'mode', 'name', 'pid', 'rid') + + prerequisite_models = ('dcim.Device',) + class Meta: verbose_name = 'EIGRP Router' @@ -80,6 +84,10 @@ class EIGRPAddressFamily(PrimaryModel): ) rid = IPAddressField(verbose_name=_('Router ID'), blank=True, null=True) + clone_fields = ('router', 'vrf', 'family') + + prerequisite_models = ('netbox_routing.EIGRPRouter',) + class Meta: verbose_name = 'EIGRP Address Family' constraints = ( @@ -122,6 +130,13 @@ class EIGRPNetwork(PrimaryModel): null=False, ) + clone_fields = ('router', 'address_family', 'network') + + prerequisite_models = ( + 'netbox_routing.EIGRPRouter', + 'ipam.Prefix', + ) + class Meta: verbose_name = 'EIGRP Network' constraints = ( @@ -184,6 +199,21 @@ class EIGRPInterface(PrimaryModel): verbose_name=_('Passphrase'), max_length=200, blank=True, null=True ) + clone_fields = ( + 'router', + 'address_family', + 'interface', + 'passive', + 'bfd', + 'authentication', + 'passphrase', + ) + + prerequisite_models = ( + 'netbox_routing.EIGRPRouter', + 'dcim.Interface', + ) + class Meta: verbose_name = 'EIGRP Interface' constraints = ( diff --git a/netbox_routing/models/ospf.py b/netbox_routing/models/ospf.py index aa13587..6eead0f 100644 --- a/netbox_routing/models/ospf.py +++ b/netbox_routing/models/ospf.py @@ -38,7 +38,7 @@ class OSPFInstance(PrimaryModel): null=True, ) - clone_fields = ('device',) + clone_fields = ('name', 'router_id', 'process_id', 'device', 'vrf') prerequisite_models = ('dcim.Device',) class Meta: @@ -62,7 +62,7 @@ class OSPFArea(PrimaryModel): default='standard', ) prerequisite_models = () - clone_fields = () + clone_fields = ('area_id', 'area_type') class Meta: ordering = ['area_id'] @@ -123,8 +123,11 @@ class OSPFInterface(PrimaryModel): passphrase = models.CharField(max_length=200, blank=True, null=True) clone_fields = ( + 'device', 'instance', 'area', + 'interface', + 'passive', 'priority', 'bfd', 'authentication', diff --git a/netbox_routing/models/static.py b/netbox_routing/models/static.py index 5312812..57331c8 100644 --- a/netbox_routing/models/static.py +++ b/netbox_routing/models/static.py @@ -52,7 +52,16 @@ class StaticRoute(PrimaryModel): null=True, ) - clone_fields = ('vrf', 'metric', 'permanent') + clone_fields = ( + 'name', + 'devices', + 'prefix', + 'next_hop', + 'vrf', + 'metric', + 'permanent', + ) + prerequisite_models = ('dcim.Device',) class Meta: