SoftwarePacks Old¶
Old thoughts¶
2 options :- add a new field is_pack in glpi_softwares
- + : no need for new tables
- + : easy to migrate from pack to software
- - : mix 2 different objets (software & packs). MoYo : but for system it is a software including others softwares ?
- - : software table is already big, no need to add more data
- create a new object and his own tables
- - : add new tables
- - : difficult to migrate from pack to software
- + : manage packs. MoYo : also true with the other option
- + : document & infocom for packs. MoYo : also true with the other option
- + : can assign tickets to packs. MoYo : also true with the other option
Option 1¶
New object : SoftwarePack¶
Tables¶
Add a new table : and a new table (the same as for Softwares)
CREATE TABLE IF NOT EXISTS `glpi_softwarepacks` ( `id` int(11) NOT NULL AUTO_INCREMENT, `entities_id` int(11) NOT NULL DEFAULT '0', `is_recursive` tinyint(1) NOT NULL DEFAULT '0', `name` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `comment` text COLLATE utf8_unicode_ci, `locations_id` int(11) NOT NULL DEFAULT '0', `users_id_tech` int(11) NOT NULL DEFAULT '0', `is_update` tinyint(1) NOT NULL DEFAULT '0', // `softwares_id` int(11) NOT NULL DEFAULT '0', -- MoYo : update of a software or a pack ? `softwarepacks_id` int(11) NOT NULL DEFAULT '0', -- MoYo : update of a software or a pack ? `manufacturers_id` int(11) NOT NULL DEFAULT '0', `is_deleted` tinyint(1) NOT NULL DEFAULT '0', `is_template` tinyint(1) NOT NULL DEFAULT '0', `template_name` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `date_mod` datetime DEFAULT NULL, `notepad` longtext COLLATE utf8_unicode_ci, `users_id` int(11) NOT NULL DEFAULT '0', `groups_id` int(11) NOT NULL DEFAULT '0', `ticket_tco` decimal(20,4) DEFAULT '0.0000', `is_helpdesk_visible` tinyint(1) NOT NULL DEFAULT '1', `softwarecategories_id` int(11) NOT NULL DEFAULT '0', PRIMARY KEY (`id`), KEY `date_mod` (`date_mod`), KEY `name` (`name`), KEY `is_template` (`is_template`), KEY `is_update` (`is_update`), KEY `softwarecategories_id` (`softwarecategories_id`), KEY `entities_id` (`entities_id`), KEY `manufacturers_id` (`manufacturers_id`), KEY `groups_id` (`groups_id`), KEY `users_id` (`users_id`), KEY `locations_id` (`locations_id`), KEY `users_id_tech` (`users_id_tech`), KEY `softwares_id` (`softwares_id`), KEY `is_deleted` (`is_deleted`), KEY `is_helpdesk_visible` (`is_helpdesk_visible`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; CREATE TABLE IF NOT EXISTS `glpi_softwareversions` ( `id` int(11) NOT NULL AUTO_INCREMENT, `entities_id` int(11) NOT NULL DEFAULT '0', `is_recursive` tinyint(1) NOT NULL DEFAULT '0', `softwarepacks_id` int(11) NOT NULL DEFAULT '0', `states_id` int(11) NOT NULL DEFAULT '0', `name` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `comment` text COLLATE utf8_unicode_ci, `operatingsystems_id` int(11) NOT NULL, PRIMARY KEY (`id`), KEY `name` (`name`), KEY `softwarepacks_id` (`softwares_id`), KEY `states_id` (`states_id`), KEY `entities_id` (`entities_id`), KEY `is_recursive` (`is_recursive`), KEY `operatingsystems_id` (`operatingsystems_id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci ; CREATE TABLE IF NOT EXISTS `glpi_computers_softwarepackversions` ( `id` int(11) NOT NULL AUTO_INCREMENT, `computers_id` int(11) NOT NULL DEFAULT '0', `softwarepackversions_id` int(11) NOT NULL DEFAULT '0', PRIMARY KEY (`id`), UNIQUE KEY `unicity` (`computers_id`,`softwarepackversions_id`), KEY `softwarepackversions_id` (`softwareversions_id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci ; CREATE TABLE IF NOT EXISTS `glpi_softwarepacklicenses` ( `id` int(11) NOT NULL AUTO_INCREMENT, `softwarepacks_id` int(11) NOT NULL DEFAULT '0', `entities_id` int(11) NOT NULL DEFAULT '0', `is_recursive` tinyint(1) NOT NULL DEFAULT '0', `number` int(11) NOT NULL DEFAULT '0', `softwarelicensetypes_id` int(11) NOT NULL DEFAULT '0', `name` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `serial` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `otherserial` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `softwarepackversions_id_buy` int(11) NOT NULL DEFAULT '0', `softwarepackversions_id_use` int(11) NOT NULL DEFAULT '0', `expire` date DEFAULT NULL, `comment` text COLLATE utf8_unicode_ci, `date_mod` datetime DEFAULT NULL, PRIMARY KEY (`id`), KEY `name` (`name`), KEY `serial` (`serial`), KEY `otherserial` (`otherserial`), KEY `expire` (`expire`), KEY `softwarepackversions_id_buy` (`softwarepackversions_id_buy`), KEY `entities_id` (`entities_id`), KEY `softwarepacks_id` (`softwares_id`), KEY `softwareppacklicensetypes_id` (`softwarepacklicensetypes_id`), KEY `softwarepackversions_id_use` (`softwarepackversions_id_use`), KEY `date_mod` (`date_mod`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci ;
Right :¶
No need for a new right. Pack management is part of the software management feature.
Associated objets¶
Associate packs to :- infocoms
- documents
- notes
- tickets
Interface¶
Software packs management can be accessed through a button "Manage packs" in the softwares list.
It opens a new search engine, to browse/create/update/delete packs.
Pack management is manual, except for rules engine (see below).
- General tab : the same as for softwares (name, users, group, etc.) + installations
- Software detail tab : the list of softwares associated with the pack
- Rules : the rules whose action is associate to this pack
- new form above sofwares list to list softwares packs
Option 2¶
Tables¶
CREATE TABLE IF NOT EXISTS `glpi_softwares_softwares` ( `id` int(11) NOT NULL AUTO_INCREMENT, `softwarepacks_id` int(11) NOT NULL DEFAULT '0', `softwares_id` int(11) NOT NULL DEFAULT '0', PRIMARY KEY (`id`), KEY `unicity` (`softwarepacks_id`,`softwares_id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci ;
Common¶
Rules¶
Add a new rulesengine for softwares packs.Criterias : software name, software version, manufacturer
Action : assign to pack
When to play the rules ?
- computer creation
- software update or deletion
- request all softwares impacted by the rules (software + version)
- get all softwares for the computers that are impacted by the rules
- process rules and affect pack to computer is necessary
Cache : hard to do, I don't know how to do it (because the number of criterias is not fixed)