aboutsummaryrefslogtreecommitdiffstats
path: root/cables.py
diff options
context:
space:
mode:
authorHåkon Solbjørg <hlsolbjorg@gmail.com>2019-04-02 00:58:09 +0200
committerHåkon Solbjørg <hlsolbjorg@gmail.com>2019-04-02 19:56:20 +0200
commit1ceefd7d700caf18f2390b94aa81d9f0207a4d85 (patch)
tree8af07d61e62e27ad0ee73efa3adc84e7bd874e3c /cables.py
parentaacc12dc9ab445e020444a5bd32b51f1fb62ddb8 (diff)
chore: Refactor to get switches from gondul before executing labler ♻️
Diffstat (limited to 'cables.py')
-rw-r--r--cables.py5
1 files changed, 1 insertions, 4 deletions
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)