Package ZenModel :: Module ManagedEntity
[hide private]
[frames] | no frames]

Source Code for Module ZenModel.ManagedEntity

 1  ########################################################################### 
 2  # 
 3  # This program is part of Zenoss Core, an open source monitoring platform. 
 4  # Copyright (C) 2007, Zenoss Inc. 
 5  # 
 6  # This program is free software; you can redistribute it and/or modify it 
 7  # under the terms of the GNU General Public License version 2 as published by 
 8  # the Free Software Foundation. 
 9  # 
10  # For complete information please visit: http://www.zenoss.com/oss/ 
11  # 
12  ########################################################################### 
13   
14  __doc__="""ManagedEntity 
15   
16  $Id: DeviceComponent.py,v 1.1 2004/04/06 21:05:03 edahl Exp $""" 
17   
18  import logging 
19  log = logging.getLogger("zen.DeviceComponent") 
20   
21  from ZenModelRM import ZenModelRM 
22  from DeviceResultInt import DeviceResultInt 
23  from RRDView import RRDView 
24  from EventView import EventView 
25   
26  from Acquisition import aq_base 
27   
28  from Products.ZenRelations.RelSchema import * 
29   
30 -class ManagedEntity(ZenModelRM, DeviceResultInt, EventView, RRDView):
31 """ 32 ManagedEntity is an entity in the system that is managed by it. 33 Its basic property is that it can be classified by the ITClass Tree. 34 Also has EventView and RRDView available. 35 """ 36 37 # list of performance multigraphs (see PerformanceView.py) 38 # FIXME this needs to go to some new setup and doesn't work now 39 #_mgraphs = [] 40 41 # primary snmpindex for this managed entity 42 snmpindex = 0 43 monitor = True 44 45 _properties = ( 46 {'id':'snmpindex', 'type':'string', 'mode':'w'}, 47 {'id':'monitor', 'type':'boolean', 'mode':'w'}, 48 ) 49 50 _relations = ( 51 ("dependencies", ToMany(ToMany, "Products.ZenModel.ManagedEntity", "dependents")), 52 ("dependents", ToMany(ToMany, "Products.ZenModel.ManagedEntity", "dependencies")), 53 ) 54
55 - def device(self):
56 """Overridden in lower classes if a device relationship exists. 57 """ 58 return None
59