Donate Share

Net::Telnet::Cisco::IOS

Tracker: Support Requests

5 getIntState and vlan - ID: 1702851
Last Update: Settings changed ( kraken1 )

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.


Kurt ( kurt_m ) - 2007-04-18 11:05

5

Closed

None

Nobody/Anonymous

None

None

Public


Comment ( 1 )




Date: 2007-06-05 15:25
Sender: kraken1Project Admin


Thanks for the input. Sorry for the delay in replying. Embarrassingly, I
don't check NTCI tickets often enough.

As you found, it's an easy fix. I'll put it in the next released version,
which is due out any day now.


Log in to comment.

Attached File

No Files Currently Attached

Changes ( 2 )

Field Old Value Date By
status_id Open 2007-06-05 15:25 kraken1
close_date - 2007-06-05 15:25 kraken1