[Fusioninventory-devel] FusionInventory cooperation
Mario Gzuk
mariogzuk at technikz.de
Wed Feb 17 10:54:57 UTC 2010
Hi Gonéri.
@this time I am able to read in the data send by the client:
ocsinventory-agent -f gives me the complete xml data on the server side.
But when I answer to the prolog (ocsinventory-agent without -f) in
compressed state:
<INVENTORY>SEND</INVENTORY>
I got the following error message:
Can't use string ("SEND") as a HASH ref while "strict refs" in use at
/usr/local/share/perl/5.8.8/Ocsinventory/Agent/XML/Response/Prolog.pm
line 51.
If I comment out the "use strict" in Prolog.pm I got this debug messages:
[debug] =BEGIN=SERVER RET======
[debug] $VAR1 = '<?xml version="1.0" encoding="UTF-8"?>
<INVENTORY>SEND</INVENTORY>';
[debug] =END=SERVER RET======
[debug] Calling handlers : `prolog_reader'
[info] Don't send the inventory
[debug] Calling handlers : `end_handler'
Is the answer from the server in a wrong format? Can you point me where
to find the error?
Thank you for your help!
greetings mario
Gonéri Le Bouder schrieb:
> 2010/2/15 Mario Gzuk <mariogzuk at technikz.de>:
>> Hi Gonéri.
>>
>>> Can you give a better description of what the agent do and how you want
>>> the
>>> information exchange to be done.
>>> Do you know if you need architecture changes in the 2.x branch of the
>>> agent
>>> for achieve that?
>> It should be possible to run the agent in 2 modes. One is that the agent
>> send the data in xml direct to a specified URL to a server (maybe also
>> whith authentification support).
> This is how OCS protocol works so it's probably easy to implement.
>
>> The second one is that it should be
>> possible to store the files in a share (local,cifs,nfs,webdav or [s]ftp)
>> so that a scheduled process on the server side reads in the changed
>> files/data.
> Maybe it's possible to use OCS software deployment for that? The
> FusionInventory 2.x implementation can support P2P to speed up data
> deployment.
>
>> Can you point me to the docs/code where I can see the formats and the
>> xml structure of the agent? In which way the data is send to the server
>> - via HTTP[S] PUT or an other way? What do the server part needs to
>> handle the incoming data?
> There is no documentation yet. Agent and server use XML to exchange
> informations. Those files are submitted throught HTTP POST.
>
> 1 The agent request job:
> 1a) The agent contact the server with some information like its
> DEVICEID. This is called the PROLOG.
> 1b) The server anwser and give order like "do me an inventory"
> (<INVENTORY>SEND</INVENTORY>)
>
> 2The agent submit job result:
> 2a) The agent submit an XML to the server
> 2b) Depending on the struct of the XML, the agent will correctly process it.
>
> You can run these steps when you want.
>
> I suggest you to grab the agent and edit
> lib/{Ocsinventory,FusionInventory}/Agent/Network.pm to add print
> messages.
> For example, in send function:
> print "send():\n"
> print $message->getContent()."\n";
>
> Best regards,
More information about the Fusioninventory-devel
mailing list