mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
Add available IPs REST API endpoint for IP ranges
This commit is contained in:
@@ -329,9 +329,9 @@ class AvailableIPSerializer(serializers.Serializer):
|
||||
else:
|
||||
vrf = None
|
||||
return OrderedDict([
|
||||
('family', self.context['prefix'].version),
|
||||
('address', '{}/{}'.format(instance, self.context['prefix'].prefixlen)),
|
||||
('vrf', vrf),
|
||||
('family', self.context['parent'].family),
|
||||
('address', f"{instance}/{self.context['parent'].mask_length}"),
|
||||
('vrf', self.context['parent'].vrf),
|
||||
])
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user