Skip to content

Commit

Permalink
Updates for 3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
xtophe38 committed Dec 29, 2021
1 parent 1415d76 commit 5b5236c
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 14 deletions.
4 changes: 2 additions & 2 deletions extension.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
<author><![CDATA[Christophe Naud]]></author>
<label><![CDATA[Network Management Extended]]></label>
<description><![CDATA[TeemIp extension that provides additional classes for network management]]></description>
<version>1.1.0</version>
<release_date>2021-04-01</release_date>
<version>3.0.0</version>
<release_date>2022-01-01</release_date>
<version_description><![CDATA[Enhancements from 1.0.0: See wiki at https://wiki.teemip.net/doku.php?id=extensions:teemip-network-mgmt-extended]]></version_description>
<itop_version_min>2.7.0</itop_version_min>
<status>stable</status>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<itop_design xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.0">
<itop_design version="1.7">
<classes>
<class id="LogicalInterface" _delta="must_exist">
<presentation>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<itop_design xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.0">
<itop_design xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.7">
<classes>
<class id="InterfaceConnector" _delta="define">
<parent>Typology</parent>
Expand All @@ -16,7 +16,6 @@
<attribute id="name"/>
</attributes>
</naming>
<display_template/>
<icon/>
<reconciliation>
<attributes>
Expand Down Expand Up @@ -107,7 +106,6 @@
<attribute id="name"/>
</attributes>
</naming>
<display_template/>
<icon/>
<reconciliation>
<attributes>
Expand Down Expand Up @@ -198,7 +196,6 @@
<attribute id="name"/>
</attributes>
</naming>
<display_template/>
<icon/>
<reconciliation>
<attributes>
Expand Down Expand Up @@ -458,7 +455,6 @@
<attribute id="networkdevice_name"/>
</attributes>
</naming>
<display_template/>
<icon>asset/img/networkdevicecomponent.png</icon>
<reconciliation>
<attributes>
Expand Down Expand Up @@ -653,7 +649,6 @@
<attribute id="name"/>
</attributes>
</naming>
<display_template/>
<icon>asset/img/clusternetwork.png</icon>
<reconciliation>
<attributes>
Expand Down Expand Up @@ -926,7 +921,6 @@
<attribute id="ipaddress_id"/>
</attributes>
</naming>
<display_template/>
<icon/>
<reconciliation>
<attributes>
Expand Down Expand Up @@ -959,7 +953,34 @@
<target_attcode>usage_id</target_attcode>
</field>
</fields>
<methods/>
<methods>
<method id="AfterInsert" _delta="define">
<comment/>
<static>false</static>
<access>public</access>
<type>Custom</type>
<code><![CDATA[ public function AfterInsert()
{
// Execute parent function first
parent::AfterInsert();
IPAddress::SetStatusOnAttachment($this->Get('ipaddress_id'));
}]]></code>
</method>
<method id="AfterDelete" _delta="define">
<comment/>
<static>false</static>
<access>public</access>
<type>Custom</type>
<code><![CDATA[ public function AfterDelete()
{
// Execute parent function first
parent::AfterDelete();
IPAddress::SetStatusOnDetachment($this->Get('ipaddress_id'));
}]]></code>
</method>
</methods>
<presentation>
<details>
<items>
Expand Down Expand Up @@ -1110,7 +1131,6 @@
<attribute id="connectableci_name"/>
</attributes>
</naming>
<display_template/>
<icon>asset/img/aggregatelink.png</icon>
<reconciliation>
<attributes>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ public static function BeforeDatabaseCreation(Config $oConfiguration, $sPrevious
// If you want to migrate data from one format to another, do it here
if ($sPreviousVersion == '1.0.0')
{
SetupPage::log_info("Module teemip-network-mgmt-extended: copy VLAN tags to name and reset them as they become integers only");
SetupLog::Info("Module teemip-network-mgmt-extended: copy VLAN tags to name and reset them as they become integers only");

$sDBSubname = $oConfiguration->Get('db_subname');
$sSQL1 = "ALTER TABLE ".$sDBSubname."vlan ADD name varchar(255)";
Expand All @@ -82,7 +82,7 @@ public static function BeforeDatabaseCreation(Config $oConfiguration, $sPrevious
CMDBSource::Query($sSQL2);
CMDBSource::Query($sSQL3);

SetupPage::log_info("Module teemip-network-mgmt-extended: VLAN tag migration done");
SetupLog::Info("Module teemip-network-mgmt-extended: VLAN tag migration done");
}
}

Expand Down

0 comments on commit 5b5236c

Please sign in to comment.