Skip to content

Commit

Permalink
Udpate for rev 0.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
xtophe38 committed Aug 29, 2019
1 parent f5e1d17 commit 0c05ac8
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 76 deletions.
65 changes: 0 additions & 65 deletions datamodel.teemip-ip-discovery.xml
Original file line number Diff line number Diff line change
Expand Up @@ -97,31 +97,6 @@
</field>
</fields>
<methods>
<method id="OnInsert">
<comment/>
<static>false</static>
<access>public</access>
<type>Overload-cmdbAbstractObject</type>
<code><![CDATA[ public function OnInsert()
{
parent::OnInsert();
// Generate an ID until (very likely) it is unique amongst the existing UUID
//
$oSearchDup = DBObjectSearch::FromOQL_AllData("SELECT IPDiscovery WHERE uuid LIKE :sUUID");
do
{
$sId = strtoupper(md5(uniqid(rand(), true)));
$sFinalId = substr($sId, 0, 4).'_'.substr($sId, 4, 4).'_'.substr($sId, 8, 4).'_'.substr($sId, 12, 4);
$oDupSet = new DBObjectSet($oSearchDup, array(), array('sUUID' => $sFinalId));
$bFound = ($oDupSet->Count() > 0);
}
while ($bFound);
$this->Set('uuid', $sFinalId);
}]]></code>
</method>
<method id="DoCheckToWrite">
<comment/>
<static>false</static>
Expand All @@ -140,46 +115,6 @@
return;
}
}
}]]></code>
</method>
<method id="DisplayBareRelations">
<static>false</static>
<access>public</access>
<type>Overload-cmdbAbstractObject</type>
<code><![CDATA[ public function DisplayBareRelations(WebPage $oPage, $bEditMode = false)
{
parent::DisplayBareRelations($oPage, $bEditMode);
$oPage->RemoveTab(Dict::S('Class:FunctionalCI/Tab:OpenedTickets'));
}]]></code>
</method>
<method id="GetAttributeFlags">
<static>false</static>
<access>public</access>
<type>Overload-cmdbAbstractObject</type>
<code><![CDATA[ public function GetAttributeFlags($sAttCode, &$aReasons = array(), $sTargetState = '')
{
if ($sAttCode == 'uuid')
{
return OPT_ATT_READONLY;
}
return parent::GetAttributeFlags($sAttCode, $aReasons, $sTargetState);
}]]></code>
</method>
<method id="GetInitialStateAttributeFlags">
<static>false</static>
<access>public</access>
<type>Overload-cmdbAbstractObject</type>
<code><![CDATA[ public function GetInitialStateAttributeFlags($sAttCode, &$aReasons = array())
{
if ($sAttCode == 'uuid')
{
return OPT_ATT_READONLY;
}
return parent::GetInitialStateAttributeFlags($sAttCode, $aReasons);
}]]></code>
</method>
</methods>
Expand Down
9 changes: 0 additions & 9 deletions extension.xml

This file was deleted.

4 changes: 2 additions & 2 deletions module.teemip-ip-discovery.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
SetupWebPage::AddModule(
__FILE__, // Path to the current file, all other file names are relative to the directory containing this file
'teemip-ip-discovery/0.2.2',
'teemip-ip-discovery/0.3.0',
array(
// Identification
//
Expand All @@ -11,7 +11,7 @@
// Setup
//
'dependencies' => array(
'teemip-ip-mgmt/2.3.0',
'teemip-ip-mgmt/2.5.0',
),
'mandatory' => false,
'visible' => true,
Expand Down

0 comments on commit 0c05ac8

Please sign in to comment.