1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

Add count_fhrp_groups to interface serializers

This commit is contained in:
jeremystretch
2021-11-04 09:58:33 -04:00
parent bbb98083eb
commit 67c73768c1
7 changed files with 25 additions and 8 deletions

View File

@@ -498,6 +498,10 @@ class BaseInterface(models.Model):
def count_ipaddresses(self):
return self.ip_addresses.count()
@property
def count_fhrp_groups(self):
return self.fhrp_group_assignments.count()
@extras_features('custom_fields', 'custom_links', 'export_templates', 'tags', 'webhooks')
class Interface(ComponentModel, BaseInterface, LinkTermination, PathEndpoint):