Skip to content

Commit

Permalink
Merge branch 'master' of github.com:oetiker/SmokePing
Browse files Browse the repository at this point in the history
  • Loading branch information
oetiker committed Apr 30, 2015
2 parents 0e2179c + 6622ee2 commit 943f986
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 6 deletions.
8 changes: 4 additions & 4 deletions lib/Smokeping/probes/OpenSSHJunOSPing.pm
Expand Up @@ -4,11 +4,11 @@ package Smokeping::probes::OpenSSHJunOSPing;
This is a Smokeping probe module. Please use the command
C<smokeping -man Smokeping::probes::TelnetJunOSPing>
C<smokeping -man Smokeping::probes::OpenSSHJunOSPing>
to view the documentation or the command
C<smokeping -makepod Smokeping::probes::TelnetJunOSPing>
C<smokeping -makepod Smokeping::probes::OpenSSHJunOSPing>
to generate the POD document.
Expand Down Expand Up @@ -51,9 +51,9 @@ ${e}head2 Requirements
This module requires the L<Net::OpenSSH> and L<IO::Pty>.
DOC
authors => <<'DOC',
Tobias Oetiker L<lt>tobi@oetiker.chL<gt>
Tobias Oetiker E<lt>tobi@oetiker.chE<gt>
based on L<Smokeping::probes::TelnetJunOSPing> by S H A N L<lt>shanali@yahoo.comL<gt>.
based on L<Smokeping::probes::TelnetJunOSPing> by S H A N E<lt>shanali@yahoo.comE<gt>.
DOC
}
}
Expand Down
14 changes: 12 additions & 2 deletions lib/Smokeping/probes/TelnetIOSPing.pm
Expand Up @@ -138,7 +138,10 @@ sub pingone ($$){
my $bytes = $self->{properties}{packetsize};
my $pings = $self->pings($target);
my $timeout = $self->{properties}{timeout};

my $vrf ="";
if ( defined ($target->{vars}{vrf}) ) {
$vrf = " vrf $target->{vars}{vrf}";
}
# do NOT call superclass ... the ping method MUST be overwriten
my %upd;
my @args = ();
Expand Down Expand Up @@ -166,7 +169,7 @@ sub pingone ($$){
$telnet->waitfor('/[\@\w\-\.]+[>#][ ]*$/');
$telnet->print("terminal length 0");
$telnet->waitfor('/[\@\w\-\.]+[>#][ ]*$/');
$telnet->print("ping");
$telnet->print("ping$vrf");
$telnet->waitfor('/Protocol \[ip\]: $/');
$telnet->print("");
$telnet->waitfor('/Target IP address: $/');
Expand Down Expand Up @@ -278,6 +281,13 @@ specified with the option iosuser.
DOC
_example => 'password',
},

vrf => {
_doc => <<DOC,
The vrf option allows you to specify the vrf for ping
DOC
_example => 'VRF1',
},
});
}

Expand Down

0 comments on commit 943f986

Please sign in to comment.