09-24-2010 12:15 PM
Hi,
Could you help us to write a script in Cisco GSS.
We would like to know if running script from DB server it can activate and suspend of answer group instances.
Thanks
Mohan
10-15-2010 02:43 AM
Hi Mohan,
For this, assuming that your DB server is running linux/solaris, I would recommend a "expect" script that connects to the GSS through telnet/ssh and runs the commands you need to suspend/activate the answer groups.
Daniel
10-16-2010 09:14 AM
Hi,
Yes, you are correct, We could like to write a script that execute from server and switch over to instance in the Cisco GSS.
Could you help me write standard template.
Thanks
Mohan
10-18-2010 01:18 AM
Hi Mohan,
Here is a simple script that will telnet into the GSS and go into config mode. You can modify it easily to make changes to the configuration.
To execute it from a linux host, you just need to run "expect
set force_conservative 0
if {$force_conservative} {
set send_slow {1 .1}
proc send {ignore arg} {
sleep .1
exp_send -s -- $arg
}
}
set timeout 8
spawn /bin/bash
match_max 100000
send -- "telnet
expect {
"login: " {
send -- "admin\r"
expect -exact "Password:"
send -- "
expect ">"
send -- "enable\r"
expect -exact "Password:"
send -- "
expect "#"
send -- "config t\r"
expect "(config)#"
send -- "exit\r"
expect "#"
send -- "exit\r"
}
}
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide