check_junos_bgp: adding some sanity after last commit
This commit is contained in:
parent
6f07e55372
commit
be62f38997
|
@ -133,11 +133,13 @@ my @args = (
|
||||||
spec => 'logical-router|L=s',
|
spec => 'logical-router|L=s',
|
||||||
usage => '-L, --logical-router=ROUTER',
|
usage => '-L, --logical-router=ROUTER',
|
||||||
desc => 'Logical Router',
|
desc => 'Logical Router',
|
||||||
|
default => '',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
spec => 'instance|I=s',
|
spec => 'instance|I=s',
|
||||||
usage => '-I, --instance=INSTANCE',
|
usage => '-I, --instance=INSTANCE',
|
||||||
desc => 'Instance',
|
desc => 'Instance',
|
||||||
|
default => '',
|
||||||
},
|
},
|
||||||
|
|
||||||
);
|
);
|
||||||
|
@ -335,10 +337,12 @@ sub get_neighbor_information
|
||||||
my %args;
|
my %args;
|
||||||
|
|
||||||
if ($conf{'logical-router'} || $conf{'instance'}) {
|
if ($conf{'logical-router'} || $conf{'instance'}) {
|
||||||
if ($conf{'logical-router'})
|
if ($conf{'logical-router'} ne '') {
|
||||||
$args{'logical-router'} = $conf{'logical-router'};
|
$args{'logical-router'} = $conf{'logical-router'};
|
||||||
if ($conf{'instance'})
|
}
|
||||||
$args{'instance'} = $conf{'instance'};
|
if ($conf{'instance'} ne '') {
|
||||||
|
$args{'instance'} = $conf{'instance'};
|
||||||
|
}
|
||||||
|
|
||||||
$res = send_query($device, $query, \%args);
|
$res = send_query($device, $query, \%args);
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue