From f846beab93416ecf14992522829280910f4aed96 Mon Sep 17 00:00:00 2001 From: Sjur Fredriksen Date: Sun, 16 Feb 2025 20:53:00 +0100 Subject: take location from uplink device --- tools/netbox/scripts/create-switch/create-switch-tg25.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'tools/netbox/scripts/create-switch/create-switch-tg25.py') diff --git a/tools/netbox/scripts/create-switch/create-switch-tg25.py b/tools/netbox/scripts/create-switch/create-switch-tg25.py index f932bf4..746ce08 100644 --- a/tools/netbox/scripts/create-switch/create-switch-tg25.py +++ b/tools/netbox/scripts/create-switch/create-switch-tg25.py @@ -99,11 +99,6 @@ class CreateSwitch(Script): model=DeviceRole, default=DEFAULT_DEVICE_ROLE.id, ) - location = ObjectVar( - model=Location, - required=True, - default=Location.objects.get(name="Ringen") # Default during development - ) uplink_type = MultiChoiceVar( label='Uplink Type', required=True, @@ -284,7 +279,7 @@ class CreateSwitch(Script): switch = Device( name=switch_name, device_type=data['device_type'], - location=data['location'], + location=data['destination_device_a'].location, role=data['device_role'], site=DEFAULT_SITE ) -- cgit v1.2.3