\PluginFusioninventoryInventoryComputerLib

Manage the update / add information of computer inventory into GLPI database.

Summary

Methods
Properties
Constants
__construct()
updateComputer()
manageNetworkPort()
addProcessor()
addMemory()
addHardDisk()
addDrive()
addGraphicCard()
addNetworkCard()
addSoundCard()
addControl()
loadSoftwares()
loadSoftwareVersions()
addSoftware()
addSoftwareVersion()
addSoftwareVersionsComputer()
addSoftwareVersionComputer()
arrayDiffEmulation()
addPrepareLog()
addLog()
setDynamicLinkItems()
$table
$softList
$softVersionList
$log_add
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Properties

$table

$table : string

Define the name of the table

Type

string

$softList

$softList : array

Initialize the list of software

Type

array

$softVersionList

$softVersionList : array

Initialize the list of software versions

Type

array

$log_add

$log_add : array

Initilize the list of logs to add in the database

Type

array

Methods

__construct()

__construct() 

__contruct function where initialize many variables

updateComputer()

updateComputer(array  $a_computerinventory, integer  $computers_id, boolean  $no_history, integer  $setdynamic) 

Update computer data

Parameters

array $a_computerinventory

all data from the agent

integer $computers_id

id of the computer

boolean $no_history

set true if not want history

integer $setdynamic

manageNetworkPort()

manageNetworkPort(array  $inventory_networkports, integer  $computers_id, boolean  $no_history) 

Manage network ports

Parameters

array $inventory_networkports
integer $computers_id
boolean $no_history

addProcessor()

addProcessor(array  $data, integer  $computers_id, boolean  $no_history) 

Add a new processor component

Parameters

array $data
integer $computers_id
boolean $no_history

addMemory()

addMemory(array  $data, integer  $computers_id, boolean  $no_history) 

Add a new memory component

Parameters

array $data
integer $computers_id
boolean $no_history

addHardDisk()

addHardDisk(array  $data, integer  $computers_id, boolean  $no_history) 

Add a new hard disk component

Parameters

array $data
integer $computers_id
boolean $no_history

addDrive()

addDrive(array  $data, integer  $computers_id, boolean  $no_history) 

Add a new drive component

Parameters

array $data
integer $computers_id
boolean $no_history

addGraphicCard()

addGraphicCard(array  $data, integer  $computers_id, boolean  $no_history) 

Add a new graphic card component

Parameters

array $data
integer $computers_id
boolean $no_history

addNetworkCard()

addNetworkCard(array  $data, integer  $computers_id, boolean  $no_history) 

Add a new network card component

Parameters

array $data
integer $computers_id
boolean $no_history

addSoundCard()

addSoundCard(array  $data, integer  $computers_id, boolean  $no_history) 

Add a new sound card component

Parameters

array $data
integer $computers_id
boolean $no_history

addControl()

addControl(array  $data, integer  $computers_id, boolean  $no_history) 

Add a new controller component

Parameters

array $data
integer $computers_id
boolean $no_history

loadSoftwares()

loadSoftwares(integer  $entities_id, array  $a_soft, integer  $lastid) : integer

Load software from DB are in the incomming inventory

Parameters

integer $entities_id

entitity id

array $a_soft

list of software from the agent inventory

integer $lastid

last id search to not search from beginning

Returns

integer —

last software id

loadSoftwareVersions()

loadSoftwareVersions(integer  $entities_id, array  $a_softVersion, integer  $lastid) : integer

Load software versions from DB are in the incomming inventory

Parameters

integer $entities_id

entitity id

array $a_softVersion

list of software versions from the agent inventory

integer $lastid

last id search to not search from beginning

Returns

integer —

last software version id

addSoftware()

addSoftware(array  $a_software, array  $options) 

Add a new software

Parameters

array $a_software
array $options

addSoftwareVersion()

addSoftwareVersion(array  $a_software, integer  $softwares_id) 

Add a software version

Parameters

array $a_software
integer $softwares_id

addSoftwareVersionsComputer()

addSoftwareVersionsComputer(array  $a_input) 

Link software versions with the computer

Parameters

array $a_input

addSoftwareVersionComputer()

addSoftwareVersionComputer(array  $a_software, integer  $computers_id, boolean  $no_history, array  $options) 

Link software version with the computer

Parameters

array $a_software
integer $computers_id
boolean $no_history
array $options

arrayDiffEmulation()

arrayDiffEmulation(array  $arrayFrom, array  $arrayAgainst) : array

Arraydiff function to have real diff between 2 arrays

Parameters

array $arrayFrom
array $arrayAgainst

Returns

array

addPrepareLog()

addPrepareLog(integer  $items_id, string  $itemtype, string  $itemtype_link = '', array  $changes = array('0', '', ''), integer  $linked_action = \Log::HISTORY_CREATE_ITEM) 

Prepare add history in database

Parameters

integer $items_id
string $itemtype
string $itemtype_link
array $changes
integer $linked_action

addLog()

addLog() 

Insert logs are in queue

setDynamicLinkItems()

setDynamicLinkItems(integer  $computers_id) 

Define items link to computer in dynamic mode

Parameters

integer $computers_id