[Fusioninventory-devel] libFusionInventory refactoring

Gonéri Le Bouder goneri at rulezlan.org
Fri Jan 21 17:04:00 UTC 2011


Hi,

The libFusionInventory (libFusInv) goal is to provide a basic and easy to
use FusionInventory server (inventory only) for PHP application.

During the last weeks, I've spent some time to do some code refactoring. I
tried to simplify the way we initialize the lib and did some code clean up:
 - the logger call are more simple and is just a wrapper one top for
error_log. I don't know for the moment if it makes sens to just call
error_log.
 - DataFilter.class.php had been remove and is merged within
StorageInventory.class.php
 - I fixed a lot of warnings
 - we use PDO exception to catch error
 - I started to write a very limited test-suite but this is something very
import to do and I hope we will devote more time in the future on this

This branch is called "filter-clean". It will be merge in master once the
FusionInventory for GLPI will get frozen. Hopefully, in the coming week.
https://github.com/fusinv/libfusioninventory-server-php/tree/filter-clean

For those who code on the libFusInv, i will be thankfulness if you take the
time to port your changes on this new branch.

We plan to use this branch to add remote VirtualMachine inventory (e.g:
ESX/libvirt) and the new remote command execution module (Run command) for
Uranos (http://uranos.sourceforge.net).

Changes overview.
 Classes/Storage/Inventory/DataFilter.class.php                  |  163
 Classes/Storage/Inventory/MySQLStorageInventory.class.php       |  689
 b/.gitignore                                                    |    2
 b/Classes/Action/InventoryAction.class.php                      |  105
 b/Classes/Action/PingAction.class.php                           |    7
 b/Classes/FusionLibServer.class.php                             |   25
 b/Classes/Logger.class.php                                      |  111
 b/Classes/LoggerTest.php                                        |   20
 b/Classes/MyException.class.php                                 |    2
 b/Classes/Storage/Inventory/DirectoryStorageInventory.class.php |  132
 b/Classes/Storage/Inventory/DirectoryStorageInventoryTest.php   |   42
 b/Classes/Storage/Inventory/MysqlStorageInventory.class.php     |  730
 b/Classes/Storage/Inventory/StorageInventory.class.php          |    8
 b/README                                                        |    3
 b/resource/tosh-r630-2011-01-11-20-57-54.ocs                    |14825
++++++++++
 b/user/applications/MyWebSite/FusInvHooks.class.php             |   23
 b/user/applications/MyWebSite/index.php                         |   31
 b/user/configs.ini                                              |   35
 b/user/index.php                                                |   11
 data/infos                                                      |    5
 20 files changed, 15943 insertions(+), 1026 deletions(-)

Best regards,
-- 
     Gonéri Le Bouder
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/fusioninventory-devel/attachments/20110121/09dd3940/attachment.htm>


More information about the Fusioninventory-devel mailing list