@@ -584,6 +584,15 @@ class BaseInterfaceTable(NetBoxTable):
584584 orderable = False ,
585585 verbose_name = _ ('IP Addresses' )
586586 )
587+ primary_mac_address = tables .Column (
588+ verbose_name = _ ('Primary MAC' ),
589+ linkify = True
590+ )
591+ mac_addresses = columns .ManyToManyColumn (
592+ orderable = False ,
593+ linkify_item = True ,
594+ verbose_name = _ ('MAC Addresses' )
595+ )
587596 fhrp_groups = tables .TemplateColumn (
588597 accessor = Accessor ('fhrp_group_assignments' ),
589598 template_code = INTERFACE_FHRPGROUPS ,
@@ -615,10 +624,6 @@ class BaseInterfaceTable(NetBoxTable):
615624 verbose_name = _ ('Q-in-Q SVLAN' ),
616625 linkify = True
617626 )
618- primary_mac_address = tables .Column (
619- verbose_name = _ ('MAC Address' ),
620- linkify = True
621- )
622627
623628 def value_ip_addresses (self , value ):
624629 return "," .join ([str (obj .address ) for obj in value .all ()])
@@ -681,11 +686,12 @@ class Meta(DeviceComponentTable.Meta):
681686 model = models .Interface
682687 fields = (
683688 'pk' , 'id' , 'name' , 'device' , 'module_bay' , 'module' , 'label' , 'enabled' , 'type' , 'mgmt_only' , 'mtu' ,
684- 'speed' , 'speed_formatted' , 'duplex' , 'mode' , 'primary_mac_address' , 'wwn' , 'poe_mode' , 'poe_type' ,
685- 'rf_role' , 'rf_channel' , 'rf_channel_frequency' , 'rf_channel_width' , 'tx_power' , 'description' ,
686- 'mark_connected' , 'cable' , 'cable_color' , 'wireless_link' , 'wireless_lans' , 'link_peer' , 'connection' ,
687- 'tags' , 'vdcs' , 'vrf' , 'l2vpn' , 'tunnel' , 'ip_addresses' , 'fhrp_groups' , 'untagged_vlan' , 'tagged_vlans' ,
688- 'qinq_svlan' , 'inventory_items' , 'created' , 'last_updated' , 'vlan_translation_policy'
689+ 'speed' , 'speed_formatted' , 'duplex' , 'mode' , 'mac_addresses' , 'primary_mac_address' , 'wwn' ,
690+ 'poe_mode' , 'poe_type' , 'rf_role' , 'rf_channel' , 'rf_channel_frequency' , 'rf_channel_width' , 'tx_power' ,
691+ 'description' , 'mark_connected' , 'cable' , 'cable_color' , 'wireless_link' , 'wireless_lans' , 'link_peer' ,
692+ 'connection' , 'tags' , 'vdcs' , 'vrf' , 'l2vpn' , 'tunnel' , 'ip_addresses' , 'fhrp_groups' ,
693+ 'untagged_vlan' , 'tagged_vlans' , 'qinq_svlan' , 'inventory_items' , 'created' , 'last_updated' ,
694+ 'vlan_translation_policy' ,
689695 )
690696 default_columns = ('pk' , 'name' , 'device' , 'label' , 'enabled' , 'type' , 'description' )
691697
@@ -746,10 +752,11 @@ class Meta(DeviceComponentTable.Meta):
746752 model = models .Interface
747753 fields = (
748754 'pk' , 'id' , 'name' , 'module_bay' , 'module' , 'label' , 'enabled' , 'type' , 'parent' , 'bridge' , 'lag' ,
749- 'mgmt_only' , 'mtu' , 'mode' , 'primary_mac_address' , 'wwn' , 'rf_role' , 'rf_channel' , 'rf_channel_frequency' ,
750- 'rf_channel_width' , 'tx_power' , 'description' , 'mark_connected' , 'cable' , 'cable_color' , 'wireless_link' ,
751- 'wireless_lans' , 'link_peer' , 'connection' , 'tags' , 'vdcs' , 'vrf' , 'l2vpn' , 'tunnel' , 'ip_addresses' ,
752- 'fhrp_groups' , 'untagged_vlan' , 'tagged_vlans' , 'qinq_svlan' , 'actions' ,
755+ 'mgmt_only' , 'mtu' , 'mode' , 'mac_addresses' , 'primary_mac_address' , 'wwn' , 'rf_role' , 'rf_channel' ,
756+ 'rf_channel_frequency' , 'rf_channel_width' , 'tx_power' , 'description' , 'mark_connected' , 'cable' ,
757+ 'cable_color' , 'wireless_link' , 'wireless_lans' , 'link_peer' , 'connection' , 'tags' , 'vdcs' , 'vrf' ,
758+ 'l2vpn' , 'tunnel' , 'ip_addresses' , 'fhrp_groups' , 'untagged_vlan' , 'tagged_vlans' , 'qinq_svlan' ,
759+ 'actions' ,
753760 )
754761 default_columns = (
755762 'pk' , 'name' , 'label' , 'enabled' , 'type' , 'parent' , 'lag' , 'mtu' , 'mode' , 'description' , 'ip_addresses' ,
@@ -1199,4 +1206,6 @@ class Meta(PrimaryModelTable.Meta):
11991206 'pk' , 'id' , 'mac_address' , 'assigned_object_parent' , 'assigned_object' , 'description' , 'is_primary' ,
12001207 'comments' , 'tags' , 'created' , 'last_updated' ,
12011208 )
1202- default_columns = ('pk' , 'mac_address' , 'assigned_object_parent' , 'assigned_object' , 'description' )
1209+ default_columns = (
1210+ 'pk' , 'mac_address' , 'is_primary' , 'assigned_object_parent' , 'assigned_object' , 'description' ,
1211+ )
0 commit comments