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

Closes #1931: Added a count of assigned IP addresses to the interface API serializer

This commit is contained in:
Jeremy Stretch
2018-11-05 14:32:22 -05:00
parent e8caa46484
commit 46e594f1f1
3 changed files with 7 additions and 3 deletions

View File

@ -2091,6 +2091,10 @@ class Interface(CableTermination, ComponentModel):
def is_lag(self):
return self.form_factor == IFACE_FF_LAG
@property
def count_ipaddresses(self):
return self.ip_addresses.count()
#
# Pass-through ports