line |
true |
false |
branch |
420
|
0 |
0 |
if ($log->is_trace) |
426
|
0 |
0 |
if ($self->hostname =~ /(.*)\@(.*)/) |
435
|
0 |
0 |
unless ($self->console_username) |
442
|
0 |
0 |
unless ($self->console_password) |
449
|
0 |
0 |
$self->get('auto_discover') ? : |
474
|
0 |
0 |
unless ($device_type) |
484
|
0 |
0 |
if ($device_type) |
487
|
0 |
0 |
if ($@) |
514
|
0 |
0 |
if (not @attribs) { } |
|
0 |
0 |
elsif (scalar @attribs == 1) { } |
529
|
0 |
0 |
wantarray ? : |
547
|
0 |
0 |
if ($self->hostname) { } |
572
|
0 |
0 |
if defined $model |
573
|
0 |
0 |
defined $model ? : |
578
|
0 |
0 |
if defined $vendor |
579
|
0 |
0 |
defined $vendor ? : |
584
|
0 |
0 |
if defined $hostname |
585
|
0 |
0 |
defined $hostname ? : |
590
|
0 |
0 |
if defined $username |
591
|
0 |
0 |
defined $username ? : |
596
|
0 |
0 |
if defined $password |
597
|
0 |
0 |
defined $password ? : |
602
|
0 |
0 |
if defined $provision |
603
|
0 |
0 |
defined $provision ? : |
608
|
0 |
0 |
if defined $admin_status |
609
|
0 |
0 |
defined $admin_status ? : |
614
|
0 |
0 |
if defined $console_username |
615
|
0 |
0 |
defined $console_username ? : |
620
|
0 |
0 |
if defined $console_password |
621
|
0 |
0 |
defined $console_password ? : |
626
|
0 |
0 |
if defined $console_hostname |
627
|
0 |
0 |
defined $console_hostname ? : |
632
|
0 |
0 |
if defined $console_tty |
633
|
0 |
0 |
defined $console_tty ? : |
639
|
0 |
0 |
if defined $enable_password |
640
|
0 |
0 |
defined $enable_password ? : |
645
|
0 |
0 |
if defined $snmp_community |
646
|
0 |
0 |
defined $snmp_community ? : |
654
|
0 |
0 |
if defined $snmp_community |
655
|
0 |
0 |
defined $snmp_community ? : |
660
|
0 |
0 |
if defined $snmp_version |
661
|
0 |
0 |
defined $snmp_version ? : |
666
|
0 |
0 |
if defined $session |
667
|
0 |
0 |
defined $session ? : |
672
|
0 |
0 |
if defined $paging_disabled |
673
|
0 |
0 |
defined $paging_disabled ? : |
690
|
0 |
0 |
unless $access_method |
692
|
0 |
0 |
if ($access_method =~ /ssh/i) { } |
|
0 |
0 |
elsif ($access_method =~ /telnet/i) { } |
|
0 |
0 |
elsif ($access_method) { } |
705
|
0 |
0 |
$access_method ? : |
728
|
0 |
0 |
unless $access_cmd |
730
|
0 |
0 |
if ($access_cmd =~ /^ssh$/i) { } |
|
0 |
0 |
elsif ($access_cmd =~ /^telnet$/i) { } |
|
0 |
0 |
elsif ($access_cmd =~ m[^/.+]) { } |
|
0 |
0 |
elsif ($access_cmd) { } |
747
|
0 |
0 |
if ($access_cmd =~ /ssh/i) { } |
|
0 |
0 |
elsif ($access_cmd =~ /telnet/i) { } |
|
0 |
0 |
elsif ($access_cmd) { } |
760
|
0 |
0 |
$access_cmd ? : |
774
|
0 |
0 |
if defined $regex |
775
|
0 |
0 |
defined $regex ? : |
805
|
0 |
0 |
unless ($self->hostname) |
811
|
0 |
0 |
unless ($self->access_method) |
817
|
0 |
0 |
unless ($self->access_cmd) |
823
|
0 |
0 |
unless ($self->username) |
830
|
0 |
0 |
if ($self->access_method =~ /^ssh$/) { } |
842
|
0 |
0 |
if (&_invalid_session($session)) { } |
850
|
0 |
0 |
if (&_host_not_reachable($self->hostname)) |
861
|
0 |
0 |
if ($@) |
873
|
0 |
0 |
if ($log->is_trace or $log->is_debug) { } |
938
|
0 |
0 |
if ($log->level == $Net::Autoconfig::Device::TRACE) |
945
|
0 |
0 |
if ($connected_to_device) { } |
|
0 |
0 |
elsif ($command_failed) { } |
959
|
0 |
0 |
$connected_to_device ? : |
1000
|
0 |
0 |
unless ($self->hostname) |
1006
|
0 |
0 |
unless ($self->provision) |
1013
|
0 |
0 |
unless ($self->access_method) |
1019
|
0 |
0 |
unless ($self->access_cmd) |
1025
|
0 |
0 |
unless ($self->console_username) |
1031
|
0 |
0 |
unless ($self->username) |
1041
|
0 |
0 |
unless ($tty and $username) |
1051
|
0 |
0 |
if ($self->access_method =~ /^ssh$/) { } |
1062
|
0 |
0 |
if (&_invalid_session($session)) { } |
1070
|
0 |
0 |
if (&_host_not_reachable($hostname)) |
1083
|
0 |
0 |
if ($@) |
1098
|
0 |
0 |
if ($log->is_trace or $log->is_debug) { } |
1147
|
0 |
0 |
if ($log->level == $Net::Autoconfig::Device::TRACE) |
1154
|
0 |
0 |
if ($connected_to_device) { } |
|
0 |
0 |
elsif ($command_failed) { } |
1171
|
0 |
0 |
if ($command_failed) |
1191
|
0 |
0 |
if ($command_failed) { } |
|
0 |
0 |
elsif ($connected_to_device) { } |
1207
|
0 |
0 |
$connected_to_device ? : |
1244
|
0 |
0 |
unless ($template_data) |
1250
|
0 |
0 |
if (&_invalid_session($self->session)) |
1257
|
0 |
0 |
unless ($self->admin_status) |
1264
|
0 |
0 |
unless (exists $$template_data{'default'}) |
1282
|
0 |
0 |
if ($$cmd{'required'}) { } |
1306
|
0 |
0 |
if (defined $replacement) { } |
1314
|
0 |
0 |
if ($$cmd{'required'}) { } |
1332
|
0 |
0 |
unless ($new_cmd eq $old_cmd) |
1366
|
0 |
0 |
if ($$cmd{'cmd'} =~ /wait/i) { } |
1377
|
0 |
0 |
if ($command_failed) |
1403
|
0 |
0 |
if ($log->is_trace) |
1410
|
0 |
0 |
if ($error_flag) |
1445
|
0 |
0 |
if ($self->hostname) |
1453
|
0 |
0 |
if ($self->vendor) { } |
1489
|
0 |
0 |
if ($self->vendor) { } |
|
0 |
0 |
elsif ($self->session and $self->provision) { } |
|
0 |
0 |
elsif ($self->snmp_community) { } |
1493
|
0 |
0 |
unless ($self->vendor eq $vendor) |
1516
|
0 |
0 |
if $info |
1520
|
0 |
0 |
if ($vendor) |
1525
|
0 |
0 |
$info ? : |
1550
|
0 |
0 |
if ($self->model) { } |
|
0 |
0 |
elsif ($self->session and $self->provision) { } |
|
0 |
0 |
elsif ($self->snmp_community) { } |
1572
|
0 |
0 |
if ($model) |
1577
|
0 |
0 |
$model ? : |
1599
|
0 |
0 |
if ($self->provision) |
1612
|
0 |
0 |
unless ($snmp) |
1627
|
0 |
0 |
if ($@) |
1633
|
0 |
0 |
if ($snmp_result) { } |
1645
|
0 |
0 |
$snmp_result ? : |
1668
|
0 |
0 |
if ($session) |
1670
|
0 |
0 |
unless ($self->admin_status) |
1679
|
0 |
0 |
if ($self->admin_status) { } |
1685
|
0 |
0 |
if ($command_failed) |
1743
|
0 |
0 |
unless ($self->session) |
1749
|
0 |
0 |
if ($self->admin_status) |
1782
|
0 |
0 |
if ($log->level == $Net::Autoconfig::Device::TRACE) |
1788
|
0 |
0 |
if ($command_failed) { } |
|
0 |
0 |
elsif ($self->admin_status) { } |
1826
|
0 |
0 |
if (&_invalid_session($session)) |
1834
|
0 |
0 |
if ($command_failed) |
1860
|
0 |
0 |
if ($self->session) { } |
1891
|
0 |
0 |
if (defined $message) |
1896
|
0 |
0 |
if ($self->session) { } |
1930
|
0 |
0 |
if (not $cmd) { } |
|
0 |
0 |
elsif (not ref $cmd eq 'HASH') { } |
1944
|
0 |
0 |
unless ($old_cmd) |
1958
|
0 |
0 |
if (defined $replacement) { } |
1966
|
0 |
0 |
if ($$cmd{'required'}) { } |
1984
|
0 |
0 |
unless ($new_cmd eq $old_cmd) |
1991
|
0 |
0 |
if ($$cmd{'cmd'}) |
2024
|
0 |
0 |
if (defined $status) |
2026
|
0 |
0 |
if ($status) { } |
2038
|
0 |
0 |
defined $status ? : |
2056
|
0 |
0 |
unless ($hostname) |
2062
|
0 |
0 |
$> ? : |
2063
|
0 |
0 |
if ($@) |
2072
|
0 |
0 |
if ($hostname =~ /.*\@(.*)/) |
2076
|
0 |
0 |
if ($ping->ping($hostname)) { } |
2113
|
0 |
0 |
unless defined $string |
2118
|
0 |
0 |
if ($string =~ /$regex/) |
2126
|
0 |
0 |
if ($device_model) { } |
2135
|
0 |
0 |
$device_model ? : |
2173
|
0 |
0 |
unless ($string) |
2183
|
0 |
0 |
if ($string =~ qr/$regex/) |
2195
|
0 |
0 |
if ($string =~ qr/$regex/) |
2204
|
0 |
0 |
unless (@$models) |
2212
|
0 |
0 |
if ($$all_types{$$models[-1]}) |
2218
|
0 |
0 |
wantarray ? : |
2238
|
0 |
0 |
unless (defined $session) |
2244
|
0 |
0 |
unless (ref $session) |
2250
|
0 |
0 |
if (not ref $session eq 'Expect') { } |
2283
|
0 |
0 |
if ($self) { } |
2286
|
0 |
0 |
unless ($session) |
2302
|
0 |
0 |
if ($@) { } |
2330
|
0 |
0 |
unless $ip_addr |
2332
|
0 |
0 |
if ($ip_addr =~ /(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})/) { } |
2337
|
0 |
0 |
if $octet > 255 |
2338
|
0 |
0 |
if $octet < 0 |
2365
|
0 |
0 |
unless $prefix |
2366
|
0 |
0 |
unless $prefix =~ m[/\d{1,2}$] |
2387
|
0 |
0 |
if ($prefix_octets > 0) { } |
|
0 |
0 |
elsif ($prefix_remainder) { } |
2403
|
0 |
0 |
wantarray ? : |
2435
|
0 |
0 |
unless ($netmask) |
2443
|
0 |
0 |
if (@netmask != 4) |
2451
|
0 |
0 |
if $octet > 255 |
2452
|
0 |
0 |
if $octet < 0 |