ZenEvents :: EventClass :: EventClass :: Class EventClass
[hide private]
[frames] | no frames]

Class EventClass

source code

                                   object --+    
                                            |    
       EventClassInst.EventClassPropertyMixin --+
                                                |
        Products.ZenModel.Organizer.Organizer --+
                                                |
Products.ZenModel.ManagedEntity.ManagedEntity --+
                                                |
    Products.ZenModel.ZenPackable.ZenPackable --+
                                                |
                                               EventClass

EventClass organizer

Instance Methods [hide private]
list of EventClass
getSubEventClasses(self)
Return all EventClass objects below this one.
source code
list
getOrganizerNames(self, addblank=False, checkPerm=False)
Returns a list of all organizer names under this organizer.
source code
list of EventClassInst
find(self, evClassKey)
Look for the eventClassKey mapping in an event class, and return them in sequence number oder, lowest-to-highest.
source code
EventClassInst
lookup(self, evt, device)
Given an event, return an event class organizer object
source code
 
applyExtraction(self, evt)
Don't have extraction on event class.
source code
 
getInstances(self)
Return all EventClassInstances from this node down.
source code
 
nextSequenceNumber(self, key)
Get next sequence number for instance.
source code
 
prepId(self, id, subchar='_') source code
 
createInstance(self, id=None, REQUEST=None)
Add an EventClassInst to this EventClass.
source code
 
removeInstances(self, ids=None, REQUEST=None)
Remove Instances from an EventClass.
source code
 
moveInstances(self, moveTarget, ids=None, REQUEST=None)
Move instances from this EventClass to moveTarget.
source code
 
countInstances(self)
count all instances with in an event dict
source code
 
buildZProperties(self) source code
 
testTransformStyle(self)
Test our transform by compiling it.
source code
 
manage_editEventClassTransform(self, transform='', REQUEST=None)
Save the transform
source code
 
getEventSeverities(self)
Return a list of tuples of severities [('Warning', 3), ...]
source code
 
getEventSeverityString(self, severity)
Return a list of tuples of severities [('Warning', 3), ...]
source code
 
reIndex(self)
Go through all ips in this tree and reindex them.
source code
 
createCatalog(self)
Create a catalog for EventClassRecord searching
source code
 
getOverriddenObjects(self, propname, showDevices=False)
Get the objects that override a property somewhere below in the tree This method overrides ZenPropertyManager
source code
 
getIconPath(self)
Override the zProperty icon path and return a folder
source code
 
getPrettyLink(self, noicon=False, shortDesc=False)
Gets a link to this object, plus an icon
source code

Inherited from EventClassInst.EventClassPropertyMixin: applyTransform, applyValues, inheritedTransforms

Inherited from EventClassInst.EventClassPropertyMixin (private): _eventClassPath

Inherited from object: __delattr__, __getattribute__, __hash__, __init__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __str__

Class Variables [hide private]
  isInTree = True
  transform = ''
  meta_type = "EventClass"
  event_key = "EventClass"
  dmdRootName = "Events"
  default_catalog = "eventClassSearch"
  _relations = ZenPackable._relations+(("instances", ToManyCont(...
  _properties = Organizer._properties+ EventClassPropertyMixin._...
  factory_type_information = {'id': 'EventClass', 'meta_type': '...
  security = ClassSecurityInfo()
  severityConversions = 'Critical', 5, ('Error', 4), ('Warning',...
  severities = dict([(b, a) for a, b in severityConversions])
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

getSubEventClasses(self)

source code 
Return all EventClass objects below this one.
Returns: list of EventClass
list of event classes

getOrganizerNames(self, addblank=False, checkPerm=False)

source code 
Returns a list of all organizer names under this organizer. Overridden here so that restricted users can get a list of event classes.
Parameters:
  • addblank (boolean) - If True, add a blank item in the list.
Returns: list
The DMD paths of all Organizers below this instance.

Permission: ZEN_COMMON

find(self, evClassKey)

source code 
Look for the eventClassKey mapping in an event class, and return them in sequence number oder, lowest-to-highest.
Parameters:
  • evClassKey (string) - event class key
Returns: list of EventClassInst
list of event class mappings that match evClassKey, sorted

lookup(self, evt, device)

source code 
Given an event, return an event class organizer object
Parameters:
  • evt (dictionary) - an event
  • device (DMD device) - device object
Returns: EventClassInst
an event class that matches the mapping

testTransformStyle(self)

source code 
Test our transform by compiling it.
Overrides: EventClassInst.EventClassPropertyMixin.testTransformStyle

Class Variable Details [hide private]

_relations

Value:
ZenPackable._relations+(("instances", ToManyCont(ToOne, "Products.ZenE\
vents.EventClassInst", "eventClass")),)

_properties

Value:
Organizer._properties+ EventClassPropertyMixin._properties+({'id': 'tr\
ansform', 'type': 'text', 'mode': 'w'},)

factory_type_information

Value:
{'id': 'EventClass', 'meta_type': 'EventClass', 'description': """Base\
 class for all event classes""", 'icon': 'EventClass.gif', 'product': \
'ZenEvents', 'factory': 'manage_addEventClass', 'immediate_view': 'eve\
ntClassStatus', 'actions':({'id': 'classes', 'name': 'Classes', 'actio\
n': 'eventClassStatus', 'permissions':(Permissions.view,)}, {'id': 'ev\
entList', 'name': 'Mappings', 'action': 'eventMappingList', 'permissio\
ns':(Permissions.view,)}, {'id': 'events', 'name': 'Events', 'action':\
 'viewEvents', 'permissions':(Permissions.view,)}, {'id': 'config', 'n\
...

severityConversions

Value:
'Critical', 5, ('Error', 4), ('Warning', 3), ('Info', 2), ('Debug', 1)\
, ('Clear', 0), ('Original',-1),