From 1ceefd7d700caf18f2390b94aa81d9f0207a4d85 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A5kon=20Solbj=C3=B8rg?= Date: Tue, 2 Apr 2019 00:58:09 +0200 Subject: =?UTF-8?q?chore:=20Refactor=20to=20get=20switches=20from=20gondul?= =?UTF-8?q?=20before=20executing=20labler=20=E2=99=BB=EF=B8=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cables.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'cables.py') diff --git a/cables.py b/cables.py index f2b8c79..9226d88 100644 --- a/cables.py +++ b/cables.py @@ -1,7 +1,5 @@ from itertools import chain -from gondul import fetch_gondul_switches - cable_label_format = "%(switch_name)s-%(switch_num)s-%(cable_name)s" mark_twice = True num_tabs = 1 @@ -67,8 +65,7 @@ def write_csv(data, outfile="cable_labels.csv", split_per_num=100): len(split_data), outfile.replace(".", "-1."))) -def make_cable_labels(uplinks=3): +def make_cable_labels(switches, uplinks=3): print("Generating labels for cables") - switches = fetch_gondul_switches() labels = generate_labels(switches, uplinks=uplinks, aps=[]) write_csv(labels) -- cgit v1.2.3