Net::Autoconfig::Device::HP - Perl extension for provisioning or reconfiguring network devices.
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
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.
All commands from Net::Autoconfig::Device are inhereted by this module. Some of the default Net::Autoconfig::Device commands are overloaded.
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 to the device using the specified method, username and password
Returns: Success = undef Failure = reason why it failed (aka true)
Returns the class of the ojbect. Useful if you want to know the specific module/class of this device.
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.
enable
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
terminal length 1000
Net::Autoconfig, Net::Autoconfig::Device, and Net::Autoconfig::Template
Kevin Ehlers <kevin@uoregon.edu>
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.
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.
1 POD Error
The following errors were encountered while parsing the POD:
Non-ASCII character seen before =encoding in '“AS'. Assuming UTF-8
To install Net::Autoconfig, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Net::Autoconfig
CPAN shell
perl -MCPAN -e shell install Net::Autoconfig
For more information on module installation, please visit the detailed CPAN module installation guide.