Skip to content

EventClassesRouter

getSequence(uid) returns the sequence order of keys for a given instance
deleteEventClass(uid, **params) remove an event class
asyncGetTree(**additionalKeys, **id) Server side method for asynchronous tree calls. Retrieves
the immediate children of the node specified by "id"

NOTE: our convention on the UI side is if we are asking
for the root node then return the root and its children
otherwise just return the children

@type id: string
@param id: The uid of the node we are getting the children for
@rtype: [dictionary]
@return: Object representing the immediate children
setTransform(uid, transform) sets the transform for the context
testCompileTransform(transform) Test our transform by compiling it.
addNewInstance(**params) Add new event class mapping for the current context
removeInstance(instances) remove instance(s) from an event class
getTransformTree(uid) returns a transform for the context with all its inherited transforms
gzip_b64(string) gzip an arbitrary string, base64 encode it, and return it
getTransform(uid) returns a transform for the context
testRule(rule) Test our rule by compiling it.
setTransformEnabled(uid, enabled) Enables or disables transforms on the given event class.
When disabled transforms are enabled again, bad_transform events are cleared.
moveInstance(params) move a mapped instance to a different organizer
@params['targetUid']
@params['UidsToMove']
getInstances(uid, **params) Returns event class mappings for the current context
moveClassOrganizer(params) move an event class organizer under a different organizer
deleteNode() Deletes a node from the tree.

B{NOTE}: You can not delete a root node of a tree

@type uid: string
@param uid: Unique identifier of the node we wish to delete
@rtype: DirectResponse
@return: B{Properties}:
- msg: (string) Status message
isTransformEnabled(uid) Returns True if transform is enabled, False if disabled.
addNode() Add a node to the existing tree underneath the node specified
by the context UID

@type type: string
@param type: Either 'class' or 'organizer'
@type contextUid: string
@param contextUid: Path to the node that will
be the new node's parent (ex. /zport/dmd/Devices)
@type id: string
@param id: Identifier of the new node, must be unique in the
parent context
@type description: string
@param description: (optional) Describes this new node (default: None)
@rtype: dictionary
@return: Marshaled form of the created node
objectExists(uid) @rtype: DirectResponse
@return:
- Properties:
- B{exists} - Returns true if we can find the object specified by the uid
getInstanceData(uid) return all extra data for instance id
testRegex(regex, example) Test our regex using the example event string.
editEventClassDescription(uid, description) edit the description of a given event class
resequence(uids) resequences a list of sequenced instances
editInstance(**params) Edit an event class instance
gunzip_b64(string) Base 64 decode a string, then gunzip it and return the result as JSON.
The input to this method should be gzipped, base 64 encoded JSON. Base
64 encoded strings are allowed to have up to 2 '='s of padding. The zenoss
Ext router eats these, so there is some logic to try padding them back into
the string should initial decoding fail.
getEventsCounts(uid) return all the event counts for this context
moveOrganizer(targetUid, organizerUid) Move the organizer uid to be underneath the organizer
specified by the targetUid.

@type targetUid: string
@param targetUid: New parent of the organizer
@type organizerUid: string
@param organizerUid: The organizer to move
@rtype: DirectResponse
@return: B{Properties}:
- data: (dictionary) Moved organizer