mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-25 19:48:49 +02:00
# Conflicts: # approot.inc.php # css/css-variables.scss # datamodels/2.x/authent-cas/module.authent-cas.php # datamodels/2.x/authent-external/module.authent-external.php # datamodels/2.x/authent-ldap/module.authent-ldap.php # datamodels/2.x/authent-local/module.authent-local.php # datamodels/2.x/combodo-db-tools/module.combodo-db-tools.php # datamodels/2.x/itop-attachments/module.itop-attachments.php # datamodels/2.x/itop-backup/module.itop-backup.php # datamodels/2.x/itop-bridge-virtualization-storage/module.itop-bridge-virtualization-storage.php # datamodels/2.x/itop-change-mgmt-itil/module.itop-change-mgmt-itil.php # datamodels/2.x/itop-change-mgmt/module.itop-change-mgmt.php # datamodels/2.x/itop-config-mgmt/module.itop-config-mgmt.php # datamodels/2.x/itop-config/module.itop-config.php # datamodels/2.x/itop-core-update/module.itop-core-update.php # datamodels/2.x/itop-datacenter-mgmt/module.itop-datacenter-mgmt.php # datamodels/2.x/itop-endusers-devices/module.itop-endusers-devices.php # datamodels/2.x/itop-files-information/module.itop-files-information.php # datamodels/2.x/itop-full-itil/module.itop-full-itil.php # datamodels/2.x/itop-hub-connector/module.itop-hub-connector.php # datamodels/2.x/itop-incident-mgmt-itil/module.itop-incident-mgmt-itil.php # datamodels/2.x/itop-knownerror-mgmt/module.itop-knownerror-mgmt.php # datamodels/2.x/itop-oauth-client/module.itop-oauth-client.php # datamodels/2.x/itop-portal-base/module.itop-portal-base.php # datamodels/2.x/itop-portal/module.itop-portal.php # datamodels/2.x/itop-problem-mgmt/module.itop-problem-mgmt.php # datamodels/2.x/itop-profiles-itil/module.itop-profiles-itil.php # datamodels/2.x/itop-request-mgmt-itil/module.itop-request-mgmt-itil.php # datamodels/2.x/itop-request-mgmt/module.itop-request-mgmt.php # datamodels/2.x/itop-service-mgmt-provider/module.itop-service-mgmt-provider.php # datamodels/2.x/itop-service-mgmt/module.itop-service-mgmt.php # datamodels/2.x/itop-sla-computation/module.itop-sla-computation.php # datamodels/2.x/itop-storage-mgmt/module.itop-storage-mgmt.php # datamodels/2.x/itop-tickets/module.itop-tickets.php # datamodels/2.x/itop-virtualization-mgmt/module.itop-virtualization-mgmt.php # datamodels/2.x/itop-welcome-itil/module.itop-welcome-itil.php # datamodels/2.x/version.xml
111 lines
3.4 KiB
PHP
Executable File
111 lines
3.4 KiB
PHP
Executable File
<?php
|
|
|
|
|
|
SetupWebPage::AddModule(
|
|
__FILE__, // Path to the current file, all other file names are relative to the directory containing this file
|
|
'itop-config-mgmt/2.7.7',
|
|
array(
|
|
// Identification
|
|
//
|
|
'label' => 'Configuration Management (CMDB)',
|
|
'category' => 'business',
|
|
|
|
// Setup
|
|
//
|
|
'dependencies' => array(
|
|
'itop-structure/2.7.1',
|
|
),
|
|
'mandatory' => false,
|
|
'visible' => true,
|
|
'installer' => 'ConfigMgmtInstaller',
|
|
|
|
// Components
|
|
//
|
|
'datamodel' => array(
|
|
'model.itop-config-mgmt.php',
|
|
'main.itop-config-mgmt.php',
|
|
),
|
|
'data.struct' => array(
|
|
),
|
|
'data.sample' => array(
|
|
'data.sample.brand.xml',
|
|
'data.sample.model.xml',
|
|
'data.sample.osfamily.xml',
|
|
'data.sample.osversion.xml',
|
|
'data.sample.networkdevicetype.xml',
|
|
'data.sample.servers.xml',
|
|
'data.sample.nw-devices.xml',
|
|
'data.sample.software.xml',
|
|
'data.sample.dbserver.xml',
|
|
'data.sample.dbschema.xml',
|
|
'data.sample.webserver.xml',
|
|
'data.sample.webapp.xml',
|
|
'data.sample.applications.xml',
|
|
'data.sample.applicationsolutionci.xml',
|
|
|
|
),
|
|
|
|
// Documentation
|
|
//
|
|
'doc.manual_setup' => '',
|
|
'doc.more_information' => '',
|
|
|
|
// Default settings
|
|
//
|
|
'settings' => array(
|
|
),
|
|
)
|
|
);
|
|
|
|
if (!class_exists('ConfigMgmtInstaller'))
|
|
{
|
|
// Module installation handler
|
|
//
|
|
class ConfigMgmtInstaller extends ModuleInstallerAPI
|
|
{
|
|
public static function BeforeWritingConfig(Config $oConfiguration)
|
|
{
|
|
// If you want to override/force some configuration values, do it here
|
|
return $oConfiguration;
|
|
}
|
|
|
|
/**
|
|
* Handler called before creating or upgrading the database schema
|
|
* @param $oConfiguration Config The new configuration of the application
|
|
* @param $sPreviousVersion string PRevious version number of the module (empty string in case of first install)
|
|
* @param $sCurrentVersion string Current version number of the module
|
|
*/
|
|
public static function BeforeDatabaseCreation(Config $oConfiguration, $sPreviousVersion, $sCurrentVersion)
|
|
{
|
|
if (strlen($sPreviousVersion) > 0)
|
|
{
|
|
// If you want to migrate data from one format to another, do it here
|
|
self::RenameEnumValueInDB('Software', 'type', 'DBserver', 'DBServer');
|
|
self::RenameEnumValueInDB('Software', 'type', 'Webserver', 'WebServer');
|
|
self::RenameEnumValueInDB('Model', 'type', 'SANswitch', 'SANSwitch');
|
|
self::RenameEnumValueInDB('Model', 'type', 'IpPhone', 'IPPhone');
|
|
self::RenameEnumValueInDB('Model', 'type', 'Telephone', 'Phone');
|
|
self::RenameClassInDB('DBserver', 'DBServer');
|
|
self::RenameClassInDB('OSfamily', 'OSFamily');
|
|
self::RenameClassInDB('OSversion', 'OSVersion');
|
|
self::RenameClassInDB('Webserver', 'WebServer');
|
|
self::RenameClassInDB('OSpatch', 'OSPatch');
|
|
self::RenameClassInDB('lnkFunctionalCIToOSpatch', 'lnkFunctionalCIToOSPatch');
|
|
self::RenameClassInDB('OsLicence', 'OSLicence');
|
|
self::RenameClassInDB('IOSversion', 'IOSVersion');
|
|
self::RenameClassInDB('IPinterface', 'IPInterface');
|
|
}
|
|
}
|
|
|
|
/**
|
|
* Handler called after the creation/update of the database schema
|
|
* @param $oConfiguration Config The new configuration of the application
|
|
* @param $sPreviousVersion string PRevious version number of the module (empty string in case of first install)
|
|
* @param $sCurrentVersion string Current version number of the module
|
|
*/
|
|
public static function AfterDatabaseCreation(Config $oConfiguration, $sPreviousVersion, $sCurrentVersion)
|
|
{
|
|
}
|
|
}
|
|
}
|