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:
@ -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
|
||||
|
Reference in New Issue
Block a user