using trigger in an education environment for setting up initial configs of large number of routers and switches

34 views
Skip to first unread message

frank cui

unread,
Dec 17, 2013, 10:47:33 AM12/17/13
to trigge...@googlegroups.com
Hi,

I intend to use trigger in an education environment where I need to first reset all the device back to the original config and then push my prepared configs to these routers. Is it easily customizable by using trigger ?

I got few problems which may hinder me in the automation.

1. When I reloaded the device when resetting the configurations, how can I asynchronously send the command when the router comes back. Can I only use a timer-based solution ?
2. Can I use trigger with devices with customized banner messages ? 

I would be very thankful for your input.

Thanks
Frank 

Jathan McCollum

unread,
Feb 13, 2014, 11:19:37 AM2/13/14
to trigge...@googlegroups.com
Hello there, Frank-

My apologies on the delayed reply, I hope that you are still using Trigger.  Let me see if I can answer your questions inline:


On Tue, Dec 17, 2013 at 7:47 AM, frank cui <frank...@gmail.com> wrote:
Hi,

I intend to use trigger in an education environment where I need to first reset all the device back to the original config and then push my prepared configs to these routers. Is it easily customizable by using trigger ?

Yes. This needs to be better documented. The solution you're looking for is the Commando class that is imported from trigger.cmds.Commando. Using this you should be able to create a custom command execution template

Here is a simple example (without customizations) of how you would use Commando:
 

I got few problems which may hinder me in the automation.

1. When I reloaded the device when resetting the configurations, how can I asynchronously send the command when the router comes back. Can I only use a timer-based solution ?

By reloading do you mean that you are rebooting the device?  If so, we don't currently have a solution to attempt to reconnect to a device within an active event loop. This would require a special type of client. I like the idea.

For now, you'd have to create a deferred task call by digging a little deeper into the underlying API provided by the Twisted library that Trigger uses for the async network I/O.

I realize this is a tad advanced and isn't for the faint of heart. But if you're interested, here is an example subclass of trigger.cmds.Commando that utilizes twisted.task.deferLater to monitor the status of active connections to call a custom method.



2. Can I use trigger with devices with customized banner messages ? 

Yes. By default, Trigger will ignore banner messages.
 

I would be very thankful for your input.

Thanks
Frank 

--
You received this message because you are subscribed to the Google Groups "Trigger" group.
To unsubscribe from this group and stop receiving emails from it, send an email to trigger-user...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.



--
Jathan.
--
Reply all
Reply to author
Forward
0 new messages