summaryrefslogtreecommitdiff
path: root/README
blob: aecf95c78fdd6693085b48b8466b8b923d4c0461 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
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 may be added into some VCS repo
and updates pushed there (for tracking changes).

The format of the output files is:
<vlan-id>;<vlan-name/description>;<interface-info>

-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...