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

# Source Code for Module Products.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 Products.ZenRelations.RelSchema import *
    27
    28 -class ManagedEntity(ZenModelRM, DeviceResultInt, EventView, RRDView):
    29      """
    30      ManagedEntity is an entity in the system that is managed by it.
    31      Its basic property is that it can be classified by the ITClass Tree.
    32      Also has EventView and RRDView available.
    33      """
    34
    35      # list of performance multigraphs (see PerformanceView.py)
    36      # FIXME this needs to go to some new setup and doesn't work now
    37      #_mgraphs = []
    38
    39      # primary snmpindex for this managed entity
    40      snmpindex = 0
    41      monitor = True
    42
    43      _properties = (
    44       {'id':'snmpindex', 'type':'string', 'mode':'w'},
    45       {'id':'monitor', 'type':'boolean', 'mode':'w'},
    46      )
    47
    48      _relations = (
    49          ("dependencies", ToMany(ToMany, "Products.ZenModel.ManagedEntity", "dependents")),
    50          ("dependents", ToMany(ToMany, "Products.ZenModel.ManagedEntity", "dependencies")),
    51      )
    52
    53 -    def device(self):
    54          """Overridden in lower classes if a device relationship exists.
    55          """
    56          return None
    57