From 5bbb747fee565fe6c751c6b4c510b44a4556875c Mon Sep 17 00:00:00 2001 From: Logan Lipke Date: Fri, 10 Apr 2020 16:50:57 -0700 Subject: [PATCH] fixes broken usage of telnet object, uses new utils::connect method --- lf_l4_auth.pl | 13 +------------ lf_monitor.pl | 10 +--------- lf_nfs_io.pl | 4 +--- 3 files changed, 3 insertions(+), 24 deletions(-) diff --git a/lf_l4_auth.pl b/lf_l4_auth.pl index 9691268c..9e399a2b 100755 --- a/lf_l4_auth.pl +++ b/lf_l4_auth.pl @@ -145,20 +145,9 @@ if ( !defined *LANforge::Utils::fmt_cmd ) { } # Configure our utils. our $utils = new LANforge::Utils(); +$::utils->connect($lfmgr_host, $lfmgr_port); -#-----------------------------------------------------------------------# - -$::utils->telnet($::t); # Set our telnet object. -if ($::quiet eq "yes") { - $::utils->cli_send_silent(1); # Do show input to CLI - $::utils->cli_rcv_silent(1); # Repress output from CLI ?? -} -else { - $::utils->cli_send_silent(0); # Do show input to CLI - $::utils->cli_rcv_silent(0); # Repress output from CLI ?? -} - #-----------------------------------------------------------------------# # survey ports, complain if they are not present # #-----------------------------------------------------------------------# diff --git a/lf_monitor.pl b/lf_monitor.pl index f01c858c..4fe2ed9e 100755 --- a/lf_monitor.pl +++ b/lf_monitor.pl @@ -128,15 +128,7 @@ sub init { $t->waitfor("/btbits\>\>/"); $::utils = new LANforge::Utils(); - $::utils->telnet($t); # Set our telnet object. - if ($::quiet eq "yes") { - $::utils->cli_send_silent(1); # Do show input to CLI - $::utils->cli_rcv_silent(1); # Repress output from CLI ?? - } - else { - $::utils->cli_send_silent(0); # Do show input to CLI - $::utils->cli_rcv_silent(0); # Repress output from CLI ?? - } + $::utils->connect($lfmgr_host, $lfmgr_port); } ## ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- diff --git a/lf_nfs_io.pl b/lf_nfs_io.pl index fd718ca8..d672572f 100755 --- a/lf_nfs_io.pl +++ b/lf_nfs_io.pl @@ -229,9 +229,7 @@ sub init { $conn->max_buffer_length(1024 * 1024 * 10); # 10M buffer $::utils = new LANforge::Utils(); - $::utils->telnet($conn); # Set our telnet object. - $::utils->cli_send_silent($::DEBUG ? 0 : 1); # Do show input to CLI - $::utils->cli_rcv_silent($::DEBUG ? 0 : 1); # Repress output from CLI ?? + $::utils->connect($lfmgr_host, $lfmgr_port); if ($::group && $::group ne "") { my $ra_bounds = $::group_names{ $::group };