Hi
today I tried the example of the methods list:
...
my $int = "vlan1";
%state = $conn->getIntState( $int );
print "Interface $int has a port state of $state{ 'port' }.\n";
print "It also has a protocol state of $state{ 'lineprotocol' }.\n";
This gives the messages:
Use of uninitialized value in concatenation (.) or string at telnetIOS.pl
line 23.
Interface vlan1 has a port state of .
Use of uninitialized value in concatenation (.) or string at telnetIOS.pl
line 24.
It also has a protocol state of .
It seems to me that the &harmonizeInts changes the input to VLAN1 which is
compared to the output of a switch:
#sho int vlan1
Vlan1 is up, line protocol is up
Hardware is EtherSVI, ....
Because VLAN1 is not Vlan1 there is no match.
For a test I modified in IOS.pm , sub getIntState the line
if ( $line =~ /$if is (.+), line protocol is (.+) / ) {
to
if ( $line =~ /$if is (.+), line protocol is (.+) /i ) { # Do
case-insensitive pattern matching
That seems to work in this case.
Nobody/Anonymous
None
None
Public
|
Date: 2007-06-05 15:25
|
| Field | Old Value | Date | By |
|---|---|---|---|
| status_id | Open | 2007-06-05 15:25 | kraken1 |
| close_date | - | 2007-06-05 15:25 | kraken1 |