From 89d1fc95b540e16eda87c90d98b4321426789fc5 Mon Sep 17 00:00:00 2001 From: Jon Clausen Date: Wed, 2 May 2018 16:12:20 +0200 Subject: initial commit, 'seems to work', README, notes --- README | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 README (limited to 'README') diff --git a/README b/README new file mode 100644 index 0000000..7d4068a --- /dev/null +++ b/README @@ -0,0 +1,33 @@ +This is a relatively simple piece of code, to solve a relatively central +lack of knowledge: + +Which VLANs exist on which devices? + +The script is run at some interval from CRON, parses the config files +gathered by RANCID, and extracts VLAN info + +The results are stored locally in 'vlanscrape's $HOME/data/ as one single +'csv' file per device. Later, that directory will be added into this repo +and updates will be pushed here. + +The format of the output files is: +;; + +-where: +vlan-id = integer +vlan-name = name or 'description' (if one exists) +iface-info = interface the vlan exists on (mostly with routers) + +Semicolon is chosen as delimiter, since the character is used in a similar +role in junos configs, and the risk of 'collision' should be reduced as a +consequence. + +Because this script relies on reading the local RANCID files, it needs to run +where RANCID runs. Currently that means 'statler'. + +The script uses 'core' modules or custom written functions exclusively. This +is to make it as "portable" as possible. The only 'requirement' is that the +python version should be higher than 2.7, but lower than 3.0 + +There is definitely room for improvement, but the script does what it says +on the tin - at least as long as nothing unexpected happens... -- cgit v1.1