\PluginFusioninventoryCommunicationRest

Manage the communication in REST with the agents.

Summary

Methods
Properties
Constants
communicate()
getConfigByAgent()
getJobsByAgent()
sendOk()
sendError()
getMethodForParameters()
updateLog()
testRestURL()
handleFusionCommunication()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Methods

communicate()

communicate(array  $params = array()) : array|false

Manage communication between agent and server

Parameters

array $params

Returns

array|false —

array return jobs ready for the agent

getConfigByAgent()

getConfigByAgent(array  $params = array()) : array

Get configuration for an agent and for modules requested

Parameters

array $params

Returns

array

getJobsByAgent()

getJobsByAgent(array  $params = array()) : false

Get jobs for an agent TODO: This methods must be used inplace of other methods in order to mutualize code and to fully support FusionInventory REST API for every task's types -- kiniou

Parameters

array $params

Returns

false

sendOk()

sendOk() 

Send to the agent an OK code

sendError()

sendError() 

Send to the agent an error code when the request sent by the agent is invalid

getMethodForParameters()

getMethodForParameters(string  $task) : string

Generate the function name related to the module to get parameters

Parameters

string $task

Returns

string

updateLog()

updateLog(array  $params = array()) 

Update agent status for a taskjob

Parameters

array $params

testRestURL()

testRestURL(string  $url) : boolean

Test a given url

Parameters

string $url

Returns

boolean

handleFusionCommunication()

handleFusionCommunication() 

Manage REST parameters