Unverified Commit 572f35b9 authored by Adrian Schollmeyer's avatar Adrian Schollmeyer
Browse files

hausaufgang, patch: Update script parameters


Signed-off-by: Adrian Schollmeyer's avatarNexAdn <nex@nexadn.de>
parent db925223
......@@ -88,24 +88,6 @@ class ConnectUserports(Script):
name = "(disabled) Connect userport to patchpanels"
description = "Bulk connect userports to a patchpanel"
patchpanel = ObjectVar(
label = "Patchpanel",
queryset = Device.objects.filter(
device_role__name = "Patchpanel Kupfer"
)
)
aufgang = ObjectVar(
label = "Hausaufgang",
queryset = Device.objects.filter(
device_role__name = "Hausaufgang"
)
)
connections = TextVar(
label = "Connections",
description =
"One connection per line. Form: [Userport name] | [Hausaufgang name]"
)
def run(self, data, commit):
self.log_error("I currently do nothing!")
pass
......@@ -76,19 +76,6 @@ class BulkPatch(Script):
label = "Device B",
queryset = Device.objects
)
port_a_use_interfaces = BooleanVar(
label = "Use interfaces on device A",
description = "true = use interfaces, false = use Front Ports (sorry"
" for bad UX, ChoiceVar seems to be broken)"
)
port_b_use_interfaces = BooleanVar(
label = "Use interfaces on device B"
)
patch_pairs = TextVar(
label = "Patch pairs",
description = "Syntax: [A-Port] | [B-Port]. Each patch pair on its own"
" line."
)
port_type_a = ChoiceVar(
label = "Device A port type",
choices = PORT_TYPES
......@@ -97,6 +84,11 @@ class BulkPatch(Script):
label = "Device B port type",
choices = PORT_TYPES
)
patch_pairs = TextVar(
label = "Patch pairs",
description = "Syntax: [A-Port] | [B-Port]. Each patch pair on its own"
" line."
)
cable_label = StringVar(
label = "Cable label",
required = False,
......@@ -110,14 +102,13 @@ class BulkPatch(Script):
def run(self, data, commit):
dev_a = data["dev_a"]
dev_b = data["dev_b"]
port_a_use_interfaces = data["port_a_use_interfaces"]
port_b_use_interfaces = data["port_b_use_interfaces"]
patch_pairs = data["patch_pairs"]
cable_label = data["cable_label"]
port_a_type = data["port_type_a"]
port_b_type = data["port_type_b"]
patch_pairs = data["patch_pairs"]
cable_label = data["cable_label"]
create_patches = True
patch_pair_no = 0
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment