http://www.freeside.biz/mediawiki/index.php?title=Freeside:4:Documentation:Developer/FS/part_export/router&feed=atom&action=historyFreeside:4:Documentation:Developer/FS/part export/router - Revision history2024-03-29T06:02:16ZRevision history for this page on the wikiMediaWiki 1.27.7http://www.freeside.biz/mediawiki/index.php?title=Freeside:4:Documentation:Developer/FS/part_export/router&diff=9436&oldid=prevJeremyd: Edit via perl MediaWiki framework (1.13)2015-11-18T15:37:53Z<p>Edit via perl MediaWiki framework (1.13)</p>
<p><b>New page</b></p><div>==FS::part_export::router==<br />
This export connects to a router and transmits commands via telnet or SSH. It requires the following custom router fields:<br />
<br />
==Required custom fields==<br />
; admin_address - IP address (or hostname) to connect.; admin_user - Username for the router.; admin_password - Password for the router.; admin_protocol - Protocol to use for the router. 'telnet' or 'ssh'. The ssh protocol only support password-less (ie. RSA key) authentication. As such, the admin_password field isn't used if ssh is specified.; admin_timeout - Time in seconds to wait for a connection.; admin_prompt - A regular expression matching the router's prompt. See Net&#58;&#58;Telnet for details. Only applies to the 'telnet' protocol.; admin_cmd_insert - Insert export command.; admin_cmd_insert_error - Insert export command error pattern.; admin_cmd_delete - Delete export command.; admin_cmd_delete_error - Delete export command error pattern.; admin_cmd_replace - Replace export command.; admin_cmd_replace_error - Replace export command error pattern.; admin_cmd_suspend - Suspend export command.; admin_cmd_suspend_error - Support export command error pattern.; admin_cmd_unsuspend - Unsuspend export command.; admin_cmd_unsuspend_error - Unsuspend export command error pattern.<br />
:The admin_cmd_* virtual fields, if set, will be processed in one of two ways. After being expanded, they will be run on the router specified by admin_address using the protocol specified by admin_protocol.<br />
:; Text&#58;&#58;Template<br />
::If the export command contains the string [@--, then it will be processed with Text::Template using [@-- and --@] as delimeters.<br />
:; eval<br />
::If the export command does not contain [@--, it will be double quoted and eval'd.<br />
<br />
:The admin_cmd_*_error virtual fields, if set, define a regular expression that will be matched against the output of the command being run. If the pattern matches, an error will be raised using the output as the error.<br />
<br />
:If any of the required router virtual fields are not defined, then the export silently declines.<br />
<br />
The export itself takes no options.</div>Jeremyd