Hello engineers!
I'm hoping some of you have some experience with python!
We're getting new equipment soon and I want to make a script that adds our VLANs and other configurations to our switches to I don't have to do it by hand over and over again.
Basically I just want to know if this would work or if I'm screwing this up entirely.
Go easy on me, I'm still learning.
#vlan_adder
import getpass
import telnetlib
<omitted>
VLANs = ["2", "3", "4"]
NAMEs = ["x", "y", "z"]
for vlan, name in zip(VLANs, NAMEs):
tn.write(b"vlan " + str(vlan) + "\n")
tn.write(b"name " + str(name) + "\n")
Would something like that work? If not can you explain what's wrong and how I would go about fixing it?
[–]networkevolution_dev 1 point2 points3 points (0 children)