X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=FS%2FFS%2Fpart_export%2Frouter.pm;h=e2cde53d450699fccdaeb4ef3bc4a416739c5a7b;hp=1d1f907e279b69064689f0ace40ac8be6d601430;hb=7de51deb0e3e3fe1b0a9e06be6498256d5511bd0;hpb=2696b950330fd4fd232b62262b7b47256a2e2a04 diff --git a/FS/FS/part_export/router.pm b/FS/FS/part_export/router.pm index 1d1f907e2..e2cde53d4 100644 --- a/FS/FS/part_export/router.pm +++ b/FS/FS/part_export/router.pm @@ -31,12 +31,33 @@ The export itself needs the following options: =cut -use vars qw(@ISA @saltset); +use vars qw(@ISA %info @saltset); +use Tie::IxHash; use String::ShellQuote; use FS::part_export; @ISA = qw(FS::part_export); +tie my %options, 'Tie::IxHash', + 'protocol' => { + label=>'Protocol', + type =>'select', + options => [qw(telnet ssh)], + default => 'telnet'}, + 'insert' => {label=>'Insert command', default=>'' }, + 'delete' => {label=>'Delete command', default=>'' }, + 'replace' => {label=>'Replace command', default=>'' }, + 'Timeout' => {label=>'Time to wait for prompt', default=>'20' }, + 'Prompt' => {label=>'Prompt string', default=>'#' } +; + +%info = ( + 'svc' => 'svc_broadband', + 'desc' => 'Send a command to a router.', + 'options' => \%options, + 'notes' => '( more detailed description from Kristian / fire2wire? )', +); + @saltset = ( 'a'..'z' , 'A'..'Z' , '0'..'9' , '.' , '/' ); sub rebless { shift; } @@ -138,7 +159,7 @@ sub router_queue { } sub ssh_cmd { #subroutine, not method - use Net::SSH '0.07'; + use Net::SSH '0.08'; &Net::SSH::ssh_cmd( { @_ } ); } @@ -164,3 +185,5 @@ sub telnet_cmd { #sub router_delete { #subroutine, not method #} +1; +