Reply

Manipulating devices with different commands within the same script

[ Edited ]
Techie
Posts: 8
2805     0

I want to write a script that executes specfic string/commands on a specific device within the same script.  I have successfully written scripts that apply the same string across multiple hosts/vendors. Thanks!

Re: Manipulating devices with different commands within the same script

Techie
Posts: 8
2805     0

Never mind.  Just thought of how to do it.

Re: Manipulating devices with different commands within the same script

Adviser
Posts: 470
2805     0

Here is an example incase someone else is looking for it Smiley Happy

 

Script-Filter:
	$vendor in ["Cisco","HP"]

########################################################################
Action:
	Config SNMP

Action-Commands: {$Vendor eq "HP"}
	config t
	snmp-server READ infoblox RO
	snmp-server WRITE netmri RW
	end
	wr mem

Action-Commands: {$Vendor eq "Cisco" and $sysdescr like /IOS/}
	config t
	snmp-server community infoblox RO
	snmp-server community netmri RW
	end
	wr mem
########################################################################
Follow me on LinkedIn: https://www.linkedin.com/in/sifbaksh
Twitter: https://twitter.com/sifbaksh

https://sifbaksh.com
Showing results for 
Search instead for 
Did you mean: 

Recommended for You