Skip to content

MibRouter

getOid(oid)
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
addTrap(uid, id, oid, **nodetype)
deleteNode(uid) Remove an organizer or MIB.

@type uid: string
@param uid: UID of organizer or MIB to remove
@rtype: DirectResponse
@return: B{Properties}:
- tree: ([dictionary]) Object representing the new tree
getTree(**id) Returns the tree structure of an organizer hierarchy. Default tree
root is MIBs.

@type id: string
@param id: (optional) Id of the root node of the tree to be
returned (default: '/zport/dmd/Mibs')
@rtype: [dictionary]
@return: Object representing the tree
deleteTrap(uid)
gzip_b64(string) gzip an arbitrary string, base64 encode it, and return it
getOidMappings(uid, **sort, **start, **limit, **page, **dir)
getTraps(uid, **sort, **start, **limit, **page, **dir)
addOidMapping(uid, id, oid, **nodetype)
deleteOidMapping(uid)
addMIB(package, **organizer) Add a new MIB by URL or local file.

@type package: string
@param package: URL or local file path to MIB file
@type organizer: string
@param organizer: ID of the organizer to add MIB to
@rtype: DirectResponse
@return: B{Properties}:
- jobId: (string) ID of the add MIB job
setInfo() Set attributes on a MIB.
This method accepts any keyword argument for the property that you wish
to set. The only required property is "uid".

@type uid: string
@keyword uid: Unique identifier of a MIB
@rtype: DirectResponse
@return: B{Properties}
- data: (dictionary) Object representing a MIB's new properties
addNode(**type, **id, **contextUid) Add an organizer or new blank MIB.

@type contextUid: string
@param contextUid: Context to attach new node
@type id: string
@param id: Id of the new orgainzer or blank MIB
@type type: string
@param type: Type of new node. Can be 'organizer' or 'MIB'
@rtype: DirectResponse
@return: B{Properties}:
- tree: ([dictionary]) Object representing the new tree
objectExists(uid) @rtype: DirectResponse
@return:
- Properties:
- B{exists} - Returns true if we can find the object specified by the uid
moveNode(uids, target) Move an organizer or MIB from one organizer to another.

@type uids: [string]
@param uids: UIDs of organizers and MIBs to move
@type target: string
@param target: UID of the organizer to move to
@rtype: DirectResponse
@return: B{Properties}:
- data: (dictionary) Object representing the new parent organizer
getMibTrapTree(**id) A MIB trap node is an OID received from a trap
getInfo(uid, **useFieldSets) Get the properties of a MIB

@type uid: string
@param uid: Unique identifier of a MIB
@type useFieldSets: boolean
@param useFieldSets: True to return a fieldset version of the info form
(default: True)
@rtype: DirectResponse
@return: B{Properties}
- data: (dictionary) Object representing a MIB's properties
- form: (dictionary) Object representing an edit form for a MIB's
properties
getOrganizerTree(id) Returns the tree structure of an organizer hierarchy, only including
organizers.

@type id: string
@param id: Id of the root node of the tree to be returned
@rtype: [dictionary]
@return: Object representing the organizer tree
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.
getMibNodeTree(**id) A MIB node is a regular OID (ie you can hit it with snmpwalk)
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