Control-CLI-AvayaData
view release on metacpan or search on metacpan
lib/Control/CLI/AvayaData.pm view on Meta::CPAN
Host => $host,
[Port => $port,]
[Username => $username,]
[Password => $password,]
[Prompt_credentials => $flag,]
[Timeout => $secs,]
[Connection_timeout => $secs,]
[Read_attempts => $numberOfLoginReadAttemps,]
[Data_with_error => $flag,]
[Wake_console => $string,]
[Blocking => $flag,]
[Errmode => $errmode,]
[Terminal_type => $string,]
[Window_size => [$width, $height],]
[Atomic_connect => $flag,]
);
If not specified, the default port number for Telnet is 23. The wake_console argument is only relevant when connecting to a Telnet port other than 23 (i.e. to a Terminal Server device) or if console() has been manually set; see console(). In which ca...
=item *
For SSH, these arguments are used:
$ok = $obj->connect("$host[ $port]");
$ok = $obj->connect(
Host => $host,
[Port => $port,]
[Username => $username,]
[Password => $password,]
[PublicKey => $publicKey,]
[PrivateKey => $privateKey,]
[Passphrase => $passphrase,]
[Prompt_credentials => $flag,]
[Timeout => $secs,]
[Connection_timeout => $secs,]
[Read_attempts => $numberOfLoginReadAttemps,]
[Data_with_error => $flag,]
[Wake_console => $string,]
[Blocking => $flag,]
[Errmode => $errmode,]
[Terminal_type => $string,]
[Window_size => [$width, $height],]
[Callback => \&codeRef,]
[Atomic_connect => $flag,]
);
If not specified, the default port number for SSH is 22. The wake_console argument is only relevant when connecting to a SSH port other than 22 (i.e. to a Terminal Server device) or if console() has been manually set; see console(). In which case, th...
A username must always be provided for all SSH connections. If not provided and prompt_credentials is true then this method will prompt for it.
Once the SSH conection is established, this method will attempt one of two possible authentication types, based on the accepted authentications of the remote host:
=over 4
=item *
B<Publickey authentication> : If the remote host accepts it and the method was supplied with public/private keys. The public/private keys need to be in OpenSSH format. If the private key is protected by a passphrase then this must also be provided or...
=item *
B<Password authentication> : If the remote host accepts either 'password' or 'keyboard-interactive' authentication methods. A password must be provided or, if prompt_credentials is true, this method will prompt for the password. If password authentic...
=back
=item *
For Serial port, these arguments are used:
$ok = $obj->connect(
[BaudRate => $baudRate,]
[ForceBaud => $flag,]
[Parity => $parity,]
[DataBits => $dataBits,]
[StopBits => $stopBits,]
[Handshake => $handshake,]
[Username => $username,]
[Password => $password,]
[Prompt_credentials => $flag,]
[Timeout => $secs,]
[Read_attempts => $numberOfLoginReadAttemps,]
[Data_with_error => $flag,]
[Wake_console => $string,]
[Blocking => $flag,]
[Errmode => $errmode,]
);
If arguments "baudrate", "parity", "databits", "stopbits" and "handshake" are not specified, the defaults are: Baud Rate = 9600, Data Bits = 8, Parity = none, Stop Bits = 1, Handshake = none. These default values will work on all Avaya Networking pro...
Allowed values for these arguments are the same allowed by Control::CLI::connect().
On Windows systems the underlying Win32::SerialPort module can have issues with some serial ports, and fail to set the desired baudrate (see bug report https://rt.cpan.org/Ticket/Display.html?id=120068); if hitting that problem (and no official Win32...
For a serial connection, this method - or to be precise the login() method which is called by connect() - will automatically send the wake_console string sequence to the attached device to alert it of the connection. The default sequence will work ac...
=back
If using the connect() method in non-blocking mode, the following example illustrates how this works:
$ok = $obj->connect(Host => $ip-address, Blocking => 0);
until ($ok) { # This loop will be executed while $ok = 0
<do other stuff here..>
$ok = $obj->connect_poll;
}
Or, if you have set an error mode action of 'return':
$ok = $obj->connect(Host => $ip-address, Blocking => 0, Errmode => 'return');
die $obj->errmsg unless defined $ok; # Error connecting
until ($ok) { # This loop will be executed while $ok = 0
<do other stuff here..>
$ok = $obj->connect_poll;
die $obj->errmsg unless defined $ok; # Error or timeout connecting
}
=item B<login() & login_poll()> - handle login for Telnet / Serial port; also set the host CLI prompt
( run in 0.872 second using v1.01-cache-2.11-cpan-39bf76dae61 )