[Fusioninventory-devel] Adding power devices support to Fusion Inventory
Guillaume Rousse
guillomovitch at gmail.com
Tue Nov 15 15:14:41 UTC 2011
Le 15/11/2011 15:30, Arnaud Quette a écrit :
> So, would you be interested in working with me on this topic?
> How can we proceed?
> Which kind of integration would be best, ie providing a formated files,
> or using languages binding or program calls?
Hellp Arnaud.
This is quite interesting idea. Especially if you're willing to provide
the code directly :P
The first point is to determine how to extract UPS informations. In
fusioninventory, they are currently two different ways for this:
- local devices are managed in local inventory task, using whatever
command/tool available
- remote devices (thoses with an IP adress, basically) are managed in
net inventory task, using only SNMP currently
Some kind of devices, such as printers, can belong to both categories:
small ones are locally controlled on a specific host, while larger ones
are autonomous. I guess UPS are quite similar in this regard, some of
them being attached by an USB link to a controller host, others having
their own network device, right ?
In this case, UPS support would mean two additional pieces of code.
Local inventory support is just a matter of adding a new additional
inventory module, in perl, for the local inventory task. There is also a
new section definition to add to the inventory data structure, but
that's trivial to do.
Remote inventory support is a bit more complex. First, we need an SNMP
description model (just a mapping of OIDs against specific known
properties), but as currently this task only manage printers and network
devices, we also need to define those properties, and add explicit
support in the task code itself.
So, the easiest way to start would be the local support. Have a look at
the generic local printer module, in the 2.2.x branch, it should give
you some idea on how to proceed:
https://github.com/fusinv/fusioninventory-agent/blob/2.2.x/lib/FusionInventory/Agent/Task/Inventory/Input/Generic/Printers.pm
Of course, feel free to ask if I'm not clear enough.
--
BOFH excuse #258:
That's easy to fix, but I can't be bothered.
More information about the Fusioninventory-devel
mailing list