NAME

FusionInventory::Agent::Inventory - Inventory data structure

DESCRIPTION

This is a data structure corresponding to an hardware and software inventory.

METHODS

new(%params)

The constructor. The following parameters are allowed, as keys of the %params hash:

logger

a logger object

statedir

a path to a writable directory containing the last serialized inventory

tag

an arbitrary label, used for server-side filtering

getContent()

Get content attribute.

mergeContent($content)

Merge content to the inventory.

addEntry(%params)

Add a new entry to the inventory. The following parameters are allowed, as keys of the %params hash:

section

the entry section (mandatory)

entry

the entry (mandatory)

noDuplicated

ignore entry if already present

setTag($tag)

Set inventory tag, an arbitrary label used for filtering on server side.

setHardware()

Save global information regarding the machine.

setOperatingSystem()

Operating System information.

setBios()

Set BIOS information.

setAccessLog()

What is that for? :)

computeChecksum()

Compute the inventory checksum. This information is used by the server to know which parts of the inventory have changed since the last one.

computeLegacyValues()

Compute the inventory global values, meaning values in hardware section such as CPU number, speed and model, computed from other values, but needed for OCS compatibility.

saveLastState()

At the end of the process IF the inventory was saved correctly, the last_state is saved.