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

Class EventClassInst

source code

                               object --+    
                                        |    
                  EventClassPropertyMixin --+
                                            |
  Products.ZenModel.ZenModelRM.ZenModelRM --+
                                            |
    Products.ZenModel.EventView.EventView --+
                                            |
Products.ZenModel.ZenPackable.ZenPackable --+
                                            |
                                           EventClassInst

EventClassInst.

Instance Methods [hide private]
 
__init__(self, id)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
getStatus(self, **kwargs)
Return the status number for this device of class statClass.
source code
 
getEventClass(self)
Return the full EventClass of this EventClassInst.
source code
 
getEventClassHref(self)
Return href of our class.
source code
 
getDmdKey(self)
Return the dmd key of this mapping ie: /App/Start/zentinel
source code
 
applyExtraction(self, evt)
Apply the event dict regex to extract additional values from the event.
source code
 
applyValues(self, evt)
Modify event with values taken from dict Inst.
source code
 
ruleOrRegex(self, limit=None)
Return the rule if it exists else return the regex.
source code
boolean
match(self, evt, device)
Match an event message against our regex.
source code
 
testRegexStyle(self)
Test our regex using the example event string.
source code
 
testRuleStyle(self)
Test our rule by compiling it.
source code
 
sameKey(self)
Return a list of all mappings with the same eventClassKey.
source code
 
manage_afterAdd(self, item, container)
Device only propagates afterAdd if it is the added object.
source code
 
manage_afterClone(self, item)
Not really sure when this is called.
source code
 
manage_beforeDelete(self, item, container)
Device only propagates beforeDelete if we are being deleted or copied.
source code
 
manage_resequence(self, seqmap, REQUEST=None)
Reorder the sequence of eventClassMappings with the same key.
source code
 
manage_editEventClassInst(self, name="", eventClassKey='', regex='', rule='', example='', transform='', explanation='', resolution='', REQUEST=None)
Edit a EventClassInst from a web page.
source code

Inherited from EventClassPropertyMixin: applyTransform, inheritedTransforms, testTransformStyle

Inherited from EventClassPropertyMixin (private): _eventClassPath

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

Class Variables [hide private]
  meta_type = "EventClassInst"
  event_key = "EventClassInst"
  default_catalog = "eventClassSearch"
  actions = "status", "history", "heartbeat", "drop"
  _properties = EventClassPropertyMixin._properties+({'id': 'eve...
  _relations = ZenPackable._relations+(("eventClass", ToOne(ToMa...
  factory_type_information = {'id': 'EventClassInst', 'meta_type...
  security = ClassSecurityInfo()

Inherited from EventClassPropertyMixin: transform

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, id)
(Constructor)

source code 
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
Overrides: object.__init__
(inherited documentation)

applyValues(self, evt)

source code 
Modify event with values taken from dict Inst. Any non-None property values are applied to the event.
Overrides: EventClassPropertyMixin.applyValues

ruleOrRegex(self, limit=None)

source code 
Return the rule if it exists else return the regex. limit limits the number of characters returned.

match(self, evt, device)

source code 
Match an event message against our regex.
Parameters:
  • evt (dictionary) - event to match in our mapping
  • device (DMD object) - device
Returns: boolean
boolean

manage_beforeDelete(self, item, container)

source code 
Device only propagates beforeDelete if we are being deleted or copied. Moving and renaming don't propagate.

Class Variable Details [hide private]

_properties

Value:
EventClassPropertyMixin._properties+({'id': 'eventClassKey', 'type': '\
string', 'mode': 'w'}, {'id': 'sequence', 'type': 'int', 'mode': 'w'},\
 {'id': 'rule', 'type': 'string', 'mode': 'w'}, {'id': 'regex', 'type'\
: 'string', 'mode': 'w'}, {'id': 'example', 'type': 'string', 'mode': \
'w'}, {'id': 'explanation', 'type': 'text', 'mode': 'w'}, {'id': 'reso\
lution', 'type': 'text', 'mode': 'w'},)

_relations

Value:
ZenPackable._relations+(("eventClass", ToOne(ToManyCont, "Products.Zen\
Events.EventClass", "instances")),)

factory_type_information

Value:
{'id': 'EventClassInst', 'meta_type': 'EventClassInst', 'description':\
 """Base class for all devices""", 'icon': 'EventClassInst.gif', 'prod\
uct': 'ZenEvents', 'factory': 'manage_addEventClassInst', 'immediate_v\
iew': 'eventClassInstStatus', 'actions':({'id': 'status', 'name': 'Sta\
tus', 'action': 'eventClassInstStatus', 'permissions':(Permissions.vie\
w,)}, {'id': 'edit', 'name': 'Edit', 'action': 'eventClassInstEdit', '\
permissions':("Manage DMD",)}, {'id': 'sequence', 'name': 'Sequence', \
'action': 'eventClassInstSequence', 'permissions':(Permissions.view,)}\
...