Branch Coverage

blib/lib/Control/CLI/Extreme.pm
Criterion Covered Total %
branch 12 2440 0.4


line true false branch
495 0 1 if (@_ == 1) { }
504 0 1 unless my $self = $class->SUPER::new(%cliArgs)
534 1 0 unless (defined $args{'output_record_separator'})
538 0 2 if ($arg eq 'prompt') { }
0 2 elsif ($arg eq 'return_result') { }
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') { }
561 0 0 if (@_ == 1) { }
563 0 0 if ($args{'host'} =~ /^(.+?)\s+(\d+)$/)
587 0 0 defined $args{'blocking'} ? :
0 0 defined $args{'connection_timeout'} ? :
0 0 defined $args{'errmode'} ? :
0 0 defined $args{'return_reference'} ? :
615 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 defined $args{'non_recognized_login'} ? :
0 0 defined $args{'generic_login'} ? :
0 0 $self->{'LOGINSTAGE'} ? :
617 0 0 if (not $self->{'LOGINSTAGE'} and $self->{'TYPE'} ne "SERIAL" and useIPv6() and defined $args{'blocking'} and not $args{'blocking'})
621 0 0 if defined $self->{'POLL'}{'errmode'}
629 0 0 if @_
631 0 0 unless (defined $self->{'POLL'} and $self->{'POLL'}{'coderef'} == __PACKAGE__->can("connect_poll"))
636 0 0 if defined $self->{'POLL'}{'errmode'}
639 0 0 unless defined $self->{'POLL'}{'complete'} and $self->{'POLL'}{'complete'} == 0
648 0 0 if $self->connection_type eq "SERIAL"
671 0 0 defined $args{'blocking'} ? :
0 0 defined $args{'timeout'} ? :
0 0 defined $args{'errmode'} ? :
0 0 defined $args{'return_reference'} ? :
681 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'} ? :
0 0 defined $args{'non_recognized_login'} ? :
0 0 defined $args{'generic_login'} ? :
692 0 0 if defined $self->{'POLL'}{'errmode'}
700 0 0 if @_
702 0 0 unless (defined $self->{'POLL'} and $self->{'POLL'}{'coderef'} == __PACKAGE__->can("login_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) { }
729 0 0 unless defined $args{'command'}
742 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'} ? :
766 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'} ? :
772 0 0 if defined $self->{'POLL'}{'errmode'}
776 0 0 if ($args{'poll_syntax'}) { }
777 0 0 wantarray ? :
780 0 0 wantarray ? :
800 0 0 if (lc $_[0] ne 'command' and lc $_[0] ne 'poll_syntax') { }
809 0 0 if $args[$i] eq "command"
810 0 0 if $args[$i] eq "feed"
811 0 0 if $args[$i] eq "feed_list" and ref $args[$i + 1] eq "ARRAY"
812 0 0 if $args[$i] eq "prompt"
813 0 0 if $args[$i] eq "more_pages"
814 0 0 if $args[$i] eq "timeout"
815 0 0 if $args[$i] eq "blocking"
816 0 0 if $args[$i] eq "return_reference"
817 0 0 if $args[$i] eq "return_result"
818 0 0 if $args[$i] eq "reset_prompt"
819 0 0 if $args[$i] eq "more_prompt"
820 0 0 if $args[$i] eq "progress_dots"
821 0 0 if $args[$i] eq "cmd_initiated_prompt"
822 0 0 if $args[$i] eq "errmode"
823 0 0 if $args[$i] eq "poll_syntax"
826 0 0 unless defined $cmd
829 0 0 $returnRes ? :
869 0 0 if defined $self->{'POLL'}{'errmode'}
873 0 0 if ($pollSyntax) { }
874 0 0 wantarray ? :
877 0 0 wantarray ? :
885 0 0 if @_
887 0 0 unless (defined $self->{'POLL'} and $self->{'POLL'}{'coderef'} == __PACKAGE__->can("cmd_poll"))
892 0 0 if defined $self->{'POLL'}{'errmode'}
895 0 0 unless defined $self->{'POLL'}{'complete'} and $self->{'POLL'}{'complete'} == 0
906 0 0 if (@_ == 1) { }
920 0 0 defined $args{'blocking'} ? :
0 0 defined $args{'timeout'} ? :
0 0 defined $args{'errmode'} ? :
936 0 0 if defined $self->{'POLL'}{'errmode'}
940 0 0 if ($args{'poll_syntax'}) { }
941 0 0 wantarray ? :
944 0 0 wantarray ? :
952 0 0 if @_
954 0 0 unless (defined $self->{'POLL'} and $self->{'POLL'}{'coderef'} == __PACKAGE__->can("attribute_poll"))
959 0 0 if defined $self->{'POLL'}{'errmode'}
962 0 0 unless defined $self->{'POLL'}{'complete'} and $self->{'POLL'}{'complete'} == 0
973 0 0 if (@_ == 1) { }
988 0 0 defined $args{'blocking'} ? :
0 0 defined $args{'timeout'} ? :
0 0 defined $args{'errmode'} ? :
1007 0 0 $args{'baudrate'} eq 'max' ? :
1011 0 0 if defined $self->{'POLL'}{'errmode'}
1015 0 0 if ($args{'poll_syntax'}) { }
1016 0 0 wantarray ? :
1019 0 0 wantarray ? :
1027 0 0 if @_
1029 0 0 unless (defined $self->{'POLL'} and $self->{'POLL'}{'coderef'} == __PACKAGE__->can("change_baudrate_poll"))
1034 0 0 if defined $self->{'POLL'}{'errmode'}
1037 0 0 unless defined $self->{'POLL'}{'complete'} and $self->{'POLL'}{'complete'} == 0
1048 0 0 if (@_ == 1) { }
1062 0 0 defined $args{'blocking'} ? :
0 0 defined $args{'timeout'} ? :
0 0 defined $args{'errmode'} ? :
1073 0 0 defined $args{'password'} ? :
0 0 defined $args{'prompt_credentials'} ? :
1079 0 0 if defined $self->{'POLL'}{'errmode'}
1087 0 0 if @_
1089 0 0 unless (defined $self->{'POLL'} and $self->{'POLL'}{'coderef'} == __PACKAGE__->can("enable_poll"))
1093 0 0 if defined $self->{'POLL'}{'errmode'}
1096 0 0 unless defined $self->{'POLL'}{'complete'} and $self->{'POLL'}{'complete'} == 0
1107 0 0 if (@_ == 1) { }
1121 0 0 defined $args{'blocking'} ? :
0 0 defined $args{'timeout'} ? :
0 0 defined $args{'errmode'} ? :
1135 0 0 if defined $self->{'POLL'}{'errmode'}
1143 0 0 if @_
1145 0 0 unless (defined $self->{'POLL'} and $self->{'POLL'}{'coderef'} == __PACKAGE__->can("device_more_paging_poll"))
1149 0 0 if defined $self->{'POLL'}{'errmode'}
1152 0 0 unless defined $self->{'POLL'}{'complete'} and $self->{'POLL'}{'complete'} == 0
1172 0 0 defined $args{'blocking'} ? :
0 0 defined $args{'timeout'} ? :
0 0 defined $args{'errmode'} ? :
1184 0 0 defined $args{'username'} ? :
0 0 defined $args{'password'} ? :
0 0 defined $args{'prompt_credentials'} ? :
1187 0 0 if defined $self->{'POLL'}{'errmode'}
1195 0 0 if @_
1197 0 0 unless (defined $self->{'POLL'} and $self->{'POLL'}{'coderef'} == __PACKAGE__->can("device_peer_cpu_poll"))
1201 0 0 if defined $self->{'POLL'}{'errmode'}
1204 0 0 unless defined $self->{'POLL'}{'complete'} and $self->{'POLL'}{'complete'} == 0
1215 0 0 unless (defined $fh)
1218 0 0 unless (ref $fh or length $fh)
1222 0 0 unless (ref $fh or defined fileno $fh)
1225 0 0 unless open $fh, ">", "$logfile"
1246 0 0 if (defined $newSetting)
1258 0 0 if (defined $newSetting)
1261 0 0 $newSetting ? :
1262 0 0 $delayPrompt ? :
1271 0 0 if defined $newSetting
1279 0 0 if defined $newSetting
1287 0 0 if defined $newSetting
1295 0 0 if (defined $newSetting)
1306 0 0 if (defined $newSetting)
1317 0 0 if defined $newSetting
1325 0 0 if defined $newSetting
1333 0 0 if defined $newSetting
1341 0 0 if defined $newSetting
1349 0 0 if defined $newSetting
1357 0 0 if (defined $newSetting and defined $sendChar || !$newSetting)
1359 0 0 $newSetting ? :
1360 0 0 "\n" eq $sendChar ? :
1387 0 0 unless ($self->{'POLLING'})
1392 0 0 unless (defined $self->{'POLL'}{$pollsub})
1399 0 0 if (@_ and not %args)
1436 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 defined $args{'non_recognized_login'} ? :
0 0 defined $args{'generic_login'} ? :
0 0 $self->{'LOGINSTAGE'} ? :
1441 0 0 if defined $connect->{'errmode'}
1443 0 0 if ($connect->{'stage'} < 1)
1464 0 0 unless $ok
1466 0 0 unless defined $self->console
1484 0 0 if $ok
1494 0 0 unless ($self->{'POLLING'})
1499 0 0 unless (defined $self->{'POLL'}{$pollsub})
1503 0 0 if (@_ and not %args)
1528 0 0 defined $args{'username'} ? :
0 0 defined $args{'password'} ? :
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'} ? :
0 0 defined $args{'non_recognized_login'} ? :
0 0 defined $args{'generic_login'} ? :
1533 0 0 if defined $login->{'errmode'}
1534 0 0 if $self->eof
1539 0 0 if ($login->{'stage'} < 1)
1541 0 0 if ($self->{'LOGINSTAGE'}) { }
1549 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'}) { }
1550 0 0 unless $self->print("line", $login->{'username'}, "errmode", "return")
1556 0 0 unless $self->print("line", $login->{'password'}, "errmode", "return")
1563 0 0 unless $self->put("string", $login->{'wake_console'}, "errmode", "return")
1567 0 0 if ($login->{'stage'} < 2)
1573 0 0 unless $ok
1577 0 0 $self->{'POLL'}{'read_buffer'} =~ /\n/ ? :
1584 0 0 if (($patdepth = rindex($self->{'POLL'}{'read_buffer'}, $LoginPatterns{$key})) >= 0)
1586 0 0 unless ($login->{'family_type'})
1588 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' or $key eq 'fabengbanner') { }
0 0 elsif ($key eq 'wlan9100banner') { }
0 0 elsif ($key eq 'xos') { }
0 0 elsif ($key eq 'switchEngine') { }
0 0 elsif ($key eq 'isw' or $key eq 'isw2') { }
0 0 elsif ($key eq 'iswMarvell') { }
0 0 elsif ($key eq 'slx') { }
0 0 elsif ($key eq 'eosChassis') { }
0 0 elsif ($key eq 'oneosbanner') { }
1592 0 0 if ($key eq "banner")
1593 0 0 if $self->{'POLL'}{'read_buffer'} =~ /\*\*\* ((?:[^\*\n]+?) (?:Switch|Controller|Platform) (?:WC)?\d+.*?)\s+/
1595 0 0 if ($self->{'POLL'}{'read_buffer'} =~ /FW:([\d\.]+)\s+SW:v([\d\.]+)/)
1605 0 0 if $self->{'POLL'}{'read_buffer'} =~ /\((Secure Router \d+)\)/
1606 0 0 if $self->{'POLL'}{'read_buffer'} =~ /Version: (.+)/
1612 0 0 if $self->{'POLL'}{'read_buffer'} =~ /\* Software Release (?i:v|REL)?(.+?) /
1618 0 0 if $self->{'POLL'}{'read_buffer'} =~ /\* Software Release (?i:v|REL)?(.+?) /
1624 0 0 if $self->{'POLL'}{'read_buffer'} =~ /(?:Software(?: Release)?|Fabric Engine) Build (.+?) /
1630 0 0 if $self->{'POLL'}{'read_buffer'} =~ /AvayaOS Version (.+?) /
1668 0 0 if ($patdepth > $deepest)
1673 0 0 if $deepest > -1
1676 0 0 if ($login->{'family_type'}) { }
1677 0 0 if ($login->{'family_type'} eq $Prm{'pers'}) { }
1680 0 0 if ($self->{'POLL'}{'local_buffer'} =~ /($InitPrompt{$promptType})/)
1688 0 0 if ($self->{'POLL'}{'local_buffer'} =~ /($InitPrompt{$login->{'family_type'}})/)
1696 0 0 if ($self->{'POLL'}{'local_buffer'} =~ /($InitPrompt{$key})/)
1706 0 0 if ($capturedPrompt)
1710 0 0 if ($login->{'family_type'} eq $Prm{'slx'})
1716 0 0 if $login->{'family_type'} eq $Prm{'pers'}
1717 0 0 if ($login->{'detectionFromPrompt'})
1718 0 0 if ($login->{'family_type'} eq $Prm{'bstk'} or defined $cliType and $cliType eq 'nncli') { }
1729 0 0 if ($self->{'POLL'}{'read_buffer'} =~ /$usernamePrompt/) { }
0 0 elsif ($self->{'POLL'}{'read_buffer'} =~ /$passwordPrompt/) { }
1739 0 0 if ($pattern eq 'oneosbanner') { }
0 0 elsif ($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 =~ /^localfail/) { }
0 0 elsif ($pattern eq 'radiusfail') { }
0 0 elsif ($pattern =~ /^radiustimeout\d$/) { }
1745 0 0 unless $self->put("string", $CTRL_Y, "errmode", "return")
1751 0 0 unless $self->put("string", "c", "errmode", "return")
1757 0 0 unless $self->put("string", $CTRL_C, "errmode", "return")
1763 0 0 unless $self->put("string", "q", "errmode", "return")
1772 0 0 unless $self->print("errmode", "return")
1779 0 0 unless $self->print("errmode", "return")
1785 0 0 if ($login->{'login_attempted'})
1789 0 0 unless ($login->{'username'})
1790 0 0 if ($self->{'TYPE'} eq 'SSH') { }
1794 0 0 unless ($login->{'prompt_credentials'})
1801 0 0 unless $self->print("line", $login->{'username'}, "errmode", "return")
1809 0 0 if ($login->{'password_sent'})
1813 0 0 unless (defined $login->{'password'})
1814 0 0 unless ($login->{'prompt_credentials'})
1820 0 0 unless $self->print("line", $login->{'password'}, "errmode", "return")
1836 0 0 if (not $login->{'family_type'} and $login->{'non_recognized_login'})
1840 0 0 if (not $login->{'generic_login'} and $login->{'family_type'} eq $Prm{'generic'} || $login->{'detectionFromPrompt'} && !($self->{'LASTPROMPT'} =~ /^@/)) { }
1846 0 0 unless $self->{'POLL'}{'blocking'}
1848 0 0 if ($login->{'stage'} < 3)
1850 0 0 unless $ok
1852 0 0 if ($login->{'family_type'} eq $Prm{'generic'} and $self->{'errmode'} eq 'croak' || $self->{'errmode'} eq 'die')
1857 0 0 if ($login->{'stage'} < 4)
1858 0 0 if ($login->{'family_type'} eq $Prm{'pers'} or $login->{'family_type'} eq $Prm{'xlr'})
1859 0 0 $self->{'LASTPROMPT'} =~ /^@/ ? :
1860 0 0 if $self->{'LASTPROMPT'} =~ /^@/
1862 0 0 if $login->{'detectionFromPrompt'}
1866 0 0 if $login->{'login_attempted'}
1876 0 0 unless ($self->{'POLLING'})
1881 0 0 unless (defined $self->{'POLL'}{$pollsub})
1885 0 0 if (@_ and not %args)
1889 0 0 if defined $args{'feed_list'} and ref $args{'feed_list'} ne "ARRAY"
1919 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'} ? :
1925 0 0 if defined $cmd->{'errmode'}
1926 0 0 if $self->eof
1927 0 0 if $cmd->{'reset_prompt'}
1931 0 0 if ($cmd->{'stage'} < 1)
1933 0 0 if (defined $cmd->{'command'})
1936 0 0 if ($command =~ /\?\s*$/ and $self->{$Package}{'ATTRIB'}{'is_nncli'})
1937 0 0 if ($familyType eq $Prm{'sr'}) { }
1944 0 0 unless $self->print("line", $command, "errmode", "return")
1950 0 0 if ($cmd->{'stage'} == 1) { }
0 0 elsif ($cmd->{'stage'} == 2) { }
1952 0 0 if defined $ok and $ok == 0
1953 0 0 unless (defined $ok)
1954 0 0 if ($cmd->{'alreadyCmdTimeout'} or not length $familyType or $familyType eq $Prm{'generic'})
1958 0 0 unless $self->print("errmode", "return")
1964 0 0 unless $self->{'POLL'}{'blocking'}
1970 0 0 unless $ok
1972 0 0 unless (length $self->{'POLL'}{'read_buffer'})
1975 0 0 if ($feed = shift @{$$cmd{'feed_data'};}) { }
1979 0 0 if (++$cmd->{'cmdPromptCount'} > $self->{$Package}{'cmd_feed_timeout'})
1985 0 0 unless $self->print("line", $feed, "errmode", "return")
1988 0 0 unless $self->{'POLL'}{'blocking'}
1994 0 0 unless $ok
1999 0 0 if ($cmd->{'progress_dots'})
2000 0 0 unless defined $cmd->{'progress'}
2001 0 0 if (($cmd->{'progress'} += length $self->{'POLL'}{'read_buffer'}) > $cmd->{'progress_dots'})
2007 0 0 unless ($cmd->{'cmdEchoRemoved'})
2009 0 0 if ($self->{'POLL'}{'local_buffer'} =~ s/(^.*\n)//) { }
2012 0 0 if $familyType eq $Prm{'xirrus'}
2016 0 0 unless length $self->{'POLL'}{'read_buffer'}
2028 0 0 if length $output
2031 0 0 if ($self->{$Package}{'noRefreshCmdPattern'} and not $cmd->{'noRefreshCmdDone'} and $output =~ /$self->{$Package}{'noRefreshCmdPattern'}/m)
2033 0 0 unless $self->put("string", $self->{$Package}{'noRefreshCmdSend'}, "errmode", "return")
2038 0 0 if (length $output)
2039 0 0 if ($cmd->{'morePromptRemoved'})
2041 0 0 if $familyType eq $Prm{'eos'}
2045 0 0 if $familyType eq $Prm{'hive'}
2046 0 0 if $familyType eq $Prm{'s200'}
2047 0 0 if $familyType eq $Prm{'sr'}
2048 0 0 if $familyType eq $Prm{'isw'}
2049 0 0 if $familyType eq $Prm{'iswMarv'}
2050 0 0 if ($familyType eq $Prm{'slx'})
2055 0 0 if $familyType eq $Prm{'xos'}
2056 0 0 if $cmd->{'noRefreshCmdDone'} and $familyType eq $Prm{'pers'}
2057 0 0 if $cmd->{'noRefreshCmdDone'} and $familyType eq $Prm{'xos'}
2058 0 0 if $familyType eq $Prm{'isw'} and $cmd->{'more_prompt'}
2059 0 0 if ($familyType eq $Prm{'xirrus'})
2072 0 0 if length $output
2073 0 0 if length $cmd->{'lastLine'}
2075 0 0 if (length $output)
2081 0 0 if (length $cmd->{'lastLine'} and $self->{'POLL'}{'local_buffer'} =~ s/\n\n$/\n/) { }
2092 0 0 unless length $cmd->{'lastLine'}
2094 0 0 if ($cmd->{'lastLine'} =~ s/($cmd->{'prompt'})//)
2096 0 0 if $cmd->{'reset_prompt'}
2097 0 0 $cmd->{'reset_prompt'} ? :
2098 0 0 unless ($newLineLastLine and not length $cmd->{'lastLine'})
2104 0 0 if ($cmd->{'more_prompt_delay'} and not $cmd->{'morePromptDelayed'} and $cmd->{'lastLine'} =~ /(?:$cmd->{'more_prompt_delay'})$/)
2108 0 0 unless $self->{'POLL'}{'blocking'}
2111 0 0 if ($cmd->{'more_prompt'} and $cmd->{'lastLine'} =~ s/(?:$cmd->{'more_prompt'})$//)
2114 0 0 if ($cmd->{'lastLine'} =~ s/^\n//)
2116 0 0 if $newLineLastLine
2118 0 0 if $newLineLastLine
2120 0 0 if (defined $MoreSkipWithin{$familyType} and $cmd->{'more_pages'} == 0) { }
0 0 elsif ($cmd->{'more_pages'} == 0 or $cmd->{'more_pages'}-- > 1) { }
2132 0 0 unless $self->put("string", $char, "errmode", "return")
2134 0 0 unless $self->{'POLL'}{'blocking'}
2137 0 0 if ($cmd->{'yn_prompt'} and $cmd->{'lastLine'} =~ /$cmd->{'yn_prompt'}/)
2138 0 0 if (++$cmd->{'ynPromptCount'} > $self->{$Package}{'cmd_feed_timeout'})
2142 0 0 if ($CmdConfirmSendY{$familyType}) { }
2143 0 0 unless $self->print("line", "y", "errmode", "return")
2147 0 0 unless $self->put("line", "y", "errmode", "return")
2150 0 0 unless $self->{'POLL'}{'blocking'}
2153 0 0 if ($cmd->{'cmd_prompt'} and $cmd->{'lastLine'} =~ /$cmd->{'cmd_prompt'}/)
2157 0 0 unless $self->{'POLL'}{'blocking'}
2162 0 0 if $cmd->{'lastLine'} =~ s/^\n//
2174 0 0 unless ($self->{'POLLING'})
2179 0 0 unless (defined $self->{'POLL'}{$pollsub})
2182 0 0 if (@_ and not %args)
2200 0 0 if defined $attrib->{'errmode'}
2201 0 0 if $self->eof
2204 0 0 if ($attrib->{'stage'} < 1)
2205 0 0 unless defined $attrib->{'attribute'}
2206 0 0 unless $familyType
2209 0 0 if ($attrib->{'reload'})
2210 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') { }
2212 0 0 unless $self->print
2221 0 0 if ($attrib->{'stage'} < 2)
2223 0 0 unless $ok
2227 0 0 if ($attrib->{'stage'} < 3)
2229 0 0 if (defined $self->{$Package}{'ATTRIBFLAG'}{$attrib->{'attribute'}})
2234 0 0 if $familyType eq $Prm{'generic'}
2239 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'}) { }
0 0 elsif ($familyType eq $Prm{'xos'}) { }
0 0 elsif ($familyType eq $Prm{'isw'}) { }
0 0 elsif ($familyType eq $Prm{'iswMarv'}) { }
0 0 elsif ($familyType eq $Prm{'s200'}) { }
0 0 elsif ($familyType eq $Prm{'wing'}) { }
0 0 elsif ($familyType eq $Prm{'slx'}) { }
0 0 elsif ($familyType eq $Prm{'hive'}) { }
0 0 elsif ($familyType eq $Prm{'ipanema'}) { }
0 0 elsif ($familyType eq $Prm{'eos'}) { }
0 0 elsif ($familyType eq $Prm{'oneos'}) { }
2240 0 0 if ($attrib->{'attribute'} eq "is_ha")
2242 0 0 unless $ok
2243 0 0 if ($$outref =~ /Current CPU State : Disabled State./) { }
0 0 elsif ($$outref =~ /Current CPU State/) { }
2255 0 0 if ($attrib->{'attribute'} eq "sw_version")
2257 0 0 unless $ok
2258 0 0 if $$outref =~ /Version : Build (?i:v|REL)?(.+?) /
2262 0 0 if ($attrib->{'attribute'} eq "fw_version")
2263 0 0 if ($attrib->{'stage'} < 4)
2265 0 0 unless $ok
2266 0 0 if ($$outref =~ /Version:\s+(?i:v|REL)?(.+)/) { }
2277 0 0 unless $ok
2278 0 0 if ($$outref =~ /Version:\s+(?i:v|REL)?(.+)/) { }
2287 0 0 if ($attrib->{'attribute'} eq "stp_mode")
2289 0 0 unless $ok
2290 0 0 if ($$outref =~ /flags spanning-tree-mode (mstp|rstp)/) { }
2299 0 0 if ($attrib->{'attribute'} eq "baudrate")
2301 0 0 unless $ok
2302 0 0 if ($$outref =~ /sio (?:console )?baud (\d+)/)
2308 0 0 if ($attrib->{'attribute'} eq "max_baud")
2309 0 0 if ($attrib->{'stage'} < 4)
2311 0 0 unless $ok
2315 0 0 if ($$outref =~ /(?:-|\.\.)\s?(\d+)[>}]/) { }
2326 0 0 unless $ok
2330 0 0 if ($$outref =~ /(?:-|\.\.)\s?(\d+)[>}]/)
2336 0 0 if ($self->{$Package}{'ATTRIB'}{'is_master_cpu'}) { }
2337 0 0 if ($attrib->{'attribute'} eq "is_dual_cpu" or $attrib->{'attribute'} eq "base_mac")
2339 0 0 unless $ok
2340 0 0 if ($$outref =~ /SysDescr\s+: (.+?) \(/g)
2342 0 0 if ($$outref =~ / BoxType: (.+)/cg) { }
2353 0 0 if $$outref =~ /SysName\s+: (.+)/g
2354 0 0 if ($self->{$Package}{'ATTRIB'}{'is_voss'}) { }
2355 0 0 if ($$outref =~ /BrandName:?\s+: (.+)/cg) { }
2367 0 0 if $$outref =~ /BaseMacAddr\s+: (.+)/g
2368 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}/) { }
2378 0 0 if $$outref =~ /Virtual IP\s+: (.+)/g
2387 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 "is_fabric_engine" or $attrib->{'attribute'} eq "serial_number" 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_/)
2389 0 0 unless $ok
2390 0 0 if ($$outref =~ /SysDescr\s+: (.+?) \(/g)
2392 0 0 if ($$outref =~ / BoxType: (.+)/cg) { }
2403 0 0 if $$outref =~ /SysName\s+: (.+)/g
2404 0 0 if ($self->{$Package}{'ATTRIB'}{'is_voss'}) { }
2405 0 0 if ($$outref =~ /BrandName:?\s+: (.+)/cg) { }
2417 0 0 if $$outref =~ /Serial#\s+: (\S+)/g
2418 0 0 if $$outref =~ /BaseMacAddr\s+: (.+)/g
2420 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 :/) { }
2429 0 0 if $$outref =~ /Virtual IP\s+: (.+)/g
2430 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 'serial_number' or $attrib->{'attribute'} eq 'apls_box_type' or $attrib->{'attribute'} eq 'brand_name') { }
2439 0 0 if ($attrib->{'attribute'} eq "slots" or $attrib->{'attribute'} eq "ports")
2440 0 0 if ($self->{$Package}{'ATTRIB'}{'is_nncli'} and $self->{$Package}{'ATTRIB'}{'model'} =~ /(?:Passport|ERS)-8[36]\d\d/) { }
2441 0 0 if ($attrib->{'stage'} < 4)
2443 0 0 unless $ok
2449 0 0 unless $ok
2456 0 0 unless $ok
2462 0 0 if ($attrib->{'attribute'} =~ /^(?:is_)?oob_/)
2463 0 0 if ($self->{$Package}{'ATTRIB'}{'is_voss'}) { }
2465 0 0 unless $ok
2467 0 0 if $$outref =~ /mgmt-oob\s+ ([\d\.]+)/g
2468 0 0 if $$outref =~ /Portmgmt\s+ ([\d\.]+)/g
2469 0 0 if $$outref =~ m[Port1/1\s+ ([\d\.]+)]g
2470 0 0 if $$outref =~ /MgmtVirtIp\s+ ([\d\.]+)/g
2471 0 0 if $$outref =~ m[Port2/1\s+ ([\d\.]+)]g
2472 0 0 if $$outref =~ /Portmgmt2\s+ ([\d\.]+)/g
2473 0 0 if ($self->{$Package}{'ATTRIB'}{'cpu_slot'} == 1) { }
2485 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'}) ? :
2491 0 0 if ($attrib->{'stage'} < 4)
2493 0 0 unless $ok
2495 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}/) { }
2504 0 0 if ($$outref =~ /Virtual IP\s+: (.+)/g) { }
2514 0 0 unless $ok
2516 0 0 if $$outref =~ m[^net mgmt ip ([\d\.]+)/[\d\.]+ *(?:cpu-slot [35])?$]m
2517 0 0 if $$outref =~ m[^net mgmt ip ([\d\.]+)/[\d\.]+ cpu-slot 6$]m
2518 0 0 if ($self->{$Package}{'ATTRIB'}{'cpu_slot'} < 5) { }
0 0 elsif ($self->{$Package}{'ATTRIB'}{'cpu_slot'} == 5) { }
2524 0 0 $self->{$Package}{'ATTRIB'}{'is_dual_cpu'} ? :
2528 0 0 $self->{$Package}{'ATTRIB'}{'is_dual_cpu'} ? :
2532 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'}) ? :
2540 0 0 if ($attrib->{'attribute'} eq "is_apls")
2545 0 0 if ($attrib->{'attribute'} eq "is_fabric_engine")
2550 0 0 if ($attrib->{'attribute'} eq "is_voss")
2552 0 0 unless $ok
2553 0 0 if ($$outref =~ m[Only devices /intflash]) { }
2568 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" or $attrib->{'attribute'} eq "serial_number")
2570 0 0 unless $ok
2571 0 0 if ($$outref =~ /Operation Mode:\s+(Switch)/g) { }
0 0 elsif ($$outref =~ /Operation Mode:\s+(Stack), Unit # (\d)/g) { }
2585 0 0 if $$outref =~ /MAC Address:\s+(.+)/cg
2586 0 0 if $$outref =~ /sysDescr:\s+(.+?)(?:\n|\s{4})/cg
2588 0 0 if $$outref =~ /Serial \#:\s+(\S+)/g
2589 0 0 if ($$outref =~ /FW:([\d\.]+)\s+SW:v([\d\.]+)/cg)
2593 0 0 if $$outref =~ /sysName: +(\S.*)/cg
2597 0 0 if ($attrib->{'attribute'} eq "slots" or $attrib->{'attribute'} eq "ports")
2599 0 0 unless $ok
2604 0 0 if ($attrib->{'attribute'} eq "stp_mode")
2606 0 0 unless $ok
2607 0 0 if ($$outref =~ /Current STP Operation Mode: (STPG|MSTP|RSTP)/) { }
2616 0 0 if ($attrib->{'attribute'} eq "mgmt_vlan")
2618 0 0 unless $ok
2619 0 0 if $$outref =~ /Management VLAN: (\d+)/
2623 0 0 if ($attrib->{'attribute'} eq "mgmt_ip" or $attrib->{'attribute'} eq "oob_ip" or $attrib->{'attribute'} eq "is_oob_connected")
2625 0 0 unless $ok
2626 0 0 if $$outref =~ /(?:Switch|Stack) IP Address:\s+[\d\.]+\s+([\d\.]+)\s+[\d\.]+/g
2627 0 0 if ($$outref =~ /Mgmt (?:Switch|Stack) IP Address:\s+[\d\.]+\s+([\d\.]+)\s/g) { }
2634 0 0 defined $self->socket && (defined $self->{$Package}{'ATTRIB'}{'oob_ip'} && $self->socket->peerhost eq $self->{$Package}{'ATTRIB'}{'oob_ip'}) ? :
2639 0 0 if ($attrib->{'attribute'} eq "baudrate")
2641 0 0 unless $ok
2642 0 0 if ($$outref =~ /Terminal speed: (\d+)/)
2648 0 0 if ($attrib->{'attribute'} eq "max_baud")
2650 0 0 unless $ok
2653 0 0 if not defined $baudRate or $1 > $baudRate
2661 0 0 if ($attrib->{'attribute'} eq "model")
2663 0 0 unless $ok
2664 0 0 if $$outref =~ /Chassis Model: (.+)/
2668 0 0 if ($attrib->{'attribute'} eq "fw_version" or $attrib->{'attribute'} eq "sw_version")
2670 0 0 unless $ok
2671 0 0 if $$outref =~ /Runtime: (.+)/g
2672 0 0 if $$outref =~ /Boot: (.+?) /
2676 0 0 if ($attrib->{'attribute'} eq "slots" or $attrib->{'attribute'} eq "ports")
2677 0 0 if ($attrib->{'stage'} < 4)
2679 0 0 unless $ok
2685 0 0 unless $ok
2690 0 0 if ($attrib->{'attribute'} eq "sysname")
2692 0 0 unless $ok
2693 0 0 if $$outref =~ /HostName: (.+)/g
2697 0 0 if ($attrib->{'attribute'} eq "base_mac")
2699 0 0 unless $ok
2700 0 0 if $$outref =~ /Mac Address\s+0x(.+)/g
2706 0 0 if ($attrib->{'attribute'} eq "model" or $attrib->{'attribute'} eq "sysname" or $attrib->{'attribute'} eq "base_mac")
2708 0 0 unless $ok
2709 0 0 if $$outref =~ /Product Name:\s+(.+)/g
2710 0 0 if $$outref =~ /System Name:\s+(.+)/g
2711 0 0 if $$outref =~ /System MAC:\s+(.+)/g
2715 0 0 if ($attrib->{'attribute'} eq "fw_version" or $attrib->{'attribute'} eq "sw_version")
2717 0 0 unless $ok
2718 0 0 if $$outref =~ /Version: (.+?) REL/g
2719 0 0 if $$outref =~ /BootLoader:\s+(.+)/
2723 0 0 if ($attrib->{'attribute'} eq "slots" or $attrib->{'attribute'} eq "ports")
2725 0 0 unless $ok
2732 0 0 if ($attrib->{'attribute'} eq "model" or $attrib->{'attribute'} eq "fw_version" or $attrib->{'attribute'} eq "sw_version")
2734 0 0 unless $ok
2735 0 0 if $$outref =~ /# box type\s+: (.+)/g
2736 0 0 if $$outref =~ /# boot monitor version\s+: v?(.+)/g
2737 0 0 if $$outref =~ /# software version\s+: v?(.+)/g
2741 0 0 if ($attrib->{'attribute'} eq "is_dual_cpu" or $attrib->{'attribute'} eq "sysname")
2743 0 0 unless $ok
2744 0 0 if $$outref =~ /SysDescr\s+: (.+?) \(/g
2745 0 0 if $$outref =~ /SysName\s+: (.+)/g
2746 0 0 if ($$outref =~ /CPU.+ dormant /) { }
2755 0 0 if ($attrib->{'attribute'} eq "slots" or $attrib->{'attribute'} eq "ports")
2757 0 0 unless $ok
2765 0 0 if ($attrib->{'attribute'} eq "model" or $attrib->{'attribute'} eq "serial_number" or $attrib->{'attribute'} eq "base_mac" or $attrib->{'attribute'} eq "fw_version" or $attrib->{'attribute'} eq "sw_version")
2767 0 0 unless $ok
2768 0 0 if $$outref =~ /Model: (.+?),/g
2769 0 0 if $$outref =~ /System \S+ +(\S+)/g
2770 0 0 if $$outref =~ /IAPs\s+(.+?)-/g
2771 0 0 if $$outref =~ /Boot Loader\s+(.+?) \(.+?\), Build: (.+)/g
2772 0 0 if $$outref =~ /System Software\s+(.+?) \(.+?\), Build: (.+)/g
2776 0 0 if ($attrib->{'attribute'} eq "sysname")
2778 0 0 unless $ok
2779 0 0 if $$outref =~ /Access Point Hostname\s*(.+)/g
2783 0 0 if ($attrib->{'attribute'} eq "slots" or $attrib->{'attribute'} eq "ports")
2785 0 0 unless $ok
2792 0 0 if ($attrib->{'attribute'} eq "model" or $attrib->{'attribute'} eq "sysname" or $attrib->{'attribute'} eq "base_mac")
2794 0 0 unless $ok
2795 0 0 if $$outref =~ /SysName: (.+)/g
2796 0 0 if $$outref =~ /System MAC: (.+)/g
2797 0 0 if $$outref =~ /System Type: (?:VPEX )?(\S+)( \(Stack\))?/g
2798 0 0 if defined $2
2799 0 0 if ($$outref =~ /Image Booted: (primary|secondary)/)
2800 0 0 if ($1 eq 'primary') { }
2801 0 0 if $$outref =~ /Primary ver: (\S+)/g
2804 0 0 if $$outref =~ /Secondary ver: (\S+)/g
2813 0 0 if ($attrib->{'attribute'} eq "switch_mode" or $attrib->{'attribute'} eq "stack_size" or $attrib->{'attribute'} eq "unit_number" or $attrib->{'attribute'} eq "master_unit" or not $self->{$Package}{'ATTRIBFLAG'}{'master_unit'} and $attrib->{'attribute'} eq "serial_number")
2815 0 0 unless $ok
2816 0 0 if ($$outref =~ /(?:This node is not in an Active Topology|stacking-support:\s+\w+\s+Disabled|\*[\d:a-f]+ - Disabled)/) { }
2827 0 0 if $1 eq "*"
2828 0 0 if $3 eq "Master"
2832 0 0 if ($attrib->{'attribute'} eq 'switch_mode' or $attrib->{'attribute'} eq 'stack_size' or $attrib->{'attribute'} eq 'unit_number' or $attrib->{'attribute'} eq 'master_unit') { }
2841 0 0 if ($attrib->{'attribute'} eq "serial_number" or $attrib->{'attribute'} eq "sw_version" or $attrib->{'attribute'} eq "fw_version")
2843 0 0 unless $ok
2844 0 0 defined $self->{$Package}{'ATTRIB'}{'master_unit'} ? :
2845 0 0 if $$outref =~ /(?:Switch|Slot-$masterUnit) : \S+ (\S+)/g
2846 0 0 if $$outref =~ /Image : Extreme(?:XOS| Networks Switch Engine) version (.+) by /g
2847 0 0 if $$outref =~ /BootROM : (?:Default )?(\S+)/g
2851 0 0 if ($attrib->{'attribute'} eq "slots" or $attrib->{'attribute'} eq "ports")
2853 0 0 unless $ok
2858 0 0 if ($attrib->{'attribute'} eq "stp_mode")
2860 0 0 unless $ok
2861 0 0 if ($$outref =~ /Operational Mode: (802.1D|802.1W|MSTP)/) { }
2862 0 0 if $1 eq "802.1D"
2863 0 0 if $1 eq "802.1W"
2864 0 0 if $1 eq "MSTP"
2872 0 0 if ($attrib->{'attribute'} eq "oob_ip" or $attrib->{'attribute'} eq "is_oob_connected")
2874 0 0 unless $ok
2875 0 0 if ($$outref =~ m[Primary IP: ([\d\.]+)/\d+]g) { }
2882 0 0 defined $self->socket && (defined $self->{$Package}{'ATTRIB'}{'oob_ip'} && $self->socket->peerhost eq $self->{$Package}{'ATTRIB'}{'oob_ip'}) ? :
2890 0 0 if ($attrib->{'attribute'} eq "model" or $attrib->{'attribute'} eq "sysname" or $attrib->{'attribute'} eq "base_mac" or $attrib->{'attribute'} eq "serial_number" or $attrib->{'attribute'} eq "sw_version")
2892 0 0 unless $ok
2893 0 0 if $$outref =~ /MAC Address : (.+)/g
2894 0 0 if $$outref =~ /Serial Number : (\S+)/g
2895 0 0 if $$outref =~ /System Name : (.+)/g
2896 0 0 if $$outref =~ /Product : (.+)/g
2897 0 0 if $$outref =~ /Board Type : (.+)/g
2898 0 0 if $$outref =~ /Software Version : V?(.+)/g
2902 0 0 if ($attrib->{'attribute'} eq "slots" or $attrib->{'attribute'} eq "ports")
2904 0 0 unless $ok
2912 0 0 if ($attrib->{'attribute'} eq "model" or $attrib->{'attribute'} eq "sysname" or $attrib->{'attribute'} eq "base_mac" or $attrib->{'attribute'} eq "serial_number" or $attrib->{'attribute'} eq "sw_version")
2914 0 0 unless $ok
2915 0 0 if $$outref =~ /MAC Address : (.+)/g
2916 0 0 if $$outref =~ /Serial Number : (\S+)/g
2917 0 0 if $$outref =~ /System Name : (.+)/g
2918 0 0 if $$outref =~ /Board Type : (.+)/g
2919 0 0 if $$outref =~ /Software Version: V(.+)/g
2923 0 0 if ($attrib->{'attribute'} eq "slots" or $attrib->{'attribute'} eq "ports")
2925 0 0 unless $ok
2933 0 0 if ($attrib->{'attribute'} eq "model" or $attrib->{'attribute'} eq "base_mac" or $attrib->{'attribute'} eq "serial_number" or $attrib->{'attribute'} eq "sw_version" or $attrib->{'attribute'} eq "fw_version")
2935 0 0 unless $ok
2936 0 0 if $$outref =~ /Machine Model\.+ (.+)/g
2937 0 0 if $$outref =~ /Serial Number\.+ (\S+)/g
2938 0 0 if $$outref =~ /Burned In MAC Address\.+ (.+)/g
2939 0 0 if $$outref =~ /Software Version\.+ (.+)/g
2940 0 0 if $$outref =~ /Operating System\.+ Linux (.+)/g
2944 0 0 if ($attrib->{'attribute'} eq "sysname")
2946 0 0 unless $ok
2948 0 0 if ($$outref =~ /System Description\.+ (.+?)-/g)
2949 0 0 if ($$outref =~ /System Name\.+ (.+)/g)
2950 0 0 if ($setSsysname) { }
0 0 elsif ($defSsysname) { }
2959 0 0 if ($attrib->{'attribute'} eq "slots" or $attrib->{'attribute'} eq "ports")
2961 0 0 unless $ok
2967 0 0 if ($attrib->{'attribute'} eq "switch_mode" or $attrib->{'attribute'} eq "stack_size" or $attrib->{'attribute'} eq "unit_number" or $attrib->{'attribute'} eq "manager_unit")
2969 0 0 unless $ok
2973 0 0 if ($2 eq "Mgmt Sw")
2978 0 0 if ($unitCount) { }
2991 0 0 if ($attrib->{'attribute'} eq "stp_mode")
2993 0 0 unless $ok
2994 0 0 if ($$outref =~ /Mode: (stp|rstp|mstp)/) { }
0 0 elsif ($$outref =~ /Spanning-tree enabled protocol (pvst|rpvst)/) { }
2995 0 0 $1 eq 'stp' ? :
3003 0 0 if ($attrib->{'attribute'} eq "oob_ip" or $attrib->{'attribute'} eq "is_oob_connected")
3005 0 0 unless $ok
3006 0 0 if ($$outref =~ /IP Address\.+ (.+)/g) { }
3013 0 0 defined $self->socket && (defined $self->{$Package}{'ATTRIB'}{'oob_ip'} && $self->socket->peerhost eq $self->{$Package}{'ATTRIB'}{'oob_ip'}) ? :
3018 0 0 if ($attrib->{'attribute'} eq "baudrate")
3020 0 0 unless $ok
3021 0 0 if ($$outref =~ /Baud Rate \(bps\)\.+ (\d+)/)
3027 0 0 if ($attrib->{'attribute'} eq "max_baud")
3029 0 0 unless $ok
3032 0 0 if not defined $baudRate or $1 > $baudRate
3041 0 0 if ($attrib->{'attribute'} eq "model" or $attrib->{'attribute'} eq "base_mac" or $attrib->{'attribute'} eq "serial_number" or $attrib->{'attribute'} eq "sw_version" or $attrib->{'attribute'} eq "fw_version" or $attrib->{'attribute'} eq "sysname")
3043 0 0 unless $ok
3044 0 0 if ($$outref =~ /(\S+) version (.+)/g)
3049 0 0 if $$outref =~ /(\S+) uptime is/g
3050 0 0 if $$outref =~ /Base ethernet MAC address is (.+)/g
3051 0 0 if $$outref =~ /System serial number is (\S+)/g
3055 0 0 if ($attrib->{'attribute'} eq "slots" or $attrib->{'attribute'} eq "ports")
3057 0 0 unless $ok
3062 0 0 if ($attrib->{'attribute'} eq "baudrate" or $attrib->{'attribute'} eq "max_baud")
3070 0 0 if ($attrib->{'attribute'} eq "sysname" or $attrib->{'attribute'} eq "base_mac")
3072 0 0 $self->config_context ? :
3073 0 0 unless $ok
3074 0 0 if $$outref =~ /Stack MAC : (.+)/g
3075 0 0 if $$outref =~ /Unit Name : (.+)/g
3076 0 0 if ($$outref =~ /SLX-OS Version : (\d+([rsx])?.+)/g)
3079 0 0 !defined($2) || $2 eq $rsx ? :
0 0 if $rsx eq "r"
3080 0 0 defined $2 && $2 eq $rsx ? :
0 0 unless $rsx eq "r"
3083 0 0 if ($self->{$Package}{'ATTRIBFLAG'}{'is_dual_mm'})
3085 0 0 $self->{$Package}{'ATTRIB'}{'is_dual_mm'} ? :
0 0 if $$outref =~ /Management IP : (.+)/g
3091 0 0 if ($attrib->{'attribute'} eq "model" or $attrib->{'attribute'} eq "switch_type" or $attrib->{'attribute'} eq "baudrate" or $attrib->{'attribute'} eq "serial_number")
3092 0 0 $self->config_context ? :
3093 0 0 unless $ok
3094 0 0 if $$outref =~ /Chassis Name:(?:\t|\e\[\d\w)(?:(?:BR|EN)-)?(.+)/g
3095 0 0 defined $self->{$Package}{'ATTRIB'}{'model'} && $self->{$Package}{'ATTRIB'}{'model'} =~ /9030/ ? :
3096 0 0 if $$outref =~ /switchType: (\d+)/g
3097 0 0 if $$outref =~ m[CHASSIS/]g and $$outref =~ /Factory Serial Num: +\t(\S+)/g
3101 0 0 if ($attrib->{'attribute'} eq "sw_version" or $attrib->{'attribute'} eq "fw_version" or $attrib->{'attribute'} =~ /^is_slx_[rsx]$/)
3102 0 0 $self->config_context ? :
3103 0 0 unless $ok
3104 0 0 if ($$outref =~ /Firmware name: (\d+([rsx])?.+)/g)
3107 0 0 !defined($2) || $2 eq $rsx ? :
0 0 if $rsx eq "r"
3108 0 0 defined $2 && $2 eq $rsx ? :
0 0 unless $rsx eq "r"
3111 0 0 if $$outref =~ /Kernel: (.+)/g
3115 0 0 if ($attrib->{'attribute'} eq "slots" or $attrib->{'attribute'} eq "ports")
3116 0 0 $self->config_context ? :
3117 0 0 unless $ok
3125 0 0 if ($attrib->{'attribute'} eq "is_ha" or $attrib->{'attribute'} eq "mm_number" or $attrib->{'attribute'} eq "is_dual_mm" or $attrib->{'attribute'} eq "is_active_mm" or not $self->{$Package}{'ATTRIBFLAG'}{'mm_number'} and $attrib->{'attribute'} =~ /oob/)
3126 0 0 $self->config_context ? :
3127 0 0 unless $ok
3129 0 0 if ($$outref =~ /M1: (Active|Standby)/g)
3130 0 0 if ($$outref =~ /M2: (Active|Standby)/g)
3131 0 0 if ($m1 and $m2) { }
3133 0 0 $m1 ? :
3138 0 0 $m1 || $m2 ? :
3139 0 0 $m1 ? :
0 0 $m2 ? :
3146 0 0 if ($attrib->{'attribute'} eq "stp_mode")
3147 0 0 $self->config_context ? :
3148 0 0 unless $ok
3149 0 0 if ($$outref =~ /Spanning-tree Mode: (.+)/g) { }
3150 0 0 if $1 == "Multiple Spanning Tree Protocol"
3151 0 0 if $1 == "Rapid Spanning Tree Protocol"
3152 0 0 if $1 == "Spanning Tree Protocol"
3153 0 0 if $1 == "Per-VLAN Spanning Tree Protocol"
3154 0 0 if $1 == "Rapid Per-VLAN Spanning Tree Protocol"
3162 0 0 if ($attrib->{'attribute'} eq "oob_ip" or $attrib->{'attribute'} eq "oob_standby_ip" or $attrib->{'attribute'} eq "is_oob_connected")
3163 0 0 $self->config_context ? :
3164 0 0 unless $ok
3166 0 0 if ($$outref =~ /interface Management (\d)/g)
3169 0 0 $mslot == $self->{$Package}{'ATTRIB'}{'mm_number'} ? :
0 0 if $$outref =~ m[ip address \"static (.+)/]g
3174 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'}) ? :
3179 0 0 if ($attrib->{'attribute'} eq "oob_virt_ip")
3180 0 0 $self->config_context ? :
3181 0 0 unless $ok
3182 0 0 if $$outref =~ m[chassis virtual-ip \"static (.+)/]g
3188 0 0 if ($attrib->{'attribute'} eq "model" or $attrib->{'attribute'} eq "sw_version" or $attrib->{'attribute'} eq "fw_version")
3190 0 0 unless $ok
3191 0 0 if $$outref =~ /Version:\s+HiveOS (\S+) build-\d+/g
3192 0 0 if $$outref =~ /Platform:\s+(\S+)/g
3193 0 0 if $$outref =~ /Bootloader ver:\s+v(\S+)/g
3197 0 0 if ($attrib->{'attribute'} eq "slots" or $attrib->{'attribute'} eq "ports")
3199 0 0 unless $ok
3204 0 0 if ($attrib->{'attribute'} eq "sysname")
3206 0 0 unless $ok
3207 0 0 if $$outref =~ /hostname (\S+)/g
3211 0 0 if ($attrib->{'attribute'} eq "base_mac" or $attrib->{'attribute'} eq "serial_number")
3213 0 0 unless $ok
3214 0 0 if $$outref =~ /Ethernet MAC address:\s+(\S+)/g
3215 0 0 if $$outref =~ /Serial number:\s+(\S+)/g
3219 0 0 if ($attrib->{'attribute'} eq "baudrate" or $attrib->{'attribute'} eq "max_baud")
3228 0 0 if ($attrib->{'attribute'} eq "model" or $attrib->{'attribute'} eq "sw_version" or $attrib->{'attribute'} eq "fw_version" or $attrib->{'attribute'} eq "serial_number")
3230 0 0 unless $ok
3231 0 0 if $$outref =~ /Name : (\S+)/g
3232 0 0 if $$outref =~ m[S/N : (\S+)]g
3233 0 0 if $$outref =~ / Kernel : (\S+)/g
3234 0 0 if $$outref =~ / Ipe : (\S+)/g
3238 0 0 if ($attrib->{'attribute'} eq "slots" or $attrib->{'attribute'} eq "ports" or $attrib->{'attribute'} eq "base_mac")
3240 0 0 unless $ok
3244 0 0 if $$outref =~ /ether (\S+)/cg and $1 ne "00:00:00:00:00:00"
3245 0 0 if $interface eq "isw0"
3252 0 0 if ($attrib->{'attribute'} eq "sysname")
3254 0 0 unless $ok
3255 0 0 if $$outref =~ /\s+Hostname\s+: (\S+)/g
3259 0 0 if ($attrib->{'attribute'} eq "baudrate" or $attrib->{'attribute'} eq "max_baud")
3267 0 0 if ($attrib->{'attribute'} eq "sysname")
3269 0 0 unless $ok
3270 0 0 if $$outref =~ /System name: (.+)/g
3274 0 0 if ($attrib->{'attribute'} eq "model" or $attrib->{'attribute'} eq "base_mac" or $attrib->{'attribute'} eq "serial_number")
3276 0 0 unless $ok
3277 0 0 if $$outref =~ /Chassis Type: (.+?)(?:\s?\(0x\d+\)?)/g
3278 0 0 if $$outref =~ /Chassis Serial Number: (\S+)/g
3279 0 0 if $$outref =~ /Base MAC Address: (.+)/g
3280 0 0 if $$outref =~ /Firmware Version: (\S+)/g
3281 0 0 if $$outref =~ /BootCode Version: (\S+)/g
3285 0 0 if ($attrib->{'attribute'} eq "sw_version" or $attrib->{'attribute'} eq "fw_version")
3287 0 0 unless $ok
3288 0 0 if $$outref =~ /Fw: (\S+)/g
3289 0 0 if $$outref =~ /Bp: (.+)/g
3293 0 0 if ($attrib->{'attribute'} eq "slots" or $attrib->{'attribute'} eq "ports")
3295 0 0 unless $ok
3300 0 0 if ($attrib->{'attribute'} eq "stp_mode")
3302 0 0 unless $ok
3303 0 0 if ($$outref =~ /Bridge Stp Mode is set to (.+)/g) { }
3304 0 0 if $1 == "ieee8021"
3305 0 0 if $1 == "none"
3313 0 0 if ($attrib->{'attribute'} eq "baudrate")
3315 0 0 unless $ok
3316 0 0 if $$outref =~ /com.\d.\d +(\d+)/
3320 0 0 if ($attrib->{'attribute'} eq "max_baud")
3322 0 0 unless $ok
3323 0 0 if $$outref =~ /,(\d+)\)$/m
3329 0 0 if ($attrib->{'attribute'} eq "sysname")
3331 0 0 unless $ok
3332 0 0 if $$outref =~ /hostname (.+)/g
3336 0 0 if ($attrib->{'attribute'} eq "model" or $attrib->{'attribute'} eq "base_mac" or $attrib->{'attribute'} eq "serial_number")
3338 0 0 unless $ok
3339 0 0 if $$outref =~ /Product Name: (\S+)/g
3340 0 0 if $$outref =~ /Serial Number: (\S+)/g
3341 0 0 if $$outref =~ /Base MAC Address: (\S+)/g
3345 0 0 if ($attrib->{'attribute'} eq "sw_version" or $attrib->{'attribute'} eq "fw_version")
3347 0 0 unless $ok
3348 0 0 if $$outref =~ /Base OS:\nCurrent Version: (\S+)/g
3349 0 0 if $$outref =~ /Current Version: (\S+)/g
3353 0 0 if ($attrib->{'attribute'} eq "slots" or $attrib->{'attribute'} eq "ports")
3355 0 0 unless $ok
3360 0 0 if ($attrib->{'attribute'} eq "oob_ip" or $attrib->{'attribute'} eq "is_oob_connected")
3362 0 0 unless $ok
3363 0 0 if ($$outref =~ m[IPv4 address (.+)/]g) { }
3370 0 0 defined $self->socket && (defined $self->{$Package}{'ATTRIB'}{'oob_ip'} && $self->socket->peerhost eq $self->{$Package}{'ATTRIB'}{'oob_ip'}) ? :
3386 0 0 unless ($self->{'POLLING'})
3391 0 0 unless (defined $self->{'POLL'}{$pollsub})
3394 0 0 if (@_ and not %args)
3414 0 0 $args{'baudrate'} eq 'max' ? :
3419 0 0 if defined $changeBaud->{'errmode'}
3422 0 0 if ($changeBaud->{'local_side_only'})
3434 0 0 if ($changeBaud->{'stage'} < 1)
3435 0 0 unless ($self->connection_type eq "SERIAL")
3438 0 0 unless (defined $self->baudrate)
3441 0 0 unless (defined $changeBaud->{'baudrate'})
3444 0 0 unless ($familyType)
3450 0 0 if ($changeBaud->{'stage'} < 2)
3451 0 0 unless (defined $self->{$Package}{'ATTRIB'}{'baudrate'})
3453 0 0 unless $ok
3455 0 0 unless (defined $self->{$Package}{'ATTRIB'}{'baudrate'})
3456 0 0 unless $changeBaud->{'maxMode'}
3461 0 0 unless (defined $self->{$Package}{'ATTRIB'}{'max_baud'})
3463 0 0 unless $ok
3465 0 0 if ($changeBaud->{'maxMode'} and not defined $self->{$Package}{'ATTRIB'}{'max_baud'})
3470 0 0 if $changeBaud->{'maxMode'}
3472 0 0 if ($changeBaud->{'baudrate'} == $self->baudrate)
3478 0 0 if ($familyType eq $Prm{'generic'}) { }
0 0 elsif ($familyType eq $Prm{'bstk'}) { }
0 0 elsif ($familyType eq $Prm{'pers'}) { }
0 0 elsif ($familyType eq $Prm{'s200'}) { }
3482 0 0 unless ($changeBaud->{'baudrate'} == 9600 or $changeBaud->{'baudrate'} == 19200 or $changeBaud->{'baudrate'} == 38400)
3487 0 0 unless ($changeBaud->{'baudrate'} == 9600 or $changeBaud->{'baudrate'} == 19200 or $changeBaud->{'baudrate'} == 38400 or $changeBaud->{'baudrate'} == 57600 or $changeBaud->{'baudrate'} == 115200)
3493 0 0 unless ($changeBaud->{'baudrate'} == 9600 or $changeBaud->{'baudrate'} == 19200 or $changeBaud->{'baudrate'} == 38400 or $changeBaud->{'baudrate'} == 57600 or $changeBaud->{'baudrate'} == 115200)
3499 0 0 unless $changeBaud->{'maxMode'}
3507 0 0 if ($changeBaud->{'stage'} < 3)
3508 0 0 if ($familyType eq $Prm{'pers'}) { }
0 0 elsif ($familyType eq $Prm{'s200'}) { }
3509 0 0 unless (defined $self->{$Package}{'ATTRIB'}{'model'})
3511 0 0 unless $ok
3513 0 0 if ($changeBaud->{'userExec'} = $self->last_prompt =~ />\s?$/)
3515 0 0 unless $ok
3519 0 0 if ($changeBaud->{'userExec'} = $self->last_prompt =~ />\s?$/)
3521 0 0 unless $ok
3527 0 0 if ($changeBaud->{'stage'} < 4)
3528 0 0 if ($familyType eq $Prm{'pers'} and $self->{$Package}{'ATTRIB'}{'is_nncli'}) { }
0 0 elsif ($familyType eq $Prm{'s200'}) { }
3529 0 0 if ($changeBaud->{'privExec'} = !$self->config_context)
3531 0 0 unless $ok
3532 0 0 unless $$resref
3536 0 0 if ($changeBaud->{'privExec'} = !$self->config_context)
3538 0 0 unless $ok
3539 0 0 unless $$resref
3545 0 0 if ($changeBaud->{'stage'} < 5)
3546 0 0 if ($familyType eq $Prm{'bstk'}) { }
0 0 elsif ($familyType eq $Prm{'pers'}) { }
0 0 elsif ($familyType eq $Prm{'s200'}) { }
3547 0 0 unless $self->print("line", "terminal speed $changeBaud->{'baudrate'}", "errmode", "return")
3551 0 0 if ($self->{$Package}{'ATTRIB'}{'model'} =~ /(?:Passport|ERS)-(?:83|16)\d\d/) { }
3552 0 0 if ($self->{$Package}{'ATTRIB'}{'is_nncli'}) { }
3553 0 0 unless $self->print("line", "boot config sio baud $changeBaud->{'baudrate'}", "errmode", "return")
3557 0 0 unless $self->print("line", "config bootconfig sio baud $changeBaud->{'baudrate'}", "errmode", "return")
3562 0 0 if ($self->{$Package}{'ATTRIB'}{'is_nncli'}) { }
3563 0 0 unless $self->print("line", "boot config sio console baud $changeBaud->{'baudrate'}", "errmode", "return")
3567 0 0 unless $self->print("line", "config bootconfig sio console baud $changeBaud->{'baudrate'}", "errmode", "return")
3573 0 0 unless $self->print("line", "serial baudrate $changeBaud->{'baudrate'}", "errmode", "return")
3580 0 0 if ($changeBaud->{'stage'} < 6)
3582 0 0 unless $ok
3583 0 0 if (length $self->{'POLL'}{'read_buffer'} and $self->{'POLL'}{'read_buffer'} =~ /$self->{$Package}{'prompt_qr'}/)
3585 0 0 unless $changeBaud->{'maxMode'}
3590 0 0 if (defined $self->{$Package}{'ORIGBAUDRATE'}) { }
3591 0 0 if $self->{$Package}{'ORIGBAUDRATE'} == $changeBaud->{'baudrate'}
3599 0 0 if ($changeBaud->{'stage'} < 7)
3604 0 0 unless $ok
3610 0 0 if ($changeBaud->{'stage'} < 8)
3612 0 0 unless $ok
3616 0 0 if ($changeBaud->{'stage'} < 9)
3617 0 0 if ($familyType eq $Prm{'pers'} and $self->{$Package}{'ATTRIB'}{'is_nncli'} or $familyType eq $Prm{'s200'})
3618 0 0 if ($changeBaud->{'privExec'})
3620 0 0 unless $ok
3621 0 0 unless $$resref
3627 0 0 if ($changeBaud->{'stage'} < 10)
3629 0 0 if ($familyType eq $Prm{'pers'} and $self->{$Package}{'ATTRIB'}{'is_nncli'} or $familyType eq $Prm{'s200'})
3630 0 0 if ($changeBaud->{'userExec'})
3632 0 0 if (defined $ExitPrivExec{$familyType}) { }
3644 0 0 if ($changeBaud->{'stage'} < 11)
3645 0 0 if ($familyType eq $Prm{'pers'} and $self->{$Package}{'ATTRIB'}{'is_nncli'} or $familyType eq $Prm{'s200'})
3646 0 0 if ($changeBaud->{'userExec'})
3648 0 0 unless $ok
3649 0 0 unless $$resref
3663 0 0 unless ($self->{'POLLING'})
3668 0 0 unless (defined $self->{'POLL'}{$pollsub})
3671 0 0 if (@_ and not %args)
3685 0 0 defined $args{'password'} ? :
0 0 defined $args{'prompt_credentials'} ? :
3690 0 0 if defined $enable->{'errmode'}
3691 0 0 if $self->eof
3697 0 0 if ($enable->{'stage'} < 1)
3699 0 0 unless $familyType
3700 0 0 unless $self->{$Package}{'ATTRIB'}{'is_nncli'}
3701 0 0 unless $self->last_prompt =~ />\s?$/
3705 0 0 unless $self->print("line", "enable", "errmode", "return")
3712 0 0 unless $ok
3715 0 0 if $self->{'POLL'}{'local_buffer'} =~ /error: Access denied/
3716 0 0 if ($self->{'POLL'}{'local_buffer'} =~ /$passwordPrompt/)
3718 0 0 if (defined $enable->{'enable_password'}) { }
3719 0 0 if ($enable->{'login_attempted'} == 1) { }
3722 0 0 unless $self->print("line", $enablePwd, "errmode", "return")
3728 0 0 unless $self->print("errmode", "return")
3733 0 0 if ($enable->{'login_attempted'} == 1) { }
0 0 elsif ($enable->{'login_attempted'} == 2) { }
3736 0 0 unless $self->print("errmode", "return")
3742 0 0 unless $self->print("line", $enablePwd, "errmode", "return")
3746 0 0 if ($enable->{'prompt_credentials'}) { }
3748 0 0 unless $self->print("line", $enablePwd, "errmode", "return")
3754 0 0 unless $self->print("errmode", "return")
3763 0 0 if $enable->{'login_failed'}
3764 0 0 if $self->last_prompt =~ />\s?$/
3765 0 0 if defined $enablePwd
3775 0 0 unless ($self->{'POLLING'})
3780 0 0 unless (defined $self->{'POLL'}{$pollsub})
3783 0 0 if (@_ and not %args)
3800 0 0 if defined $devMorePage->{'errmode'}
3801 0 0 if $self->eof
3804 0 0 unless $familyType
3805 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'}) { }
0 0 elsif ($familyType eq $Prm{'xos'}) { }
0 0 elsif ($familyType eq $Prm{'s200'}) { }
0 0 elsif ($familyType eq $Prm{'isw'}) { }
0 0 elsif ($familyType eq $Prm{'iswMarv'}) { }
0 0 elsif ($familyType eq $Prm{'wing'}) { }
0 0 elsif ($familyType eq $Prm{'slx'}) { }
0 0 elsif ($familyType eq $Prm{'hive'}) { }
0 0 elsif ($familyType eq $Prm{'eos'}) { }
0 0 elsif ($familyType eq $Prm{'oneos'}) { }
3806 0 0 $devMorePage->{'enable'} ? :
0 0 unless defined $devMorePage->{'cmdString'}
3808 0 0 unless $ok
3809 0 0 unless $$resref
3812 0 0 if ($self->{$Package}{'ATTRIB'}{'is_nncli'}) { }
3813 0 0 if ($devMorePage->{'stage'} < 1)
3814 0 0 unless (defined $self->{$Package}{'ATTRIB'}{'model'})
3816 0 0 unless $ok
3818 0 0 if (defined $self->{$Package}{'ATTRIB'}{'model'} and $self->{$Package}{'ATTRIB'}{'model'} =~ /(?:Passport|ERS)-83\d\d/) { }
3825 0 0 if ($devMorePage->{'stage'} < 2)
3826 0 0 $devMorePage->{'enable'} ? :
0 0 unless defined $devMorePage->{'cmdString'}
3828 0 0 unless $ok
3829 0 0 if not $$resref and defined $self->{$Package}{'ATTRIB'}{'model'}
3831 0 0 if $$resref
3834 0 0 if ($devMorePage->{'stage'} < 3)
3835 0 0 $devMorePage->{'enable'} ? :
0 0 unless defined $devMorePage->{'cmdString'}
3837 0 0 unless $ok
3838 0 0 unless $$resref
3842 0 0 $devMorePage->{'enable'} ? :
0 0 unless defined $devMorePage->{'cmdString'}
3844 0 0 unless $ok
3845 0 0 unless $$resref
3849 0 0 $devMorePage->{'enable'} ? :
0 0 unless defined $devMorePage->{'cmdString'}
3851 0 0 unless $ok
3852 0 0 unless $$resref
3855 0 0 $devMorePage->{'enable'} ? :
0 0 unless defined $devMorePage->{'cmdString'}
3857 0 0 unless $ok
3858 0 0 unless $$resref
3861 0 0 $devMorePage->{'enable'} ? :
0 0 unless defined $devMorePage->{'cmdString'}
3863 0 0 unless $ok
3864 0 0 unless $$resref
3867 0 0 $devMorePage->{'enable'} ? :
0 0 unless defined $devMorePage->{'cmdString'}
3869 0 0 unless $ok
3870 0 0 unless $$resref
3873 0 0 $devMorePage->{'enable'} ? :
0 0 unless defined $devMorePage->{'cmdString'}
3875 0 0 unless $ok
3876 0 0 unless $$resref
3879 0 0 $devMorePage->{'enable'} ? :
0 0 unless defined $devMorePage->{'cmdString'}
3880 0 0 $self->config_context ? :
3881 0 0 unless $ok
3882 0 0 unless $$resref
3885 0 0 $devMorePage->{'enable'} ? :
0 0 unless defined $devMorePage->{'cmdString'}
3887 0 0 unless $ok
3888 0 0 unless $$resref
3891 0 0 $devMorePage->{'enable'} ? :
0 0 unless defined $devMorePage->{'cmdString'}
3892 0 0 $self->config_context ? :
3893 0 0 unless $ok
3894 0 0 unless $$resref
3897 0 0 $devMorePage->{'enable'} ? :
0 0 unless defined $devMorePage->{'cmdString'}
3898 0 0 $self->config_context ? :
3899 0 0 unless $ok
3900 0 0 unless $$resref
3903 0 0 $devMorePage->{'enable'} ? :
0 0 unless defined $devMorePage->{'cmdString'}
3905 0 0 unless $ok
3906 0 0 unless $$resref
3909 0 0 $devMorePage->{'enable'} ? :
0 0 unless defined $devMorePage->{'cmdString'}
3911 0 0 unless $ok
3912 0 0 unless $$resref
3915 0 0 $devMorePage->{'enable'} ? :
0 0 unless defined $devMorePage->{'cmdString'}
3917 0 0 unless $ok
3918 0 0 unless $$resref
3932 0 0 unless ($self->{'POLLING'})
3937 0 0 unless (defined $self->{'POLL'}{$pollsub})
3940 0 0 if (@_ and not %args)
3953 0 0 defined $args{'username'} ? :
0 0 defined $args{'password'} ? :
0 0 defined $args{'prompt_credentials'} ? :
3958 0 0 if defined $devPeerCpu->{'errmode'}
3959 0 0 if $self->eof
3962 0 0 if ($devPeerCpu->{'stage'} < 1)
3963 0 0 unless ($familyType)
3966 0 0 unless ($familyType eq $Prm{'pers'})
3969 0 0 unless ($devPeerCpu->{'username'} and $devPeerCpu->{'password'} or $devPeerCpu->{'prompt_credentials'})
3975 0 0 if ($devPeerCpu->{'stage'} < 2)
3977 0 0 unless $ok
3979 0 0 unless $self->print("line", "peer telnet", "errmode", "return")
3984 0 0 if ($devPeerCpu->{'stage'} < 3)
3986 0 0 unless defined $ok
3987 0 0 unless $ok
3989 0 0 unless defined $devPeerCpu->{'username'}
3990 0 0 unless $self->print("line", $devPeerCpu->{'username'}, "errmode", "return")
3995 0 0 if ($devPeerCpu->{'stage'} < 4)
3997 0 0 unless defined $ok
3998 0 0 unless $ok
4000 0 0 unless defined $devPeerCpu->{'password'}
4001 0 0 unless $self->print("line", $devPeerCpu->{'password'}, "errmode", "return")
4008 0 0 unless $ok
4012 0 0 $self->{'LASTPROMPT'} =~ /^@/ ? :
4013 0 0 if $self->{'LASTPROMPT'} =~ /^@/
4023 0 0 unless (defined $self->{'POLL'}{$pollsub})
4034 0 0 if ($self->{$Package}{'ATTRIB'}{'is_nncli'}) { }
4035 0 0 if ($cmdPrivExec->{'stage'} < 1)
4036 0 0 if ($self->{'WRITEFLAG'})
4038 0 0 unless $ok
4042 0 0 if ($cmdPrivExec->{'stage'} < 2)
4043 0 0 if ($cmdPrivExec->{'userExec'} = $self->last_prompt =~ />\s?$/)
4045 0 0 unless $ok
4049 0 0 if ($cmdPrivExec->{'stage'} < 3)
4051 0 0 unless $ok
4056 0 0 if ($cmdPrivExec->{'stage'} < 4)
4058 0 0 if ($cmdPrivExec->{'userExec'})
4060 0 0 if (defined $ExitPrivExec{$familyType}) { }
4071 0 0 if ($cmdPrivExec->{'stage'} < 5)
4072 0 0 if ($cmdPrivExec->{'userExec'})
4074 0 0 unless $ok
4084 0 0 unless $ok
4096 0 0 unless (defined $self->{'POLL'}{$pollsub})
4108 0 0 if ($self->{$Package}{'ATTRIB'}{'is_nncli'}) { }
4109 0 0 if ($cmdConfig->{'stage'} < 1)
4110 0 0 if ($self->{'WRITEFLAG'})
4112 0 0 unless $ok
4116 0 0 if ($cmdConfig->{'stage'} < 2)
4117 0 0 if ($cmdConfig->{'userExec'} = $self->last_prompt =~ />\s?$/)
4119 0 0 unless $ok
4123 0 0 if ($cmdConfig->{'stage'} < 3)
4124 0 0 if ($cmdConfig->{'privExec'} = !$self->config_context)
4125 0 0 $familyType eq 'WLAN9100' || $familyType eq 'Series200' || $familyType eq 'ISWmarvell' ? :
4127 0 0 unless $ok
4128 0 0 unless $$resref
4132 0 0 if ($cmdConfig->{'stage'} < 4)
4134 0 0 unless $ok
4139 0 0 if ($cmdConfig->{'stage'} < 5)
4140 0 0 if ($cmdConfig->{'privExec'})
4141 0 0 $familyType eq 'ISWmarvell' ? :
4143 0 0 unless $ok
4148 0 0 if ($cmdConfig->{'stage'} < 6)
4150 0 0 if ($cmdConfig->{'userExec'})
4152 0 0 if (defined $ExitPrivExec{$familyType}) { }
4163 0 0 if ($cmdConfig->{'stage'} < 7)
4164 0 0 if ($cmdConfig->{'userExec'})
4166 0 0 unless $ok
4175 0 0 unless $cmdcli =~ /^config /
4177 0 0 unless $ok
4189 0 0 unless (defined $self->{'POLL'}{$pollsub})
4200 0 0 if ($cmdIpanema->{'stage'} < 1)
4201 0 0 if ($self->{'WRITEFLAG'})
4203 0 0 unless $ok
4207 0 0 if ($cmdIpanema->{'stage'} < 2)
4209 0 0 if (($cmdIpanema->{'virtualRt'}) = $self->last_prompt =~ /\.rt(\d):/g or ($cmdIpanema->{'virtualRtCli'}) = $self->last_prompt =~ /\.rt(\d)\]/g)
4217 0 0 if ($cmdIpanema->{'stage'} < 3)
4218 0 0 if ($cmdIpanema->{'virtualRt'} or $cmdIpanema->{'virtualRtCli'})
4220 0 0 unless $ok
4225 0 0 if ($cmdIpanema->{'stage'} < 4)
4227 0 0 unless $ok
4232 0 0 if ($cmdIpanema->{'stage'} < 5)
4235 0 0 if ($cmdIpanema->{'virtualRt'}) { }
0 0 elsif ($cmdIpanema->{'virtualRtCli'}) { }
4241 0 0 if (defined $virtualRtCmd)
4246 0 0 if ($cmdIpanema->{'stage'} < 6)
4247 0 0 if ($cmdIpanema->{'virtualRt'})
4249 0 0 unless $ok
4263 0 0 unless (defined $self->{'POLL'}{$pollsub})
4270 0 0 if ($discDevice->{'stage'} < 1)
4276 0 0 if ($discDevice->{'stage'} < 2)
4279 0 0 unless $ok
4282 0 0 if ($self->last_prompt =~ /(.*)($GenericPromptRegex)/) { }
4293 0 0 if ($discDevice->{'stage'} < 3)
4296 0 0 unless $ok
4298 0 0 if ($$outref =~ /\s+Configured\s+In Use\s+Last BootP/)
4305 0 0 if ($$outref =~ /^\? Unknown command \(try "help"\)\.$/)
4312 0 0 if ($discDevice->{'stage'} < 4)
4315 0 0 unless $ok
4317 0 0 if ($$outref =~ /^\s+auto-recover-delay :/m)
4324 0 0 if ($discDevice->{'stage'} < 5)
4326 0 0 $self->config_context ? :
4327 0 0 unless $ok
4329 0 0 if ($$outref =~ /^Chassis Name:(?:\t|\e\[\d\w)(?:(?:BR|EN)-)?(.+)/m)
4333 0 0 defined $self->{$Package}{'ATTRIB'}{'model'} && $self->{$Package}{'ATTRIB'}{'model'} =~ /9030/ ? :
4334 0 0 if $$outref =~ /switchType: (\d+)/g
4335 0 0 if $$outref =~ m[CHASSIS/]g and $$outref =~ /Factory Serial Num: (\S+)/g
4341 0 0 if ($discDevice->{'stage'} < 6)
4344 0 0 unless $ok
4346 0 0 if ($$outref =~ /^Image : Extreme(XOS| Networks Switch Engine) version (.+) by /m)
4347 0 0 $1 eq 'XOS' ? :
4349 0 0 if $$outref =~ /^BootROM :(.+)$/m
4355 0 0 if ($discDevice->{'stage'} < 7)
4358 0 0 unless $ok
4360 0 0 if ($$outref =~ /Product Name: (\S+)/g)
4364 0 0 if $$outref =~ /Base MAC Address: (\S+)/g
4370 0 0 if ($discDevice->{'stage'} < 8)
4373 0 0 unless $ok
4375 0 0 if ($$outref =~ /^(?:Product |Board Type) : (.+)(?:, PoE Switch)?/m)
4384 0 0 if ($discDevice->{'stage'} < 9)
4387 0 0 unless $ok
4389 0 0 if ($$outref =~ /^Page Filter Enabled\t\t: (?:enable|disable)/m)
4396 0 0 if ($discDevice->{'stage'} < 10)
4399 0 0 unless $ok
4401 0 0 if ($$outref =~ /^(\S+) version (.+)\nCopyright \(c\) [\d-]+ Extreme Networks/m)
4405 0 0 if $$outref =~ /^(\S+) uptime is/m
4406 0 0 if $$outref =~ /^Base ethernet MAC address is (.+)$/m
4407 0 0 if $$outref =~ /System serial number is (\S+)/g
4413 0 0 if ($discDevice->{'stage'} < 11)
4416 0 0 unless $ok
4418 0 0 if ($$outref =~ /^Version: HiveOS (\S+) build-/m)
4420 0 0 if $$outref =~ /^Platform:\s+(\S+)/m
4421 0 0 if $$outref =~ /^Bootloader ver: v(\S+)/m
4426 0 0 if ($$outref =~ /^Copyright \(c\) \d{4} by (?:Extreme|Enterasys) Networks, Inc\./m)
4433 0 0 if ($discDevice->{'stage'} < 12)
4436 0 0 unless $ok
4438 0 0 if ($$outref =~ /^ \[LAN\] IPaddr : /m)
4440 0 0 if $$outref =~ /^\s+Hostname\s+: (\S+)/m
4446 0 0 if ($discDevice->{'stage'} < 13)
4449 0 0 unless $ok
4451 0 0 if ($$outref =~ m[^\d(?:/\d)?\s+\S+\s+\S+\s+\S+\s+Extreme\s+(\S+)]m)
4460 0 0 if ($discDevice->{'stage'} < 14)
4463 0 0 unless $ok
4465 0 0 if ($$outref =~ /^Version:\s+(?i:v|REL)?(.+)/m)
4474 0 0 if ($discDevice->{'stage'} < 15)
4477 0 0 unless $ok
4479 0 0 if ($$outref =~ /^Access Point Hostname\s*(.+)$/m)
4488 0 0 if ($discDevice->{'stage'} < 16)
4491 0 0 unless $ok
4493 0 0 if ($$outref =~ /^Chassis Model: (.+)$/m)
4502 0 0 if ($discDevice->{'stage'} < 17)
4505 0 0 unless $ok
4507 0 0 if ($$outref =~ /Product Name:\s+(.+)/g)
4511 0 0 if $$outref =~ /System Name:\s+(.+)/g
4512 0 0 if $$outref =~ /System MAC:\s+(.+)/g
4518 0 0 if ($discDevice->{'stage'} < 18)
4521 0 0 unless $ok
4523 0 0 if ($$outref =~ /^\s+NVRamSize:/m)
4540 0 0 if (shift() & $self->{'debug'})
4544 0 0 if ($self->{$Package}{'DEBUGLOGFH'}) { }
4561 0 0 unless ($attrib->{'debugMsg'})
4562 0 0 $cmd->$#* ? :
4563 0 0 defined $pages ? :
4567 0 0 if $cmd->$#* and $cmdConfig
4568 0 0 if $cmd->$#*
4569 0 0 if $familyType eq $Prm{'ipanema'}
4578 0 0 if (defined $keyType) { }
4586 0 0 if ($actualPrompt)
4593 0 0 defined $MorePromptDelay{$keyType} ? :
4594 0 0 if defined $RefreshCommands{$keyType}
4603 0 0 if (defined $configContext) { }
4609 0 0 if ($self->{'LASTPROMPT'} =~ /$regex/)
4615 0 0 unless $match
4625 0 0 if (defined $Attribute{$family}) { }
4633 0 0 if (%attribList)
4646 0 0 if $self->{$Package}{'ATTRIBFLAG'}{'slots'}
4647 0 0 if $self->{$Package}{'ATTRIBFLAG'}{'ports'}
4650 0 0 if (defined $1 and !defined($currentSlot) || $1 != $currentSlot)
4652 0 0 unless grep {$_ eq $currentSlot;} @slots
4654 0 0 if (defined $currentSlot) { }
4655 0 0 unless grep {$_ eq lc $2;} @{$ports[$currentSlot];}
4658 0 0 unless grep {$_ eq lc $2;} @ports
4660 0 0 unless defined $1
4673 0 0 if $self->{$Package}{'ATTRIBFLAG'}{'slots'}
4674 0 0 if $self->{$Package}{'ATTRIBFLAG'}{'ports'}
4677 0 0 if (not defined $currentHash or $1 ne $currentHash)
4679 0 0 unless grep {$_ eq $currentHash;} @slots
4681 0 0 unless grep {$_ eq $2;} @{$ports{$currentHash};}
4696 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'}{'family_type'} eq $Prm{'isw'} or $self->{$Package}{'ATTRIB'}{'family_type'} eq $Prm{'iswMarv'}) { }
0 0 elsif ($self->{$Package}{'ATTRIB'}{'is_apls'}) { }
0 0 elsif ($self->{$Package}{'ATTRIB'}{'is_eos'}) { }
4738 0 0 if ($self->{$Package}{'ATTRIB'}{'family_type'} eq $Prm{'pers'})
4740 0 0 if ($model =~ /FabricEngine$/) { }
0 0 elsif ($self->{$Package}{'ATTRIB'}{'is_apls'} or $model =~ /^(?:VSP|XA)/ or $model =~ /VOSS$/) { }
4792 0 0 if ($attrib eq 'is_nncli' or $attrib eq 'is_acli') { }
4802 0 0 if (defined $value) { }
4816 0 0 unless $familyType = $self->{$Package}{'ATTRIB'}{'family_type'}
4817 0 0 if $familyType eq $Prm{'generic'}
4818 0 0 if ($$outref =~ /$ErrorPatterns{$familyType}/m) { }
4834 0 0 if (defined $self->baudrate and defined(my $origBaud = $self->{$Package}{'ORIGBAUDRATE'}))
4836 0 0 if ($familyType eq $Prm{'bstk'}) { }
0 0 elsif ($familyType eq $Prm{'pers'}) { }
4843 0 0 if ($self->{$Package}{'ATTRIB'}{'is_nncli'}) { }