MultiGLPi Specifications

Dependancies

This plugin will needs the following softwares to work :
  • GLPI 0.80 and higher
  • WebServices plugin version 1.1.0 and higher

Uses cases

  • Unidirectionnal synchronization between one central and several local GLPI
  • Bidirectionnal synchronization between or more GLPI

For each source GLPI, it'll be possible to choose with items to synchronize.

Synchronization protocol

It'll be possible to choose which protocol to use :
  • SOAP
  • XML-RPC
  • REST

Workflow

Tables

GLPI items

list of GLPI items to synchronise for each slave server

DROP TABLE IF EXISTS `glpi_plugin_multiglpi_items`;
CREATE TABLE IF NOT EXISTS `glpi_plugin_multiglpi_items` (
  `id` int(11) NOT NULL auto_increment,
  `item` varchar(255) collate utf8_unicode_ci default NULL,
  `type` ENUM('core','plugin') NOT NULL default 'core',
  `is_active` TINYINT NOT NULL default '0', //Activate or not this slave
  `multiglpi_servers_id` TINYINT NOT NULL default '1',
   PRIMARY KEY  (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

Slave GLPI servers

DROP TABLE IF EXISTS `glpi_plugin_multiglpi_servers`;
CREATE TABLE IF NOT EXISTS `glpi_plugin_multiglpi_servers` (
  `id` int(11) NOT NULL auto_increment,
  `name` varchar(255) collate utf8_unicode_ci default NULL,
  `host` varchar(255) collate utf8_unicode_ci default NULL,
  `url` varchar(255) collate utf8_unicode_ci default NULL,
  `ws_user` varchar(50) collate utf8_unicode_ci default NULL,
  `ws_pass` varchar(50) collate utf8_unicode_ci default NULL,
  `glpi_user` varchar(50) collate utf8_unicode_ci default NULL,
  `glpi_pass` varchar(50) collate utf8_unicode_ci default NULL,
  `is_active` TINYINT NOT NULL default '0', //Activate or not this slave
  `protocols_id` TINYINT NOT NULL default '1',
  `entities_id_base` TINYINT NOT NULL default '0', //Source entity ID
  `is_deflate` TINYINT NOT NULL default '0',
  `session` varchar(255) collate utf8_unicode_ci default NULL,  
  `comment` text collate utf8_unicode_ci,
   PRIMARY KEY  (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

Changelog table

This table logs all changes in the local GLPI. Will be used by a remote GLPI to get changes since last synchronization.

DROP TABLE IF EXISTS `glpi_plugin_multiglpi_logs`;
CREATE TABLE IF NOT EXISTS `glpi_plugin_multiglpi_logs` (
     `id` int(11) NOT NULL auto_increment,
     `items_id` int(11) NOT NULL auto_increment,
     `itemtype` varchar(50) collate utf8_unicode_ci default NULL,
     `change_type` varchar(50) collate utf8_unicode_ci default NULL, //[add|update|delete|purge]
     `change_date` datetime NOT NULL,
   PRIMARY KEY  (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

Links table

This table link an unique object in the source and remote GLPI

DROP TABLE IF EXISTS `glpi_plugin_multiglpi_links`;
CREATE TABLE IF NOT EXISTS `glpi_plugin_multiglpi_links` (
     `id` int(11) NOT NULL auto_increment,    
     `masters_id` int(11) NOT NULL auto_increment, //ID in the master GLPI
     `slaves_id` int(11) NOT NULL auto_increment, //ID in the slave GLPI
     `itemtype` varchar(50) collate utf8_unicode_ci default NULL, //Object's itemtype
   PRIMARY KEY  (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;