Commit e1636cc3 authored by Stauros Kroustouris's avatar Stauros Kroustouris

provide more info for the free ifces

parent ad3931bf
......@@ -64,7 +64,7 @@ def site_devices(request, site_id):
'name': ifce.name.name,
'ifces': [ifce.to_node_dict()],
# as andreas about that
'free_ports': [interface.name for interface in ifce.name.ifce_set.filter(taggedifce__isnull=True, status='down').exclude(name__contains='.').exclude(name__contains='ae')],
'free_ports': [{'name': interface.name, 'bandwidth': interface.bandwidth, 'type': interface.ifcetype.get_type()} for interface in ifce.name.ifce_set.filter(taggedifce__isnull=True, status='down').exclude(name__contains='.').exclude(name__contains='ae')],
# colocated or not
'role': role,
'id': ifce.name.pk
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment