mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
Fixes #7589: Correct 128GFC interface type identifier
This commit is contained in:
@ -3,6 +3,7 @@
|
|||||||
### Breaking Changes
|
### Breaking Changes
|
||||||
|
|
||||||
* Exported webhooks and custom fields now reference associated content types by raw string value (e.g. "dcim.site") rather than by human-friendly name.
|
* Exported webhooks and custom fields now reference associated content types by raw string value (e.g. "dcim.site") rather than by human-friendly name.
|
||||||
|
* The 128GFC interface type has been corrected from `128gfc-sfp28` to `128gfc-qsfp28`.
|
||||||
|
|
||||||
### Enhancements
|
### Enhancements
|
||||||
|
|
||||||
@ -14,6 +15,7 @@
|
|||||||
|
|
||||||
### Bug Fixes
|
### Bug Fixes
|
||||||
|
|
||||||
|
* [#7589](https://github.com/netbox-community/netbox/issues/7589) - Correct 128GFC interface type identifier
|
||||||
* [#7756](https://github.com/netbox-community/netbox/issues/7756) - Fix AttributeError exception when editing an IP address assigned to a FHRPGroup
|
* [#7756](https://github.com/netbox-community/netbox/issues/7756) - Fix AttributeError exception when editing an IP address assigned to a FHRPGroup
|
||||||
* [#7757](https://github.com/netbox-community/netbox/issues/7757) - Fix 404 when assigning multiple contacts/FHRP groups in succession
|
* [#7757](https://github.com/netbox-community/netbox/issues/7757) - Fix 404 when assigning multiple contacts/FHRP groups in succession
|
||||||
* [#7768](https://github.com/netbox-community/netbox/issues/7768) - Validate IP address status when creating a new FHRP group
|
* [#7768](https://github.com/netbox-community/netbox/issues/7768) - Validate IP address status when creating a new FHRP group
|
||||||
|
@ -782,7 +782,7 @@ class InterfaceTypeChoices(ChoiceSet):
|
|||||||
TYPE_16GFC_SFP_PLUS = '16gfc-sfpp'
|
TYPE_16GFC_SFP_PLUS = '16gfc-sfpp'
|
||||||
TYPE_32GFC_SFP28 = '32gfc-sfp28'
|
TYPE_32GFC_SFP28 = '32gfc-sfp28'
|
||||||
TYPE_64GFC_QSFP_PLUS = '64gfc-qsfpp'
|
TYPE_64GFC_QSFP_PLUS = '64gfc-qsfpp'
|
||||||
TYPE_128GFC_QSFP28 = '128gfc-sfp28'
|
TYPE_128GFC_QSFP28 = '128gfc-qsfp28'
|
||||||
|
|
||||||
# InfiniBand
|
# InfiniBand
|
||||||
TYPE_INFINIBAND_SDR = 'infiniband-sdr'
|
TYPE_INFINIBAND_SDR = 'infiniband-sdr'
|
||||||
|
29
netbox/dcim/migrations/0142_rename_128gfc_qsfp28.py
Normal file
29
netbox/dcim/migrations/0142_rename_128gfc_qsfp28.py
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
from django.db import migrations
|
||||||
|
|
||||||
|
OLD_VALUE = '128gfc-sfp28'
|
||||||
|
NEW_VALUE = '128gfc-qsfp28'
|
||||||
|
|
||||||
|
|
||||||
|
def correct_type(apps, schema_editor):
|
||||||
|
"""
|
||||||
|
Correct TYPE_128GFC_QSFP28 interface type.
|
||||||
|
"""
|
||||||
|
Interface = apps.get_model('dcim', 'Interface')
|
||||||
|
InterfaceTemplate = apps.get_model('dcim', 'InterfaceTemplate')
|
||||||
|
|
||||||
|
for model in (Interface, InterfaceTemplate):
|
||||||
|
model.objects.filter(type=OLD_VALUE).update(type=NEW_VALUE)
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('dcim', '0141_asn_model'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.RunPython(
|
||||||
|
code=correct_type,
|
||||||
|
reverse_code=migrations.RunPython.noop
|
||||||
|
),
|
||||||
|
]
|
Reference in New Issue
Block a user