mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-16 12:12:53 -06:00
Normalize connection_status for non-connected device components during migration
This commit is contained in:
parent
45a1dfbd8a
commit
703be259fd
@ -46,6 +46,9 @@ def console_connections_to_cables(apps, schema_editor):
|
|||||||
if 'test' not in sys.argv:
|
if 'test' not in sys.argv:
|
||||||
print("{} cables created".format(cable_count))
|
print("{} cables created".format(cable_count))
|
||||||
|
|
||||||
|
# Normalize connection_status for all non-connected ConsolePorts
|
||||||
|
ConsolePort.objects.filter(connected_endpoint__isnull=True).update(connection_status=None)
|
||||||
|
|
||||||
|
|
||||||
def power_connections_to_cables(apps, schema_editor):
|
def power_connections_to_cables(apps, schema_editor):
|
||||||
"""
|
"""
|
||||||
@ -87,6 +90,9 @@ def power_connections_to_cables(apps, schema_editor):
|
|||||||
if 'test' not in sys.argv:
|
if 'test' not in sys.argv:
|
||||||
print("{} cables created".format(cable_count))
|
print("{} cables created".format(cable_count))
|
||||||
|
|
||||||
|
# Normalize connection_status for all non-connected PowerPorts
|
||||||
|
PowerPort.objects.filter(connected_endpoint__isnull=True).update(connection_status=None)
|
||||||
|
|
||||||
|
|
||||||
def interface_connections_to_cables(apps, schema_editor):
|
def interface_connections_to_cables(apps, schema_editor):
|
||||||
"""
|
"""
|
||||||
|
Loading…
Reference in New Issue
Block a user