The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

FusionInventory::Agent::Tools::Hardware - Hardware-related functions

DESCRIPTION

This module provides some hardware-related functions.

FUNCTIONS

getDeviceBaseInfo($snmp)

return a minimal set of information for a device through SNMP, according to a set of rules hardcoded in the agent.

getDeviceInfo($snmp, $dictionary)

return a limited set of information for a device through SNMP, according to a set of rules hardcoded in the agent and the usage of generic knowledge base, the dictionary.

getDeviceFullInfo(%params)

return a full set of information for a device through SNMP, according to a set of rules hardcoded in the agent and the usage of a device-specific set of mappings, the model.

setConnectedDevicesMacAddresses($description, $snmp, $model, $ports)

set mac addresses of connected devices.

  • description: device identification key

  • snmp: FusionInventory::Agent::SNMP object

  • model: SNMP model

  • ports: device ports list

setConnectedDevices($description, $snmp, $model, $ports)

Set connected devices using CDP if available, LLDP otherwise.

  • description: device identification key

  • snmp: FusionInventory::Agent::SNMP object

  • model: SNMP model

  • ports: device ports list

setTrunkPorts($description, $snmp, $model, $ports)

Set trunk flag on ports needing it.

  • description: device identification key

  • snmp: FusionInventory::Agent::SNMP object

  • model: SNMP model

  • ports: device ports list

performSpecificCleanup($description, $snmp, $model, $ports)

Perform device-specific miscaelanous cleanups

  • description: device identification key

  • snmp: FusionInventory::Agent::SNMP object

  • model: SNMP model

  • ports: device ports list

getCanonicalSerialNumber($value)

Return a canonical value for a serial number.

getCanonicalMacAddress($value)

Return a canonical value for a mac address.

getCanonicalMemory($value)

Return a canonical value for mac address, in bytes.

getElement($oid, $index)

return the $index element of an oid.

getElements($oid, $first, $last)

return all elements of index in range $first to $last of an oid.

loadModel($file)

Load an SNMP description model from given file.