diff --git a/datamodels/2.x/itop-container-mgmt/data/en_us.data.itop-container-type.xml b/datamodels/2.x/itop-container-mgmt/data/en_us.data.itop-container-type.xml new file mode 100644 index 0000000000..a9e22b37a2 --- /dev/null +++ b/datamodels/2.x/itop-container-mgmt/data/en_us.data.itop-container-type.xml @@ -0,0 +1,24 @@ + + + + AWS - Elastic Container Service + + + AWS - Elastic Kubernetes Service + + + Azure Kubernetes Service + + + Docker Swarm + + + Google Kubernetes Engine + + + Kubernetes + + + Nomad + + \ No newline at end of file diff --git a/datamodels/2.x/itop-container-mgmt/datamodel.itop-container-mgmt.xml b/datamodels/2.x/itop-container-mgmt/datamodel.itop-container-mgmt.xml new file mode 100644 index 0000000000..7fc1280d37 --- /dev/null +++ b/datamodels/2.x/itop-container-mgmt/datamodel.itop-container-mgmt.xml @@ -0,0 +1,1254 @@ + + + + + FunctionalCI + + bizmodel,searchable + false + containerimage + + + + + + + + + + + + + + + + + + + + + software_id + + + true + Software + DEL_MANUAL + all + + + image_url + + true + + all + + + containerapplication_id + + false + ContainerApplication + DEL_AUTO + all + + + containerapplication_id + containervirtualhost_id + + + + + + + + 10 + + + 20 + + + 30 + + + 40 + + + 50 + + + + + + + 10 + + + 20 + + + 30 + + + 40 + + + +
+ + + + + + + 10 + + + 20 + + + 30 + + + 40 + + + 50 + + + 10 + + + 10 + + + + + + + 10 + + + 20 + + + 30 + + + 40 + + + 10 + + + 20 + + + 30 + + + 40 + + + 50 + + +
+ + + + 10 + + + 20 + + + 30 + + + +
+ + + + + containerapplication_id + both + + + + +
+ + FunctionalCI + + bizmodel,searchable + true + containervirtualhost + + + + + + + + + + + + + + + status + + + status='obsolete' + + + + + ContainerApplication + containervirtualhost_id + list + + false + false + + + + status + + + implementation + 10 + + + + production + 20 + + + + obsolete + 30 + + + + + $ibo-lifecycle-neutral-state-primary-color + $ibo-lifecycle-neutral-state-secondary-color + + + + implementation + false + + + all + + + containertype_id + + + true + ContainerType + DEL_MANUAL + all + + + + + + + + 10 + + + 20 + + + 30 + + + 40 + + + + + + + 10 + + + 20 + + + 30 + + + 40 + + + +
+ + + 10 + + + 20 + + + 30 + + + 40 + + + 50 + + + 60 + + + 70 + + + 80 + + + 90 + + + 100 + + + 110 + + + 120 + + + 130 + + +
+ + + + 10 + + + 20 + + + 30 + + + +
+ + + + + containerapplications_list + both + + + + +
+ + ContainerVirtualHost + + bizmodel,searchable + false + containerhost + + + + + + + + + + + + + + + + + + + status + + + + + + containercluster_id + SELECT ContainerCluster WHERE org_id= :this->org_id + true + ContainerCluster + DEL_MANUAL + all + + + role + + + master + 10 + + + worker + 20 + + + standalone + 30 + + + + standalone + false + radio_horizontal + + + + all + + + system_id + SELECT FunctionalCI WHERE finalclass IN ('Server','VirtualMachine','Cloud') + false + FunctionalCI + DEL_AUTO + all + + + + + /** + * Event Listener for EVENT_DB_BEFORE_WRITE + * An object is about to be written into the database. + * The object can be modified. + * + * @param Combodo\iTop\Service\Events\EventData $oEventData Event data object + * + */ + false + public + EventListener + Get('containercluster_id') == 0) { + $this->Set('role', 'standalone'); + } else if ($this->Get('role') == 'standalone') { + $this->Set('role', 'worker'); + } +}]]> + + + + + + + 10 + + + 20 + + + 30 + + + 40 + + + 50 + + + + + + + 10 + + + 20 + + + 30 + + + 40 + + + +
+ + + + + + + 10 + + + 20 + + + 30 + + + 40 + + + 50 + + + 60 + + + 10 + + + 10 + + + + + + + 10 + + + 20 + + + 30 + + + 40 + + + 10 + + + 20 + + + 30 + + + 40 + + + 50 + + + 60 + + +
+ + + + 10 + + + 20 + + + 30 + + + 40 + + + 50 + + + 60 + + + +
+ + + + + containercluster_id + both + + + + + + + EVENT_DB_BEFORE_WRITE + EvtBeforeWrite + 0 + + +
+ + FunctionalCI + + bizmodel,searchable + false + containerapplication + + + + + + + + + + + + + + + + + + status + + + + status='obsolete' + + + + + containervirtualhost_id + + false + ContainerVirtualHost + DEL_AUTO + all + + + ContainerImage + containerapplication_id + list + + false + false + + + + status + + + implementation + 10 + + + + production + 20 + + + + obsolete + 30 + + + + + implementation + false + + + all + + + + + + + + 10 + + + 20 + + + 30 + + + 40 + + + + + + + 10 + + + 20 + + + 30 + + + 40 + + + +
+ + + + + + + 10 + + + 20 + + + 30 + + + 40 + + + 50 + + + 60 + + + 10 + + + 10 + + + + + + + 10 + + + 10 + + + 20 + + + 30 + + + 40 + + + 50 + + + 60 + + + 70 + + + 80 + + +
+ + + + 10 + + + 20 + + + 30 + + + 40 + + + +
+
+ + ContainerVirtualHost + + bizmodel,searchable + false + containercluster + + + + + + + + + + + + + + + status + + + + + + redundancy + impacts + ContainerHost + containercluster + true + 50 + percent + user + user + + + ContainerHost + containercluster_id + list + + false + false + on_host_display + + + + + + + + 10 + + + 20 + + + 30 + + + + + + + 10 + + + 20 + + + 30 + + + 40 + + + +
+ + + + + + + 10 + + + 20 + + + 30 + + + 40 + + + 50 + + + 60 + + + 10 + + + 10 + + + + + + + 10 + + + 10 + + + 20 + + + 30 + + + 40 + + + 50 + + + 60 + + + 70 + + +
+ + + + 10 + + + 20 + + + 30 + + + 40 + + + +
+
+ + VirtualHost + + bizmodel,searchable + false + cloud + + + + + + + + + + + + + + + + + + + + + + ContainerHost + system_id + list + + false + false + + + + location_id + SELECT Location WHERE org_id=:this->provider_id + true + Location + DEL_MANUAL + all + + + provider_id + + true + Organization + DEL_MANUAL + all + + + + + + + + 10 + + + 20 + + + 30 + + + 40 + + + 50 + + + + + + + 10 + + + 20 + + + 30 + + + 40 + + + +
+ + + + + + + 10 + + + 20 + + + 30 + + + 40 + + + 50 + + + 60 + + + 10 + + + 10 + + + + + + + 10 + + + 20 + + + 10 + + + 20 + + + 30 + + + 40 + + + 50 + + + 60 + + + 70 + + + 80 + + +
+ + + + 10 + + + 20 + + + 30 + + + 40 + + + 50 + + + +
+ + + + + containerhosts_list + both + + + + +
+ + Typology + + bizmodel,searchable + false + containertype + + + + + + + + + + + + + + + + + + + 10 + + + + + + + 10 + + + +
+ + + 10 + + +
+
+
+
+ + + + + + 1 + + + 4 + Cloud + + + 5 + ContainerApplication + + + 6 + ContainerHost + + + 7 + ContainerCluster + + + 8 + ContainerImage + + + + + + + + + + + 0 + + + 11 + ContainerType + + + + + + + +
diff --git a/datamodels/2.x/itop-container-mgmt/dictionaries/en.dict.itop-container-mgmt.php b/datamodels/2.x/itop-container-mgmt/dictionaries/en.dict.itop-container-mgmt.php new file mode 100644 index 0000000000..ebc5d69a67 --- /dev/null +++ b/datamodels/2.x/itop-container-mgmt/dictionaries/en.dict.itop-container-mgmt.php @@ -0,0 +1,104 @@ + '%1$s', + 'Class:ContainerImage/ComplementaryName' => '%1$s', + 'Class:ContainerImage' => 'Container Image', + 'Class:ContainerImage+' => 'Image of a piece of software ready to be launched as a container', + 'Class:ContainerImage/Attribute:software_id' => 'Software', + 'Class:ContainerImage/Attribute:software_id+' => '', + 'Class:ContainerImage/Attribute:image_url' => 'Image URL', + 'Class:ContainerImage/Attribute:image_url+' => '', + 'Class:ContainerImage/Attribute:containerapplication_id' => 'Containerized Application', + 'Class:ContainerImage/Attribute:containerapplication_id+' => 'Application to which this image contributes', + 'Class:ContainerImage/Attribute:containervirtualhost_id' => 'Container Host', + 'Class:ContainerImage/Attribute:containervirtualhost_id+' => 'Platform on which the application is deployed', + 'ContainerImage:baseinfo' => 'General information', + 'ContainerImage:moreinfo' => 'Container specifics', + + // Class Container Application + 'Class:ContainerApplication/Name' => '%1$s', + 'Class:ContainerApplication/ComplementaryName' => '%1$s', + 'Class:ContainerApplication' => 'Containerized Application', + 'Class:ContainerApplication+' => 'Application deployed on a container environment', + 'Class:ContainerApplication/Attribute:status' => 'Status', + 'Class:ContainerApplication/Attribute:status+' => 'Status of the application', + 'Class:ContainerApplication/Attribute:containervirtualhost_id' => 'Container Host', + 'Class:ContainerApplication/Attribute:containervirtualhost_id+' => 'Container Platform on which the application is running', + 'Class:ContainerApplication/Attribute:containertype_id' => 'Container type', + 'Class:ContainerApplication/Attribute:containertype_id+' => 'Technology used for containerization', + 'Class:ContainerApplication/Attribute:containerimages_list' => 'Container images', + 'Class:ContainerApplication/Attribute:containerimages_list+' => 'Software images used to build the containerized application', + 'ContainerApplication:baseinfo' => 'General information', + 'ContainerApplication:moreinfo' => 'Container specifics', + + // Class Container Virtual Host + 'Class:ContainerVirtualHost/Name' => '%1$s', + 'Class:ContainerVirtualHost/ComplementaryName' => '', + 'Class:ContainerVirtualHost' => 'Container Platform', + 'Class:ContainerVirtualHost+' => 'Platform on which application run as containers', + 'Class:ContainerVirtualHost/Attribute:containertype_id' => 'Container Type', + 'Class:ContainerVirtualHost/Attribute:containertype_id+' => 'Technology used to deliver containerization', + 'Class:ContainerVirtualHost/Attribute:status' => 'Status', + 'Class:ContainerVirtualHost/Attribute:status+' => 'Status of the container platform', + 'Class:ContainerVirtualHost/Attribute:containerapplications_list' => 'Applications', + 'Class:ContainerVirtualHost/Attribute:containerapplications_list+' => 'Applications running on this container environment', + 'ContainerVirtualHost:baseinfo' => 'General Information', + 'ContainerVirtualHost:moreinfo' => 'Container specifics', + + // Class Container Host + 'Class:ContainerHost/Name' => '%1$s', + 'Class:ContainerHost/ComplementaryName' => '%1$s-%2$s', + 'Class:ContainerHost' => 'Container Host', + 'Class:ContainerHost+' => 'Host dedicated to containers', + 'Class:ContainerHost/Attribute:containercluster_id' => 'Container Cluster', + 'Class:ContainerHost/Attribute:containercluster_id+' => '', + 'Class:ContainerHost/Attribute:role' => 'Role', + 'Class:ContainerHost/Attribute:role+' => 'Role of the host within its cluster: Master or Worker. Standalone when not part of a cluster.', + 'Class:ContainerHost/Attribute:system_id' => 'System', + 'Class:ContainerHost/Attribute:system_id+' => 'The system can be a Server, a Virtual Machine, a Cloud, ...', + 'Class:ContainerHost/Attribute:role/Value:master' => 'Master', + 'Class:ContainerHost/Attribute:role/Value:worker' => 'Worker', + 'Class:ContainerHost/Attribute:role/Value:standalone' => 'Standalone', + + // Class Container Cluster + 'Class:ContainerCluster/Name' => '%1$s', + 'Class:ContainerCluster/ComplementaryName' => '', + 'Class:ContainerCluster' => 'Container Cluster', + 'Class:ContainerCluster+' => 'Cluster of Container Hosts', + 'Class:ContainerCluster/Attribute:redundancy' => 'Configuration of the redundancy', + 'Class:ContainerCluster/Attribute:redundancy/disabled' => 'The cluster is up if all its hosts are up', + 'Class:ContainerCluster/Attribute:redundancy/count' => 'The cluster is up if at least %1$s hosts are up', + 'Class:ContainerCluster/Attribute:redundancy/percent' => 'The cluster is up if at least %1$s %% of the hosts are up', + 'Class:ContainerCluster/Attribute:containerhosts_list' => 'Container Hosts', + 'Class:ContainerCluster/Attribute:containerhosts_list+' => 'Hosts part of this cluster', + + // Class Container Type + 'Class:ContainerType/Name' => '%1$s', + 'Class:ContainerType/ComplementaryName' => '', + 'Class:ContainerType' => 'Container Type', + 'Class:ContainerType+' => 'Technology used to deliver containerization', + + // Class Cloud + 'Class:Cloud/Name' => '%1$s', + 'Class:Cloud/ComplementaryName' => '%1$s-%2$s', + 'Class:Cloud' => 'Cloud', + 'Class:Cloud+' => '', + 'Class:Cloud/Attribute:provider_id' => 'Provider', + 'Class:Cloud/Attribute:provider_id+' => '', + 'Class:Cloud/Attribute:location_id' => 'Location id', + 'Class:Cloud/Attribute:location_id+' => '', + 'Class:Cloud/Attribute:containerhosts_list' => 'Container Hosts', + 'Class:Cloud/Attribute:containerhosts_list+' => '', + 'Cloud:baseinfo' => 'General information', + 'Cloud:moreinfo' => 'More information', +)); +?> diff --git a/datamodels/2.x/itop-container-mgmt/dictionaries/fr.dict.itop-container-mgmt.php b/datamodels/2.x/itop-container-mgmt/dictionaries/fr.dict.itop-container-mgmt.php new file mode 100644 index 0000000000..042f318351 --- /dev/null +++ b/datamodels/2.x/itop-container-mgmt/dictionaries/fr.dict.itop-container-mgmt.php @@ -0,0 +1,105 @@ + '%1$s', + 'Class:ContainerImage/ComplementaryName' => '%1$s', + 'Class:ContainerImage' => 'Image pour conteneur', + 'Class:ContainerImage+' => 'Image d\'un logiciel, constituant d\'une application conteneurisée', + 'Class:ContainerImage/Attribute:software_id' => 'Logiciel', + 'Class:ContainerImage/Attribute:software_id+' => '', + 'Class:ContainerImage/Attribute:image_url' => 'URL de l\'image', + 'Class:ContainerImage/Attribute:image_url+' => '', + 'Class:ContainerImage/Attribute:containerapplication_id' => 'Application conteneurisée', + 'Class:ContainerImage/Attribute:containerapplication_id+' => 'L\'application à laquelle cette image contribue', + 'Class:ContainerImage/Attribute:containervirtualhost_id' => 'Plateforme de l\'application', + 'Class:ContainerImage/Attribute:containervirtualhost_id+' => 'Plateforme où cette image est déployée en conteneur', + 'ContainerImage:baseinfo' => 'Informations générales', + 'ContainerImage:moreinfo' => 'Spécificités de la conteneurisation', + + // Class Container Application + 'Class:ContainerApplication/Name' => '%1$s', + 'Class:ContainerApplication/ComplementaryName' => '%1$s', + 'Class:ContainerApplication' => 'Application conteneurisée', + 'Class:ContainerApplication+' => 'Application déployée sur une plateforme de conteneurisation', + 'Class:ContainerApplication/Attribute:status' => 'Etat', + 'Class:ContainerApplication/Attribute:status+' => 'Etat de l\'application', + 'Class:ContainerApplication/Attribute:containervirtualhost_id' => 'Hôte', + 'Class:ContainerApplication/Attribute:containervirtualhost_id+' => 'Plateforme de conteneurisation sur laquelle cette application est déployée', + 'Class:ContainerApplication/Attribute:containertype_id' => 'Type de conteneur', + 'Class:ContainerApplication/Attribute:containertype_id+' => '', + 'Class:ContainerApplication/Attribute:containerimages_list' => 'Images', + 'Class:ContainerApplication/Attribute:containerimages_list+' => 'Images des conteneurs constitutifs de cette application', + 'ContainerApplication:baseinfo' => 'Informations générales', + 'ContainerApplication:moreinfo' => 'Spécificités de la conteneurisation', + + // Class Container Virtual Host + 'Class:ContainerVirtualHost/Name' => '%1$s', + 'Class:ContainerVirtualHost/ComplementaryName' => '', + 'Class:ContainerVirtualHost' => 'Plateforme de conteneurisation', + 'Class:ContainerVirtualHost+' => 'Plateforme sur laquelle des applications s\'exécutent dans des conteneurs', + 'Class:ContainerVirtualHost/Attribute:containertype_id' => 'Type de plateforme', + 'Class:ContainerVirtualHost/Attribute:containertype_id+' => 'Technologie de conteneurisation utilisée', + 'Class:ContainerVirtualHost/Attribute:status' => 'Etat', + 'Class:ContainerVirtualHost/Attribute:status+' => 'Etat de la plateforme de conteneurisation', + 'Class:ContainerVirtualHost/Attribute:containerapplications_list' => 'Applications', + 'Class:ContainerVirtualHost/Attribute:containerapplications_list+' => 'Applications qui sont déployées sur cette plateforme', + 'ContainerVirtualHost:baseinfo' => 'Informations générales', + 'ContainerVirtualHost:moreinfo' => 'Spécificités de la conteneurisation', + + // Class Container Host + 'Class:ContainerHost/Name' => '%1$s', + 'Class:ContainerHost/ComplementaryName' => '%1$s-%2$s', + 'Class:ContainerHost' => 'Hôte pour conteneurs', + 'Class:ContainerHost+' => 'Système hôte dédié à l\'exécution de conteneurs', + 'Class:ContainerHost/Attribute:containercluster_id' => 'Grappe pour conteneurs', + 'Class:ContainerHost/Attribute:containercluster_id+' => 'Grappe d\'hôtes pour conteneurs', + 'Class:ContainerHost/Attribute:role' => 'Rôle', + 'Class:ContainerHost/Attribute:role+' => 'Rôle de cet hôte au sein de la grappe : Maître ou Esclave. Autonome en l\'absence de grappe', + 'Class:ContainerHost/Attribute:role/Value:master' => 'Maître', + 'Class:ContainerHost/Attribute:role/Value:worker' => 'Esclave', + 'Class:ContainerHost/Attribute:role/Value:standalone' => 'Autonome', + 'Class:ContainerHost/Attribute:system_id' => 'Système', + 'Class:ContainerHost/Attribute:system_id+' => 'Le système sur lequel cet hôte tourne. Cela peut être un Serveur, une Machine Virtuelle ou un Nuage, ...', + + // Class Container Cluster + 'Class:ContainerCluster/Name' => '%1$s', + 'Class:ContainerCluster/ComplementaryName' => '', + 'Class:ContainerCluster' => 'Grappe pour conteneurs', + 'Class:ContainerCluster+' => 'Grappe d\'hôtes de conteneurs', + 'Class:ContainerCluster/Attribute:redundancy' => 'Configuration de la redondance', + 'Class:ContainerCluster/Attribute:redundancy/disabled' => 'La grappe est opérationnelle si tous les hôtes qui la composent sont opérationnels', + 'Class:ContainerCluster/Attribute:redundancy/count' => 'Nombre minimal d\'hôtes pour que la grappe soit opérationnelle : %1$s', + 'Class:ContainerCluster/Attribute:redundancy/percent' => 'Pourcentage minimal d\'hôtes pour que la grappe soit opérationnelle : %1$s %%', + 'Class:ContainerCluster/Attribute:containerhosts_list' => 'Hôtes pour conteneurs', + 'Class:ContainerCluster/Attribute:containerhosts_list+' => 'Hôtes composant cette grappe', + + // Class Container Type + 'Class:ContainerType/Name' => '%1$s', + 'Class:ContainerType/ComplementaryName' => '', + 'Class:ContainerType' => 'Type de conteneurisation', + 'Class:ContainerType+' => 'Technologie de conteneurisation', + + // Class Cloud + 'Class:Cloud/Name' => '%1$s', + 'Class:Cloud/ComplementaryName' => '%1$s-%2$s', + 'Class:Cloud' => 'Nuage', + 'Class:Cloud+' => '', + 'Class:Cloud/Attribute:provider_id' => 'Fournisseur', + 'Class:Cloud/Attribute:provider_id+' => 'Organisation fournissant le nuage', + 'Class:Cloud/Attribute:location_id' => 'Site', + 'Class:Cloud/Attribute:location_id+' => 'Site du fournisseur, hébergeant le nuage', + 'Class:Cloud/Attribute:containerhosts_list' => 'Hôtes pour conteneurs', + 'Class:Cloud/Attribute:containerhosts_list+' => 'Liste des hôtes hébergés dans ce nuage', + 'Cloud:baseinfo' => 'Informations générales', + 'Cloud:moreinfo' => 'Informations propres au nuage', + +)); +?> diff --git a/datamodels/2.x/itop-container-mgmt/images/icons8-application-container.svg b/datamodels/2.x/itop-container-mgmt/images/icons8-application-container.svg new file mode 100644 index 0000000000..01ef18e4ff --- /dev/null +++ b/datamodels/2.x/itop-container-mgmt/images/icons8-application-container.svg @@ -0,0 +1,346 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/datamodels/2.x/itop-container-mgmt/images/icons8-cloud.svg b/datamodels/2.x/itop-container-mgmt/images/icons8-cloud.svg new file mode 100644 index 0000000000..5132b6dbcb --- /dev/null +++ b/datamodels/2.x/itop-container-mgmt/images/icons8-cloud.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/datamodels/2.x/itop-container-mgmt/images/icons8-cluster-container.svg b/datamodels/2.x/itop-container-mgmt/images/icons8-cluster-container.svg new file mode 100644 index 0000000000..81e577756c --- /dev/null +++ b/datamodels/2.x/itop-container-mgmt/images/icons8-cluster-container.svg @@ -0,0 +1,524 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/datamodels/2.x/itop-container-mgmt/images/icons8-host-container.svg b/datamodels/2.x/itop-container-mgmt/images/icons8-host-container.svg new file mode 100644 index 0000000000..6477f1831d --- /dev/null +++ b/datamodels/2.x/itop-container-mgmt/images/icons8-host-container.svg @@ -0,0 +1,275 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/datamodels/2.x/itop-container-mgmt/images/icons8-image-container.svg b/datamodels/2.x/itop-container-mgmt/images/icons8-image-container.svg new file mode 100644 index 0000000000..0982e316ad --- /dev/null +++ b/datamodels/2.x/itop-container-mgmt/images/icons8-image-container.svg @@ -0,0 +1,336 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/datamodels/2.x/itop-container-mgmt/model.itop-container-mgmt.php b/datamodels/2.x/itop-container-mgmt/model.itop-container-mgmt.php new file mode 100644 index 0000000000..ccc1b539e8 --- /dev/null +++ b/datamodels/2.x/itop-container-mgmt/model.itop-container-mgmt.php @@ -0,0 +1,17 @@ + 'Container management', + 'category' => 'business', + + // Setup + // + 'dependencies' => array( + 'itop-virtualization-mgmt/3.2.0' + ), + 'mandatory' => false, + 'visible' => true, + 'installer' => 'ContainerTypeInstaller', + + // Components + // + 'datamodel' => array( + 'model.itop-container-mgmt.php', // Contains the PHP code generated by the "compilation" of datamodel.combodo-container-mgmt.xml + ), + 'webservice' => array( + + ), + 'data.struct' => array( + // add your 'structure' definition XML files here, + ), + 'data.sample' => array( + // add your sample data XML files here, + ), + + // Documentation + // + 'doc.manual_setup' => '', // hyperlink to manual setup documentation, if any + 'doc.more_information' => '', // hyperlink to more information, if any + + // Default settings + // + 'settings' => array( + // Module specific settings go here, if any + ), + ) +); + +if (!class_exists('ContainerTypeInstaller')) +{ + // Module installation handler + // + class ContainerTypeInstaller extends ModuleInstallerAPI + { + /** + * 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 + * + * @throws \Exception + */ + public static function AfterDatabaseCreation(Config $oConfiguration, $sPreviousVersion, $sCurrentVersion) + { + if ($sPreviousVersion == '') { // First installation + $oDataLoader = new XMLDataLoader(); + CMDBObject::SetTrackInfo("Initialization ContainerTypeInstaller"); + $oMyChange = CMDBObject::GetCurrentChange(); + $sFileName = dirname(__FILE__)."/data/en_us.data.itop-container-type.xml"; + SetupLog::Info("Uploading ContainerType objects from file: $sFileName"); + $oDataLoader->StartSession($oMyChange); + $oDataLoader->LoadFile($sFileName, false, true); + $oDataLoader->EndSession(); + } + } + } +} + +?>