Kevin Ehlers > Net-Autoconfig-v1.13.2 > Net::Autoconfig::Device::HP

Download:
Net-Autoconfig/Net-Autoconfig-v1.13.2.tar.gz

Dependencies

Annotate this POD

CPAN RT

New  1
Open  0
View/Report Bugs
Module Version: 1.2.2   Source  

NAME ^

Net::Autoconfig::Device::HP - Perl extension for provisioning or reconfiguring network devices.

SYNOPSIS ^

  use Net::Autoconfig::Device::HP;

  my %data = (
               hostname        => dev1,
               username        => user1,
               password        => pass1,
               enable_password => enable1,
               snmp_version    => '2c',
               snmp_community  => 'public',
            );
  my $device = Net::Autoconfig::Device::HP->new(%data);

  $device->connect();
  $device->get_admin_rights();
  $device->disable_paging();
  $device->discover_dev_type();          # always returns Net::Autoconfig::Device::HP
  $device->configure($config_template);  # see Net::Autoconfig::Template

DESCRIPTION ^

This essentially only overloads the expect commands and handles some of the idiosycrasies of HP devices regarding login, paging, etc.

For more information, see Net::Autoconfig::Device.

Overloaded Methods ^

All commands from Net::Autoconfig::Device are inhereted by this module. Some of the default Net::Autoconfig::Device commands are overloaded.

new()

Create a new Net::Autoconfig::Device::HP object. Additional info can be configured after the object has been created. Pass an array with ( key1 => value1, key2 => value2, ...) to initialize the object with those key values.

connect()

Connect to the device using the specified method, username and password

Returns: Success = undef Failure = reason why it failed (aka true)

discover_dev_type()

Returns the class of the ojbect. Useful if you want to know the specific module/class of this device.

get_admin_rights()

Gain administrative rights on this device using the specified password/credentials. In the case of HP devices, this uses the enable command. If admin access is already granted, this keeps it the same.

Returns: Success = undef Failure = reason why it failed (aka true)

disable_paging()

Disable paging on the terminal. I.e. make it so the switch doesn't prompt to see the next screen of output. It just writes it all to the screen.

In case you wanted to know, the HP command for doing this is terminal length 1000

Returns: Success = undef Failure = reason why it failed (aka true)

SEE ALSO ^

Net::Autoconfig, Net::Autoconfig::Device, and Net::Autoconfig::Template

AUTHOR ^

Kevin Ehlers <kevin@uoregon.edu>

COPYRIGHT AND LICENSE ^

Copyright (C) 2008 by Kevin Ehlers, University of Oregon. All rights reserved.

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.8 or, at your option, any later version of Perl 5 you may have available.

DISCLAIMER OF WARRENTY ^

THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.

syntax highlighting: