diff --git a/docs/models/dcim/interface.md b/docs/models/dcim/interface.md index 3a44557fb..dd8afc797 100644 --- a/docs/models/dcim/interface.md +++ b/docs/models/dcim/interface.md @@ -10,7 +10,7 @@ Interfaces in NetBox represent network interfaces used to exchange data with con ## Fields -!!! note +!!! note "Changed in NetBox v4.2" The MAC address of an interface (formerly a concrete database field) is available as a property, `mac_address`, which reflects the value of the primary linked [MAC address](./macaddress.md) object. ### Device diff --git a/docs/models/virtualization/vminterface.md b/docs/models/virtualization/vminterface.md index fc9d72cab..910a97e28 100644 --- a/docs/models/virtualization/vminterface.md +++ b/docs/models/virtualization/vminterface.md @@ -4,7 +4,7 @@ ## Fields -!!! note +!!! note "Changed in NetBox v4.2" The MAC address of an interface (formerly a concrete database field) is available as a property, `mac_address`, which reflects the value of the primary linked [MAC address](./macaddress.md) object. ### Virtual Machine diff --git a/netbox/dcim/forms/bulk_create.py b/netbox/dcim/forms/bulk_create.py index fe1337396..0ea3aee63 100644 --- a/netbox/dcim/forms/bulk_create.py +++ b/netbox/dcim/forms/bulk_create.py @@ -12,6 +12,7 @@ __all__ = ( 'ConsolePortBulkCreateForm', 'ConsoleServerPortBulkCreateForm', 'DeviceBayBulkCreateForm', + # 'FrontPortBulkCreateForm', 'InterfaceBulkCreateForm', 'InventoryItemBulkCreateForm', 'ModuleBayBulkCreateForm', diff --git a/netbox/dcim/forms/bulk_import.py b/netbox/dcim/forms/bulk_import.py index af4896435..05ae8d989 100644 --- a/netbox/dcim/forms/bulk_import.py +++ b/netbox/dcim/forms/bulk_import.py @@ -777,19 +777,7 @@ class MACAddressImportForm(NetBoxModelImportForm): if self.cleaned_data.get('interface'): self.instance.assigned_object = self.cleaned_data['interface'] - mac_address = super().save(*args, **kwargs) - - # Set as primary for device/VM - # TODO: set as primary for interface - # if self.cleaned_data.get('is_primary'): - # parent = self.cleaned_data.get('device') or self.cleaned_data.get('virtual_machine') - # if self.instance.address.version == 4: - # parent.primary_ip4 = ipaddress - # elif self.instance.address.version == 6: - # parent.primary_ip6 = ipaddress - # parent.save() - - return mac_address + return super().save(*args, **kwargs) #