X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=web%2Fsmanagement.pl;h=ed783b2fa915b245f821f92c9d19675416df061c;hb=065361daac62b4cdb33cf19caa534e29ac1dfde0;hp=b900f1ea53e140d0c45460c0f7dd5d7c41052866;hpb=9180f8278b332f8eb6c65a11d6f284f5facf6722;p=nms diff --git a/web/smanagement.pl b/web/smanagement.pl index b900f1e..ed783b2 100755 --- a/web/smanagement.pl +++ b/web/smanagement.pl @@ -22,22 +22,6 @@ my $sgetip = $dbh->prepare("SELECT ip FROM switches WHERE sysname = ?") or die "Could not prepare sgetip"; my $sgid = $dbh->prepare("SELECT nextval('squeue_group_sequence') as gid"); -# Send a command to switch and return the data recvied from the switch -sub switch_exec($$) { - my ($cmd, $conn) = @_; - - # Send the command and get data from switch - my @data = $conn->cmd($cmd); - my @lines = (); - foreach my $line (@data) { - # Remove escape-7 sequence - $line =~ s/\x1b\x37//g; - push (@lines, $line); - } - - return @lines; -} - sub parse_range($) { my $switches = $_; my @range;