[icinga-checkins] icinga.org: icinga-web/jmosshammer/apiIntegration: * Added service relationships - not tested yet

git at icinga.org git at icinga.org
Wed Nov 10 17:33:13 CET 2010


Module: icinga-web
Branch: jmosshammer/apiIntegration
Commit: 0401d13d5fb3c77b5b63b9f54248ad28b02b09df
URL:    https://git.icinga.org/?p=icinga-web.git;a=commit;h=0401d13d5fb3c77b5b63b9f54248ad28b02b09df

Author: jmosshammer <jmosshammer at mojadev-VGN-NW11S-S.(none)>
Date:   Wed Nov 10 17:32:50 2010 +0100

* Added service relationships - not tested yet

---

 .../models/generated/BaseIcingaServices.php        |   74 +++++++++++++++++++-
 1 files changed, 73 insertions(+), 1 deletions(-)

diff --git a/app/modules/Api/lib/database/models/generated/BaseIcingaServices.php b/app/modules/Api/lib/database/models/generated/BaseIcingaServices.php
index 262f36d..b949871 100644
--- a/app/modules/Api/lib/database/models/generated/BaseIcingaServices.php
+++ b/app/modules/Api/lib/database/models/generated/BaseIcingaServices.php
@@ -587,10 +587,82 @@ abstract class BaseIcingaServices extends Doctrine_Record
     public function setUp()
     {
         parent::setUp();
+
 	$this->hasOne("IcingaHosts as ServiceHost",array(
 	    'local' => 'host_object_id',
 	    'foreign' => 'host_object_id'
 	));
-        
+	$this->hasOne("IcingaInstances as ServiceInstance", array(
+	    'local' => 'instance_id',
+	    'foreign' => 'instance_id'
+	));
+	$this->hasMany("IcingaComments as ServiceComments", array(
+	    'local' => 'service_object_id',
+	    'foreign' => 'object_id'
+	));
+        $this->hasMany("IcingaCommenthistory as ServiceCommenthistory", array(
+	    'local' => 'service_object_id',
+	    'foreign' => 'object_id'
+	));
+	$this->hasOne("IcingaServicestatus as ServiceStatus", array(
+	    'local' => 'service_object_id',
+	    'foreign' => 'service_object_id'
+	));
+	$this->hasMany("IcingaServicechecks as ServiceChecks", array(
+	    'local' => 'service_object_id',
+	    'foreign' => 'service_object_id'
+	));
+	$this->hasMany("IcingaContacts as Contacts", array(
+	    'local' => 'service_id',
+	    'foreign' => 'contact_object_id',
+	    'refclass' => 'IcingaServiceContacts'
+	));
+	$this->hasMany("IcingaContactgroups as Contacts", array(
+	    'local' => 'service_id',
+	    'foreign' => 'contactgroup_object_id',
+	    'refclass' => 'IcingaServiceContactgroups'
+	));
+	$this->hasMany("IcingaStatehistory as ServiceHistory", array(
+	    'local' => 'service_object_id',
+	    'foreign' => 'object_id'
+	));
+	$this->hasMany("IcingaServiceEscalations as ServiceEscalations", array(
+	    'local' => 'service_object_id',
+	    'foreign' => 'service_object_id'
+	));
+	$this->hasMany("IcingaTimedevents as ServiceEvents", array(
+	    'local' => 'service_object_id',
+	    'foreign' => 'object_id'
+	));
+	$this->hasMany("IcingaScheduleddowntime as ServicesScheduledDowntimes", array(
+	    'local' => 'service_object_id',
+	    'foreign' => 'object_id'
+	));
+	$this->hasMany("IcingaDowntimehistory as ServicesDowntimeHistory", array(
+	    'local' => 'service_object_id',
+	    'foreign' => 'object_id'
+	));
+	$this->hasMany("IcingaCustomVariables as ServiceCustomVariables", array(
+	    'local' => 'service_object_id',
+	    'foreign' => 'object_id'
+	));
+	$this->hasMany("IcingaService as ServiceDependencies", array(
+	    'local' => 'service_object_id',
+	    'foreign' => 'dependent_service_object_id',
+	    'refClass' => 'IcingaServicedependencies'
+	));
+	$this->hasMany("IcingaServicegroups as ServiceGroups", array(
+	    'local' => 'service_object_id',
+	    'foreign' => 'servicegroup_object_id',
+	    'refClass' => 'IcingaServicegroupMembers'
+	));
+	$this->hasMany("IcingaNotifications as ServiceNotification", array(
+	    'local' => 'service_object_id',
+	    'foreign' => 'object_id'
+	));
+	$this->hasMany("IcingaAcknowledgements as ServiceAcknowledgements", array(
+	    'local' => 'service_object_id',
+	    'foreign' => 'object_id'
+	));
     }
 }
\ No newline at end of file





More information about the icinga-checkins mailing list