Hi All,
A simple one no doubt. I am trying to get a DNA template to loop through a list of devices using the Template Programmer api. My plan is to use the bulkfile parameter to point to a csv file with all the devices IP's in and reference a json params file.
python template.py --template test --bulkfile devices.csv --paramsfile test.json
CSV file e.g
device_ip
192.168.1.1,
192.168.2.1
json params file to store the IP & MASK e.g
{"IP":"192.168.1.1",
"MASK":255.255.255.0"},
{"IP":"192.168.2.1",
"MASK":255.255.255.0"},
The template:
int g1/0 $IP $MASK
How do i construct the loop so as to go through the csv and apply the contents of the json? I can't wrap my head around this today
everything i try doesn't seem to read in the variables.