line |
true |
false |
branch |
258
|
0 |
1 |
if (@_ == 1) { } |
267
|
0 |
1 |
unless my $self = $class->SUPER::new(%cliArgs) |
296
|
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') { } |
320
|
0 |
0 |
if (@_ == 1) { } |
322
|
0 |
0 |
if ($args{'host'} =~ /^(.+?)\s+(\d+)$/) |
346
|
0 |
0 |
defined $args{'blocking'} ? : |
|
0 |
0 |
defined $args{'connection_timeout'} ? : |
|
0 |
0 |
defined $args{'errmode'} ? : |
|
0 |
0 |
defined $args{'return_reference'} ? : |
372
|
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'} ? : |
374
|
0 |
0 |
if (not $self->{'LOGINSTAGE'} and $self->{'TYPE'} ne 'SERIAL' and useIPv6() and defined $args{'blocking'} and not $args{'blocking'}) |
378
|
0 |
0 |
if defined $self->{'POLL'}{'errmode'} |
386
|
0 |
0 |
if @_ |
388
|
0 |
0 |
unless (defined $self->{'POLL'} and $self->{'POLL'}{'coderef'} == 'Control::CLI::AvayaData'->can('connect_poll')) |
393
|
0 |
0 |
if defined $self->{'POLL'}{'errmode'} |
396
|
0 |
0 |
unless defined $self->{'POLL'}{'complete'} and $self->{'POLL'}{'complete'} == 0 |
405
|
0 |
0 |
if $self->connection_type eq 'SERIAL' |
428
|
0 |
0 |
defined $args{'blocking'} ? : |
|
0 |
0 |
defined $args{'timeout'} ? : |
|
0 |
0 |
defined $args{'errmode'} ? : |
|
0 |
0 |
defined $args{'return_reference'} ? : |
438
|
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'} ? : |
447
|
0 |
0 |
if defined $self->{'POLL'}{'errmode'} |
455
|
0 |
0 |
if @_ |
457
|
0 |
0 |
unless (defined $self->{'POLL'} and $self->{'POLL'}{'coderef'} == 'Control::CLI::AvayaData'->can('login_poll')) |
462
|
0 |
0 |
if defined $self->{'POLL'}{'errmode'} |
465
|
0 |
0 |
unless defined $self->{'POLL'}{'complete'} and $self->{'POLL'}{'complete'} == 0 |
476
|
0 |
0 |
if (@_ == 1) { } |
484
|
0 |
0 |
unless defined $args{'command'} |
497
|
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'} ? : |
521
|
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'} ? : |
524
|
0 |
0 |
if defined $self->{'POLL'}{'errmode'} |
528
|
0 |
0 |
if ($args{'poll_syntax'}) { } |
529
|
0 |
0 |
wantarray ? : |
532
|
0 |
0 |
wantarray ? : |
552
|
0 |
0 |
if (lc $_[0] ne 'command' and lc $_[0] ne 'poll_syntax') { } |
561
|
0 |
0 |
if $args[$i] eq 'command' |
562
|
0 |
0 |
if $args[$i] eq 'feed' |
563
|
0 |
0 |
if $args[$i] eq 'feed_list' and ref $args[$i + 1] eq 'ARRAY' |
564
|
0 |
0 |
if $args[$i] eq 'prompt' |
565
|
0 |
0 |
if $args[$i] eq 'more_pages' |
566
|
0 |
0 |
if $args[$i] eq 'timeout' |
567
|
0 |
0 |
if $args[$i] eq 'blocking' |
568
|
0 |
0 |
if $args[$i] eq 'return_reference' |
569
|
0 |
0 |
if $args[$i] eq 'return_result' |
570
|
0 |
0 |
if $args[$i] eq 'reset_prompt' |
571
|
0 |
0 |
if $args[$i] eq 'more_prompt' |
572
|
0 |
0 |
if $args[$i] eq 'progress_dots' |
573
|
0 |
0 |
if $args[$i] eq 'cmd_initiated_prompt' |
574
|
0 |
0 |
if $args[$i] eq 'errmode' |
575
|
0 |
0 |
if $args[$i] eq 'poll_syntax' |
578
|
0 |
0 |
unless defined $cmd |
581
|
0 |
0 |
$returnRes ? : |
618
|
0 |
0 |
if defined $self->{'POLL'}{'errmode'} |
622
|
0 |
0 |
if ($pollSyntax) { } |
623
|
0 |
0 |
wantarray ? : |
626
|
0 |
0 |
wantarray ? : |
634
|
0 |
0 |
if @_ |
636
|
0 |
0 |
unless (defined $self->{'POLL'} and $self->{'POLL'}{'coderef'} == 'Control::CLI::AvayaData'->can('cmd_poll')) |
641
|
0 |
0 |
if defined $self->{'POLL'}{'errmode'} |
644
|
0 |
0 |
unless defined $self->{'POLL'}{'complete'} and $self->{'POLL'}{'complete'} == 0 |
655
|
0 |
0 |
if (@_ == 1) { } |
669
|
0 |
0 |
defined $args{'blocking'} ? : |
|
0 |
0 |
defined $args{'timeout'} ? : |
|
0 |
0 |
defined $args{'errmode'} ? : |
685
|
0 |
0 |
if defined $self->{'POLL'}{'errmode'} |
689
|
0 |
0 |
if ($args{'poll_syntax'}) { } |
690
|
0 |
0 |
wantarray ? : |
693
|
0 |
0 |
wantarray ? : |
701
|
0 |
0 |
if @_ |
703
|
0 |
0 |
unless (defined $self->{'POLL'} and $self->{'POLL'}{'coderef'} == 'Control::CLI::AvayaData'->can('attribute_poll')) |
708
|
0 |
0 |
if defined $self->{'POLL'}{'errmode'} |
711
|
0 |
0 |
unless defined $self->{'POLL'}{'complete'} and $self->{'POLL'}{'complete'} == 0 |
722
|
0 |
0 |
if (@_ == 1) { } |
737
|
0 |
0 |
defined $args{'blocking'} ? : |
|
0 |
0 |
defined $args{'timeout'} ? : |
|
0 |
0 |
defined $args{'errmode'} ? : |
756
|
0 |
0 |
$args{'baudrate'} eq 'max' ? : |
760
|
0 |
0 |
if defined $self->{'POLL'}{'errmode'} |
764
|
0 |
0 |
if ($args{'poll_syntax'}) { } |
765
|
0 |
0 |
wantarray ? : |
768
|
0 |
0 |
wantarray ? : |
776
|
0 |
0 |
if @_ |
778
|
0 |
0 |
unless (defined $self->{'POLL'} and $self->{'POLL'}{'coderef'} == 'Control::CLI::AvayaData'->can('change_baudrate_poll')) |
783
|
0 |
0 |
if defined $self->{'POLL'}{'errmode'} |
786
|
0 |
0 |
unless defined $self->{'POLL'}{'complete'} and $self->{'POLL'}{'complete'} == 0 |
797
|
0 |
0 |
if (@_ == 1) { } |
811
|
0 |
0 |
defined $args{'blocking'} ? : |
|
0 |
0 |
defined $args{'timeout'} ? : |
|
0 |
0 |
defined $args{'errmode'} ? : |
822
|
0 |
0 |
defined $args{'password'} ? : |
|
0 |
0 |
defined $args{'prompt_credentials'} ? : |
828
|
0 |
0 |
if defined $self->{'POLL'}{'errmode'} |
836
|
0 |
0 |
if @_ |
838
|
0 |
0 |
unless (defined $self->{'POLL'} and $self->{'POLL'}{'coderef'} == 'Control::CLI::AvayaData'->can('enable_poll')) |
842
|
0 |
0 |
if defined $self->{'POLL'}{'errmode'} |
845
|
0 |
0 |
unless defined $self->{'POLL'}{'complete'} and $self->{'POLL'}{'complete'} == 0 |
856
|
0 |
0 |
if (@_ == 1) { } |
870
|
0 |
0 |
defined $args{'blocking'} ? : |
|
0 |
0 |
defined $args{'timeout'} ? : |
|
0 |
0 |
defined $args{'errmode'} ? : |
884
|
0 |
0 |
if defined $self->{'POLL'}{'errmode'} |
892
|
0 |
0 |
if @_ |
894
|
0 |
0 |
unless (defined $self->{'POLL'} and $self->{'POLL'}{'coderef'} == 'Control::CLI::AvayaData'->can('device_more_paging_poll')) |
898
|
0 |
0 |
if defined $self->{'POLL'}{'errmode'} |
901
|
0 |
0 |
unless defined $self->{'POLL'}{'complete'} and $self->{'POLL'}{'complete'} == 0 |
921
|
0 |
0 |
defined $args{'blocking'} ? : |
|
0 |
0 |
defined $args{'timeout'} ? : |
|
0 |
0 |
defined $args{'errmode'} ? : |
933
|
0 |
0 |
defined $args{'username'} ? : |
|
0 |
0 |
defined $args{'password'} ? : |
|
0 |
0 |
defined $args{'prompt_credentials'} ? : |
936
|
0 |
0 |
if defined $self->{'POLL'}{'errmode'} |
944
|
0 |
0 |
if @_ |
946
|
0 |
0 |
unless (defined $self->{'POLL'} and $self->{'POLL'}{'coderef'} == 'Control::CLI::AvayaData'->can('device_peer_cpu_poll')) |
950
|
0 |
0 |
if defined $self->{'POLL'}{'errmode'} |
953
|
0 |
0 |
unless defined $self->{'POLL'}{'complete'} and $self->{'POLL'}{'complete'} == 0 |
964
|
0 |
0 |
unless (defined $fh) |
967
|
0 |
0 |
unless (ref $fh or length $fh) |
971
|
0 |
0 |
unless (ref $fh or defined fileno $fh) |
974
|
0 |
0 |
unless open $fh, '>', "$logfile" |
995
|
0 |
0 |
if (defined $newSetting) |
1007
|
0 |
0 |
if (defined $newSetting) |
1011
|
0 |
0 |
$newSetting ? : |
1012
|
0 |
0 |
$delayPrompt ? : |
1021
|
0 |
0 |
if defined $newSetting |
1029
|
0 |
0 |
if defined $newSetting |
1037
|
0 |
0 |
if defined $newSetting |
1045
|
0 |
0 |
if (defined $newSetting) |
1056
|
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 |
1099
|
0 |
0 |
if defined $newSetting |
1125
|
0 |
0 |
unless ($self->{'POLLING'}) |
1130
|
0 |
0 |
unless (defined $self->{'POLL'}{$pollsub}) |
1137
|
0 |
0 |
if (@_ and not %args) |
1172
|
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'} ? : |
1177
|
0 |
0 |
if defined $connect->{'errmode'} |
1179
|
0 |
0 |
if ($connect->{'stage'} < 1) |
1200
|
0 |
0 |
unless $ok |
1202
|
0 |
0 |
unless defined $self->console |
1218
|
0 |
0 |
if $ok |
1228
|
0 |
0 |
unless ($self->{'POLLING'}) |
1233
|
0 |
0 |
unless (defined $self->{'POLL'}{$pollsub}) |
1236
|
0 |
0 |
if (@_ and not %args) |
1259
|
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'} ? : |
1264
|
0 |
0 |
if defined $login->{'errmode'} |
1265
|
0 |
0 |
if $self->eof |
1270
|
0 |
0 |
if ($login->{'stage'} < 1) |
1272
|
0 |
0 |
if ($self->{'LOGINSTAGE'}) { } |
1280
|
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'}) { } |
1281
|
0 |
0 |
unless $self->print('line', $login->{'username'}, 'errmode', 'return') |
1287
|
0 |
0 |
unless $self->print('line', $login->{'password'}, 'errmode', 'return') |
1294
|
0 |
0 |
unless $self->put('string', $login->{'wake_console'}, 'errmode', 'return') |
1298
|
0 |
0 |
if ($login->{'stage'} < 2) |
1304
|
0 |
0 |
unless $ok |
1308
|
0 |
0 |
$self->{'POLL'}{'read_buffer'} =~ /\n/ ? : |
1312
|
0 |
0 |
if ($login->{'family_type'}) { } |
1313
|
0 |
0 |
if ($login->{'family_type'} eq $Prm{'pers'}) { } |
1316
|
0 |
0 |
if ($self->{'POLL'}{'local_buffer'} =~ /($InitPrompt{$promptType})/) |
1324
|
0 |
0 |
if ($self->{'POLL'}{'local_buffer'} =~ /($InitPrompt{$login->{'family_type'}})/) |
1332
|
0 |
0 |
if ($self->{'POLL'}{'local_buffer'} =~ /($InitPrompt{$key})/) |
1342
|
0 |
0 |
if ($capturedPrompt) |
1352
|
0 |
0 |
if $login->{'family_type'} eq $Prm{'pers'} |
1353
|
0 |
0 |
if ($login->{'detectionFromPrompt'}) |
1354
|
0 |
0 |
if ($login->{'family_type'} eq $Prm{'bstk'} or defined $cliType and $cliType eq 'nncli') { } |
1368
|
0 |
0 |
if (($patdepth = rindex($self->{'POLL'}{'read_buffer'}, $LoginPatterns{$key})) >= 0) |
1370
|
0 |
0 |
unless ($login->{'family_type'}) |
1372
|
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') { } |
1377
|
0 |
0 |
if ($key eq 'banner') |
1378
|
0 |
0 |
if $self->{'POLL'}{'read_buffer'} =~ /\*\*\* ((?:[^\*\n]+?) (?:Switch|Controller|Platform) (?:WC)?\d+.*?)\s+/ |
1380
|
0 |
0 |
if ($self->{'POLL'}{'read_buffer'} =~ /FW:([\d\.]+)\s+SW:v([\d\.]+)/) |
1391
|
0 |
0 |
if $self->{'POLL'}{'read_buffer'} =~ /\((Secure Router \d+)\)/ |
1392
|
0 |
0 |
if $self->{'POLL'}{'read_buffer'} =~ /Version: (.+)/ |
1399
|
0 |
0 |
if $self->{'POLL'}{'read_buffer'} =~ /\* Software Release (?i:v|REL)?(.+?) / |
1406
|
0 |
0 |
if $self->{'POLL'}{'read_buffer'} =~ /\* Software Release (?i:v|REL)?(.+?) / |
1413
|
0 |
0 |
if $self->{'POLL'}{'read_buffer'} =~ /Software Release Build (.+?) / |
1420
|
0 |
0 |
if $self->{'POLL'}{'read_buffer'} =~ /AvayaOS Version (.+?) / |
1423
|
0 |
0 |
if ($patdepth > $deepest) |
1428
|
0 |
0 |
if $deepest > -1 |
1431
|
0 |
0 |
if ($self->{'POLL'}{'read_buffer'} =~ /$usernamePrompt/) { } |
|
0 |
0 |
elsif ($self->{'POLL'}{'read_buffer'} =~ /$passwordPrompt/) { } |
1441
|
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$/) { } |
1443
|
0 |
0 |
unless $self->put('string', $CTRL_Y, 'errmode', 'return') |
1449
|
0 |
0 |
unless $self->put('string', 'c', 'errmode', 'return') |
1455
|
0 |
0 |
unless $self->put('string', $CTRL_C, 'errmode', 'return') |
1461
|
0 |
0 |
unless $self->put('string', 'q', 'errmode', 'return') |
1470
|
0 |
0 |
unless $self->print('errmode', 'return') |
1477
|
0 |
0 |
unless $self->print('errmode', 'return') |
1483
|
0 |
0 |
if ($login->{'login_attempted'}) |
1487
|
0 |
0 |
unless ($login->{'username'}) |
1488
|
0 |
0 |
if ($self->{'TYPE'} eq 'SSH') { } |
1492
|
0 |
0 |
unless ($login->{'prompt_credentials'}) |
1499
|
0 |
0 |
unless $self->print('line', $login->{'username'}, 'errmode', 'return') |
1507
|
0 |
0 |
if ($login->{'password_sent'}) |
1511
|
0 |
0 |
unless ($login->{'password'}) |
1512
|
0 |
0 |
unless ($login->{'prompt_credentials'}) |
1518
|
0 |
0 |
unless $self->print('line', $login->{'password'}, 'errmode', 'return') |
1535
|
0 |
0 |
if ($login->{'family_type'} eq $Prm{'generic'} or $login->{'detectionFromPrompt'} and not $self->{'LASTPROMPT'} =~ /^@/) { } |
1541
|
0 |
0 |
unless $self->{'POLL'}{'blocking'} |
1543
|
0 |
0 |
if ($login->{'stage'} < 3) |
1545
|
0 |
0 |
unless $ok |
1547
|
0 |
0 |
if ($login->{'family_type'} eq $Prm{'generic'} and $self->{'errmode'} eq 'croak' || $self->{'errmode'} eq 'die') |
1552
|
0 |
0 |
if ($login->{'stage'} < 4) |
1553
|
0 |
0 |
if ($login->{'family_type'} eq $Prm{'pers'} or $login->{'family_type'} eq $Prm{'xlr'}) |
1554
|
0 |
0 |
$self->{'LASTPROMPT'} =~ /^@/ ? : |
1555
|
0 |
0 |
if $self->{'LASTPROMPT'} =~ /^@/ |
1557
|
0 |
0 |
if $login->{'detectionFromPrompt'} |
1561
|
0 |
0 |
if $login->{'login_attempted'} |
1571
|
0 |
0 |
unless ($self->{'POLLING'}) |
1576
|
0 |
0 |
unless (defined $self->{'POLL'}{$pollsub}) |
1580
|
0 |
0 |
if (@_ and not %args) |
1584
|
0 |
0 |
if defined $args{'feed_list'} and !ref($args{'feed_list'}) eq 'ARRAY' |
1611
|
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'} ? : |
1617
|
0 |
0 |
if defined $cmd->{'errmode'} |
1618
|
0 |
0 |
if $self->eof |
1619
|
0 |
0 |
if $cmd->{'reset_prompt'} |
1623
|
0 |
0 |
if ($cmd->{'stage'} < 1) |
1625
|
0 |
0 |
if (defined $cmd->{'command'}) |
1628
|
0 |
0 |
if ($command =~ /\?\s*$/ and $self->{$Package}{'ATTRIB'}{'is_nncli'}) |
1629
|
0 |
0 |
if ($familyType eq $Prm{'sr'}) { } |
1636
|
0 |
0 |
unless $self->print('line', $command, 'errmode', 'return') |
1642
|
0 |
0 |
if ($cmd->{'stage'} == 1) { } |
|
0 |
0 |
elsif ($cmd->{'stage'} == 2) { } |
1644
|
0 |
0 |
if defined $ok and $ok == 0 |
1645
|
0 |
0 |
unless (defined $ok) |
1646
|
0 |
0 |
if ($cmd->{'alreadyCmdTimeout'} or not length $familyType or $familyType eq $Prm{'generic'}) |
1650
|
0 |
0 |
unless $self->print('errmode', 'return') |
1656
|
0 |
0 |
unless $self->{'POLL'}{'blocking'} |
1662
|
0 |
0 |
unless $ok |
1664
|
0 |
0 |
unless (length $self->{'POLL'}{'read_buffer'}) |
1667
|
0 |
0 |
if ($feed = shift @{$$cmd{'feed_data'};}) { } |
1671
|
0 |
0 |
if (++$cmd->{'cmdPromptCount'} > $self->{$Package}{'cmd_feed_timeout'}) |
1677
|
0 |
0 |
unless $self->print('line', $feed, 'errmode', 'return') |
1680
|
0 |
0 |
unless $self->{'POLL'}{'blocking'} |
1686
|
0 |
0 |
unless $ok |
1691
|
0 |
0 |
if ($cmd->{'progress_dots'}) |
1692
|
0 |
0 |
unless defined $cmd->{'progress'} |
1693
|
0 |
0 |
if (($cmd->{'progress'} += length $self->{'POLL'}{'read_buffer'}) > $cmd->{'progress_dots'}) |
1699
|
0 |
0 |
unless ($cmd->{'cmdEchoRemoved'}) |
1701
|
0 |
0 |
if ($self->{'POLL'}{'local_buffer'} =~ s/(^.*\n)//) { } |
1704
|
0 |
0 |
if $familyType eq $Prm{'xirrus'} |
1708
|
0 |
0 |
unless length $self->{'POLL'}{'read_buffer'} |
1721
|
0 |
0 |
if (length $output) |
1723
|
0 |
0 |
if $familyType eq $Prm{'sr'} |
1724
|
0 |
0 |
if ($familyType eq $Prm{'xirrus'}) |
1737
|
0 |
0 |
if length $output |
1738
|
0 |
0 |
if length $cmd->{'lastLine'} |
1740
|
0 |
0 |
if (length $output) |
1746
|
0 |
0 |
if (length $cmd->{'lastLine'} and $self->{'POLL'}{'local_buffer'} =~ s/\n\n$/\n/) { } |
1757
|
0 |
0 |
unless length $cmd->{'lastLine'} |
1759
|
0 |
0 |
if ($cmd->{'lastLine'} =~ s/($cmd->{'prompt'})//) |
1762
|
0 |
0 |
if $cmd->{'reset_prompt'} |
1763
|
0 |
0 |
$cmd->{'reset_prompt'} ? : |
1764
|
0 |
0 |
unless ($newLineLastLine and not length $cmd->{'lastLine'}) |
1770
|
0 |
0 |
if ($cmd->{'more_prompt_delay'} and not $cmd->{'morePromptDelayed'} and $cmd->{'lastLine'} =~ /(?:$cmd->{'more_prompt_delay'})$/) |
1774
|
0 |
0 |
unless $self->{'POLL'}{'blocking'} |
1777
|
0 |
0 |
if ($cmd->{'more_prompt'} and $cmd->{'lastLine'} =~ s/(?:$cmd->{'more_prompt'})$//) |
1779
|
0 |
0 |
if (length $cmd->{'lastLine'}) |
1782
|
0 |
0 |
if $newLineLastLine |
1784
|
0 |
0 |
if $newLineLastLine |
1785
|
0 |
0 |
if ($cmd->{'more_pages'} == 0 or $cmd->{'more_pages'}-- > 1) { } |
1787
|
0 |
0 |
unless $self->put('string', $Space, 'errmode', 'return') |
1792
|
0 |
0 |
unless $self->put('string', 'q', 'errmode', 'return') |
1795
|
0 |
0 |
unless $self->{'POLL'}{'blocking'} |
1798
|
0 |
0 |
if ($cmd->{'yn_prompt'} and $cmd->{'lastLine'} =~ /$cmd->{'yn_prompt'}/) |
1799
|
0 |
0 |
if (++$cmd->{'ynPromptCount'} > $self->{$Package}{'cmd_feed_timeout'}) |
1803
|
0 |
0 |
unless $self->print('line', 'y', 'errmode', 'return') |
1805
|
0 |
0 |
unless $self->{'POLL'}{'blocking'} |
1808
|
0 |
0 |
if ($cmd->{'cmd_prompt'} and $cmd->{'lastLine'} =~ /$cmd->{'cmd_prompt'}/) |
1812
|
0 |
0 |
unless $self->{'POLL'}{'blocking'} |
1817
|
0 |
0 |
if $cmd->{'lastLine'} =~ s/^\n// |
1829
|
0 |
0 |
unless ($self->{'POLLING'}) |
1834
|
0 |
0 |
unless (defined $self->{'POLL'}{$pollsub}) |
1837
|
0 |
0 |
if (@_ and not %args) |
1855
|
0 |
0 |
if defined $attrib->{'errmode'} |
1856
|
0 |
0 |
if $self->eof |
1859
|
0 |
0 |
if ($attrib->{'stage'} < 1) |
1860
|
0 |
0 |
unless defined $attrib->{'attribute'} |
1861
|
0 |
0 |
unless $familyType |
1864
|
0 |
0 |
if ($attrib->{'reload'}) |
1865
|
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') { } |
1867
|
0 |
0 |
unless $self->print |
1876
|
0 |
0 |
if ($attrib->{'stage'} < 2) |
1878
|
0 |
0 |
unless $ok |
1882
|
0 |
0 |
if ($attrib->{'stage'} < 3) |
1884
|
0 |
0 |
if (defined $self->{$Package}{'ATTRIBFLAG'}{$attrib->{'attribute'}}) |
1889
|
0 |
0 |
if $familyType eq $Prm{'generic'} |
1894
|
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'}) { } |
1895
|
0 |
0 |
if ($attrib->{'attribute'} eq 'is_ha') |
1896
|
0 |
0 |
unless ($attrib->{'debugMsg'}) |
1901
|
0 |
0 |
unless $ok |
1902
|
0 |
0 |
if ($$outref =~ /Current CPU State : Disabled State./) { } |
|
0 |
0 |
elsif ($$outref =~ /Current CPU State/) { } |
1914
|
0 |
0 |
if ($attrib->{'attribute'} eq 'sw_version') |
1915
|
0 |
0 |
unless ($attrib->{'debugMsg'}) |
1920
|
0 |
0 |
unless $ok |
1921
|
0 |
0 |
if $$outref =~ /Version : Build (?i:v|REL)?(.+?) / |
1925
|
0 |
0 |
if ($attrib->{'attribute'} eq 'fw_version') |
1926
|
0 |
0 |
if ($attrib->{'stage'} < 4) |
1927
|
0 |
0 |
unless ($attrib->{'debugMsg'}) |
1932
|
0 |
0 |
unless $ok |
1933
|
0 |
0 |
if ($$outref =~ /Version:\s+(?i:v|REL)?(.+)/) { } |
1943
|
0 |
0 |
unless ($attrib->{'debugMsg'}) |
1948
|
0 |
0 |
unless $ok |
1949
|
0 |
0 |
if ($$outref =~ /Version:\s+(?i:v|REL)?(.+)/) { } |
1958
|
0 |
0 |
if ($attrib->{'attribute'} eq 'stp_mode') |
1959
|
0 |
0 |
unless ($attrib->{'debugMsg'}) |
1964
|
0 |
0 |
unless $ok |
1965
|
0 |
0 |
if ($$outref =~ /flags spanning-tree-mode (mstp|rstp)/) { } |
1974
|
0 |
0 |
if ($attrib->{'attribute'} eq 'baudrate') |
1975
|
0 |
0 |
unless ($attrib->{'debugMsg'}) |
1980
|
0 |
0 |
unless $ok |
1981
|
0 |
0 |
if ($$outref =~ /sio (?:console )?baud (\d+)/) |
1987
|
0 |
0 |
if ($attrib->{'attribute'} eq 'max_baud') |
1988
|
0 |
0 |
if ($attrib->{'stage'} < 4) |
1989
|
0 |
0 |
unless ($attrib->{'debugMsg'}) |
1994
|
0 |
0 |
unless $ok |
1998
|
0 |
0 |
if ($$outref =~ /(?:-|\.\.)\s?(\d+)[>}]/) { } |
2008
|
0 |
0 |
unless ($attrib->{'debugMsg'}) |
2013
|
0 |
0 |
unless $ok |
2017
|
0 |
0 |
if ($$outref =~ /(?:-|\.\.)\s?(\d+)[>}]/) |
2023
|
0 |
0 |
if ($self->{$Package}{'ATTRIB'}{'is_master_cpu'}) { } |
2024
|
0 |
0 |
if ($attrib->{'attribute'} eq 'is_dual_cpu' or $attrib->{'attribute'} eq 'base_mac') |
2025
|
0 |
0 |
unless ($attrib->{'debugMsg'}) |
2030
|
0 |
0 |
unless $ok |
2031
|
0 |
0 |
if ($$outref =~ /SysDescr\s+: (.+?) \(/g) |
2033
|
0 |
0 |
if ($$outref =~ / BoxType: (.+)/cg) { } |
2044
|
0 |
0 |
if $$outref =~ /SysName\s+: (.+)/g |
2045
|
0 |
0 |
if ($self->{$Package}{'ATTRIB'}{'is_voss'}) { } |
2046
|
0 |
0 |
if ($$outref =~ /BrandName:?\s+: (.+)/cg) { } |
2058
|
0 |
0 |
if $$outref =~ /BaseMacAddr\s+: (.+)/g |
2059
|
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}/) { } |
2069
|
0 |
0 |
if $$outref =~ /Virtual IP\s+: (.+)/g |
2077
|
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_/) |
2078
|
0 |
0 |
unless ($attrib->{'debugMsg'}) |
2083
|
0 |
0 |
unless $ok |
2084
|
0 |
0 |
if ($$outref =~ /SysDescr\s+: (.+?) \(/g) |
2086
|
0 |
0 |
if ($$outref =~ / BoxType: (.+)/cg) { } |
2097
|
0 |
0 |
if $$outref =~ /SysName\s+: (.+)/g |
2098
|
0 |
0 |
if ($self->{$Package}{'ATTRIB'}{'is_voss'}) { } |
2099
|
0 |
0 |
if ($$outref =~ /BrandName:?\s+: (.+)/cg) { } |
2111
|
0 |
0 |
if $$outref =~ /BaseMacAddr\s+: (.+)/g |
2113
|
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 :/) { } |
2122
|
0 |
0 |
if $$outref =~ /Virtual IP\s+: (.+)/g |
2123
|
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') { } |
2132
|
0 |
0 |
if ($attrib->{'attribute'} eq 'slots' or $attrib->{'attribute'} eq 'ports') |
2133
|
0 |
0 |
if ($self->{$Package}{'ATTRIB'}{'is_nncli'} and $self->{$Package}{'ATTRIB'}{'model'} =~ /(?:Passport|ERS)-8[36]\d\d/) { } |
2134
|
0 |
0 |
if ($attrib->{'stage'} < 4) |
2135
|
0 |
0 |
unless ($attrib->{'debugMsg'}) |
2140
|
0 |
0 |
unless $ok |
2145
|
0 |
0 |
unless ($attrib->{'debugMsg'}) |
2150
|
0 |
0 |
unless $ok |
2156
|
0 |
0 |
unless ($attrib->{'debugMsg'}) |
2161
|
0 |
0 |
unless $ok |
2167
|
0 |
0 |
if ($attrib->{'attribute'} =~ /^(?:is_)?oob_/) |
2168
|
0 |
0 |
if ($self->{$Package}{'ATTRIB'}{'is_voss'}) { } |
2169
|
0 |
0 |
unless ($attrib->{'debugMsg'}) |
2174
|
0 |
0 |
unless $ok |
2176
|
0 |
0 |
if $$outref =~ /Portmgmt\s+ ([\d\.]+)/g |
2177
|
0 |
0 |
if $$outref =~ m[Port1/1\s+ ([\d\.]+)]g |
2178
|
0 |
0 |
if $$outref =~ /MgmtVirtIp\s+ ([\d\.]+)/g |
2179
|
0 |
0 |
if $$outref =~ m[Port2/1\s+ ([\d\.]+)]g |
2180
|
0 |
0 |
if $$outref =~ /Portmgmt2\s+ ([\d\.]+)/g |
2181
|
0 |
0 |
if ($self->{$Package}{'ATTRIB'}{'cpu_slot'} == 1) { } |
2193
|
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'}) ? : |
2199
|
0 |
0 |
if ($attrib->{'stage'} < 4) |
2200
|
0 |
0 |
unless ($attrib->{'debugMsg'}) |
2205
|
0 |
0 |
unless $ok |
2207
|
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}/) { } |
2216
|
0 |
0 |
if ($$outref =~ /Virtual IP\s+: (.+)/g) { } |
2225
|
0 |
0 |
unless ($attrib->{'debugMsg'}) |
2230
|
0 |
0 |
unless $ok |
2232
|
0 |
0 |
if $$outref =~ m[^net mgmt ip ([\d\.]+)/[\d\.]+ *(?:cpu-slot [35])?$]m |
2233
|
0 |
0 |
if $$outref =~ m[^net mgmt ip ([\d\.]+)/[\d\.]+ cpu-slot 6$]m |
2234
|
0 |
0 |
if ($self->{$Package}{'ATTRIB'}{'cpu_slot'} < 5) { } |
|
0 |
0 |
elsif ($self->{$Package}{'ATTRIB'}{'cpu_slot'} == 5) { } |
2240
|
0 |
0 |
$self->{$Package}{'ATTRIB'}{'is_dual_cpu'} ? : |
2244
|
0 |
0 |
$self->{$Package}{'ATTRIB'}{'is_dual_cpu'} ? : |
2248
|
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'}) ? : |
2256
|
0 |
0 |
if ($attrib->{'attribute'} eq 'is_apls') |
2261
|
0 |
0 |
if ($attrib->{'attribute'} eq 'is_voss') |
2262
|
0 |
0 |
unless ($attrib->{'debugMsg'}) |
2267
|
0 |
0 |
unless $ok |
2268
|
0 |
0 |
if ($$outref =~ m[Only devices /intflash]) { } |
2282
|
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') |
2283
|
0 |
0 |
unless ($attrib->{'debugMsg'}) |
2288
|
0 |
0 |
unless $ok |
2289
|
0 |
0 |
if ($$outref =~ /Operation Mode:\s+(Switch)/g) { } |
|
0 |
0 |
elsif ($$outref =~ /Operation Mode:\s+(Stack), Unit # (\d)/g) { } |
2303
|
0 |
0 |
if $$outref =~ /MAC Address:\s+(.+)/cg |
2304
|
0 |
0 |
if $$outref =~ /sysDescr:\s+(.+?)(?:\n|\s{4})/cg |
2306
|
0 |
0 |
if ($$outref =~ /FW:([\d\.]+)\s+SW:v([\d\.]+)/cg) |
2310
|
0 |
0 |
if $$outref =~ /sysName: +(\S+)/cg |
2314
|
0 |
0 |
if ($attrib->{'attribute'} eq 'slots' or $attrib->{'attribute'} eq 'ports') |
2315
|
0 |
0 |
unless ($attrib->{'debugMsg'}) |
2320
|
0 |
0 |
unless $ok |
2325
|
0 |
0 |
if ($attrib->{'attribute'} eq 'stp_mode') |
2326
|
0 |
0 |
unless ($attrib->{'debugMsg'}) |
2331
|
0 |
0 |
unless $ok |
2332
|
0 |
0 |
if ($$outref =~ /Current STP Operation Mode: (STPG|MSTP|RSTP)/) { } |
2341
|
0 |
0 |
if ($attrib->{'attribute'} eq 'mgmt_vlan') |
2342
|
0 |
0 |
unless ($attrib->{'debugMsg'}) |
2347
|
0 |
0 |
unless $ok |
2348
|
0 |
0 |
if $$outref =~ /Management VLAN: (\d+)/ |
2352
|
0 |
0 |
if ($attrib->{'attribute'} eq 'mgmt_ip' or $attrib->{'attribute'} eq 'oob_ip' or $attrib->{'attribute'} eq 'is_oob_connected') |
2353
|
0 |
0 |
unless ($attrib->{'debugMsg'}) |
2358
|
0 |
0 |
unless $ok |
2359
|
0 |
0 |
if $$outref =~ /(?:Switch|Stack) IP Address:\s+[\d\.]+\s+([\d\.]+)\s+[\d\.]+/g |
2360
|
0 |
0 |
if ($$outref =~ /Mgmt (?:Switch|Stack) IP Address:\s+[\d\.]+\s+([\d\.]+)\s/g) { } |
2367
|
0 |
0 |
defined $self->socket && (defined $self->{$Package}{'ATTRIB'}{'oob_ip'} && $self->socket->peerhost eq $self->{$Package}{'ATTRIB'}{'oob_ip'}) ? : |
2372
|
0 |
0 |
if ($attrib->{'attribute'} eq 'baudrate') |
2373
|
0 |
0 |
unless ($attrib->{'debugMsg'}) |
2378
|
0 |
0 |
unless $ok |
2379
|
0 |
0 |
if ($$outref =~ /Terminal speed: (\d+)/) |
2385
|
0 |
0 |
if ($attrib->{'attribute'} eq 'max_baud') |
2386
|
0 |
0 |
unless ($attrib->{'debugMsg'}) |
2391
|
0 |
0 |
unless $ok |
2394
|
0 |
0 |
if not defined $baudRate or $1 > $baudRate |
2402
|
0 |
0 |
if ($attrib->{'attribute'} eq 'model') |
2403
|
0 |
0 |
unless ($attrib->{'debugMsg'}) |
2408
|
0 |
0 |
unless $ok |
2409
|
0 |
0 |
if $$outref =~ /Chassis Model: (.+)/ |
2413
|
0 |
0 |
if ($attrib->{'attribute'} eq 'fw_version' or $attrib->{'attribute'} eq 'sw_version') |
2414
|
0 |
0 |
unless ($attrib->{'debugMsg'}) |
2419
|
0 |
0 |
unless $ok |
2420
|
0 |
0 |
if $$outref =~ /Runtime: (.+)/g |
2421
|
0 |
0 |
if $$outref =~ /Boot: (.+?) / |
2425
|
0 |
0 |
if ($attrib->{'attribute'} eq 'slots' or $attrib->{'attribute'} eq 'ports') |
2426
|
0 |
0 |
if ($attrib->{'stage'} < 4) |
2427
|
0 |
0 |
unless ($attrib->{'debugMsg'}) |
2432
|
0 |
0 |
unless $ok |
2437
|
0 |
0 |
unless ($attrib->{'debugMsg'}) |
2442
|
0 |
0 |
unless $ok |
2447
|
0 |
0 |
if ($attrib->{'attribute'} eq 'sysname') |
2448
|
0 |
0 |
unless ($attrib->{'debugMsg'}) |
2453
|
0 |
0 |
unless $ok |
2454
|
0 |
0 |
if $$outref =~ /HostName: (.+)/g |
2458
|
0 |
0 |
if ($attrib->{'attribute'} eq 'base_mac') |
2459
|
0 |
0 |
unless ($attrib->{'debugMsg'}) |
2464
|
0 |
0 |
unless $ok |
2465
|
0 |
0 |
if $$outref =~ /Mac Address\s+0x(.+)/g |
2471
|
0 |
0 |
if ($attrib->{'attribute'} eq 'model' or $attrib->{'attribute'} eq 'sysname' or $attrib->{'attribute'} eq 'base_mac') |
2472
|
0 |
0 |
unless ($attrib->{'debugMsg'}) |
2477
|
0 |
0 |
unless $ok |
2478
|
0 |
0 |
if $$outref =~ /Product Name:\s+(.+)/g |
2479
|
0 |
0 |
if $$outref =~ /System Name:\s+(.+)/g |
2480
|
0 |
0 |
if $$outref =~ /System MAC:\s+(.+)/g |
2484
|
0 |
0 |
if ($attrib->{'attribute'} eq 'fw_version' or $attrib->{'attribute'} eq 'sw_version') |
2485
|
0 |
0 |
unless ($attrib->{'debugMsg'}) |
2490
|
0 |
0 |
unless $ok |
2491
|
0 |
0 |
if $$outref =~ /Version: (.+?) REL/g |
2492
|
0 |
0 |
if $$outref =~ /BootLoader:\s+(.+)/ |
2496
|
0 |
0 |
if ($attrib->{'attribute'} eq 'slots' or $attrib->{'attribute'} eq 'ports') |
2497
|
0 |
0 |
unless ($attrib->{'debugMsg'}) |
2502
|
0 |
0 |
unless $ok |
2509
|
0 |
0 |
if ($attrib->{'attribute'} eq 'model' or $attrib->{'attribute'} eq 'fw_version' or $attrib->{'attribute'} eq 'sw_version') |
2510
|
0 |
0 |
unless ($attrib->{'debugMsg'}) |
2515
|
0 |
0 |
unless $ok |
2516
|
0 |
0 |
if $$outref =~ /# box type\s+: (.+)/g |
2517
|
0 |
0 |
if $$outref =~ /# boot monitor version\s+: v?(.+)/g |
2518
|
0 |
0 |
if $$outref =~ /# software version\s+: v?(.+)/g |
2522
|
0 |
0 |
if ($attrib->{'attribute'} eq 'is_dual_cpu' or $attrib->{'attribute'} eq 'sysname') |
2523
|
0 |
0 |
unless ($attrib->{'debugMsg'}) |
2528
|
0 |
0 |
unless $ok |
2529
|
0 |
0 |
if $$outref =~ /SysDescr\s+: (.+?) \(/g |
2530
|
0 |
0 |
if $$outref =~ /SysName\s+: (.+)/g |
2531
|
0 |
0 |
if ($$outref =~ /CPU.+ dormant /) { } |
2540
|
0 |
0 |
if ($attrib->{'attribute'} eq 'slots' or $attrib->{'attribute'} eq 'ports') |
2541
|
0 |
0 |
unless ($attrib->{'debugMsg'}) |
2546
|
0 |
0 |
unless $ok |
2554
|
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') |
2555
|
0 |
0 |
unless ($attrib->{'debugMsg'}) |
2560
|
0 |
0 |
unless $ok |
2561
|
0 |
0 |
if $$outref =~ /Model: (.+?),/g |
2562
|
0 |
0 |
if $$outref =~ /IAPs\s+(.+?)-/g |
2563
|
0 |
0 |
if $$outref =~ /Boot Loader\s+(.+?) \(.+?\), Build: (.+)/g |
2564
|
0 |
0 |
if $$outref =~ /System Software\s+(.+?) \(.+?\), Build: (.+)/g |
2568
|
0 |
0 |
if ($attrib->{'attribute'} eq 'sysname') |
2569
|
0 |
0 |
unless ($attrib->{'debugMsg'}) |
2574
|
0 |
0 |
unless $ok |
2575
|
0 |
0 |
if $$outref =~ /Access Point Hostname\s*(.+)/g |
2579
|
0 |
0 |
if ($attrib->{'attribute'} eq 'slots' or $attrib->{'attribute'} eq 'ports') |
2580
|
0 |
0 |
unless ($attrib->{'debugMsg'}) |
2585
|
0 |
0 |
unless $ok |
2600
|
0 |
0 |
unless ($self->{'POLLING'}) |
2605
|
0 |
0 |
unless (defined $self->{'POLL'}{$pollsub}) |
2608
|
0 |
0 |
if (@_ and not %args) |
2628
|
0 |
0 |
$args{'baudrate'} eq 'max' ? : |
2633
|
0 |
0 |
if defined $changeBaud->{'errmode'} |
2636
|
0 |
0 |
if ($changeBaud->{'local_side_only'}) |
2648
|
0 |
0 |
if ($changeBaud->{'stage'} < 1) |
2649
|
0 |
0 |
unless ($self->connection_type eq 'SERIAL') |
2652
|
0 |
0 |
unless (defined $self->baudrate) |
2655
|
0 |
0 |
unless (defined $changeBaud->{'baudrate'}) |
2658
|
0 |
0 |
unless ($familyType) |
2664
|
0 |
0 |
if ($changeBaud->{'stage'} < 2) |
2665
|
0 |
0 |
unless (defined $self->{$Package}{'ATTRIB'}{'baudrate'}) |
2667
|
0 |
0 |
unless $ok |
2669
|
0 |
0 |
unless (defined $self->{$Package}{'ATTRIB'}{'baudrate'}) |
2670
|
0 |
0 |
unless $changeBaud->{'maxMode'} |
2675
|
0 |
0 |
unless (defined $self->{$Package}{'ATTRIB'}{'max_baud'}) |
2677
|
0 |
0 |
unless $ok |
2679
|
0 |
0 |
if ($changeBaud->{'maxMode'} and not defined $self->{$Package}{'ATTRIB'}{'max_baud'}) |
2684
|
0 |
0 |
if $changeBaud->{'maxMode'} |
2686
|
0 |
0 |
if ($changeBaud->{'baudrate'} == $self->baudrate) |
2692
|
0 |
0 |
if ($familyType eq $Prm{'generic'}) { } |
|
0 |
0 |
elsif ($familyType eq $Prm{'bstk'}) { } |
|
0 |
0 |
elsif ($familyType eq $Prm{'pers'}) { } |
2696
|
0 |
0 |
unless ($changeBaud->{'baudrate'} == 9600 or $changeBaud->{'baudrate'} == 19200 or $changeBaud->{'baudrate'} == 38400) |
2701
|
0 |
0 |
unless ($changeBaud->{'baudrate'} == 9600 or $changeBaud->{'baudrate'} == 19200 or $changeBaud->{'baudrate'} == 38400 or $changeBaud->{'baudrate'} == 57600 or $changeBaud->{'baudrate'} == 115200) |
2707
|
0 |
0 |
unless $changeBaud->{'maxMode'} |
2715
|
0 |
0 |
if ($changeBaud->{'stage'} < 3) |
2716
|
0 |
0 |
if ($familyType eq $Prm{'pers'}) |
2717
|
0 |
0 |
unless (defined $self->{$Package}{'ATTRIB'}{'model'}) |
2719
|
0 |
0 |
unless $ok |
2721
|
0 |
0 |
if ($changeBaud->{'userExec'} = $self->last_prompt =~ />\s?$/) |
2723
|
0 |
0 |
unless $ok |
2729
|
0 |
0 |
if ($changeBaud->{'stage'} < 4) |
2730
|
0 |
0 |
if ($familyType eq $Prm{'pers'} and $self->{$Package}{'ATTRIB'}{'is_nncli'}) |
2731
|
0 |
0 |
if ($changeBaud->{'privExec'} = !($self->last_prompt =~ /\(config/)) |
2733
|
0 |
0 |
unless $ok |
2734
|
0 |
0 |
unless $$resref |
2740
|
0 |
0 |
if ($changeBaud->{'stage'} < 5) |
2741
|
0 |
0 |
if ($familyType eq $Prm{'bstk'}) { } |
|
0 |
0 |
elsif ($familyType eq $Prm{'pers'}) { } |
2742
|
0 |
0 |
unless $self->print('line', "terminal speed $changeBaud->{'baudrate'}", 'errmode', 'return') |
2746
|
0 |
0 |
if ($self->{$Package}{'ATTRIB'}{'model'} =~ /(?:Passport|ERS)-(?:83|16)\d\d/) { } |
2747
|
0 |
0 |
if ($self->{$Package}{'ATTRIB'}{'is_nncli'}) { } |
2748
|
0 |
0 |
unless $self->print('line', "boot config sio baud $changeBaud->{'baudrate'}", 'errmode', 'return') |
2752
|
0 |
0 |
unless $self->print('line', "config bootconfig sio baud $changeBaud->{'baudrate'}", 'errmode', 'return') |
2757
|
0 |
0 |
if ($self->{$Package}{'ATTRIB'}{'is_nncli'}) { } |
2758
|
0 |
0 |
unless $self->print('line', "boot config sio console baud $changeBaud->{'baudrate'}", 'errmode', 'return') |
2762
|
0 |
0 |
unless $self->print('line', "config bootconfig sio console baud $changeBaud->{'baudrate'}", 'errmode', 'return') |
2771
|
0 |
0 |
if ($changeBaud->{'stage'} < 6) |
2773
|
0 |
0 |
unless $ok |
2774
|
0 |
0 |
if (length $self->{'POLL'}{'read_buffer'} and $self->{'POLL'}{'read_buffer'} =~ /$self->{$Package}{'prompt_qr'}/) |
2776
|
0 |
0 |
unless $changeBaud->{'maxMode'} |
2781
|
0 |
0 |
if (defined $self->{$Package}{'ORIGBAUDRATE'}) { } |
2782
|
0 |
0 |
if $self->{$Package}{'ORIGBAUDRATE'} == $changeBaud->{'baudrate'} |
2790
|
0 |
0 |
if ($changeBaud->{'stage'} < 7) |
2795
|
0 |
0 |
unless $ok |
2801
|
0 |
0 |
if ($changeBaud->{'stage'} < 8) |
2803
|
0 |
0 |
unless $ok |
2807
|
0 |
0 |
if ($changeBaud->{'stage'} < 9) |
2808
|
0 |
0 |
if ($familyType eq $Prm{'pers'} and $self->{$Package}{'ATTRIB'}{'is_nncli'}) |
2809
|
0 |
0 |
if ($changeBaud->{'privExec'}) |
2811
|
0 |
0 |
unless $ok |
2812
|
0 |
0 |
unless $$resref |
2818
|
0 |
0 |
if ($changeBaud->{'stage'} < 10) |
2819
|
0 |
0 |
if ($familyType eq $Prm{'pers'} and $self->{$Package}{'ATTRIB'}{'is_nncli'}) |
2820
|
0 |
0 |
if ($changeBaud->{'userExec'}) |
2822
|
0 |
0 |
unless $ok |
2823
|
0 |
0 |
unless $$resref |
2837
|
0 |
0 |
unless ($self->{'POLLING'}) |
2842
|
0 |
0 |
unless (defined $self->{'POLL'}{$pollsub}) |
2845
|
0 |
0 |
if (@_ and not %args) |
2859
|
0 |
0 |
defined $args{'password'} ? : |
|
0 |
0 |
defined $args{'prompt_credentials'} ? : |
2864
|
0 |
0 |
if defined $enable->{'errmode'} |
2865
|
0 |
0 |
if $self->eof |
2871
|
0 |
0 |
if ($enable->{'stage'} < 1) |
2873
|
0 |
0 |
unless $familyType |
2874
|
0 |
0 |
unless $self->{$Package}{'ATTRIB'}{'is_nncli'} |
2875
|
0 |
0 |
unless $self->last_prompt =~ />\s?$/ |
2879
|
0 |
0 |
unless $self->print('line', 'enable', 'errmode', 'return') |
2886
|
0 |
0 |
unless $ok |
2889
|
0 |
0 |
if $self->{'POLL'}{'local_buffer'} =~ /error: Access denied/ |
2890
|
0 |
0 |
if ($self->{'POLL'}{'local_buffer'} =~ /$passwordPrompt/) |
2892
|
0 |
0 |
if (defined $enable->{'enable_password'}) { } |
2893
|
0 |
0 |
if ($enable->{'login_attempted'} == 1) { } |
2896
|
0 |
0 |
unless $self->print('line', $enablePwd, 'errmode', 'return') |
2902
|
0 |
0 |
unless $self->print('errmode', 'return') |
2907
|
0 |
0 |
if ($enable->{'login_attempted'} == 1) { } |
|
0 |
0 |
elsif ($enable->{'login_attempted'} == 2) { } |
2910
|
0 |
0 |
unless $self->print('errmode', 'return') |
2916
|
0 |
0 |
unless $self->print('line', $enablePwd, 'errmode', 'return') |
2920
|
0 |
0 |
if ($enable->{'prompt_credentials'}) { } |
2922
|
0 |
0 |
unless $self->print('line', $enablePwd, 'errmode', 'return') |
2928
|
0 |
0 |
unless $self->print('errmode', 'return') |
2938
|
0 |
0 |
if $enable->{'login_failed'} |
2939
|
0 |
0 |
if $self->last_prompt =~ />\s?$/ |
2940
|
0 |
0 |
if defined $enablePwd |
2950
|
0 |
0 |
unless ($self->{'POLLING'}) |
2955
|
0 |
0 |
unless (defined $self->{'POLL'}{$pollsub}) |
2958
|
0 |
0 |
if (@_ and not %args) |
2975
|
0 |
0 |
if defined $devMorePage->{'errmode'} |
2976
|
0 |
0 |
if $self->eof |
2979
|
0 |
0 |
unless $familyType |
2980
|
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'}) { } |
2981
|
0 |
0 |
$devMorePage->{'enable'} ? : |
|
0 |
0 |
unless defined $devMorePage->{'cmdString'} |
2983
|
0 |
0 |
unless $ok |
2984
|
0 |
0 |
unless $$resref |
2987
|
0 |
0 |
if ($self->{$Package}{'ATTRIB'}{'is_nncli'}) { } |
2988
|
0 |
0 |
if ($devMorePage->{'stage'} < 1) |
2989
|
0 |
0 |
unless (defined $self->{$Package}{'ATTRIB'}{'model'}) |
2991
|
0 |
0 |
unless $ok |
2993
|
0 |
0 |
if (defined $self->{$Package}{'ATTRIB'}{'model'} and $self->{$Package}{'ATTRIB'}{'model'} =~ /(?:Passport|ERS)-83\d\d/) { } |
3000
|
0 |
0 |
if ($devMorePage->{'stage'} < 2) |
3001
|
0 |
0 |
$devMorePage->{'enable'} ? : |
|
0 |
0 |
unless defined $devMorePage->{'cmdString'} |
3003
|
0 |
0 |
unless $ok |
3004
|
0 |
0 |
if not $$resref and defined $self->{$Package}{'ATTRIB'}{'model'} |
3006
|
0 |
0 |
if $$resref |
3009
|
0 |
0 |
if ($devMorePage->{'stage'} < 3) |
3010
|
0 |
0 |
$devMorePage->{'enable'} ? : |
|
0 |
0 |
unless defined $devMorePage->{'cmdString'} |
3012
|
0 |
0 |
unless $ok |
3013
|
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 |
3024
|
0 |
0 |
$devMorePage->{'enable'} ? : |
|
0 |
0 |
unless defined $devMorePage->{'cmdString'} |
3026
|
0 |
0 |
unless $ok |
3027
|
0 |
0 |
unless $$resref |
3030
|
0 |
0 |
$devMorePage->{'enable'} ? : |
|
0 |
0 |
unless defined $devMorePage->{'cmdString'} |
3032
|
0 |
0 |
unless $ok |
3033
|
0 |
0 |
unless $$resref |
3036
|
0 |
0 |
$devMorePage->{'enable'} ? : |
|
0 |
0 |
unless defined $devMorePage->{'cmdString'} |
3038
|
0 |
0 |
unless $ok |
3039
|
0 |
0 |
unless $$resref |
3053
|
0 |
0 |
unless ($self->{'POLLING'}) |
3058
|
0 |
0 |
unless (defined $self->{'POLL'}{$pollsub}) |
3061
|
0 |
0 |
if (@_ and not %args) |
3074
|
0 |
0 |
defined $args{'username'} ? : |
|
0 |
0 |
defined $args{'password'} ? : |
|
0 |
0 |
defined $args{'prompt_credentials'} ? : |
3079
|
0 |
0 |
if defined $devPeerCpu->{'errmode'} |
3080
|
0 |
0 |
if $self->eof |
3083
|
0 |
0 |
if ($devPeerCpu->{'stage'} < 1) |
3084
|
0 |
0 |
unless ($familyType) |
3087
|
0 |
0 |
unless ($familyType eq $Prm{'pers'}) |
3090
|
0 |
0 |
unless ($devPeerCpu->{'username'} and $devPeerCpu->{'password'} or $devPeerCpu->{'prompt_credentials'}) |
3096
|
0 |
0 |
if ($devPeerCpu->{'stage'} < 2) |
3098
|
0 |
0 |
unless $ok |
3100
|
0 |
0 |
unless $self->print('line', 'peer telnet', 'errmode', 'return') |
3105
|
0 |
0 |
if ($devPeerCpu->{'stage'} < 3) |
3107
|
0 |
0 |
unless defined $ok |
3108
|
0 |
0 |
unless $ok |
3110
|
0 |
0 |
unless defined $devPeerCpu->{'username'} |
3111
|
0 |
0 |
unless $self->print('line', $devPeerCpu->{'username'}, 'errmode', 'return') |
3116
|
0 |
0 |
if ($devPeerCpu->{'stage'} < 4) |
3118
|
0 |
0 |
unless defined $ok |
3119
|
0 |
0 |
unless $ok |
3121
|
0 |
0 |
unless defined $devPeerCpu->{'password'} |
3122
|
0 |
0 |
unless $self->print('line', $devPeerCpu->{'password'}, 'errmode', 'return') |
3129
|
0 |
0 |
unless $ok |
3133
|
0 |
0 |
$self->{'LASTPROMPT'} =~ /^@/ ? : |
3134
|
0 |
0 |
if $self->{'LASTPROMPT'} =~ /^@/ |
3144
|
0 |
0 |
unless (defined $self->{'POLL'}{$pollsub}) |
3154
|
0 |
0 |
if ($self->{$Package}{'ATTRIB'}{'is_nncli'}) { } |
3155
|
0 |
0 |
if ($cmdPrivExec->{'stage'} < 1) |
3156
|
0 |
0 |
if ($cmdPrivExec->{'userExec'} = $self->last_prompt =~ />\s?$/) |
3158
|
0 |
0 |
unless $ok |
3162
|
0 |
0 |
if ($cmdPrivExec->{'stage'} < 2) |
3164
|
0 |
0 |
unless $ok |
3169
|
0 |
0 |
if ($cmdPrivExec->{'stage'} < 3) |
3170
|
0 |
0 |
if ($cmdPrivExec->{'userExec'}) |
3172
|
0 |
0 |
unless $ok |
3173
|
0 |
0 |
unless $$resref |
3182
|
0 |
0 |
unless $ok |
3194
|
0 |
0 |
unless (defined $self->{'POLL'}{$pollsub}) |
3205
|
0 |
0 |
if ($self->{$Package}{'ATTRIB'}{'is_nncli'}) { } |
3206
|
0 |
0 |
if ($cmdConfig->{'stage'} < 1) |
3207
|
0 |
0 |
if ($cmdConfig->{'userExec'} = $self->last_prompt =~ />\s?$/) |
3209
|
0 |
0 |
unless $ok |
3213
|
0 |
0 |
if ($cmdConfig->{'stage'} < 2) |
3214
|
0 |
0 |
if ($cmdConfig->{'privExec'} = !($self->last_prompt =~ m[[\(/]config])) |
3216
|
0 |
0 |
unless $ok |
3217
|
0 |
0 |
unless $$resref |
3221
|
0 |
0 |
if ($cmdConfig->{'stage'} < 3) |
3223
|
0 |
0 |
unless $ok |
3228
|
0 |
0 |
if ($cmdConfig->{'stage'} < 4) |
3229
|
0 |
0 |
if ($cmdConfig->{'privExec'}) |
3231
|
0 |
0 |
unless $ok |
3232
|
0 |
0 |
unless $$resref |
3236
|
0 |
0 |
if ($cmdConfig->{'stage'} < 5) |
3237
|
0 |
0 |
if ($cmdConfig->{'userExec'}) |
3239
|
0 |
0 |
unless $ok |
3240
|
0 |
0 |
unless $$resref |
3248
|
0 |
0 |
unless $cmdcli =~ /^config / |
3250
|
0 |
0 |
unless $ok |
3261
|
0 |
0 |
unless (defined $self->{'POLL'}{$pollsub}) |
3268
|
0 |
0 |
if ($discDevice->{'stage'} < 1) |
3280
|
0 |
0 |
if ($discDevice->{'stage'} < 2) |
3283
|
0 |
0 |
unless $ok |
3285
|
0 |
0 |
if ($$outref =~ /\s+Configured\s+In Use\s+Last BootP/) |
3295
|
0 |
0 |
if ($discDevice->{'stage'} < 3) |
3298
|
0 |
0 |
unless $ok |
3300
|
0 |
0 |
if ($$outref =~ /^\s+auto-recover-delay :/m) |
3311
|
0 |
0 |
if ($discDevice->{'stage'} < 4) |
3314
|
0 |
0 |
unless $ok |
3316
|
0 |
0 |
if ($$outref =~ /^Version:\s+(?i:v|REL)?(.+)/m) |
3328
|
0 |
0 |
if ($discDevice->{'stage'} < 5) |
3331
|
0 |
0 |
unless $ok |
3333
|
0 |
0 |
if ($$outref =~ /^Access Point Hostname\s*(.+)$/m) |
3345
|
0 |
0 |
if ($discDevice->{'stage'} < 6) |
3348
|
0 |
0 |
unless $ok |
3350
|
0 |
0 |
if ($$outref =~ /^Chassis Model: (.+)$/m) |
3362
|
0 |
0 |
if ($discDevice->{'stage'} < 7) |
3365
|
0 |
0 |
unless $ok |
3367
|
0 |
0 |
if ($$outref =~ /Product Name:\s+(.+)/g) |
3372
|
0 |
0 |
if $$outref =~ /System Name:\s+(.+)/g |
3373
|
0 |
0 |
if $$outref =~ /System MAC:\s+(.+)/g |
3381
|
0 |
0 |
if ($discDevice->{'stage'} < 8) |
3384
|
0 |
0 |
unless $ok |
3386
|
0 |
0 |
if ($$outref =~ /^\s+NVRamSize:/m) |
3408
|
0 |
0 |
if (shift() & $self->{'debug'}) |
3412
|
0 |
0 |
if ($self->{$Package}{'DEBUGLOGFH'}) { } |
3430
|
0 |
0 |
if ($actualPrompt) |
3445
|
0 |
0 |
if $self->{$Package}{'ATTRIBFLAG'}{'slots'} |
3446
|
0 |
0 |
if $self->{$Package}{'ATTRIBFLAG'}{'ports'} |
3448
|
0 |
0 |
if (defined $1 and !defined($currentSlot) || $1 != $currentSlot) |
3450
|
0 |
0 |
unless grep {$_ eq $currentSlot;} @slots |
3452
|
0 |
0 |
if (defined $currentSlot) { } |
3453
|
0 |
0 |
unless grep {$_ eq $2;} @{$ports[$currentSlot];} |
3456
|
0 |
0 |
unless grep {$_ eq $2;} @ports |
3472
|
0 |
0 |
if ($self->{$Package}{'ATTRIB'}{'family_type'} eq $Prm{'bstk'}) { } |
|
0 |
0 |
elsif ($self->{$Package}{'ATTRIB'}{'family_type'} eq $Prm{'pers'}) { } |
|
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'}) { } |
3505
|
0 |
0 |
if ($self->{$Package}{'ATTRIB'}{'family_type'} eq $Prm{'pers'}) |
3506
|
0 |
0 |
if ($self->{$Package}{'ATTRIB'}{'is_apls'} or $model =~ /^VSP/) { } |
3549
|
0 |
0 |
if ($attrib eq 'is_nncli' or $attrib eq 'is_acli') { } |
3559
|
0 |
0 |
if (defined $value) { } |
3565
|
0 |
0 |
if ($attrib eq 'family_type') |
3566
|
0 |
0 |
if (defined $Attribute{$value}) { } |
3584
|
0 |
0 |
unless $familyType = $self->{$Package}{'ATTRIB'}{'family_type'} |
3585
|
0 |
0 |
if $familyType eq $Prm{'generic'} |
3586
|
0 |
0 |
if ($$outref =~ /$ErrorPatterns{$familyType}/m) { } |
3602
|
0 |
0 |
if (defined $self->baudrate and defined(my $origBaud = $self->{$Package}{'ORIGBAUDRATE'})) |
3604
|
0 |
0 |
if ($familyType eq $Prm{'bstk'}) { } |
|
0 |
0 |
elsif ($familyType eq $Prm{'pers'}) { } |
3611
|
0 |
0 |
if ($self->{$Package}{'ATTRIB'}{'is_nncli'}) { } |