line |
true |
false |
branch |
252
|
0 |
1 |
if (@_ == 1) { } |
261
|
0 |
1 |
unless my $self = $class->SUPER::new(%cliArgs) |
290
|
0 |
2 |
if ($arg eq 'prompt') { } |
|
0 |
2 |
elsif ($arg eq 'return_result') { } |
|
0 |
2 |
elsif ($arg eq 'more_prompt') { } |
|
0 |
2 |
elsif ($arg eq 'more_paging') { } |
|
0 |
2 |
elsif ($arg eq 'cmd_confirm_prompt') { } |
|
0 |
2 |
elsif ($arg eq 'cmd_initiated_prompt') { } |
|
0 |
2 |
elsif ($arg eq 'cmd_feed_timeout') { } |
|
0 |
2 |
elsif ($arg eq 'console') { } |
|
0 |
2 |
elsif ($arg eq 'wake_console') { } |
|
0 |
2 |
elsif ($arg eq 'debug_file') { } |
314
|
0 |
0 |
if (@_ == 1) { } |
316
|
0 |
0 |
if ($args{'host'} =~ /^(.+?)\s+(\d+)$/) |
339
|
0 |
0 |
defined $args{'blocking'} ? : |
|
0 |
0 |
defined $args{'connection_timeout'} ? : |
|
0 |
0 |
defined $args{'errmode'} ? : |
|
0 |
0 |
defined $args{'return_reference'} ? : |
364
|
0 |
0 |
defined $args{'prompt_credentials'} ? : |
|
0 |
0 |
defined $args{'timeout'} ? : |
|
0 |
0 |
defined $args{'read_attempts'} ? : |
|
0 |
0 |
defined $args{'data_with_error'} ? : |
|
0 |
0 |
defined $args{'wake_console'} ? : |
|
0 |
0 |
$self->{'LOGINSTAGE'} ? : |
366
|
0 |
0 |
if (not $self->{'LOGINSTAGE'} and $self->{'TYPE'} ne 'SERIAL' and useIPv6() and defined $args{'blocking'} and not $args{'blocking'}) |
370
|
0 |
0 |
if defined $self->{'POLL'}{'errmode'} |
378
|
0 |
0 |
if @_ |
380
|
0 |
0 |
unless (defined $self->{'POLL'} and $self->{'POLL'}{'coderef'} == 'Control::CLI::AvayaData'->can('connect_poll')) |
385
|
0 |
0 |
if defined $self->{'POLL'}{'errmode'} |
388
|
0 |
0 |
unless defined $self->{'POLL'}{'complete'} and $self->{'POLL'}{'complete'} == 0 |
397
|
0 |
0 |
if $self->connection_type eq 'SERIAL' |
420
|
0 |
0 |
defined $args{'blocking'} ? : |
|
0 |
0 |
defined $args{'timeout'} ? : |
|
0 |
0 |
defined $args{'errmode'} ? : |
|
0 |
0 |
defined $args{'return_reference'} ? : |
430
|
0 |
0 |
defined $args{'prompt_credentials'} ? : |
|
0 |
0 |
defined $args{'read_attempts'} ? : |
|
0 |
0 |
defined $args{'data_with_error'} ? : |
|
0 |
0 |
defined $args{'wake_console'} ? : |
439
|
0 |
0 |
if defined $self->{'POLL'}{'errmode'} |
447
|
0 |
0 |
if @_ |
449
|
0 |
0 |
unless (defined $self->{'POLL'} and $self->{'POLL'}{'coderef'} == 'Control::CLI::AvayaData'->can('login_poll')) |
454
|
0 |
0 |
if defined $self->{'POLL'}{'errmode'} |
457
|
0 |
0 |
unless defined $self->{'POLL'}{'complete'} and $self->{'POLL'}{'complete'} == 0 |
468
|
0 |
0 |
if (@_ == 1) { } |
476
|
0 |
0 |
unless defined $args{'command'} |
489
|
0 |
0 |
defined $args{'blocking'} ? : |
|
0 |
0 |
defined $args{'timeout'} ? : |
|
0 |
0 |
defined $args{'errmode'} ? : |
|
0 |
0 |
defined $args{'return_result'} ? : |
|
0 |
0 |
(defined $args{'return_result'} ? $args{'return_result'} : $self->{$Package}{'return_result'}) ? : |
|
0 |
0 |
defined $args{'return_reference'} ? : |
513
|
0 |
0 |
defined $args{'prompt'} ? : |
|
0 |
0 |
defined $args{'more_prompt'} ? : |
|
0 |
0 |
defined $args{'more_prompt'} ? : |
|
0 |
0 |
defined $args{'more_pages'} ? : |
|
0 |
0 |
defined $args{'cmd_confirm_prompt'} ? : |
|
0 |
0 |
defined $args{'progress_dots'} ? : |
516
|
0 |
0 |
if defined $self->{'POLL'}{'errmode'} |
520
|
0 |
0 |
if ($args{'poll_syntax'}) { } |
521
|
0 |
0 |
wantarray ? : |
524
|
0 |
0 |
wantarray ? : |
544
|
0 |
0 |
if (lc $_[0] ne 'command' and lc $_[0] ne 'poll_syntax') { } |
553
|
0 |
0 |
if $args[$i] eq 'command' |
554
|
0 |
0 |
if $args[$i] eq 'feed' |
555
|
0 |
0 |
if $args[$i] eq 'feed_list' and ref $args[$i + 1] eq 'ARRAY' |
556
|
0 |
0 |
if $args[$i] eq 'prompt' |
557
|
0 |
0 |
if $args[$i] eq 'more_pages' |
558
|
0 |
0 |
if $args[$i] eq 'timeout' |
559
|
0 |
0 |
if $args[$i] eq 'blocking' |
560
|
0 |
0 |
if $args[$i] eq 'return_reference' |
561
|
0 |
0 |
if $args[$i] eq 'return_result' |
562
|
0 |
0 |
if $args[$i] eq 'reset_prompt' |
563
|
0 |
0 |
if $args[$i] eq 'more_prompt' |
564
|
0 |
0 |
if $args[$i] eq 'progress_dots' |
565
|
0 |
0 |
if $args[$i] eq 'cmd_initiated_prompt' |
566
|
0 |
0 |
if $args[$i] eq 'errmode' |
567
|
0 |
0 |
if $args[$i] eq 'poll_syntax' |
570
|
0 |
0 |
unless defined $cmd |
573
|
0 |
0 |
$returnRes ? : |
610
|
0 |
0 |
if defined $self->{'POLL'}{'errmode'} |
614
|
0 |
0 |
if ($pollSyntax) { } |
615
|
0 |
0 |
wantarray ? : |
618
|
0 |
0 |
wantarray ? : |
626
|
0 |
0 |
if @_ |
628
|
0 |
0 |
unless (defined $self->{'POLL'} and $self->{'POLL'}{'coderef'} == 'Control::CLI::AvayaData'->can('cmd_poll')) |
633
|
0 |
0 |
if defined $self->{'POLL'}{'errmode'} |
636
|
0 |
0 |
unless defined $self->{'POLL'}{'complete'} and $self->{'POLL'}{'complete'} == 0 |
647
|
0 |
0 |
if (@_ == 1) { } |
661
|
0 |
0 |
defined $args{'blocking'} ? : |
|
0 |
0 |
defined $args{'timeout'} ? : |
|
0 |
0 |
defined $args{'errmode'} ? : |
677
|
0 |
0 |
if defined $self->{'POLL'}{'errmode'} |
681
|
0 |
0 |
if ($args{'poll_syntax'}) { } |
682
|
0 |
0 |
wantarray ? : |
685
|
0 |
0 |
wantarray ? : |
693
|
0 |
0 |
if @_ |
695
|
0 |
0 |
unless (defined $self->{'POLL'} and $self->{'POLL'}{'coderef'} == 'Control::CLI::AvayaData'->can('attribute_poll')) |
700
|
0 |
0 |
if defined $self->{'POLL'}{'errmode'} |
703
|
0 |
0 |
unless defined $self->{'POLL'}{'complete'} and $self->{'POLL'}{'complete'} == 0 |
714
|
0 |
0 |
if (@_ == 1) { } |
729
|
0 |
0 |
defined $args{'blocking'} ? : |
|
0 |
0 |
defined $args{'timeout'} ? : |
|
0 |
0 |
defined $args{'errmode'} ? : |
748
|
0 |
0 |
$args{'baudrate'} eq 'max' ? : |
752
|
0 |
0 |
if defined $self->{'POLL'}{'errmode'} |
756
|
0 |
0 |
if ($args{'poll_syntax'}) { } |
757
|
0 |
0 |
wantarray ? : |
760
|
0 |
0 |
wantarray ? : |
768
|
0 |
0 |
if @_ |
770
|
0 |
0 |
unless (defined $self->{'POLL'} and $self->{'POLL'}{'coderef'} == 'Control::CLI::AvayaData'->can('change_baudrate_poll')) |
775
|
0 |
0 |
if defined $self->{'POLL'}{'errmode'} |
778
|
0 |
0 |
unless defined $self->{'POLL'}{'complete'} and $self->{'POLL'}{'complete'} == 0 |
789
|
0 |
0 |
if (@_ == 1) { } |
803
|
0 |
0 |
defined $args{'blocking'} ? : |
|
0 |
0 |
defined $args{'timeout'} ? : |
|
0 |
0 |
defined $args{'errmode'} ? : |
814
|
0 |
0 |
defined $args{'password'} ? : |
|
0 |
0 |
defined $args{'prompt_credentials'} ? : |
820
|
0 |
0 |
if defined $self->{'POLL'}{'errmode'} |
828
|
0 |
0 |
if @_ |
830
|
0 |
0 |
unless (defined $self->{'POLL'} and $self->{'POLL'}{'coderef'} == 'Control::CLI::AvayaData'->can('enable_poll')) |
834
|
0 |
0 |
if defined $self->{'POLL'}{'errmode'} |
837
|
0 |
0 |
unless defined $self->{'POLL'}{'complete'} and $self->{'POLL'}{'complete'} == 0 |
848
|
0 |
0 |
if (@_ == 1) { } |
862
|
0 |
0 |
defined $args{'blocking'} ? : |
|
0 |
0 |
defined $args{'timeout'} ? : |
|
0 |
0 |
defined $args{'errmode'} ? : |
876
|
0 |
0 |
if defined $self->{'POLL'}{'errmode'} |
884
|
0 |
0 |
if @_ |
886
|
0 |
0 |
unless (defined $self->{'POLL'} and $self->{'POLL'}{'coderef'} == 'Control::CLI::AvayaData'->can('device_more_paging_poll')) |
890
|
0 |
0 |
if defined $self->{'POLL'}{'errmode'} |
893
|
0 |
0 |
unless defined $self->{'POLL'}{'complete'} and $self->{'POLL'}{'complete'} == 0 |
913
|
0 |
0 |
defined $args{'blocking'} ? : |
|
0 |
0 |
defined $args{'timeout'} ? : |
|
0 |
0 |
defined $args{'errmode'} ? : |
925
|
0 |
0 |
defined $args{'username'} ? : |
|
0 |
0 |
defined $args{'password'} ? : |
|
0 |
0 |
defined $args{'prompt_credentials'} ? : |
928
|
0 |
0 |
if defined $self->{'POLL'}{'errmode'} |
936
|
0 |
0 |
if @_ |
938
|
0 |
0 |
unless (defined $self->{'POLL'} and $self->{'POLL'}{'coderef'} == 'Control::CLI::AvayaData'->can('device_peer_cpu_poll')) |
942
|
0 |
0 |
if defined $self->{'POLL'}{'errmode'} |
945
|
0 |
0 |
unless defined $self->{'POLL'}{'complete'} and $self->{'POLL'}{'complete'} == 0 |
956
|
0 |
0 |
unless (defined $fh) |
959
|
0 |
0 |
unless (ref $fh or length $fh) |
963
|
0 |
0 |
unless (ref $fh or defined fileno $fh) |
966
|
0 |
0 |
unless open $fh, '>', "$logfile" |
987
|
0 |
0 |
if (defined $newSetting) |
999
|
0 |
0 |
if (defined $newSetting) |
1003
|
0 |
0 |
$newSetting ? : |
1004
|
0 |
0 |
$delayPrompt ? : |
1013
|
0 |
0 |
if defined $newSetting |
1021
|
0 |
0 |
if defined $newSetting |
1029
|
0 |
0 |
if defined $newSetting |
1037
|
0 |
0 |
if (defined $newSetting) |
1048
|
0 |
0 |
if (defined $newSetting) |
1059
|
0 |
0 |
if defined $newSetting |
1067
|
0 |
0 |
if defined $newSetting |
1075
|
0 |
0 |
if defined $newSetting |
1083
|
0 |
0 |
if defined $newSetting |
1091
|
0 |
0 |
if defined $newSetting |
1117
|
0 |
0 |
unless ($self->{'POLLING'}) |
1122
|
0 |
0 |
unless (defined $self->{'POLL'}{$pollsub}) |
1128
|
0 |
0 |
if (@_ and not %args) |
1162
|
0 |
0 |
defined $args{'username'} ? : |
|
0 |
0 |
defined $args{'password'} ? : |
|
0 |
0 |
defined $args{'passphrase'} ? : |
|
0 |
0 |
defined $args{'prompt_credentials'} ? : |
|
0 |
0 |
defined $args{'login_timeout'} ? : |
|
0 |
0 |
defined $args{'read_attempts'} ? : |
|
0 |
0 |
defined $args{'data_with_error'} ? : |
|
0 |
0 |
defined $args{'wake_console'} ? : |
|
0 |
0 |
$self->{'LOGINSTAGE'} ? : |
1167
|
0 |
0 |
if defined $connect->{'errmode'} |
1169
|
0 |
0 |
if ($connect->{'stage'} < 1) |
1189
|
0 |
0 |
unless $ok |
1191
|
0 |
0 |
unless defined $self->console |
1207
|
0 |
0 |
if $ok |
1217
|
0 |
0 |
unless ($self->{'POLLING'}) |
1222
|
0 |
0 |
unless (defined $self->{'POLL'}{$pollsub}) |
1225
|
0 |
0 |
if (@_ and not %args) |
1248
|
0 |
0 |
defined $args{'username'} ? : |
|
0 |
0 |
defined $args{'password'} ? : |
|
0 |
0 |
defined $args{'read_attempts'} ? : |
|
0 |
0 |
defined $args{'data_with_error'} ? : |
|
0 |
0 |
defined $args{'wake_console'} ? : |
|
0 |
0 |
defined $args{'prompt_credentials'} ? : |
1253
|
0 |
0 |
if defined $login->{'errmode'} |
1254
|
0 |
0 |
if $self->eof |
1259
|
0 |
0 |
if ($login->{'stage'} < 1) |
1261
|
0 |
0 |
if ($self->{'LOGINSTAGE'}) { } |
1269
|
0 |
0 |
if ($self->{'LOGINSTAGE'} eq 'username' and $login->{'username'}) { } |
|
0 |
0 |
elsif ($self->{'LOGINSTAGE'} eq 'password' and $login->{'password'}) { } |
|
0 |
0 |
elsif ($self->console and $login->{'wake_console'}) { } |
1270
|
0 |
0 |
unless $self->print('line', $login->{'username'}, 'errmode', 'return') |
1276
|
0 |
0 |
unless $self->print('line', $login->{'password'}, 'errmode', 'return') |
1283
|
0 |
0 |
unless $self->put('string', $login->{'wake_console'}, 'errmode', 'return') |
1287
|
0 |
0 |
if ($login->{'stage'} < 2) |
1293
|
0 |
0 |
unless $ok |
1297
|
0 |
0 |
$self->{'POLL'}{'read_buffer'} =~ /\n/ ? : |
1304
|
0 |
0 |
if (($patdepth = rindex($self->{'POLL'}{'read_buffer'}, $LoginPatterns{$key})) >= 0) |
1306
|
0 |
0 |
unless ($login->{'family_type'}) |
1308
|
0 |
0 |
if ($key eq 'banner' or $key eq 'menu' or $key eq 'submenu') { } |
|
0 |
0 |
elsif ($key eq 'srbanner') { } |
|
0 |
0 |
elsif ($key eq 'xlrbanner') { } |
|
0 |
0 |
elsif ($key eq 'ersbanner' or $key eq 'passportbanner' or $key eq 'pp1600banner') { } |
|
0 |
0 |
elsif ($key eq 'vspbanner') { } |
|
0 |
0 |
elsif ($key eq 'wlan9100banner') { } |
1313
|
0 |
0 |
if ($key eq 'banner') |
1314
|
0 |
0 |
if $self->{'POLL'}{'read_buffer'} =~ /\*\*\* ((?:[^\*\n]+?) (?:Switch|Controller|Platform) (?:WC)?\d+.*?)\s+/ |
1316
|
0 |
0 |
if ($self->{'POLL'}{'read_buffer'} =~ /FW:([\d\.]+)\s+SW:v([\d\.]+)/) |
1327
|
0 |
0 |
if $self->{'POLL'}{'read_buffer'} =~ /\((Secure Router \d+)\)/ |
1328
|
0 |
0 |
if $self->{'POLL'}{'read_buffer'} =~ /Version: (.+)/ |
1335
|
0 |
0 |
if $self->{'POLL'}{'read_buffer'} =~ /\* Software Release (?i:v|REL)?(.+?) / |
1342
|
0 |
0 |
if $self->{'POLL'}{'read_buffer'} =~ /\* Software Release (?i:v|REL)?(.+?) / |
1349
|
0 |
0 |
if $self->{'POLL'}{'read_buffer'} =~ /Software Release Build (.+?) / |
1356
|
0 |
0 |
if $self->{'POLL'}{'read_buffer'} =~ /AvayaOS Version (.+?) / |
1359
|
0 |
0 |
if ($patdepth > $deepest) |
1364
|
0 |
0 |
if $deepest > -1 |
1367
|
0 |
0 |
if ($self->{'POLL'}{'read_buffer'} =~ /$usernamePrompt/) { } |
|
0 |
0 |
elsif ($self->{'POLL'}{'read_buffer'} =~ /$passwordPrompt/) { } |
1377
|
0 |
0 |
if ($pattern eq 'banner' or $pattern eq 'bell') { } |
|
0 |
0 |
elsif ($pattern eq 'menu') { } |
|
0 |
0 |
elsif ($pattern eq 'submenu') { } |
|
0 |
0 |
elsif ($pattern =~ /^more\d$/) { } |
|
0 |
0 |
elsif ($pattern =~ /^consoleLogMsg\d$/) { } |
|
0 |
0 |
elsif ($pattern eq 'lastlogin') { } |
|
0 |
0 |
elsif ($pattern eq 'username') { } |
|
0 |
0 |
elsif ($pattern eq 'password') { } |
|
0 |
0 |
elsif ($pattern eq 'localfail') { } |
|
0 |
0 |
elsif ($pattern eq 'radiusfail') { } |
|
0 |
0 |
elsif ($pattern =~ /^radiustimeout\d$/) { } |
1379
|
0 |
0 |
unless $self->put('string', $CTRL_Y, 'errmode', 'return') |
1385
|
0 |
0 |
unless $self->put('string', 'c', 'errmode', 'return') |
1391
|
0 |
0 |
unless $self->put('string', $CTRL_C, 'errmode', 'return') |
1397
|
0 |
0 |
unless $self->put('string', 'q', 'errmode', 'return') |
1406
|
0 |
0 |
unless $self->print('errmode', 'return') |
1413
|
0 |
0 |
unless $self->print('errmode', 'return') |
1419
|
0 |
0 |
if ($login->{'login_attempted'}) |
1423
|
0 |
0 |
unless ($login->{'username'}) |
1424
|
0 |
0 |
if ($self->{'TYPE'} eq 'SSH') { } |
1428
|
0 |
0 |
unless ($login->{'prompt_credentials'}) |
1435
|
0 |
0 |
unless $self->print('line', $login->{'username'}, 'errmode', 'return') |
1443
|
0 |
0 |
if ($login->{'password_sent'}) |
1447
|
0 |
0 |
unless ($login->{'password'}) |
1448
|
0 |
0 |
unless ($login->{'prompt_credentials'}) |
1454
|
0 |
0 |
unless $self->print('line', $login->{'password'}, 'errmode', 'return') |
1472
|
0 |
0 |
if ($login->{'family_type'}) { } |
1473
|
0 |
0 |
if ($login->{'family_type'} eq $Prm{'pers'}) { } |
1476
|
0 |
0 |
if ($self->{'POLL'}{'local_buffer'} =~ /($InitPrompt{$promptType})/) |
1484
|
0 |
0 |
if ($self->{'POLL'}{'local_buffer'} =~ /($InitPrompt{$login->{'family_type'}})/) |
1492
|
0 |
0 |
if ($self->{'POLL'}{'local_buffer'} =~ /($InitPrompt{$key})/) |
1502
|
0 |
0 |
if ($capturedPrompt) |
1512
|
0 |
0 |
if $login->{'family_type'} eq $Prm{'pers'} |
1513
|
0 |
0 |
if ($login->{'detectionFromPrompt'}) |
1514
|
0 |
0 |
if ($login->{'family_type'} eq $Prm{'bstk'} or defined $cliType and $cliType eq 'nncli') { } |
1524
|
0 |
0 |
if ($login->{'family_type'} eq $Prm{'generic'} or $login->{'detectionFromPrompt'} and not $self->{'LASTPROMPT'} =~ /^@/) { } |
1530
|
0 |
0 |
unless $self->{'POLL'}{'blocking'} |
1532
|
0 |
0 |
if ($login->{'stage'} < 3) |
1534
|
0 |
0 |
unless $ok |
1536
|
0 |
0 |
if ($login->{'family_type'} eq $Prm{'generic'} and $self->{'errmode'} eq 'croak' || $self->{'errmode'} eq 'die') |
1541
|
0 |
0 |
if ($login->{'stage'} < 4) |
1542
|
0 |
0 |
if ($login->{'family_type'} eq $Prm{'pers'} or $login->{'family_type'} eq $Prm{'xlr'}) |
1543
|
0 |
0 |
$self->{'LASTPROMPT'} =~ /^@/ ? : |
1544
|
0 |
0 |
if $self->{'LASTPROMPT'} =~ /^@/ |
1546
|
0 |
0 |
if $login->{'detectionFromPrompt'} |
1550
|
0 |
0 |
if $login->{'login_attempted'} |
1560
|
0 |
0 |
unless ($self->{'POLLING'}) |
1565
|
0 |
0 |
unless (defined $self->{'POLL'}{$pollsub}) |
1569
|
0 |
0 |
if (@_ and not %args) |
1573
|
0 |
0 |
if defined $args{'feed_list'} and !ref($args{'feed_list'}) eq 'ARRAY' |
1600
|
0 |
0 |
defined $args{'prompt'} ? : |
|
0 |
0 |
defined $args{'more_prompt'} ? : |
|
0 |
0 |
defined $args{'more_prompt'} ? : |
|
0 |
0 |
defined $args{'more_pages'} ? : |
|
0 |
0 |
defined $args{'cmd_confirm_prompt'} ? : |
|
0 |
0 |
defined $args{'cmd_initiated_prompt'} ? : |
|
0 |
0 |
defined $args{'progress_dots'} ? : |
|
0 |
0 |
defined $args{'timeout'} ? : |
1606
|
0 |
0 |
if defined $cmd->{'errmode'} |
1607
|
0 |
0 |
if $self->eof |
1608
|
0 |
0 |
if $cmd->{'reset_prompt'} |
1612
|
0 |
0 |
if ($cmd->{'stage'} < 1) |
1614
|
0 |
0 |
if (defined $cmd->{'command'}) |
1617
|
0 |
0 |
if ($command =~ /\?\s*$/ and $self->{$Package}{'ATTRIB'}{'is_nncli'}) |
1618
|
0 |
0 |
if ($familyType eq $Prm{'sr'}) { } |
1625
|
0 |
0 |
unless $self->print('line', $command, 'errmode', 'return') |
1631
|
0 |
0 |
if ($cmd->{'stage'} == 1) { } |
|
0 |
0 |
elsif ($cmd->{'stage'} == 2) { } |
1633
|
0 |
0 |
if defined $ok and $ok == 0 |
1634
|
0 |
0 |
unless (defined $ok) |
1635
|
0 |
0 |
if ($cmd->{'alreadyCmdTimeout'} or not length $familyType or $familyType eq $Prm{'generic'}) |
1639
|
0 |
0 |
unless $self->print('errmode', 'return') |
1645
|
0 |
0 |
unless $self->{'POLL'}{'blocking'} |
1651
|
0 |
0 |
unless $ok |
1653
|
0 |
0 |
unless (length $self->{'POLL'}{'read_buffer'}) |
1656
|
0 |
0 |
if ($feed = shift @{$$cmd{'feed_data'};}) { } |
1660
|
0 |
0 |
if (++$cmd->{'cmdPromptCount'} > $self->{$Package}{'cmd_feed_timeout'}) |
1666
|
0 |
0 |
unless $self->print('line', $feed, 'errmode', 'return') |
1669
|
0 |
0 |
unless $self->{'POLL'}{'blocking'} |
1675
|
0 |
0 |
unless $ok |
1680
|
0 |
0 |
if ($cmd->{'progress_dots'}) |
1681
|
0 |
0 |
unless defined $cmd->{'progress'} |
1682
|
0 |
0 |
if (($cmd->{'progress'} += length $self->{'POLL'}{'read_buffer'}) > $cmd->{'progress_dots'}) |
1688
|
0 |
0 |
unless ($cmd->{'cmdEchoRemoved'}) |
1690
|
0 |
0 |
if ($self->{'POLL'}{'local_buffer'} =~ s/(^.*\n)//) { } |
1693
|
0 |
0 |
if $familyType eq $Prm{'xirrus'} |
1697
|
0 |
0 |
unless length $self->{'POLL'}{'read_buffer'} |
1710
|
0 |
0 |
if (length $output) |
1712
|
0 |
0 |
if $familyType eq $Prm{'sr'} |
1713
|
0 |
0 |
if ($familyType eq $Prm{'xirrus'}) |
1726
|
0 |
0 |
if length $output |
1727
|
0 |
0 |
if length $cmd->{'lastLine'} |
1729
|
0 |
0 |
if (length $output) |
1735
|
0 |
0 |
if (length $cmd->{'lastLine'} and $self->{'POLL'}{'local_buffer'} =~ s/\n\n$/\n/) { } |
1746
|
0 |
0 |
unless length $cmd->{'lastLine'} |
1748
|
0 |
0 |
if ($cmd->{'lastLine'} =~ s/($cmd->{'prompt'})//) |
1751
|
0 |
0 |
if $cmd->{'reset_prompt'} |
1752
|
0 |
0 |
$cmd->{'reset_prompt'} ? : |
1753
|
0 |
0 |
unless ($newLineLastLine and not length $cmd->{'lastLine'}) |
1759
|
0 |
0 |
if ($cmd->{'more_prompt_delay'} and not $cmd->{'morePromptDelayed'} and $cmd->{'lastLine'} =~ /(?:$cmd->{'more_prompt_delay'})$/) |
1763
|
0 |
0 |
unless $self->{'POLL'}{'blocking'} |
1766
|
0 |
0 |
if ($cmd->{'more_prompt'} and $cmd->{'lastLine'} =~ s/(?:$cmd->{'more_prompt'})$//) |
1768
|
0 |
0 |
if (length $cmd->{'lastLine'}) |
1771
|
0 |
0 |
if $newLineLastLine |
1773
|
0 |
0 |
if $newLineLastLine |
1774
|
0 |
0 |
if ($cmd->{'more_pages'} == 0 or $cmd->{'more_pages'}-- > 1) { } |
1776
|
0 |
0 |
unless $self->put('string', $Space, 'errmode', 'return') |
1781
|
0 |
0 |
unless $self->put('string', 'q', 'errmode', 'return') |
1784
|
0 |
0 |
unless $self->{'POLL'}{'blocking'} |
1787
|
0 |
0 |
if ($cmd->{'yn_prompt'} and $cmd->{'lastLine'} =~ /$cmd->{'yn_prompt'}/) |
1788
|
0 |
0 |
if (++$cmd->{'ynPromptCount'} > $self->{$Package}{'cmd_feed_timeout'}) |
1792
|
0 |
0 |
unless $self->print('line', 'y', 'errmode', 'return') |
1794
|
0 |
0 |
unless $self->{'POLL'}{'blocking'} |
1797
|
0 |
0 |
if ($cmd->{'cmd_prompt'} and $cmd->{'lastLine'} =~ /$cmd->{'cmd_prompt'}/) |
1801
|
0 |
0 |
unless $self->{'POLL'}{'blocking'} |
1806
|
0 |
0 |
if $cmd->{'lastLine'} =~ s/^\n// |
1818
|
0 |
0 |
unless ($self->{'POLLING'}) |
1823
|
0 |
0 |
unless (defined $self->{'POLL'}{$pollsub}) |
1826
|
0 |
0 |
if (@_ and not %args) |
1844
|
0 |
0 |
if defined $attrib->{'errmode'} |
1845
|
0 |
0 |
if $self->eof |
1848
|
0 |
0 |
if ($attrib->{'stage'} < 1) |
1849
|
0 |
0 |
unless defined $attrib->{'attribute'} |
1850
|
0 |
0 |
unless $familyType |
1853
|
0 |
0 |
if ($attrib->{'reload'}) |
1854
|
0 |
0 |
if ($attrib->{'attribute'} eq 'family_type' or $attrib->{'attribute'} eq 'is_nncli' or $attrib->{'attribute'} eq 'is_acli' or $attrib->{'attribute'} eq 'is_master_cpu' or $attrib->{'attribute'} eq 'cpu_slot') { } |
1856
|
0 |
0 |
unless $self->print |
1865
|
0 |
0 |
if ($attrib->{'stage'} < 2) |
1867
|
0 |
0 |
unless $ok |
1871
|
0 |
0 |
if ($attrib->{'stage'} < 3) |
1873
|
0 |
0 |
if (defined $self->{$Package}{'ATTRIBFLAG'}{$attrib->{'attribute'}}) |
1878
|
0 |
0 |
if $familyType eq $Prm{'generic'} |
1883
|
0 |
0 |
if ($familyType eq $Prm{'pers'}) { } |
|
0 |
0 |
elsif ($familyType eq $Prm{'bstk'}) { } |
|
0 |
0 |
elsif ($familyType eq $Prm{'sr'}) { } |
|
0 |
0 |
elsif ($familyType eq $Prm{'trpz'}) { } |
|
0 |
0 |
elsif ($familyType eq $Prm{'xlr'}) { } |
|
0 |
0 |
elsif ($familyType eq $Prm{'xirrus'}) { } |
1884
|
0 |
0 |
if ($attrib->{'attribute'} eq 'is_ha') |
1885
|
0 |
0 |
unless ($attrib->{'debugMsg'}) |
1890
|
0 |
0 |
unless $ok |
1891
|
0 |
0 |
if ($$outref =~ /Current CPU State : Disabled State./) { } |
|
0 |
0 |
elsif ($$outref =~ /Current CPU State/) { } |
1903
|
0 |
0 |
if ($attrib->{'attribute'} eq 'sw_version') |
1904
|
0 |
0 |
unless ($attrib->{'debugMsg'}) |
1909
|
0 |
0 |
unless $ok |
1910
|
0 |
0 |
if $$outref =~ /Version : Build (?i:v|REL)?(.+?) / |
1914
|
0 |
0 |
if ($attrib->{'attribute'} eq 'fw_version') |
1915
|
0 |
0 |
if ($attrib->{'stage'} < 4) |
1916
|
0 |
0 |
unless ($attrib->{'debugMsg'}) |
1921
|
0 |
0 |
unless $ok |
1922
|
0 |
0 |
if ($$outref =~ /Version:\s+(?i:v|REL)?(.+)/) { } |
1932
|
0 |
0 |
unless ($attrib->{'debugMsg'}) |
1937
|
0 |
0 |
unless $ok |
1938
|
0 |
0 |
if ($$outref =~ /Version:\s+(?i:v|REL)?(.+)/) { } |
1947
|
0 |
0 |
if ($attrib->{'attribute'} eq 'stp_mode') |
1948
|
0 |
0 |
unless ($attrib->{'debugMsg'}) |
1953
|
0 |
0 |
unless $ok |
1954
|
0 |
0 |
if ($$outref =~ /flags spanning-tree-mode (mstp|rstp)/) { } |
1963
|
0 |
0 |
if ($attrib->{'attribute'} eq 'baudrate') |
1964
|
0 |
0 |
unless ($attrib->{'debugMsg'}) |
1969
|
0 |
0 |
unless $ok |
1970
|
0 |
0 |
if ($$outref =~ /sio (?:console )?baud (\d+)/) |
1976
|
0 |
0 |
if ($attrib->{'attribute'} eq 'max_baud') |
1977
|
0 |
0 |
if ($attrib->{'stage'} < 4) |
1978
|
0 |
0 |
unless ($attrib->{'debugMsg'}) |
1983
|
0 |
0 |
unless $ok |
1987
|
0 |
0 |
if ($$outref =~ /(?:-|\.\.)\s?(\d+)[>}]/) { } |
1997
|
0 |
0 |
unless ($attrib->{'debugMsg'}) |
2002
|
0 |
0 |
unless $ok |
2006
|
0 |
0 |
if ($$outref =~ /(?:-|\.\.)\s?(\d+)[>}]/) |
2012
|
0 |
0 |
if ($self->{$Package}{'ATTRIB'}{'is_master_cpu'}) { } |
2013
|
0 |
0 |
if ($attrib->{'attribute'} eq 'is_dual_cpu' or $attrib->{'attribute'} eq 'base_mac') |
2014
|
0 |
0 |
unless ($attrib->{'debugMsg'}) |
2019
|
0 |
0 |
unless $ok |
2020
|
0 |
0 |
if ($$outref =~ /SysDescr\s+: (.+?) \(/g) |
2022
|
0 |
0 |
if ($$outref =~ / BoxType: (.+)/cg) { } |
2033
|
0 |
0 |
if $$outref =~ /SysName\s+: (.+)/g |
2034
|
0 |
0 |
if ($self->{$Package}{'ATTRIB'}{'is_voss'}) { } |
2035
|
0 |
0 |
if ($$outref =~ /BrandName:?\s+: (.+)/cg) { } |
2046
|
0 |
0 |
if $$outref =~ /BaseMacAddr\s+: (.+)/g |
2047
|
0 |
0 |
if ($$outref =~ /CP.+ dormant / or $$outref =~ /\s1\s+\d{4}\S{2}\s+1\s+CPU\s+(?:\d+\s+){4}/ and $$outref =~ /\s2\s+\d{4}\S{2}\s+1\s+CPU\s+(?:\d+\s+){4}/) { } |
2057
|
0 |
0 |
if $$outref =~ /Virtual IP\s+: (.+)/g |
2065
|
0 |
0 |
if ($attrib->{'attribute'} eq 'model' or $attrib->{'attribute'} eq 'sysname' or $attrib->{'attribute'} eq 'is_apls' or $attrib->{'attribute'} eq 'is_voss' or $attrib->{'attribute'} eq 'apls_box_type' or $attrib->{'attribute'} eq 'brand_name' or not $self->{$Package}{'ATTRIBFLAG'}{'model'} and $attrib->{'attribute'} eq 'slots' || $attrib->{'attribute'} eq 'ports' or not $self->{$Package}{'ATTRIBFLAG'}{'is_voss'} and $attrib->{'attribute'} =~ /^(?:is_)?oob_/) |
2066
|
0 |
0 |
unless ($attrib->{'debugMsg'}) |
2071
|
0 |
0 |
unless $ok |
2072
|
0 |
0 |
if ($$outref =~ /SysDescr\s+: (.+?) \(/g) |
2074
|
0 |
0 |
if ($$outref =~ / BoxType: (.+)/cg) { } |
2085
|
0 |
0 |
if $$outref =~ /SysName\s+: (.+)/g |
2086
|
0 |
0 |
if ($self->{$Package}{'ATTRIB'}{'is_voss'}) { } |
2087
|
0 |
0 |
if ($$outref =~ /BrandName:?\s+: (.+)/cg) { } |
2098
|
0 |
0 |
if $$outref =~ /BaseMacAddr\s+: (.+)/g |
2100
|
0 |
0 |
if ($$outref =~ /CP.+ dormant / or $$outref =~ /\s1\s+\d{4}\S{2}\s+1\s+CPU\s+(?:\d+\s+){4}/ and $$outref =~ /\s2\s+\d{4}\S{2}\s+1\s+CPU\s+(?:\d+\s+){4}/) { } |
|
0 |
0 |
elsif ($$outref =~ /System Error Info :/) { } |
2109
|
0 |
0 |
if $$outref =~ /Virtual IP\s+: (.+)/g |
2110
|
0 |
0 |
if ($attrib->{'attribute'} eq 'model' or $attrib->{'attribute'} eq 'sysname' or $attrib->{'attribute'} eq 'is_apls' or $attrib->{'attribute'} eq 'is_voss' or $attrib->{'attribute'} eq 'apls_box_type' or $attrib->{'attribute'} eq 'brand_name') { } |
2119
|
0 |
0 |
if ($attrib->{'attribute'} eq 'slots' or $attrib->{'attribute'} eq 'ports') |
2120
|
0 |
0 |
if ($self->{$Package}{'ATTRIB'}{'is_nncli'} and $self->{$Package}{'ATTRIB'}{'model'} =~ /(?:Passport|ERS)-8[36]\d\d/) { } |
2121
|
0 |
0 |
if ($attrib->{'stage'} < 4) |
2122
|
0 |
0 |
unless ($attrib->{'debugMsg'}) |
2127
|
0 |
0 |
unless $ok |
2132
|
0 |
0 |
unless ($attrib->{'debugMsg'}) |
2137
|
0 |
0 |
unless $ok |
2143
|
0 |
0 |
unless ($attrib->{'debugMsg'}) |
2148
|
0 |
0 |
unless $ok |
2154
|
0 |
0 |
if ($attrib->{'attribute'} =~ /^(?:is_)?oob_/) |
2155
|
0 |
0 |
if ($self->{$Package}{'ATTRIB'}{'is_voss'}) { } |
2156
|
0 |
0 |
unless ($attrib->{'debugMsg'}) |
2161
|
0 |
0 |
unless $ok |
2163
|
0 |
0 |
if $$outref =~ /Portmgmt\s+ ([\d\.]+)/g |
2164
|
0 |
0 |
if $$outref =~ m[Port1/1\s+ ([\d\.]+)]g |
2165
|
0 |
0 |
if $$outref =~ /MgmtVirtIp\s+ ([\d\.]+)/g |
2166
|
0 |
0 |
if $$outref =~ m[Port2/1\s+ ([\d\.]+)]g |
2167
|
0 |
0 |
if $$outref =~ /Portmgmt2\s+ ([\d\.]+)/g |
2168
|
0 |
0 |
if ($self->{$Package}{'ATTRIB'}{'cpu_slot'} == 1) { } |
2180
|
0 |
0 |
defined $self->socket && (defined $self->{$Package}{'ATTRIB'}{'oob_ip'} && $self->socket->peerhost eq $self->{$Package}{'ATTRIB'}{'oob_ip'} || defined $self->{$Package}{'ATTRIB'}{'oob_virt_ip'} && $self->socket->peerhost eq $self->{$Package}{'ATTRIB'}{'oob_virt_ip'}) ? : |
2186
|
0 |
0 |
if ($attrib->{'stage'} < 4) |
2187
|
0 |
0 |
unless ($attrib->{'debugMsg'}) |
2192
|
0 |
0 |
unless $ok |
2194
|
0 |
0 |
if ($$outref =~ /CP.+ dormant / or $$outref =~ /\s1\s+\d{4}\S{2}\s+1\s+CPU\s+(?:\d+\s+){4}/ and $$outref =~ /\s2\s+\d{4}\S{2}\s+1\s+CPU\s+(?:\d+\s+){4}/) { } |
2203
|
0 |
0 |
if ($$outref =~ /Virtual IP\s+: (.+)/g) { } |
2212
|
0 |
0 |
unless ($attrib->{'debugMsg'}) |
2217
|
0 |
0 |
unless $ok |
2219
|
0 |
0 |
if $$outref =~ m[^net mgmt ip ([\d\.]+)/[\d\.]+ *(?:cpu-slot [35])?$]m |
2220
|
0 |
0 |
if $$outref =~ m[^net mgmt ip ([\d\.]+)/[\d\.]+ cpu-slot 6$]m |
2221
|
0 |
0 |
if ($self->{$Package}{'ATTRIB'}{'cpu_slot'} < 5) { } |
|
0 |
0 |
elsif ($self->{$Package}{'ATTRIB'}{'cpu_slot'} == 5) { } |
2227
|
0 |
0 |
$self->{$Package}{'ATTRIB'}{'is_dual_cpu'} ? : |
2231
|
0 |
0 |
$self->{$Package}{'ATTRIB'}{'is_dual_cpu'} ? : |
2235
|
0 |
0 |
defined $self->socket && (defined $self->{$Package}{'ATTRIB'}{'oob_ip'} && $self->socket->peerhost eq $self->{$Package}{'ATTRIB'}{'oob_ip'} || defined $self->{$Package}{'ATTRIB'}{'oob_virt_ip'} && $self->socket->peerhost eq $self->{$Package}{'ATTRIB'}{'oob_virt_ip'}) ? : |
2243
|
0 |
0 |
if ($attrib->{'attribute'} eq 'is_apls') |
2248
|
0 |
0 |
if ($attrib->{'attribute'} eq 'is_voss') |
2249
|
0 |
0 |
unless ($attrib->{'debugMsg'}) |
2254
|
0 |
0 |
unless $ok |
2255
|
0 |
0 |
if ($$outref =~ m[Only devices /intflash]) { } |
2269
|
0 |
0 |
if ($attrib->{'attribute'} eq 'fw_version' or $attrib->{'attribute'} eq 'sw_version' or $attrib->{'attribute'} eq 'switch_mode' or $attrib->{'attribute'} eq 'unit_number' or $attrib->{'attribute'} eq 'base_unit' or $attrib->{'attribute'} eq 'stack_size' or $attrib->{'attribute'} eq 'model' or $attrib->{'attribute'} eq 'sysname' or $attrib->{'attribute'} eq 'base_mac') |
2270
|
0 |
0 |
unless ($attrib->{'debugMsg'}) |
2275
|
0 |
0 |
unless $ok |
2276
|
0 |
0 |
if ($$outref =~ /Operation Mode:\s+(Switch)/g) { } |
|
0 |
0 |
elsif ($$outref =~ /Operation Mode:\s+(Stack), Unit # (\d)/g) { } |
2290
|
0 |
0 |
if $$outref =~ /MAC Address:\s+(.+)/cg |
2291
|
0 |
0 |
if $$outref =~ /sysDescr:\s+(.+?)(?:\n|\s{4})/cg |
2293
|
0 |
0 |
if ($$outref =~ /FW:([\d\.]+)\s+SW:v([\d\.]+)/cg) |
2297
|
0 |
0 |
if $$outref =~ /sysName: +(\S+)/cg |
2301
|
0 |
0 |
if ($attrib->{'attribute'} eq 'slots' or $attrib->{'attribute'} eq 'ports') |
2302
|
0 |
0 |
unless ($attrib->{'debugMsg'}) |
2307
|
0 |
0 |
unless $ok |
2312
|
0 |
0 |
if ($attrib->{'attribute'} eq 'stp_mode') |
2313
|
0 |
0 |
unless ($attrib->{'debugMsg'}) |
2318
|
0 |
0 |
unless $ok |
2319
|
0 |
0 |
if ($$outref =~ /Current STP Operation Mode: (STPG|MSTP|RSTP)/) { } |
2328
|
0 |
0 |
if ($attrib->{'attribute'} eq 'mgmt_vlan') |
2329
|
0 |
0 |
unless ($attrib->{'debugMsg'}) |
2334
|
0 |
0 |
unless $ok |
2335
|
0 |
0 |
if $$outref =~ /Management VLAN: (\d+)/ |
2339
|
0 |
0 |
if ($attrib->{'attribute'} eq 'mgmt_ip' or $attrib->{'attribute'} eq 'oob_ip' or $attrib->{'attribute'} eq 'is_oob_connected') |
2340
|
0 |
0 |
unless ($attrib->{'debugMsg'}) |
2345
|
0 |
0 |
unless $ok |
2346
|
0 |
0 |
if $$outref =~ /(?:Switch|Stack) IP Address:\s+[\d\.]+\s+([\d\.]+)\s+[\d\.]+/g |
2347
|
0 |
0 |
if ($$outref =~ /Mgmt (?:Switch|Stack) IP Address:\s+[\d\.]+\s+([\d\.]+)\s/g) { } |
2354
|
0 |
0 |
defined $self->socket && (defined $self->{$Package}{'ATTRIB'}{'oob_ip'} && $self->socket->peerhost eq $self->{$Package}{'ATTRIB'}{'oob_ip'}) ? : |
2359
|
0 |
0 |
if ($attrib->{'attribute'} eq 'baudrate') |
2360
|
0 |
0 |
unless ($attrib->{'debugMsg'}) |
2365
|
0 |
0 |
unless $ok |
2366
|
0 |
0 |
if ($$outref =~ /Terminal speed: (\d+)/) |
2372
|
0 |
0 |
if ($attrib->{'attribute'} eq 'max_baud') |
2373
|
0 |
0 |
unless ($attrib->{'debugMsg'}) |
2378
|
0 |
0 |
unless $ok |
2381
|
0 |
0 |
if not defined $baudRate or $1 > $baudRate |
2389
|
0 |
0 |
if ($attrib->{'attribute'} eq 'model') |
2390
|
0 |
0 |
unless ($attrib->{'debugMsg'}) |
2395
|
0 |
0 |
unless $ok |
2396
|
0 |
0 |
if $$outref =~ /Chassis Model: (.+)/ |
2400
|
0 |
0 |
if ($attrib->{'attribute'} eq 'fw_version' or $attrib->{'attribute'} eq 'sw_version') |
2401
|
0 |
0 |
unless ($attrib->{'debugMsg'}) |
2406
|
0 |
0 |
unless $ok |
2407
|
0 |
0 |
if $$outref =~ /Runtime: (.+)/g |
2408
|
0 |
0 |
if $$outref =~ /Boot: (.+?) / |
2412
|
0 |
0 |
if ($attrib->{'attribute'} eq 'slots' or $attrib->{'attribute'} eq 'ports') |
2413
|
0 |
0 |
if ($attrib->{'stage'} < 4) |
2414
|
0 |
0 |
unless ($attrib->{'debugMsg'}) |
2419
|
0 |
0 |
unless $ok |
2424
|
0 |
0 |
unless ($attrib->{'debugMsg'}) |
2429
|
0 |
0 |
unless $ok |
2434
|
0 |
0 |
if ($attrib->{'attribute'} eq 'sysname') |
2435
|
0 |
0 |
unless ($attrib->{'debugMsg'}) |
2440
|
0 |
0 |
unless $ok |
2441
|
0 |
0 |
if $$outref =~ /HostName: (.+)/g |
2445
|
0 |
0 |
if ($attrib->{'attribute'} eq 'base_mac') |
2446
|
0 |
0 |
unless ($attrib->{'debugMsg'}) |
2451
|
0 |
0 |
unless $ok |
2452
|
0 |
0 |
if $$outref =~ /Mac Address\s+0x(.+)/g |
2458
|
0 |
0 |
if ($attrib->{'attribute'} eq 'model' or $attrib->{'attribute'} eq 'sysname' or $attrib->{'attribute'} eq 'base_mac') |
2459
|
0 |
0 |
unless ($attrib->{'debugMsg'}) |
2464
|
0 |
0 |
unless $ok |
2465
|
0 |
0 |
if $$outref =~ /Product Name:\s+(.+)/g |
2466
|
0 |
0 |
if $$outref =~ /System Name:\s+(.+)/g |
2467
|
0 |
0 |
if $$outref =~ /System MAC:\s+(.+)/g |
2471
|
0 |
0 |
if ($attrib->{'attribute'} eq 'fw_version' or $attrib->{'attribute'} eq 'sw_version') |
2472
|
0 |
0 |
unless ($attrib->{'debugMsg'}) |
2477
|
0 |
0 |
unless $ok |
2478
|
0 |
0 |
if $$outref =~ /Version: (.+?) REL/g |
2479
|
0 |
0 |
if $$outref =~ /BootLoader:\s+(.+)/ |
2483
|
0 |
0 |
if ($attrib->{'attribute'} eq 'slots' or $attrib->{'attribute'} eq 'ports') |
2484
|
0 |
0 |
unless ($attrib->{'debugMsg'}) |
2489
|
0 |
0 |
unless $ok |
2496
|
0 |
0 |
if ($attrib->{'attribute'} eq 'model' or $attrib->{'attribute'} eq 'fw_version' or $attrib->{'attribute'} eq 'sw_version') |
2497
|
0 |
0 |
unless ($attrib->{'debugMsg'}) |
2502
|
0 |
0 |
unless $ok |
2503
|
0 |
0 |
if $$outref =~ /# box type\s+: (.+)/g |
2504
|
0 |
0 |
if $$outref =~ /# boot monitor version\s+: v?(.+)/g |
2505
|
0 |
0 |
if $$outref =~ /# software version\s+: v?(.+)/g |
2509
|
0 |
0 |
if ($attrib->{'attribute'} eq 'is_dual_cpu' or $attrib->{'attribute'} eq 'sysname') |
2510
|
0 |
0 |
unless ($attrib->{'debugMsg'}) |
2515
|
0 |
0 |
unless $ok |
2516
|
0 |
0 |
if $$outref =~ /SysDescr\s+: (.+?) \(/g |
2517
|
0 |
0 |
if $$outref =~ /SysName\s+: (.+)/g |
2518
|
0 |
0 |
if ($$outref =~ /CPU.+ dormant /) { } |
2527
|
0 |
0 |
if ($attrib->{'attribute'} eq 'slots' or $attrib->{'attribute'} eq 'ports') |
2528
|
0 |
0 |
unless ($attrib->{'debugMsg'}) |
2533
|
0 |
0 |
unless $ok |
2541
|
0 |
0 |
if ($attrib->{'attribute'} eq 'model' or $attrib->{'attribute'} eq 'base_mac' or $attrib->{'attribute'} eq 'fw_version' or $attrib->{'attribute'} eq 'sw_version') |
2542
|
0 |
0 |
unless ($attrib->{'debugMsg'}) |
2547
|
0 |
0 |
unless $ok |
2548
|
0 |
0 |
if $$outref =~ /Model: (.+?),/g |
2549
|
0 |
0 |
if $$outref =~ /IAPs\s+(.+?)-/g |
2550
|
0 |
0 |
if $$outref =~ /Boot Loader\s+(.+?) \(.+?\), Build: (.+)/g |
2551
|
0 |
0 |
if $$outref =~ /System Software\s+(.+?) \(.+?\), Build: (.+)/g |
2555
|
0 |
0 |
if ($attrib->{'attribute'} eq 'sysname') |
2556
|
0 |
0 |
unless ($attrib->{'debugMsg'}) |
2561
|
0 |
0 |
unless $ok |
2562
|
0 |
0 |
if $$outref =~ /Access Point Hostname\s*(.+)/g |
2566
|
0 |
0 |
if ($attrib->{'attribute'} eq 'slots' or $attrib->{'attribute'} eq 'ports') |
2567
|
0 |
0 |
unless ($attrib->{'debugMsg'}) |
2572
|
0 |
0 |
unless $ok |
2587
|
0 |
0 |
unless ($self->{'POLLING'}) |
2592
|
0 |
0 |
unless (defined $self->{'POLL'}{$pollsub}) |
2595
|
0 |
0 |
if (@_ and not %args) |
2615
|
0 |
0 |
$args{'baudrate'} eq 'max' ? : |
2620
|
0 |
0 |
if defined $changeBaud->{'errmode'} |
2623
|
0 |
0 |
if ($changeBaud->{'local_side_only'}) |
2635
|
0 |
0 |
if ($changeBaud->{'stage'} < 1) |
2636
|
0 |
0 |
unless ($self->connection_type eq 'SERIAL') |
2639
|
0 |
0 |
unless (defined $self->baudrate) |
2642
|
0 |
0 |
unless (defined $changeBaud->{'baudrate'}) |
2645
|
0 |
0 |
unless ($familyType) |
2651
|
0 |
0 |
if ($changeBaud->{'stage'} < 2) |
2652
|
0 |
0 |
unless (defined $self->{$Package}{'ATTRIB'}{'baudrate'}) |
2654
|
0 |
0 |
unless $ok |
2656
|
0 |
0 |
unless (defined $self->{$Package}{'ATTRIB'}{'baudrate'}) |
2657
|
0 |
0 |
unless $changeBaud->{'maxMode'} |
2662
|
0 |
0 |
unless (defined $self->{$Package}{'ATTRIB'}{'max_baud'}) |
2664
|
0 |
0 |
unless $ok |
2666
|
0 |
0 |
if ($changeBaud->{'maxMode'} and not defined $self->{$Package}{'ATTRIB'}{'max_baud'}) |
2671
|
0 |
0 |
if $changeBaud->{'maxMode'} |
2673
|
0 |
0 |
if ($changeBaud->{'baudrate'} == $self->baudrate) |
2679
|
0 |
0 |
if ($familyType eq $Prm{'generic'}) { } |
|
0 |
0 |
elsif ($familyType eq $Prm{'bstk'}) { } |
|
0 |
0 |
elsif ($familyType eq $Prm{'pers'}) { } |
2683
|
0 |
0 |
unless ($changeBaud->{'baudrate'} == 9600 or $changeBaud->{'baudrate'} == 19200 or $changeBaud->{'baudrate'} == 38400) |
2688
|
0 |
0 |
unless ($changeBaud->{'baudrate'} == 9600 or $changeBaud->{'baudrate'} == 19200 or $changeBaud->{'baudrate'} == 38400 or $changeBaud->{'baudrate'} == 57600 or $changeBaud->{'baudrate'} == 115200) |
2694
|
0 |
0 |
unless $changeBaud->{'maxMode'} |
2702
|
0 |
0 |
if ($changeBaud->{'stage'} < 3) |
2703
|
0 |
0 |
if ($familyType eq $Prm{'pers'}) |
2704
|
0 |
0 |
unless (defined $self->{$Package}{'ATTRIB'}{'model'}) |
2706
|
0 |
0 |
unless $ok |
2708
|
0 |
0 |
if ($changeBaud->{'userExec'} = $self->last_prompt =~ />\s?$/) |
2710
|
0 |
0 |
unless $ok |
2716
|
0 |
0 |
if ($changeBaud->{'stage'} < 4) |
2717
|
0 |
0 |
if ($familyType eq $Prm{'pers'} and $self->{$Package}{'ATTRIB'}{'is_nncli'}) |
2718
|
0 |
0 |
if ($changeBaud->{'privExec'} = !($self->last_prompt =~ /\(config/)) |
2720
|
0 |
0 |
unless $ok |
2721
|
0 |
0 |
unless $$resref |
2727
|
0 |
0 |
if ($changeBaud->{'stage'} < 5) |
2728
|
0 |
0 |
if ($familyType eq $Prm{'bstk'}) { } |
|
0 |
0 |
elsif ($familyType eq $Prm{'pers'}) { } |
2729
|
0 |
0 |
unless $self->print('line', "terminal speed $changeBaud->{'baudrate'}", 'errmode', 'return') |
2733
|
0 |
0 |
if ($self->{$Package}{'ATTRIB'}{'model'} =~ /(?:Passport|ERS)-(?:83|16)\d\d/) { } |
2734
|
0 |
0 |
if ($self->{$Package}{'ATTRIB'}{'is_nncli'}) { } |
2735
|
0 |
0 |
unless $self->print('line', "boot config sio baud $changeBaud->{'baudrate'}", 'errmode', 'return') |
2739
|
0 |
0 |
unless $self->print('line', "config bootconfig sio baud $changeBaud->{'baudrate'}", 'errmode', 'return') |
2744
|
0 |
0 |
if ($self->{$Package}{'ATTRIB'}{'is_nncli'}) { } |
2745
|
0 |
0 |
unless $self->print('line', "boot config sio console baud $changeBaud->{'baudrate'}", 'errmode', 'return') |
2749
|
0 |
0 |
unless $self->print('line', "config bootconfig sio console baud $changeBaud->{'baudrate'}", 'errmode', 'return') |
2758
|
0 |
0 |
if ($changeBaud->{'stage'} < 6) |
2760
|
0 |
0 |
unless $ok |
2761
|
0 |
0 |
if (length $self->{'POLL'}{'read_buffer'} and $self->{'POLL'}{'read_buffer'} =~ /$self->{$Package}{'prompt_qr'}/) |
2763
|
0 |
0 |
unless $changeBaud->{'maxMode'} |
2768
|
0 |
0 |
if (defined $self->{$Package}{'ORIGBAUDRATE'}) { } |
2769
|
0 |
0 |
if $self->{$Package}{'ORIGBAUDRATE'} == $changeBaud->{'baudrate'} |
2777
|
0 |
0 |
if ($changeBaud->{'stage'} < 7) |
2782
|
0 |
0 |
unless $ok |
2788
|
0 |
0 |
if ($changeBaud->{'stage'} < 8) |
2790
|
0 |
0 |
unless $ok |
2794
|
0 |
0 |
if ($changeBaud->{'stage'} < 9) |
2795
|
0 |
0 |
if ($familyType eq $Prm{'pers'} and $self->{$Package}{'ATTRIB'}{'is_nncli'}) |
2796
|
0 |
0 |
if ($changeBaud->{'privExec'}) |
2798
|
0 |
0 |
unless $ok |
2799
|
0 |
0 |
unless $$resref |
2805
|
0 |
0 |
if ($changeBaud->{'stage'} < 10) |
2806
|
0 |
0 |
if ($familyType eq $Prm{'pers'} and $self->{$Package}{'ATTRIB'}{'is_nncli'}) |
2807
|
0 |
0 |
if ($changeBaud->{'userExec'}) |
2809
|
0 |
0 |
unless $ok |
2810
|
0 |
0 |
unless $$resref |
2824
|
0 |
0 |
unless ($self->{'POLLING'}) |
2829
|
0 |
0 |
unless (defined $self->{'POLL'}{$pollsub}) |
2832
|
0 |
0 |
if (@_ and not %args) |
2846
|
0 |
0 |
defined $args{'password'} ? : |
|
0 |
0 |
defined $args{'prompt_credentials'} ? : |
2851
|
0 |
0 |
if defined $enable->{'errmode'} |
2852
|
0 |
0 |
if $self->eof |
2858
|
0 |
0 |
if ($enable->{'stage'} < 1) |
2860
|
0 |
0 |
unless $familyType |
2861
|
0 |
0 |
unless $self->{$Package}{'ATTRIB'}{'is_nncli'} |
2862
|
0 |
0 |
unless $self->last_prompt =~ />\s?$/ |
2866
|
0 |
0 |
unless $self->print('line', 'enable', 'errmode', 'return') |
2873
|
0 |
0 |
unless $ok |
2876
|
0 |
0 |
if $self->{'POLL'}{'local_buffer'} =~ /error: Access denied/ |
2877
|
0 |
0 |
if ($self->{'POLL'}{'local_buffer'} =~ /$passwordPrompt/) |
2879
|
0 |
0 |
if (defined $enable->{'enable_password'}) { } |
2880
|
0 |
0 |
if ($enable->{'login_attempted'} == 1) { } |
2883
|
0 |
0 |
unless $self->print('line', $enablePwd, 'errmode', 'return') |
2889
|
0 |
0 |
unless $self->print('errmode', 'return') |
2894
|
0 |
0 |
if ($enable->{'login_attempted'} == 1) { } |
|
0 |
0 |
elsif ($enable->{'login_attempted'} == 2) { } |
2897
|
0 |
0 |
unless $self->print('errmode', 'return') |
2903
|
0 |
0 |
unless $self->print('line', $enablePwd, 'errmode', 'return') |
2907
|
0 |
0 |
if ($enable->{'prompt_credentials'}) { } |
2909
|
0 |
0 |
unless $self->print('line', $enablePwd, 'errmode', 'return') |
2915
|
0 |
0 |
unless $self->print('errmode', 'return') |
2925
|
0 |
0 |
if $enable->{'login_failed'} |
2926
|
0 |
0 |
if $self->last_prompt =~ />\s?$/ |
2927
|
0 |
0 |
if defined $enablePwd |
2937
|
0 |
0 |
unless ($self->{'POLLING'}) |
2942
|
0 |
0 |
unless (defined $self->{'POLL'}{$pollsub}) |
2945
|
0 |
0 |
if (@_ and not %args) |
2962
|
0 |
0 |
if defined $devMorePage->{'errmode'} |
2963
|
0 |
0 |
if $self->eof |
2966
|
0 |
0 |
unless $familyType |
2967
|
0 |
0 |
if ($familyType eq $Prm{'bstk'}) { } |
|
0 |
0 |
elsif ($familyType eq $Prm{'pers'} or $familyType eq $Prm{'xlr'}) { } |
|
0 |
0 |
elsif ($familyType eq $Prm{'sr'}) { } |
|
0 |
0 |
elsif ($familyType eq $Prm{'trpz'}) { } |
|
0 |
0 |
elsif ($familyType eq $Prm{'xirrus'}) { } |
2968
|
0 |
0 |
$devMorePage->{'enable'} ? : |
|
0 |
0 |
unless defined $devMorePage->{'cmdString'} |
2970
|
0 |
0 |
unless $ok |
2971
|
0 |
0 |
unless $$resref |
2974
|
0 |
0 |
if ($self->{$Package}{'ATTRIB'}{'is_nncli'}) { } |
2975
|
0 |
0 |
if ($devMorePage->{'stage'} < 1) |
2976
|
0 |
0 |
unless (defined $self->{$Package}{'ATTRIB'}{'model'}) |
2978
|
0 |
0 |
unless $ok |
2980
|
0 |
0 |
if (defined $self->{$Package}{'ATTRIB'}{'model'} and $self->{$Package}{'ATTRIB'}{'model'} =~ /(?:Passport|ERS)-83\d\d/) { } |
2987
|
0 |
0 |
if ($devMorePage->{'stage'} < 2) |
2988
|
0 |
0 |
$devMorePage->{'enable'} ? : |
|
0 |
0 |
unless defined $devMorePage->{'cmdString'} |
2990
|
0 |
0 |
unless $ok |
2991
|
0 |
0 |
if not $$resref and defined $self->{$Package}{'ATTRIB'}{'model'} |
2993
|
0 |
0 |
if $$resref |
2996
|
0 |
0 |
if ($devMorePage->{'stage'} < 3) |
2997
|
0 |
0 |
$devMorePage->{'enable'} ? : |
|
0 |
0 |
unless defined $devMorePage->{'cmdString'} |
2999
|
0 |
0 |
unless $ok |
3000
|
0 |
0 |
unless $$resref |
3004
|
0 |
0 |
$devMorePage->{'enable'} ? : |
|
0 |
0 |
unless defined $devMorePage->{'cmdString'} |
3006
|
0 |
0 |
unless $ok |
3007
|
0 |
0 |
unless $$resref |
3011
|
0 |
0 |
$devMorePage->{'enable'} ? : |
|
0 |
0 |
unless defined $devMorePage->{'cmdString'} |
3013
|
0 |
0 |
unless $ok |
3014
|
0 |
0 |
unless $$resref |
3017
|
0 |
0 |
$devMorePage->{'enable'} ? : |
|
0 |
0 |
unless defined $devMorePage->{'cmdString'} |
3019
|
0 |
0 |
unless $ok |
3020
|
0 |
0 |
unless $$resref |
3023
|
0 |
0 |
$devMorePage->{'enable'} ? : |
|
0 |
0 |
unless defined $devMorePage->{'cmdString'} |
3025
|
0 |
0 |
unless $ok |
3026
|
0 |
0 |
unless $$resref |
3040
|
0 |
0 |
unless ($self->{'POLLING'}) |
3045
|
0 |
0 |
unless (defined $self->{'POLL'}{$pollsub}) |
3048
|
0 |
0 |
if (@_ and not %args) |
3061
|
0 |
0 |
defined $args{'username'} ? : |
|
0 |
0 |
defined $args{'password'} ? : |
|
0 |
0 |
defined $args{'prompt_credentials'} ? : |
3066
|
0 |
0 |
if defined $devPeerCpu->{'errmode'} |
3067
|
0 |
0 |
if $self->eof |
3070
|
0 |
0 |
if ($devPeerCpu->{'stage'} < 1) |
3071
|
0 |
0 |
unless ($familyType) |
3074
|
0 |
0 |
unless ($familyType eq $Prm{'pers'}) |
3077
|
0 |
0 |
unless ($devPeerCpu->{'username'} and $devPeerCpu->{'password'} or $devPeerCpu->{'prompt_credentials'}) |
3083
|
0 |
0 |
if ($devPeerCpu->{'stage'} < 2) |
3085
|
0 |
0 |
unless $ok |
3087
|
0 |
0 |
unless $self->print('line', 'peer telnet', 'errmode', 'return') |
3092
|
0 |
0 |
if ($devPeerCpu->{'stage'} < 3) |
3094
|
0 |
0 |
unless defined $ok |
3095
|
0 |
0 |
unless $ok |
3097
|
0 |
0 |
unless defined $devPeerCpu->{'username'} |
3098
|
0 |
0 |
unless $self->print('line', $devPeerCpu->{'username'}, 'errmode', 'return') |
3103
|
0 |
0 |
if ($devPeerCpu->{'stage'} < 4) |
3105
|
0 |
0 |
unless defined $ok |
3106
|
0 |
0 |
unless $ok |
3108
|
0 |
0 |
unless defined $devPeerCpu->{'password'} |
3109
|
0 |
0 |
unless $self->print('line', $devPeerCpu->{'password'}, 'errmode', 'return') |
3116
|
0 |
0 |
unless $ok |
3120
|
0 |
0 |
$self->{'LASTPROMPT'} =~ /^@/ ? : |
3121
|
0 |
0 |
if $self->{'LASTPROMPT'} =~ /^@/ |
3131
|
0 |
0 |
unless (defined $self->{'POLL'}{$pollsub}) |
3141
|
0 |
0 |
if ($self->{$Package}{'ATTRIB'}{'is_nncli'}) { } |
3142
|
0 |
0 |
if ($cmdPrivExec->{'stage'} < 1) |
3143
|
0 |
0 |
if ($cmdPrivExec->{'userExec'} = $self->last_prompt =~ />\s?$/) |
3145
|
0 |
0 |
unless $ok |
3149
|
0 |
0 |
if ($cmdPrivExec->{'stage'} < 2) |
3151
|
0 |
0 |
unless $ok |
3156
|
0 |
0 |
if ($cmdPrivExec->{'stage'} < 3) |
3157
|
0 |
0 |
if ($cmdPrivExec->{'userExec'}) |
3159
|
0 |
0 |
unless $ok |
3160
|
0 |
0 |
unless $$resref |
3169
|
0 |
0 |
unless $ok |
3181
|
0 |
0 |
unless (defined $self->{'POLL'}{$pollsub}) |
3192
|
0 |
0 |
if ($self->{$Package}{'ATTRIB'}{'is_nncli'}) { } |
3193
|
0 |
0 |
if ($cmdConfig->{'stage'} < 1) |
3194
|
0 |
0 |
if ($cmdConfig->{'userExec'} = $self->last_prompt =~ />\s?$/) |
3196
|
0 |
0 |
unless $ok |
3200
|
0 |
0 |
if ($cmdConfig->{'stage'} < 2) |
3201
|
0 |
0 |
if ($cmdConfig->{'privExec'} = !($self->last_prompt =~ m[[\(/]config])) |
3203
|
0 |
0 |
unless $ok |
3204
|
0 |
0 |
unless $$resref |
3208
|
0 |
0 |
if ($cmdConfig->{'stage'} < 3) |
3210
|
0 |
0 |
unless $ok |
3215
|
0 |
0 |
if ($cmdConfig->{'stage'} < 4) |
3216
|
0 |
0 |
if ($cmdConfig->{'privExec'}) |
3218
|
0 |
0 |
unless $ok |
3219
|
0 |
0 |
unless $$resref |
3223
|
0 |
0 |
if ($cmdConfig->{'stage'} < 5) |
3224
|
0 |
0 |
if ($cmdConfig->{'userExec'}) |
3226
|
0 |
0 |
unless $ok |
3227
|
0 |
0 |
unless $$resref |
3235
|
0 |
0 |
unless $cmdcli =~ /^config / |
3237
|
0 |
0 |
unless $ok |
3248
|
0 |
0 |
unless (defined $self->{'POLL'}{$pollsub}) |
3255
|
0 |
0 |
if ($discDevice->{'stage'} < 1) |
3267
|
0 |
0 |
if ($discDevice->{'stage'} < 2) |
3270
|
0 |
0 |
unless $ok |
3272
|
0 |
0 |
if ($$outref =~ /\s+Configured\s+In Use\s+Last BootP/) |
3282
|
0 |
0 |
if ($discDevice->{'stage'} < 3) |
3285
|
0 |
0 |
unless $ok |
3287
|
0 |
0 |
if ($$outref =~ /^\s+auto-recover-delay :/m) |
3298
|
0 |
0 |
if ($discDevice->{'stage'} < 4) |
3301
|
0 |
0 |
unless $ok |
3303
|
0 |
0 |
if ($$outref =~ /^Version:\s+(?i:v|REL)?(.+)/m) |
3315
|
0 |
0 |
if ($discDevice->{'stage'} < 5) |
3318
|
0 |
0 |
unless $ok |
3320
|
0 |
0 |
if ($$outref =~ /^Access Point Hostname\s*(.+)$/m) |
3332
|
0 |
0 |
if ($discDevice->{'stage'} < 6) |
3335
|
0 |
0 |
unless $ok |
3337
|
0 |
0 |
if ($$outref =~ /^Chassis Model: (.+)$/m) |
3349
|
0 |
0 |
if ($discDevice->{'stage'} < 7) |
3352
|
0 |
0 |
unless $ok |
3354
|
0 |
0 |
if ($$outref =~ /Product Name:\s+(.+)/g) |
3359
|
0 |
0 |
if $$outref =~ /System Name:\s+(.+)/g |
3360
|
0 |
0 |
if $$outref =~ /System MAC:\s+(.+)/g |
3368
|
0 |
0 |
if ($discDevice->{'stage'} < 8) |
3371
|
0 |
0 |
unless $ok |
3373
|
0 |
0 |
if ($$outref =~ /^\s+NVRamSize:/m) |
3395
|
0 |
0 |
if (shift() & $self->{'debug'}) |
3399
|
0 |
0 |
if ($self->{$Package}{'DEBUGLOGFH'}) { } |
3417
|
0 |
0 |
if ($actualPrompt) |
3432
|
0 |
0 |
if $self->{$Package}{'ATTRIBFLAG'}{'slots'} |
3433
|
0 |
0 |
if $self->{$Package}{'ATTRIBFLAG'}{'ports'} |
3435
|
0 |
0 |
if (defined $1 and !defined($currentSlot) || $1 != $currentSlot) |
3437
|
0 |
0 |
unless grep {$_ eq $currentSlot;} @slots |
3439
|
0 |
0 |
if (defined $currentSlot) { } |
3440
|
0 |
0 |
unless grep {$_ eq $2;} @{$ports[$currentSlot];} |
3443
|
0 |
0 |
unless grep {$_ eq $2;} @ports |
3459
|
0 |
0 |
if ($self->{$Package}{'ATTRIB'}{'family_type'} eq $Prm{'bstk'}) { } |
|
0 |
0 |
elsif ($self->{$Package}{'ATTRIB'}{'family_type'} eq $Prm{'sr'}) { } |
|
0 |
0 |
elsif ($self->{$Package}{'ATTRIB'}{'family_type'} eq $Prm{'trpz'}) { } |
|
0 |
0 |
elsif ($self->{$Package}{'ATTRIB'}{'family_type'} eq $Prm{'xirrus'}) { } |
|
0 |
0 |
elsif ($self->{$Package}{'ATTRIB'}{'is_apls'}) { } |
3489
|
0 |
0 |
if ($self->{$Package}{'ATTRIB'}{'family_type'} eq $Prm{'pers'}) |
3490
|
0 |
0 |
if ($self->{$Package}{'ATTRIB'}{'is_apls'} or $model =~ /^VSP/) { } |
3533
|
0 |
0 |
if ($attrib eq 'is_nncli' or $attrib eq 'is_acli') { } |
3543
|
0 |
0 |
if (defined $value) { } |
3549
|
0 |
0 |
if ($attrib eq 'family_type') |
3550
|
0 |
0 |
if (defined $Attribute{$value}) { } |
3568
|
0 |
0 |
unless $familyType = $self->{$Package}{'ATTRIB'}{'family_type'} |
3569
|
0 |
0 |
if $familyType eq $Prm{'generic'} |
3570
|
0 |
0 |
if ($$outref =~ /$ErrorPatterns{$familyType}/m) { } |
3586
|
0 |
0 |
if (defined $self->baudrate and defined(my $origBaud = $self->{$Package}{'ORIGBAUDRATE'})) |
3588
|
0 |
0 |
if ($familyType eq $Prm{'bstk'}) { } |
|
0 |
0 |
elsif ($familyType eq $Prm{'pers'}) { } |
3595
|
0 |
0 |
if ($self->{$Package}{'ATTRIB'}{'is_nncli'}) { } |