Package Products :: Package ZenHub :: Package services :: Module TrapService
[hide private]
[frames] | no frames]

Source Code for Module Products.ZenHub.services.TrapService

 1  ########################################################################### 
 2  # 
 3  # This program is part of Zenoss Core, an open source monitoring platform. 
 4  # Copyright (C) 2009, 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  from Products.ZenHub.HubService import HubService 
15  from Products.ZenHub.PBDaemon import translateError 
16 17 18 -class TrapService(HubService):
19 20 @translateError
21 - def remote_getOidMap(self):
22 """ 23 Return a dictionary containing all OID -> Name mappings from /Mibs. 24 """ 25 oidMap = {} 26 for brain in [ b for b in self.dmd.Mibs.mibSearch() if b.oid ]: 27 oidMap[brain.oid] = brain.id 28 29 return oidMap
30