Provide stdin to IOSXR.pm when none available (#462)
* See issue #461 for a detailed description
This commit is contained in:
committed by
Oliver Gorwits
parent
9f8dd0039b
commit
f5622929e0
@@ -36,6 +36,11 @@ Returns a list of hashrefs in the format C<{ mac => MACADDR, ip => IPADDR }>.
|
|||||||
sub arpnip {
|
sub arpnip {
|
||||||
my ($self, $hostlabel, $ssh, $args) = @_;
|
my ($self, $hostlabel, $ssh, $args) = @_;
|
||||||
|
|
||||||
|
# IOSXR show commands seem to depend on an available STDIN
|
||||||
|
unless (-t STDIN){
|
||||||
|
open STDIN, "<", "/dev/zero" or warn "Failed to fake stdin: $!";
|
||||||
|
}
|
||||||
|
|
||||||
debug "$hostlabel $$ arpnip()";
|
debug "$hostlabel $$ arpnip()";
|
||||||
my @data = $ssh->capture("show arp vrf all");
|
my @data = $ssh->capture("show arp vrf all");
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user