NAME
PDK::Device::Concern::Netdisco - A module for parallel network topology discovery and interface description correction
SYNOPSIS
use PDK::Device::Concern::Netdisco;
my $netdisco = PDK::Device::Concern::Netdisco->new();
my $devices = [
{ name => 'switch1', ip => '192.168.1.1', os => 'H3C' },
{ name => 'router1', ip => '192.168.1.2', os => 'Cisco' },
];
$netdisco->exploreTopologyJob($devices);
DESCRIPTION
PDK::Device::Concern::Netdisco is a Moose-based module that provides functionality for parallel network topology discovery and interface description correction. It supports multiple devices and can handle different device types such as H3C and Cisco.
ATTRIBUTES
- queue
-
Number of concurrent tasks. Defaults to 10 or the value of PDK_DEVICE_NETDISCO_QUEUE environment variable.
- workdir
-
Working directory for logs and output files. Defaults to PDK_DEVICE_NETDISCO_HOME environment variable or user's home directory.
- debug
-
Debug level. Defaults to 0 or the value of PDK_DEVICE_NETDISCO_DEBUG environment variable.
- result
-
Stores the results of operations, including success and failure records.
METHODS
- exploreTopologyJob($devices)
-
Executes topology discovery tasks for multiple devices in parallel.
- startExploreTopology($device)
-
Performs topology discovery for a single device and records the result.
- exploreTopology($param)
-
Executes the topology discovery operation for a single device.
- explore_h3c($device)
-
Explores topology for H3C devices.
- explore_cisco($device)
-
Explores topology for Cisco devices.
- dump($msg)
-
Outputs debug information based on the current debug level.
ENVIRONMENT VARIABLES
- PDK_DEVICE_NETDISCO_QUEUE
-
Sets the number of concurrent tasks.
- PDK_DEVICE_NETDISCO_HOME
-
Sets the working directory for logs and output files.
- PDK_DEVICE_NETDISCO_DEBUG
-
Sets the debug level.
DEPENDENCIES
This module requires the following Perl modules:
AUTHOR
WENWU YAN <968828@gmail.com>
LICENSE AND COPYRIGHT
Copyright (C) 2024 WENWU YAN
This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.