line |
true |
false |
branch |
257
|
0 |
1 |
if (@_ == 1) { } |
266
|
0 |
1 |
unless my $self = $class->SUPER::new(%cliArgs) |
295
|
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') { } |
319
|
0 |
0 |
if (@_ == 1) { } |
321
|
0 |
0 |
if ($args{'host'} =~ /^(.+?)\s+(\d+)$/) |
345
|
0 |
0 |
defined $args{'blocking'} ? : |
|
0 |
0 |
defined $args{'connection_timeout'} ? : |
|
0 |
0 |
defined $args{'errmode'} ? : |
|
0 |
0 |
defined $args{'return_reference'} ? : |
371
|
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'} ? : |
373
|
0 |
0 |
if (not $self->{'LOGINSTAGE'} and $self->{'TYPE'} ne 'SERIAL' and useIPv6() and defined $args{'blocking'} and not $args{'blocking'}) |
377
|
0 |
0 |
if defined $self->{'POLL'}{'errmode'} |
385
|
0 |
0 |
if @_ |
387
|
0 |
0 |
unless (defined $self->{'POLL'} and $self->{'POLL'}{'coderef'} == 'Control::CLI::AvayaData'->can('connect_poll')) |
392
|
0 |
0 |
if defined $self->{'POLL'}{'errmode'} |
395
|
0 |
0 |
unless defined $self->{'POLL'}{'complete'} and $self->{'POLL'}{'complete'} == 0 |
404
|
0 |
0 |
if $self->connection_type eq 'SERIAL' |
427
|
0 |
0 |
defined $args{'blocking'} ? : |
|
0 |
0 |
defined $args{'timeout'} ? : |
|
0 |
0 |
defined $args{'errmode'} ? : |
|
0 |
0 |
defined $args{'return_reference'} ? : |
437
|
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'} ? : |
446
|
0 |
0 |
if defined $self->{'POLL'}{'errmode'} |
454
|
0 |
0 |
if @_ |
456
|
0 |
0 |
unless (defined $self->{'POLL'} and $self->{'POLL'}{'coderef'} == 'Control::CLI::AvayaData'->can('login_poll')) |
461
|
0 |
0 |
if defined $self->{'POLL'}{'errmode'} |
464
|
0 |
0 |
unless defined $self->{'POLL'}{'complete'} and $self->{'POLL'}{'complete'} == 0 |
475
|
0 |
0 |
if (@_ == 1) { } |
483
|
0 |
0 |
unless defined $args{'command'} |
496
|
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'} ? : |
520
|
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'} ? : |
523
|
0 |
0 |
if defined $self->{'POLL'}{'errmode'} |
527
|
0 |
0 |
if ($args{'poll_syntax'}) { } |
528
|
0 |
0 |
wantarray ? : |
531
|
0 |
0 |
wantarray ? : |
551
|
0 |
0 |
if (lc $_[0] ne 'command' and lc $_[0] ne 'poll_syntax') { } |
560
|
0 |
0 |
if $args[$i] eq 'command' |
561
|
0 |
0 |
if $args[$i] eq 'feed' |
562
|
0 |
0 |
if $args[$i] eq 'feed_list' and ref $args[$i + 1] eq 'ARRAY' |
563
|
0 |
0 |
if $args[$i] eq 'prompt' |
564
|
0 |
0 |
if $args[$i] eq 'more_pages' |
565
|
0 |
0 |
if $args[$i] eq 'timeout' |
566
|
0 |
0 |
if $args[$i] eq 'blocking' |
567
|
0 |
0 |
if $args[$i] eq 'return_reference' |
568
|
0 |
0 |
if $args[$i] eq 'return_result' |
569
|
0 |
0 |
if $args[$i] eq 'reset_prompt' |
570
|
0 |
0 |
if $args[$i] eq 'more_prompt' |
571
|
0 |
0 |
if $args[$i] eq 'progress_dots' |
572
|
0 |
0 |
if $args[$i] eq 'cmd_initiated_prompt' |
573
|
0 |
0 |
if $args[$i] eq 'errmode' |
574
|
0 |
0 |
if $args[$i] eq 'poll_syntax' |
577
|
0 |
0 |
unless defined $cmd |
580
|
0 |
0 |
$returnRes ? : |
617
|
0 |
0 |
if defined $self->{'POLL'}{'errmode'} |
621
|
0 |
0 |
if ($pollSyntax) { } |
622
|
0 |
0 |
wantarray ? : |
625
|
0 |
0 |
wantarray ? : |
633
|
0 |
0 |
if @_ |
635
|
0 |
0 |
unless (defined $self->{'POLL'} and $self->{'POLL'}{'coderef'} == 'Control::CLI::AvayaData'->can('cmd_poll')) |
640
|
0 |
0 |
if defined $self->{'POLL'}{'errmode'} |
643
|
0 |
0 |
unless defined $self->{'POLL'}{'complete'} and $self->{'POLL'}{'complete'} == 0 |
654
|
0 |
0 |
if (@_ == 1) { } |
668
|
0 |
0 |
defined $args{'blocking'} ? : |
|
0 |
0 |
defined $args{'timeout'} ? : |
|
0 |
0 |
defined $args{'errmode'} ? : |
684
|
0 |
0 |
if defined $self->{'POLL'}{'errmode'} |
688
|
0 |
0 |
if ($args{'poll_syntax'}) { } |
689
|
0 |
0 |
wantarray ? : |
692
|
0 |
0 |
wantarray ? : |
700
|
0 |
0 |
if @_ |
702
|
0 |
0 |
unless (defined $self->{'POLL'} and $self->{'POLL'}{'coderef'} == 'Control::CLI::AvayaData'->can('attribute_poll')) |
707
|
0 |
0 |
if defined $self->{'POLL'}{'errmode'} |
710
|
0 |
0 |
unless defined $self->{'POLL'}{'complete'} and $self->{'POLL'}{'complete'} == 0 |
721
|
0 |
0 |
if (@_ == 1) { } |
736
|
0 |
0 |
defined $args{'blocking'} ? : |
|
0 |
0 |
defined $args{'timeout'} ? : |
|
0 |
0 |
defined $args{'errmode'} ? : |
755
|
0 |
0 |
$args{'baudrate'} eq 'max' ? : |
759
|
0 |
0 |
if defined $self->{'POLL'}{'errmode'} |
763
|
0 |
0 |
if ($args{'poll_syntax'}) { } |
764
|
0 |
0 |
wantarray ? : |
767
|
0 |
0 |
wantarray ? : |
775
|
0 |
0 |
if @_ |
777
|
0 |
0 |
unless (defined $self->{'POLL'} and $self->{'POLL'}{'coderef'} == 'Control::CLI::AvayaData'->can('change_baudrate_poll')) |
782
|
0 |
0 |
if defined $self->{'POLL'}{'errmode'} |
785
|
0 |
0 |
unless defined $self->{'POLL'}{'complete'} and $self->{'POLL'}{'complete'} == 0 |
796
|
0 |
0 |
if (@_ == 1) { } |
810
|
0 |
0 |
defined $args{'blocking'} ? : |
|
0 |
0 |
defined $args{'timeout'} ? : |
|
0 |
0 |
defined $args{'errmode'} ? : |
821
|
0 |
0 |
defined $args{'password'} ? : |
|
0 |
0 |
defined $args{'prompt_credentials'} ? : |
827
|
0 |
0 |
if defined $self->{'POLL'}{'errmode'} |
835
|
0 |
0 |
if @_ |
837
|
0 |
0 |
unless (defined $self->{'POLL'} and $self->{'POLL'}{'coderef'} == 'Control::CLI::AvayaData'->can('enable_poll')) |
841
|
0 |
0 |
if defined $self->{'POLL'}{'errmode'} |
844
|
0 |
0 |
unless defined $self->{'POLL'}{'complete'} and $self->{'POLL'}{'complete'} == 0 |
855
|
0 |
0 |
if (@_ == 1) { } |
869
|
0 |
0 |
defined $args{'blocking'} ? : |
|
0 |
0 |
defined $args{'timeout'} ? : |
|
0 |
0 |
defined $args{'errmode'} ? : |
883
|
0 |
0 |
if defined $self->{'POLL'}{'errmode'} |
891
|
0 |
0 |
if @_ |
893
|
0 |
0 |
unless (defined $self->{'POLL'} and $self->{'POLL'}{'coderef'} == 'Control::CLI::AvayaData'->can('device_more_paging_poll')) |
897
|
0 |
0 |
if defined $self->{'POLL'}{'errmode'} |
900
|
0 |
0 |
unless defined $self->{'POLL'}{'complete'} and $self->{'POLL'}{'complete'} == 0 |
920
|
0 |
0 |
defined $args{'blocking'} ? : |
|
0 |
0 |
defined $args{'timeout'} ? : |
|
0 |
0 |
defined $args{'errmode'} ? : |
932
|
0 |
0 |
defined $args{'username'} ? : |
|
0 |
0 |
defined $args{'password'} ? : |
|
0 |
0 |
defined $args{'prompt_credentials'} ? : |
935
|
0 |
0 |
if defined $self->{'POLL'}{'errmode'} |
943
|
0 |
0 |
if @_ |
945
|
0 |
0 |
unless (defined $self->{'POLL'} and $self->{'POLL'}{'coderef'} == 'Control::CLI::AvayaData'->can('device_peer_cpu_poll')) |
949
|
0 |
0 |
if defined $self->{'POLL'}{'errmode'} |
952
|
0 |
0 |
unless defined $self->{'POLL'}{'complete'} and $self->{'POLL'}{'complete'} == 0 |
963
|
0 |
0 |
unless (defined $fh) |
966
|
0 |
0 |
unless (ref $fh or length $fh) |
970
|
0 |
0 |
unless (ref $fh or defined fileno $fh) |
973
|
0 |
0 |
unless open $fh, '>', "$logfile" |
994
|
0 |
0 |
if (defined $newSetting) |
1006
|
0 |
0 |
if (defined $newSetting) |
1010
|
0 |
0 |
$newSetting ? : |
1011
|
0 |
0 |
$delayPrompt ? : |
1020
|
0 |
0 |
if defined $newSetting |
1028
|
0 |
0 |
if defined $newSetting |
1036
|
0 |
0 |
if defined $newSetting |
1044
|
0 |
0 |
if (defined $newSetting) |
1055
|
0 |
0 |
if (defined $newSetting) |
1066
|
0 |
0 |
if defined $newSetting |
1074
|
0 |
0 |
if defined $newSetting |
1082
|
0 |
0 |
if defined $newSetting |
1090
|
0 |
0 |
if defined $newSetting |
1098
|
0 |
0 |
if defined $newSetting |
1124
|
0 |
0 |
unless ($self->{'POLLING'}) |
1129
|
0 |
0 |
unless (defined $self->{'POLL'}{$pollsub}) |
1136
|
0 |
0 |
if (@_ and not %args) |
1171
|
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'} ? : |
1176
|
0 |
0 |
if defined $connect->{'errmode'} |
1178
|
0 |
0 |
if ($connect->{'stage'} < 1) |
1199
|
0 |
0 |
unless $ok |
1201
|
0 |
0 |
unless defined $self->console |
1217
|
0 |
0 |
if $ok |
1227
|
0 |
0 |
unless ($self->{'POLLING'}) |
1232
|
0 |
0 |
unless (defined $self->{'POLL'}{$pollsub}) |
1235
|
0 |
0 |
if (@_ and not %args) |
1258
|
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'} ? : |
1263
|
0 |
0 |
if defined $login->{'errmode'} |
1264
|
0 |
0 |
if $self->eof |
1269
|
0 |
0 |
if ($login->{'stage'} < 1) |
1271
|
0 |
0 |
if ($self->{'LOGINSTAGE'}) { } |
1279
|
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'}) { } |
1280
|
0 |
0 |
unless $self->print('line', $login->{'username'}, 'errmode', 'return') |
1286
|
0 |
0 |
unless $self->print('line', $login->{'password'}, 'errmode', 'return') |
1293
|
0 |
0 |
unless $self->put('string', $login->{'wake_console'}, 'errmode', 'return') |
1297
|
0 |
0 |
if ($login->{'stage'} < 2) |
1303
|
0 |
0 |
unless $ok |
1307
|
0 |
0 |
$self->{'POLL'}{'read_buffer'} =~ /\n/ ? : |
1314
|
0 |
0 |
if (($patdepth = rindex($self->{'POLL'}{'read_buffer'}, $LoginPatterns{$key})) >= 0) |
1316
|
0 |
0 |
unless ($login->{'family_type'}) |
1318
|
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') { } |
1323
|
0 |
0 |
if ($key eq 'banner') |
1324
|
0 |
0 |
if $self->{'POLL'}{'read_buffer'} =~ /\*\*\* ((?:[^\*\n]+?) (?:Switch|Controller|Platform) (?:WC)?\d+.*?)\s+/ |
1326
|
0 |
0 |
if ($self->{'POLL'}{'read_buffer'} =~ /FW:([\d\.]+)\s+SW:v([\d\.]+)/) |
1337
|
0 |
0 |
if $self->{'POLL'}{'read_buffer'} =~ /\((Secure Router \d+)\)/ |
1338
|
0 |
0 |
if $self->{'POLL'}{'read_buffer'} =~ /Version: (.+)/ |
1345
|
0 |
0 |
if $self->{'POLL'}{'read_buffer'} =~ /\* Software Release (?i:v|REL)?(.+?) / |
1352
|
0 |
0 |
if $self->{'POLL'}{'read_buffer'} =~ /\* Software Release (?i:v|REL)?(.+?) / |
1359
|
0 |
0 |
if $self->{'POLL'}{'read_buffer'} =~ /Software Release Build (.+?) / |
1366
|
0 |
0 |
if $self->{'POLL'}{'read_buffer'} =~ /AvayaOS Version (.+?) / |
1369
|
0 |
0 |
if ($patdepth > $deepest) |
1374
|
0 |
0 |
if $deepest > -1 |
1377
|
0 |
0 |
if ($self->{'POLL'}{'read_buffer'} =~ /$usernamePrompt/) { } |
|
0 |
0 |
elsif ($self->{'POLL'}{'read_buffer'} =~ /$passwordPrompt/) { } |
1387
|
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$/) { } |
1389
|
0 |
0 |
unless $self->put('string', $CTRL_Y, 'errmode', 'return') |
1395
|
0 |
0 |
unless $self->put('string', 'c', 'errmode', 'return') |
1401
|
0 |
0 |
unless $self->put('string', $CTRL_C, 'errmode', 'return') |
1407
|
0 |
0 |
unless $self->put('string', 'q', 'errmode', 'return') |
1416
|
0 |
0 |
unless $self->print('errmode', 'return') |
1423
|
0 |
0 |
unless $self->print('errmode', 'return') |
1429
|
0 |
0 |
if ($login->{'login_attempted'}) |
1433
|
0 |
0 |
unless ($login->{'username'}) |
1434
|
0 |
0 |
if ($self->{'TYPE'} eq 'SSH') { } |
1438
|
0 |
0 |
unless ($login->{'prompt_credentials'}) |
1445
|
0 |
0 |
unless $self->print('line', $login->{'username'}, 'errmode', 'return') |
1453
|
0 |
0 |
if ($login->{'password_sent'}) |
1457
|
0 |
0 |
unless ($login->{'password'}) |
1458
|
0 |
0 |
unless ($login->{'prompt_credentials'}) |
1464
|
0 |
0 |
unless $self->print('line', $login->{'password'}, 'errmode', 'return') |
1482
|
0 |
0 |
if ($login->{'family_type'}) { } |
1483
|
0 |
0 |
if ($login->{'family_type'} eq $Prm{'pers'}) { } |
1486
|
0 |
0 |
if ($self->{'POLL'}{'local_buffer'} =~ /($InitPrompt{$promptType})/) |
1494
|
0 |
0 |
if ($self->{'POLL'}{'local_buffer'} =~ /($InitPrompt{$login->{'family_type'}})/) |
1502
|
0 |
0 |
if ($self->{'POLL'}{'local_buffer'} =~ /($InitPrompt{$key})/) |
1512
|
0 |
0 |
if ($capturedPrompt) |
1522
|
0 |
0 |
if $login->{'family_type'} eq $Prm{'pers'} |
1523
|
0 |
0 |
if ($login->{'detectionFromPrompt'}) |
1524
|
0 |
0 |
if ($login->{'family_type'} eq $Prm{'bstk'} or defined $cliType and $cliType eq 'nncli') { } |
1534
|
0 |
0 |
if ($login->{'family_type'} eq $Prm{'generic'} or $login->{'detectionFromPrompt'} and not $self->{'LASTPROMPT'} =~ /^@/) { } |
1540
|
0 |
0 |
unless $self->{'POLL'}{'blocking'} |
1542
|
0 |
0 |
if ($login->{'stage'} < 3) |
1544
|
0 |
0 |
unless $ok |
1546
|
0 |
0 |
if ($login->{'family_type'} eq $Prm{'generic'} and $self->{'errmode'} eq 'croak' || $self->{'errmode'} eq 'die') |
1551
|
0 |
0 |
if ($login->{'stage'} < 4) |
1552
|
0 |
0 |
if ($login->{'family_type'} eq $Prm{'pers'} or $login->{'family_type'} eq $Prm{'xlr'}) |
1553
|
0 |
0 |
$self->{'LASTPROMPT'} =~ /^@/ ? : |
1554
|
0 |
0 |
if $self->{'LASTPROMPT'} =~ /^@/ |
1556
|
0 |
0 |
if $login->{'detectionFromPrompt'} |
1560
|
0 |
0 |
if $login->{'login_attempted'} |
1570
|
0 |
0 |
unless ($self->{'POLLING'}) |
1575
|
0 |
0 |
unless (defined $self->{'POLL'}{$pollsub}) |
1579
|
0 |
0 |
if (@_ and not %args) |
1583
|
0 |
0 |
if defined $args{'feed_list'} and !ref($args{'feed_list'}) eq 'ARRAY' |
1610
|
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'} ? : |
1616
|
0 |
0 |
if defined $cmd->{'errmode'} |
1617
|
0 |
0 |
if $self->eof |
1618
|
0 |
0 |
if $cmd->{'reset_prompt'} |
1622
|
0 |
0 |
if ($cmd->{'stage'} < 1) |
1624
|
0 |
0 |
if (defined $cmd->{'command'}) |
1627
|
0 |
0 |
if ($command =~ /\?\s*$/ and $self->{$Package}{'ATTRIB'}{'is_nncli'}) |
1628
|
0 |
0 |
if ($familyType eq $Prm{'sr'}) { } |
1635
|
0 |
0 |
unless $self->print('line', $command, 'errmode', 'return') |
1641
|
0 |
0 |
if ($cmd->{'stage'} == 1) { } |
|
0 |
0 |
elsif ($cmd->{'stage'} == 2) { } |
1643
|
0 |
0 |
if defined $ok and $ok == 0 |
1644
|
0 |
0 |
unless (defined $ok) |
1645
|
0 |
0 |
if ($cmd->{'alreadyCmdTimeout'} or not length $familyType or $familyType eq $Prm{'generic'}) |
1649
|
0 |
0 |
unless $self->print('errmode', 'return') |
1655
|
0 |
0 |
unless $self->{'POLL'}{'blocking'} |
1661
|
0 |
0 |
unless $ok |
1663
|
0 |
0 |
unless (length $self->{'POLL'}{'read_buffer'}) |
1666
|
0 |
0 |
if ($feed = shift @{$$cmd{'feed_data'};}) { } |
1670
|
0 |
0 |
if (++$cmd->{'cmdPromptCount'} > $self->{$Package}{'cmd_feed_timeout'}) |
1676
|
0 |
0 |
unless $self->print('line', $feed, 'errmode', 'return') |
1679
|
0 |
0 |
unless $self->{'POLL'}{'blocking'} |
1685
|
0 |
0 |
unless $ok |
1690
|
0 |
0 |
if ($cmd->{'progress_dots'}) |
1691
|
0 |
0 |
unless defined $cmd->{'progress'} |
1692
|
0 |
0 |
if (($cmd->{'progress'} += length $self->{'POLL'}{'read_buffer'}) > $cmd->{'progress_dots'}) |
1698
|
0 |
0 |
unless ($cmd->{'cmdEchoRemoved'}) |
1700
|
0 |
0 |
if ($self->{'POLL'}{'local_buffer'} =~ s/(^.*\n)//) { } |
1703
|
0 |
0 |
if $familyType eq $Prm{'xirrus'} |
1707
|
0 |
0 |
unless length $self->{'POLL'}{'read_buffer'} |
1720
|
0 |
0 |
if (length $output) |
1722
|
0 |
0 |
if $familyType eq $Prm{'sr'} |
1723
|
0 |
0 |
if ($familyType eq $Prm{'xirrus'}) |
1736
|
0 |
0 |
if length $output |
1737
|
0 |
0 |
if length $cmd->{'lastLine'} |
1739
|
0 |
0 |
if (length $output) |
1745
|
0 |
0 |
if (length $cmd->{'lastLine'} and $self->{'POLL'}{'local_buffer'} =~ s/\n\n$/\n/) { } |
1756
|
0 |
0 |
unless length $cmd->{'lastLine'} |
1758
|
0 |
0 |
if ($cmd->{'lastLine'} =~ s/($cmd->{'prompt'})//) |
1761
|
0 |
0 |
if $cmd->{'reset_prompt'} |
1762
|
0 |
0 |
$cmd->{'reset_prompt'} ? : |
1763
|
0 |
0 |
unless ($newLineLastLine and not length $cmd->{'lastLine'}) |
1769
|
0 |
0 |
if ($cmd->{'more_prompt_delay'} and not $cmd->{'morePromptDelayed'} and $cmd->{'lastLine'} =~ /(?:$cmd->{'more_prompt_delay'})$/) |
1773
|
0 |
0 |
unless $self->{'POLL'}{'blocking'} |
1776
|
0 |
0 |
if ($cmd->{'more_prompt'} and $cmd->{'lastLine'} =~ s/(?:$cmd->{'more_prompt'})$//) |
1778
|
0 |
0 |
if (length $cmd->{'lastLine'}) |
1781
|
0 |
0 |
if $newLineLastLine |
1783
|
0 |
0 |
if $newLineLastLine |
1784
|
0 |
0 |
if ($cmd->{'more_pages'} == 0 or $cmd->{'more_pages'}-- > 1) { } |
1786
|
0 |
0 |
unless $self->put('string', $Space, 'errmode', 'return') |
1791
|
0 |
0 |
unless $self->put('string', 'q', 'errmode', 'return') |
1794
|
0 |
0 |
unless $self->{'POLL'}{'blocking'} |
1797
|
0 |
0 |
if ($cmd->{'yn_prompt'} and $cmd->{'lastLine'} =~ /$cmd->{'yn_prompt'}/) |
1798
|
0 |
0 |
if (++$cmd->{'ynPromptCount'} > $self->{$Package}{'cmd_feed_timeout'}) |
1802
|
0 |
0 |
unless $self->print('line', 'y', 'errmode', 'return') |
1804
|
0 |
0 |
unless $self->{'POLL'}{'blocking'} |
1807
|
0 |
0 |
if ($cmd->{'cmd_prompt'} and $cmd->{'lastLine'} =~ /$cmd->{'cmd_prompt'}/) |
1811
|
0 |
0 |
unless $self->{'POLL'}{'blocking'} |
1816
|
0 |
0 |
if $cmd->{'lastLine'} =~ s/^\n// |
1828
|
0 |
0 |
unless ($self->{'POLLING'}) |
1833
|
0 |
0 |
unless (defined $self->{'POLL'}{$pollsub}) |
1836
|
0 |
0 |
if (@_ and not %args) |
1854
|
0 |
0 |
if defined $attrib->{'errmode'} |
1855
|
0 |
0 |
if $self->eof |
1858
|
0 |
0 |
if ($attrib->{'stage'} < 1) |
1859
|
0 |
0 |
unless defined $attrib->{'attribute'} |
1860
|
0 |
0 |
unless $familyType |
1863
|
0 |
0 |
if ($attrib->{'reload'}) |
1864
|
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') { } |
1866
|
0 |
0 |
unless $self->print |
1875
|
0 |
0 |
if ($attrib->{'stage'} < 2) |
1877
|
0 |
0 |
unless $ok |
1881
|
0 |
0 |
if ($attrib->{'stage'} < 3) |
1883
|
0 |
0 |
if (defined $self->{$Package}{'ATTRIBFLAG'}{$attrib->{'attribute'}}) |
1888
|
0 |
0 |
if $familyType eq $Prm{'generic'} |
1893
|
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'}) { } |
1894
|
0 |
0 |
if ($attrib->{'attribute'} eq 'is_ha') |
1895
|
0 |
0 |
unless ($attrib->{'debugMsg'}) |
1900
|
0 |
0 |
unless $ok |
1901
|
0 |
0 |
if ($$outref =~ /Current CPU State : Disabled State./) { } |
|
0 |
0 |
elsif ($$outref =~ /Current CPU State/) { } |
1913
|
0 |
0 |
if ($attrib->{'attribute'} eq 'sw_version') |
1914
|
0 |
0 |
unless ($attrib->{'debugMsg'}) |
1919
|
0 |
0 |
unless $ok |
1920
|
0 |
0 |
if $$outref =~ /Version : Build (?i:v|REL)?(.+?) / |
1924
|
0 |
0 |
if ($attrib->{'attribute'} eq 'fw_version') |
1925
|
0 |
0 |
if ($attrib->{'stage'} < 4) |
1926
|
0 |
0 |
unless ($attrib->{'debugMsg'}) |
1931
|
0 |
0 |
unless $ok |
1932
|
0 |
0 |
if ($$outref =~ /Version:\s+(?i:v|REL)?(.+)/) { } |
1942
|
0 |
0 |
unless ($attrib->{'debugMsg'}) |
1947
|
0 |
0 |
unless $ok |
1948
|
0 |
0 |
if ($$outref =~ /Version:\s+(?i:v|REL)?(.+)/) { } |
1957
|
0 |
0 |
if ($attrib->{'attribute'} eq 'stp_mode') |
1958
|
0 |
0 |
unless ($attrib->{'debugMsg'}) |
1963
|
0 |
0 |
unless $ok |
1964
|
0 |
0 |
if ($$outref =~ /flags spanning-tree-mode (mstp|rstp)/) { } |
1973
|
0 |
0 |
if ($attrib->{'attribute'} eq 'baudrate') |
1974
|
0 |
0 |
unless ($attrib->{'debugMsg'}) |
1979
|
0 |
0 |
unless $ok |
1980
|
0 |
0 |
if ($$outref =~ /sio (?:console )?baud (\d+)/) |
1986
|
0 |
0 |
if ($attrib->{'attribute'} eq 'max_baud') |
1987
|
0 |
0 |
if ($attrib->{'stage'} < 4) |
1988
|
0 |
0 |
unless ($attrib->{'debugMsg'}) |
1993
|
0 |
0 |
unless $ok |
1997
|
0 |
0 |
if ($$outref =~ /(?:-|\.\.)\s?(\d+)[>}]/) { } |
2007
|
0 |
0 |
unless ($attrib->{'debugMsg'}) |
2012
|
0 |
0 |
unless $ok |
2016
|
0 |
0 |
if ($$outref =~ /(?:-|\.\.)\s?(\d+)[>}]/) |
2022
|
0 |
0 |
if ($self->{$Package}{'ATTRIB'}{'is_master_cpu'}) { } |
2023
|
0 |
0 |
if ($attrib->{'attribute'} eq 'is_dual_cpu' or $attrib->{'attribute'} eq 'base_mac') |
2024
|
0 |
0 |
unless ($attrib->{'debugMsg'}) |
2029
|
0 |
0 |
unless $ok |
2030
|
0 |
0 |
if ($$outref =~ /SysDescr\s+: (.+?) \(/g) |
2032
|
0 |
0 |
if ($$outref =~ / BoxType: (.+)/cg) { } |
2043
|
0 |
0 |
if $$outref =~ /SysName\s+: (.+)/g |
2044
|
0 |
0 |
if ($self->{$Package}{'ATTRIB'}{'is_voss'}) { } |
2045
|
0 |
0 |
if ($$outref =~ /BrandName:?\s+: (.+)/cg) { } |
2056
|
0 |
0 |
if $$outref =~ /BaseMacAddr\s+: (.+)/g |
2057
|
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}/) { } |
2067
|
0 |
0 |
if $$outref =~ /Virtual IP\s+: (.+)/g |
2075
|
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_/) |
2076
|
0 |
0 |
unless ($attrib->{'debugMsg'}) |
2081
|
0 |
0 |
unless $ok |
2082
|
0 |
0 |
if ($$outref =~ /SysDescr\s+: (.+?) \(/g) |
2084
|
0 |
0 |
if ($$outref =~ / BoxType: (.+)/cg) { } |
2095
|
0 |
0 |
if $$outref =~ /SysName\s+: (.+)/g |
2096
|
0 |
0 |
if ($self->{$Package}{'ATTRIB'}{'is_voss'}) { } |
2097
|
0 |
0 |
if ($$outref =~ /BrandName:?\s+: (.+)/cg) { } |
2108
|
0 |
0 |
if $$outref =~ /BaseMacAddr\s+: (.+)/g |
2110
|
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 :/) { } |
2119
|
0 |
0 |
if $$outref =~ /Virtual IP\s+: (.+)/g |
2120
|
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') { } |
2129
|
0 |
0 |
if ($attrib->{'attribute'} eq 'slots' or $attrib->{'attribute'} eq 'ports') |
2130
|
0 |
0 |
if ($self->{$Package}{'ATTRIB'}{'is_nncli'} and $self->{$Package}{'ATTRIB'}{'model'} =~ /(?:Passport|ERS)-8[36]\d\d/) { } |
2131
|
0 |
0 |
if ($attrib->{'stage'} < 4) |
2132
|
0 |
0 |
unless ($attrib->{'debugMsg'}) |
2137
|
0 |
0 |
unless $ok |
2142
|
0 |
0 |
unless ($attrib->{'debugMsg'}) |
2147
|
0 |
0 |
unless $ok |
2153
|
0 |
0 |
unless ($attrib->{'debugMsg'}) |
2158
|
0 |
0 |
unless $ok |
2164
|
0 |
0 |
if ($attrib->{'attribute'} =~ /^(?:is_)?oob_/) |
2165
|
0 |
0 |
if ($self->{$Package}{'ATTRIB'}{'is_voss'}) { } |
2166
|
0 |
0 |
unless ($attrib->{'debugMsg'}) |
2171
|
0 |
0 |
unless $ok |
2173
|
0 |
0 |
if $$outref =~ /Portmgmt\s+ ([\d\.]+)/g |
2174
|
0 |
0 |
if $$outref =~ m[Port1/1\s+ ([\d\.]+)]g |
2175
|
0 |
0 |
if $$outref =~ /MgmtVirtIp\s+ ([\d\.]+)/g |
2176
|
0 |
0 |
if $$outref =~ m[Port2/1\s+ ([\d\.]+)]g |
2177
|
0 |
0 |
if $$outref =~ /Portmgmt2\s+ ([\d\.]+)/g |
2178
|
0 |
0 |
if ($self->{$Package}{'ATTRIB'}{'cpu_slot'} == 1) { } |
2190
|
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'}) ? : |
2196
|
0 |
0 |
if ($attrib->{'stage'} < 4) |
2197
|
0 |
0 |
unless ($attrib->{'debugMsg'}) |
2202
|
0 |
0 |
unless $ok |
2204
|
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}/) { } |
2213
|
0 |
0 |
if ($$outref =~ /Virtual IP\s+: (.+)/g) { } |
2222
|
0 |
0 |
unless ($attrib->{'debugMsg'}) |
2227
|
0 |
0 |
unless $ok |
2229
|
0 |
0 |
if $$outref =~ m[^net mgmt ip ([\d\.]+)/[\d\.]+ *(?:cpu-slot [35])?$]m |
2230
|
0 |
0 |
if $$outref =~ m[^net mgmt ip ([\d\.]+)/[\d\.]+ cpu-slot 6$]m |
2231
|
0 |
0 |
if ($self->{$Package}{'ATTRIB'}{'cpu_slot'} < 5) { } |
|
0 |
0 |
elsif ($self->{$Package}{'ATTRIB'}{'cpu_slot'} == 5) { } |
2237
|
0 |
0 |
$self->{$Package}{'ATTRIB'}{'is_dual_cpu'} ? : |
2241
|
0 |
0 |
$self->{$Package}{'ATTRIB'}{'is_dual_cpu'} ? : |
2245
|
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'}) ? : |
2253
|
0 |
0 |
if ($attrib->{'attribute'} eq 'is_apls') |
2258
|
0 |
0 |
if ($attrib->{'attribute'} eq 'is_voss') |
2259
|
0 |
0 |
unless ($attrib->{'debugMsg'}) |
2264
|
0 |
0 |
unless $ok |
2265
|
0 |
0 |
if ($$outref =~ m[Only devices /intflash]) { } |
2279
|
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') |
2280
|
0 |
0 |
unless ($attrib->{'debugMsg'}) |
2285
|
0 |
0 |
unless $ok |
2286
|
0 |
0 |
if ($$outref =~ /Operation Mode:\s+(Switch)/g) { } |
|
0 |
0 |
elsif ($$outref =~ /Operation Mode:\s+(Stack), Unit # (\d)/g) { } |
2300
|
0 |
0 |
if $$outref =~ /MAC Address:\s+(.+)/cg |
2301
|
0 |
0 |
if $$outref =~ /sysDescr:\s+(.+?)(?:\n|\s{4})/cg |
2303
|
0 |
0 |
if ($$outref =~ /FW:([\d\.]+)\s+SW:v([\d\.]+)/cg) |
2307
|
0 |
0 |
if $$outref =~ /sysName: +(\S+)/cg |
2311
|
0 |
0 |
if ($attrib->{'attribute'} eq 'slots' or $attrib->{'attribute'} eq 'ports') |
2312
|
0 |
0 |
unless ($attrib->{'debugMsg'}) |
2317
|
0 |
0 |
unless $ok |
2322
|
0 |
0 |
if ($attrib->{'attribute'} eq 'stp_mode') |
2323
|
0 |
0 |
unless ($attrib->{'debugMsg'}) |
2328
|
0 |
0 |
unless $ok |
2329
|
0 |
0 |
if ($$outref =~ /Current STP Operation Mode: (STPG|MSTP|RSTP)/) { } |
2338
|
0 |
0 |
if ($attrib->{'attribute'} eq 'mgmt_vlan') |
2339
|
0 |
0 |
unless ($attrib->{'debugMsg'}) |
2344
|
0 |
0 |
unless $ok |
2345
|
0 |
0 |
if $$outref =~ /Management VLAN: (\d+)/ |
2349
|
0 |
0 |
if ($attrib->{'attribute'} eq 'mgmt_ip' or $attrib->{'attribute'} eq 'oob_ip' or $attrib->{'attribute'} eq 'is_oob_connected') |
2350
|
0 |
0 |
unless ($attrib->{'debugMsg'}) |
2355
|
0 |
0 |
unless $ok |
2356
|
0 |
0 |
if $$outref =~ /(?:Switch|Stack) IP Address:\s+[\d\.]+\s+([\d\.]+)\s+[\d\.]+/g |
2357
|
0 |
0 |
if ($$outref =~ /Mgmt (?:Switch|Stack) IP Address:\s+[\d\.]+\s+([\d\.]+)\s/g) { } |
2364
|
0 |
0 |
defined $self->socket && (defined $self->{$Package}{'ATTRIB'}{'oob_ip'} && $self->socket->peerhost eq $self->{$Package}{'ATTRIB'}{'oob_ip'}) ? : |
2369
|
0 |
0 |
if ($attrib->{'attribute'} eq 'baudrate') |
2370
|
0 |
0 |
unless ($attrib->{'debugMsg'}) |
2375
|
0 |
0 |
unless $ok |
2376
|
0 |
0 |
if ($$outref =~ /Terminal speed: (\d+)/) |
2382
|
0 |
0 |
if ($attrib->{'attribute'} eq 'max_baud') |
2383
|
0 |
0 |
unless ($attrib->{'debugMsg'}) |
2388
|
0 |
0 |
unless $ok |
2391
|
0 |
0 |
if not defined $baudRate or $1 > $baudRate |
2399
|
0 |
0 |
if ($attrib->{'attribute'} eq 'model') |
2400
|
0 |
0 |
unless ($attrib->{'debugMsg'}) |
2405
|
0 |
0 |
unless $ok |
2406
|
0 |
0 |
if $$outref =~ /Chassis Model: (.+)/ |
2410
|
0 |
0 |
if ($attrib->{'attribute'} eq 'fw_version' or $attrib->{'attribute'} eq 'sw_version') |
2411
|
0 |
0 |
unless ($attrib->{'debugMsg'}) |
2416
|
0 |
0 |
unless $ok |
2417
|
0 |
0 |
if $$outref =~ /Runtime: (.+)/g |
2418
|
0 |
0 |
if $$outref =~ /Boot: (.+?) / |
2422
|
0 |
0 |
if ($attrib->{'attribute'} eq 'slots' or $attrib->{'attribute'} eq 'ports') |
2423
|
0 |
0 |
if ($attrib->{'stage'} < 4) |
2424
|
0 |
0 |
unless ($attrib->{'debugMsg'}) |
2429
|
0 |
0 |
unless $ok |
2434
|
0 |
0 |
unless ($attrib->{'debugMsg'}) |
2439
|
0 |
0 |
unless $ok |
2444
|
0 |
0 |
if ($attrib->{'attribute'} eq 'sysname') |
2445
|
0 |
0 |
unless ($attrib->{'debugMsg'}) |
2450
|
0 |
0 |
unless $ok |
2451
|
0 |
0 |
if $$outref =~ /HostName: (.+)/g |
2455
|
0 |
0 |
if ($attrib->{'attribute'} eq 'base_mac') |
2456
|
0 |
0 |
unless ($attrib->{'debugMsg'}) |
2461
|
0 |
0 |
unless $ok |
2462
|
0 |
0 |
if $$outref =~ /Mac Address\s+0x(.+)/g |
2468
|
0 |
0 |
if ($attrib->{'attribute'} eq 'model' or $attrib->{'attribute'} eq 'sysname' or $attrib->{'attribute'} eq 'base_mac') |
2469
|
0 |
0 |
unless ($attrib->{'debugMsg'}) |
2474
|
0 |
0 |
unless $ok |
2475
|
0 |
0 |
if $$outref =~ /Product Name:\s+(.+)/g |
2476
|
0 |
0 |
if $$outref =~ /System Name:\s+(.+)/g |
2477
|
0 |
0 |
if $$outref =~ /System MAC:\s+(.+)/g |
2481
|
0 |
0 |
if ($attrib->{'attribute'} eq 'fw_version' or $attrib->{'attribute'} eq 'sw_version') |
2482
|
0 |
0 |
unless ($attrib->{'debugMsg'}) |
2487
|
0 |
0 |
unless $ok |
2488
|
0 |
0 |
if $$outref =~ /Version: (.+?) REL/g |
2489
|
0 |
0 |
if $$outref =~ /BootLoader:\s+(.+)/ |
2493
|
0 |
0 |
if ($attrib->{'attribute'} eq 'slots' or $attrib->{'attribute'} eq 'ports') |
2494
|
0 |
0 |
unless ($attrib->{'debugMsg'}) |
2499
|
0 |
0 |
unless $ok |
2506
|
0 |
0 |
if ($attrib->{'attribute'} eq 'model' or $attrib->{'attribute'} eq 'fw_version' or $attrib->{'attribute'} eq 'sw_version') |
2507
|
0 |
0 |
unless ($attrib->{'debugMsg'}) |
2512
|
0 |
0 |
unless $ok |
2513
|
0 |
0 |
if $$outref =~ /# box type\s+: (.+)/g |
2514
|
0 |
0 |
if $$outref =~ /# boot monitor version\s+: v?(.+)/g |
2515
|
0 |
0 |
if $$outref =~ /# software version\s+: v?(.+)/g |
2519
|
0 |
0 |
if ($attrib->{'attribute'} eq 'is_dual_cpu' or $attrib->{'attribute'} eq 'sysname') |
2520
|
0 |
0 |
unless ($attrib->{'debugMsg'}) |
2525
|
0 |
0 |
unless $ok |
2526
|
0 |
0 |
if $$outref =~ /SysDescr\s+: (.+?) \(/g |
2527
|
0 |
0 |
if $$outref =~ /SysName\s+: (.+)/g |
2528
|
0 |
0 |
if ($$outref =~ /CPU.+ dormant /) { } |
2537
|
0 |
0 |
if ($attrib->{'attribute'} eq 'slots' or $attrib->{'attribute'} eq 'ports') |
2538
|
0 |
0 |
unless ($attrib->{'debugMsg'}) |
2543
|
0 |
0 |
unless $ok |
2551
|
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') |
2552
|
0 |
0 |
unless ($attrib->{'debugMsg'}) |
2557
|
0 |
0 |
unless $ok |
2558
|
0 |
0 |
if $$outref =~ /Model: (.+?),/g |
2559
|
0 |
0 |
if $$outref =~ /IAPs\s+(.+?)-/g |
2560
|
0 |
0 |
if $$outref =~ /Boot Loader\s+(.+?) \(.+?\), Build: (.+)/g |
2561
|
0 |
0 |
if $$outref =~ /System Software\s+(.+?) \(.+?\), Build: (.+)/g |
2565
|
0 |
0 |
if ($attrib->{'attribute'} eq 'sysname') |
2566
|
0 |
0 |
unless ($attrib->{'debugMsg'}) |
2571
|
0 |
0 |
unless $ok |
2572
|
0 |
0 |
if $$outref =~ /Access Point Hostname\s*(.+)/g |
2576
|
0 |
0 |
if ($attrib->{'attribute'} eq 'slots' or $attrib->{'attribute'} eq 'ports') |
2577
|
0 |
0 |
unless ($attrib->{'debugMsg'}) |
2582
|
0 |
0 |
unless $ok |
2597
|
0 |
0 |
unless ($self->{'POLLING'}) |
2602
|
0 |
0 |
unless (defined $self->{'POLL'}{$pollsub}) |
2605
|
0 |
0 |
if (@_ and not %args) |
2625
|
0 |
0 |
$args{'baudrate'} eq 'max' ? : |
2630
|
0 |
0 |
if defined $changeBaud->{'errmode'} |
2633
|
0 |
0 |
if ($changeBaud->{'local_side_only'}) |
2645
|
0 |
0 |
if ($changeBaud->{'stage'} < 1) |
2646
|
0 |
0 |
unless ($self->connection_type eq 'SERIAL') |
2649
|
0 |
0 |
unless (defined $self->baudrate) |
2652
|
0 |
0 |
unless (defined $changeBaud->{'baudrate'}) |
2655
|
0 |
0 |
unless ($familyType) |
2661
|
0 |
0 |
if ($changeBaud->{'stage'} < 2) |
2662
|
0 |
0 |
unless (defined $self->{$Package}{'ATTRIB'}{'baudrate'}) |
2664
|
0 |
0 |
unless $ok |
2666
|
0 |
0 |
unless (defined $self->{$Package}{'ATTRIB'}{'baudrate'}) |
2667
|
0 |
0 |
unless $changeBaud->{'maxMode'} |
2672
|
0 |
0 |
unless (defined $self->{$Package}{'ATTRIB'}{'max_baud'}) |
2674
|
0 |
0 |
unless $ok |
2676
|
0 |
0 |
if ($changeBaud->{'maxMode'} and not defined $self->{$Package}{'ATTRIB'}{'max_baud'}) |
2681
|
0 |
0 |
if $changeBaud->{'maxMode'} |
2683
|
0 |
0 |
if ($changeBaud->{'baudrate'} == $self->baudrate) |
2689
|
0 |
0 |
if ($familyType eq $Prm{'generic'}) { } |
|
0 |
0 |
elsif ($familyType eq $Prm{'bstk'}) { } |
|
0 |
0 |
elsif ($familyType eq $Prm{'pers'}) { } |
2693
|
0 |
0 |
unless ($changeBaud->{'baudrate'} == 9600 or $changeBaud->{'baudrate'} == 19200 or $changeBaud->{'baudrate'} == 38400) |
2698
|
0 |
0 |
unless ($changeBaud->{'baudrate'} == 9600 or $changeBaud->{'baudrate'} == 19200 or $changeBaud->{'baudrate'} == 38400 or $changeBaud->{'baudrate'} == 57600 or $changeBaud->{'baudrate'} == 115200) |
2704
|
0 |
0 |
unless $changeBaud->{'maxMode'} |
2712
|
0 |
0 |
if ($changeBaud->{'stage'} < 3) |
2713
|
0 |
0 |
if ($familyType eq $Prm{'pers'}) |
2714
|
0 |
0 |
unless (defined $self->{$Package}{'ATTRIB'}{'model'}) |
2716
|
0 |
0 |
unless $ok |
2718
|
0 |
0 |
if ($changeBaud->{'userExec'} = $self->last_prompt =~ />\s?$/) |
2720
|
0 |
0 |
unless $ok |
2726
|
0 |
0 |
if ($changeBaud->{'stage'} < 4) |
2727
|
0 |
0 |
if ($familyType eq $Prm{'pers'} and $self->{$Package}{'ATTRIB'}{'is_nncli'}) |
2728
|
0 |
0 |
if ($changeBaud->{'privExec'} = !($self->last_prompt =~ /\(config/)) |
2730
|
0 |
0 |
unless $ok |
2731
|
0 |
0 |
unless $$resref |
2737
|
0 |
0 |
if ($changeBaud->{'stage'} < 5) |
2738
|
0 |
0 |
if ($familyType eq $Prm{'bstk'}) { } |
|
0 |
0 |
elsif ($familyType eq $Prm{'pers'}) { } |
2739
|
0 |
0 |
unless $self->print('line', "terminal speed $changeBaud->{'baudrate'}", 'errmode', 'return') |
2743
|
0 |
0 |
if ($self->{$Package}{'ATTRIB'}{'model'} =~ /(?:Passport|ERS)-(?:83|16)\d\d/) { } |
2744
|
0 |
0 |
if ($self->{$Package}{'ATTRIB'}{'is_nncli'}) { } |
2745
|
0 |
0 |
unless $self->print('line', "boot config sio baud $changeBaud->{'baudrate'}", 'errmode', 'return') |
2749
|
0 |
0 |
unless $self->print('line', "config bootconfig sio baud $changeBaud->{'baudrate'}", 'errmode', 'return') |
2754
|
0 |
0 |
if ($self->{$Package}{'ATTRIB'}{'is_nncli'}) { } |
2755
|
0 |
0 |
unless $self->print('line', "boot config sio console baud $changeBaud->{'baudrate'}", 'errmode', 'return') |
2759
|
0 |
0 |
unless $self->print('line', "config bootconfig sio console baud $changeBaud->{'baudrate'}", 'errmode', 'return') |
2768
|
0 |
0 |
if ($changeBaud->{'stage'} < 6) |
2770
|
0 |
0 |
unless $ok |
2771
|
0 |
0 |
if (length $self->{'POLL'}{'read_buffer'} and $self->{'POLL'}{'read_buffer'} =~ /$self->{$Package}{'prompt_qr'}/) |
2773
|
0 |
0 |
unless $changeBaud->{'maxMode'} |
2778
|
0 |
0 |
if (defined $self->{$Package}{'ORIGBAUDRATE'}) { } |
2779
|
0 |
0 |
if $self->{$Package}{'ORIGBAUDRATE'} == $changeBaud->{'baudrate'} |
2787
|
0 |
0 |
if ($changeBaud->{'stage'} < 7) |
2792
|
0 |
0 |
unless $ok |
2798
|
0 |
0 |
if ($changeBaud->{'stage'} < 8) |
2800
|
0 |
0 |
unless $ok |
2804
|
0 |
0 |
if ($changeBaud->{'stage'} < 9) |
2805
|
0 |
0 |
if ($familyType eq $Prm{'pers'} and $self->{$Package}{'ATTRIB'}{'is_nncli'}) |
2806
|
0 |
0 |
if ($changeBaud->{'privExec'}) |
2808
|
0 |
0 |
unless $ok |
2809
|
0 |
0 |
unless $$resref |
2815
|
0 |
0 |
if ($changeBaud->{'stage'} < 10) |
2816
|
0 |
0 |
if ($familyType eq $Prm{'pers'} and $self->{$Package}{'ATTRIB'}{'is_nncli'}) |
2817
|
0 |
0 |
if ($changeBaud->{'userExec'}) |
2819
|
0 |
0 |
unless $ok |
2820
|
0 |
0 |
unless $$resref |
2834
|
0 |
0 |
unless ($self->{'POLLING'}) |
2839
|
0 |
0 |
unless (defined $self->{'POLL'}{$pollsub}) |
2842
|
0 |
0 |
if (@_ and not %args) |
2856
|
0 |
0 |
defined $args{'password'} ? : |
|
0 |
0 |
defined $args{'prompt_credentials'} ? : |
2861
|
0 |
0 |
if defined $enable->{'errmode'} |
2862
|
0 |
0 |
if $self->eof |
2868
|
0 |
0 |
if ($enable->{'stage'} < 1) |
2870
|
0 |
0 |
unless $familyType |
2871
|
0 |
0 |
unless $self->{$Package}{'ATTRIB'}{'is_nncli'} |
2872
|
0 |
0 |
unless $self->last_prompt =~ />\s?$/ |
2876
|
0 |
0 |
unless $self->print('line', 'enable', 'errmode', 'return') |
2883
|
0 |
0 |
unless $ok |
2886
|
0 |
0 |
if $self->{'POLL'}{'local_buffer'} =~ /error: Access denied/ |
2887
|
0 |
0 |
if ($self->{'POLL'}{'local_buffer'} =~ /$passwordPrompt/) |
2889
|
0 |
0 |
if (defined $enable->{'enable_password'}) { } |
2890
|
0 |
0 |
if ($enable->{'login_attempted'} == 1) { } |
2893
|
0 |
0 |
unless $self->print('line', $enablePwd, 'errmode', 'return') |
2899
|
0 |
0 |
unless $self->print('errmode', 'return') |
2904
|
0 |
0 |
if ($enable->{'login_attempted'} == 1) { } |
|
0 |
0 |
elsif ($enable->{'login_attempted'} == 2) { } |
2907
|
0 |
0 |
unless $self->print('errmode', 'return') |
2913
|
0 |
0 |
unless $self->print('line', $enablePwd, 'errmode', 'return') |
2917
|
0 |
0 |
if ($enable->{'prompt_credentials'}) { } |
2919
|
0 |
0 |
unless $self->print('line', $enablePwd, 'errmode', 'return') |
2925
|
0 |
0 |
unless $self->print('errmode', 'return') |
2935
|
0 |
0 |
if $enable->{'login_failed'} |
2936
|
0 |
0 |
if $self->last_prompt =~ />\s?$/ |
2937
|
0 |
0 |
if defined $enablePwd |
2947
|
0 |
0 |
unless ($self->{'POLLING'}) |
2952
|
0 |
0 |
unless (defined $self->{'POLL'}{$pollsub}) |
2955
|
0 |
0 |
if (@_ and not %args) |
2972
|
0 |
0 |
if defined $devMorePage->{'errmode'} |
2973
|
0 |
0 |
if $self->eof |
2976
|
0 |
0 |
unless $familyType |
2977
|
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'}) { } |
2978
|
0 |
0 |
$devMorePage->{'enable'} ? : |
|
0 |
0 |
unless defined $devMorePage->{'cmdString'} |
2980
|
0 |
0 |
unless $ok |
2981
|
0 |
0 |
unless $$resref |
2984
|
0 |
0 |
if ($self->{$Package}{'ATTRIB'}{'is_nncli'}) { } |
2985
|
0 |
0 |
if ($devMorePage->{'stage'} < 1) |
2986
|
0 |
0 |
unless (defined $self->{$Package}{'ATTRIB'}{'model'}) |
2988
|
0 |
0 |
unless $ok |
2990
|
0 |
0 |
if (defined $self->{$Package}{'ATTRIB'}{'model'} and $self->{$Package}{'ATTRIB'}{'model'} =~ /(?:Passport|ERS)-83\d\d/) { } |
2997
|
0 |
0 |
if ($devMorePage->{'stage'} < 2) |
2998
|
0 |
0 |
$devMorePage->{'enable'} ? : |
|
0 |
0 |
unless defined $devMorePage->{'cmdString'} |
3000
|
0 |
0 |
unless $ok |
3001
|
0 |
0 |
if not $$resref and defined $self->{$Package}{'ATTRIB'}{'model'} |
3003
|
0 |
0 |
if $$resref |
3006
|
0 |
0 |
if ($devMorePage->{'stage'} < 3) |
3007
|
0 |
0 |
$devMorePage->{'enable'} ? : |
|
0 |
0 |
unless defined $devMorePage->{'cmdString'} |
3009
|
0 |
0 |
unless $ok |
3010
|
0 |
0 |
unless $$resref |
3014
|
0 |
0 |
$devMorePage->{'enable'} ? : |
|
0 |
0 |
unless defined $devMorePage->{'cmdString'} |
3016
|
0 |
0 |
unless $ok |
3017
|
0 |
0 |
unless $$resref |
3021
|
0 |
0 |
$devMorePage->{'enable'} ? : |
|
0 |
0 |
unless defined $devMorePage->{'cmdString'} |
3023
|
0 |
0 |
unless $ok |
3024
|
0 |
0 |
unless $$resref |
3027
|
0 |
0 |
$devMorePage->{'enable'} ? : |
|
0 |
0 |
unless defined $devMorePage->{'cmdString'} |
3029
|
0 |
0 |
unless $ok |
3030
|
0 |
0 |
unless $$resref |
3033
|
0 |
0 |
$devMorePage->{'enable'} ? : |
|
0 |
0 |
unless defined $devMorePage->{'cmdString'} |
3035
|
0 |
0 |
unless $ok |
3036
|
0 |
0 |
unless $$resref |
3050
|
0 |
0 |
unless ($self->{'POLLING'}) |
3055
|
0 |
0 |
unless (defined $self->{'POLL'}{$pollsub}) |
3058
|
0 |
0 |
if (@_ and not %args) |
3071
|
0 |
0 |
defined $args{'username'} ? : |
|
0 |
0 |
defined $args{'password'} ? : |
|
0 |
0 |
defined $args{'prompt_credentials'} ? : |
3076
|
0 |
0 |
if defined $devPeerCpu->{'errmode'} |
3077
|
0 |
0 |
if $self->eof |
3080
|
0 |
0 |
if ($devPeerCpu->{'stage'} < 1) |
3081
|
0 |
0 |
unless ($familyType) |
3084
|
0 |
0 |
unless ($familyType eq $Prm{'pers'}) |
3087
|
0 |
0 |
unless ($devPeerCpu->{'username'} and $devPeerCpu->{'password'} or $devPeerCpu->{'prompt_credentials'}) |
3093
|
0 |
0 |
if ($devPeerCpu->{'stage'} < 2) |
3095
|
0 |
0 |
unless $ok |
3097
|
0 |
0 |
unless $self->print('line', 'peer telnet', 'errmode', 'return') |
3102
|
0 |
0 |
if ($devPeerCpu->{'stage'} < 3) |
3104
|
0 |
0 |
unless defined $ok |
3105
|
0 |
0 |
unless $ok |
3107
|
0 |
0 |
unless defined $devPeerCpu->{'username'} |
3108
|
0 |
0 |
unless $self->print('line', $devPeerCpu->{'username'}, 'errmode', 'return') |
3113
|
0 |
0 |
if ($devPeerCpu->{'stage'} < 4) |
3115
|
0 |
0 |
unless defined $ok |
3116
|
0 |
0 |
unless $ok |
3118
|
0 |
0 |
unless defined $devPeerCpu->{'password'} |
3119
|
0 |
0 |
unless $self->print('line', $devPeerCpu->{'password'}, 'errmode', 'return') |
3126
|
0 |
0 |
unless $ok |
3130
|
0 |
0 |
$self->{'LASTPROMPT'} =~ /^@/ ? : |
3131
|
0 |
0 |
if $self->{'LASTPROMPT'} =~ /^@/ |
3141
|
0 |
0 |
unless (defined $self->{'POLL'}{$pollsub}) |
3151
|
0 |
0 |
if ($self->{$Package}{'ATTRIB'}{'is_nncli'}) { } |
3152
|
0 |
0 |
if ($cmdPrivExec->{'stage'} < 1) |
3153
|
0 |
0 |
if ($cmdPrivExec->{'userExec'} = $self->last_prompt =~ />\s?$/) |
3155
|
0 |
0 |
unless $ok |
3159
|
0 |
0 |
if ($cmdPrivExec->{'stage'} < 2) |
3161
|
0 |
0 |
unless $ok |
3166
|
0 |
0 |
if ($cmdPrivExec->{'stage'} < 3) |
3167
|
0 |
0 |
if ($cmdPrivExec->{'userExec'}) |
3169
|
0 |
0 |
unless $ok |
3170
|
0 |
0 |
unless $$resref |
3179
|
0 |
0 |
unless $ok |
3191
|
0 |
0 |
unless (defined $self->{'POLL'}{$pollsub}) |
3202
|
0 |
0 |
if ($self->{$Package}{'ATTRIB'}{'is_nncli'}) { } |
3203
|
0 |
0 |
if ($cmdConfig->{'stage'} < 1) |
3204
|
0 |
0 |
if ($cmdConfig->{'userExec'} = $self->last_prompt =~ />\s?$/) |
3206
|
0 |
0 |
unless $ok |
3210
|
0 |
0 |
if ($cmdConfig->{'stage'} < 2) |
3211
|
0 |
0 |
if ($cmdConfig->{'privExec'} = !($self->last_prompt =~ m[[\(/]config])) |
3213
|
0 |
0 |
unless $ok |
3214
|
0 |
0 |
unless $$resref |
3218
|
0 |
0 |
if ($cmdConfig->{'stage'} < 3) |
3220
|
0 |
0 |
unless $ok |
3225
|
0 |
0 |
if ($cmdConfig->{'stage'} < 4) |
3226
|
0 |
0 |
if ($cmdConfig->{'privExec'}) |
3228
|
0 |
0 |
unless $ok |
3229
|
0 |
0 |
unless $$resref |
3233
|
0 |
0 |
if ($cmdConfig->{'stage'} < 5) |
3234
|
0 |
0 |
if ($cmdConfig->{'userExec'}) |
3236
|
0 |
0 |
unless $ok |
3237
|
0 |
0 |
unless $$resref |
3245
|
0 |
0 |
unless $cmdcli =~ /^config / |
3247
|
0 |
0 |
unless $ok |
3258
|
0 |
0 |
unless (defined $self->{'POLL'}{$pollsub}) |
3265
|
0 |
0 |
if ($discDevice->{'stage'} < 1) |
3277
|
0 |
0 |
if ($discDevice->{'stage'} < 2) |
3280
|
0 |
0 |
unless $ok |
3282
|
0 |
0 |
if ($$outref =~ /\s+Configured\s+In Use\s+Last BootP/) |
3292
|
0 |
0 |
if ($discDevice->{'stage'} < 3) |
3295
|
0 |
0 |
unless $ok |
3297
|
0 |
0 |
if ($$outref =~ /^\s+auto-recover-delay :/m) |
3308
|
0 |
0 |
if ($discDevice->{'stage'} < 4) |
3311
|
0 |
0 |
unless $ok |
3313
|
0 |
0 |
if ($$outref =~ /^Version:\s+(?i:v|REL)?(.+)/m) |
3325
|
0 |
0 |
if ($discDevice->{'stage'} < 5) |
3328
|
0 |
0 |
unless $ok |
3330
|
0 |
0 |
if ($$outref =~ /^Access Point Hostname\s*(.+)$/m) |
3342
|
0 |
0 |
if ($discDevice->{'stage'} < 6) |
3345
|
0 |
0 |
unless $ok |
3347
|
0 |
0 |
if ($$outref =~ /^Chassis Model: (.+)$/m) |
3359
|
0 |
0 |
if ($discDevice->{'stage'} < 7) |
3362
|
0 |
0 |
unless $ok |
3364
|
0 |
0 |
if ($$outref =~ /Product Name:\s+(.+)/g) |
3369
|
0 |
0 |
if $$outref =~ /System Name:\s+(.+)/g |
3370
|
0 |
0 |
if $$outref =~ /System MAC:\s+(.+)/g |
3378
|
0 |
0 |
if ($discDevice->{'stage'} < 8) |
3381
|
0 |
0 |
unless $ok |
3383
|
0 |
0 |
if ($$outref =~ /^\s+NVRamSize:/m) |
3405
|
0 |
0 |
if (shift() & $self->{'debug'}) |
3409
|
0 |
0 |
if ($self->{$Package}{'DEBUGLOGFH'}) { } |
3427
|
0 |
0 |
if ($actualPrompt) |
3442
|
0 |
0 |
if $self->{$Package}{'ATTRIBFLAG'}{'slots'} |
3443
|
0 |
0 |
if $self->{$Package}{'ATTRIBFLAG'}{'ports'} |
3445
|
0 |
0 |
if (defined $1 and !defined($currentSlot) || $1 != $currentSlot) |
3447
|
0 |
0 |
unless grep {$_ eq $currentSlot;} @slots |
3449
|
0 |
0 |
if (defined $currentSlot) { } |
3450
|
0 |
0 |
unless grep {$_ eq $2;} @{$ports[$currentSlot];} |
3453
|
0 |
0 |
unless grep {$_ eq $2;} @ports |
3469
|
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'}) { } |
3502
|
0 |
0 |
if ($self->{$Package}{'ATTRIB'}{'family_type'} eq $Prm{'pers'}) |
3503
|
0 |
0 |
if ($self->{$Package}{'ATTRIB'}{'is_apls'} or $model =~ /^VSP/) { } |
3546
|
0 |
0 |
if ($attrib eq 'is_nncli' or $attrib eq 'is_acli') { } |
3556
|
0 |
0 |
if (defined $value) { } |
3562
|
0 |
0 |
if ($attrib eq 'family_type') |
3563
|
0 |
0 |
if (defined $Attribute{$value}) { } |
3581
|
0 |
0 |
unless $familyType = $self->{$Package}{'ATTRIB'}{'family_type'} |
3582
|
0 |
0 |
if $familyType eq $Prm{'generic'} |
3583
|
0 |
0 |
if ($$outref =~ /$ErrorPatterns{$familyType}/m) { } |
3599
|
0 |
0 |
if (defined $self->baudrate and defined(my $origBaud = $self->{$Package}{'ORIGBAUDRATE'})) |
3601
|
0 |
0 |
if ($familyType eq $Prm{'bstk'}) { } |
|
0 |
0 |
elsif ($familyType eq $Prm{'pers'}) { } |
3608
|
0 |
0 |
if ($self->{$Package}{'ATTRIB'}{'is_nncli'}) { } |