The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Net::Telnet::Brcd - Contact BROCADE switch with TELNET

SYNOPSIS

    use Net::Telnet::Brcd;
    
    my $sw = new Net::Telnet::Brcd;
    
    $sw->connect($sw_name,$user,$pass) or die "\n";
    
    %wwn_port = $sw->switchShow(-bywwn=>1);
    my @lines = $sw->cmd("configShow");

DESCRIPTION

This library part is the implementation of BROCADE command with TELNET. The general DOCUMENTATION could be read in Net::Brcd(3) module.

How to implement interface for a specific network PROTOCOL

Youre parent module is Net::Brcd.

    use base qw(Net::Brcd Exporter ...);

You have to code the methods :

$obj = Net::<Proto>::Brcd->new();
    sub new {
        my ($class)=shift;

        my $self  = $class->SUPER::new();
        bless $self, $class;
        return $self;
    }

This method is a relay to the new function of Net::Brcd.

$ok_no_ok = $obj->proto_connect($ip_switch, $user, $pass);

This method is used in the connect function of Net::Brcd. You could store youre specific parameter in object $obj->{PROTO}.

@res = $obj->cmd($cmd);

Execute $cmd and return res as ARRAY without \r\n. The command have to send automatically the command continue (space character) and answer yes for question to be silent as possible.

$obj->sendcmd($cmd);

Execute $cmd without wait for response.

$obj->sendeof();

Stop current command.

$obj->readline();

Read line by line the answer. Return undef for the last line.

SEE ALSO

Brocade Documentation, BrcdAPI, Net::Telnet(3), Net::Brcd(3).

BUGS

...

AUTHOR

Laurent Bendavid, <lbendavid@cpan.org>

COPYRIGHT AND LICENSE

Copyright (C) 2005 by Laurent Bendavid

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.3 or, at your option, any later version of Perl 5 you may have available.

Version

1.12

History

Created 6/27/2005, Modified 7/3/10 22:04:20