SHARE
TWEET

Untitled

a guest Jan 24th, 2019 65 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. pysnmp.smi.error.MibNotFoundError: CISCO-IETF-IPMROUTE-MIB compilation error(s): missingcaused by <class 'pysnmp.smi.error.MibNotFoundError'>: MIB file "CISCO-IETF-IPMROUTE-MIB.py[co]" not found in search path (DirMibSource('/usr/lib/python3.4/site-packages/pysnmp/smi/mibs'), DirMibSource('/usr/lib/python3.4/site-packages/pysnmp/smi/mibs/instances'), DirMibSource('pysnmp_mibs'), DirMibSource('/root/.pysnmp/mibs'), DirMibSource('~/projects/nemo/MIBs'))
  2.    
  3. def find_name_type(oid, module):
  4.  
  5.     mibBuilder = builder.MibBuilder()
  6.     compiler.addMibCompiler(mibBuilder, sources = ['~/projects/mibs'])
  7.     mibBuilder.addMibSources(builder.DirMibSource('~/projects/mibs'))
  8.     mibBuilder.loadModules(module)
  9.     mibView = view.MibViewController(mibBuilder)
  10.     oid, label, suffix = mibView.getNodeName(oid)
  11.  
  12.     modName, symName, suffix = mibView.getNodeLocation(oid)
  13.     mibNode, = mibBuilder.importSymbols(modName, symName)
  14.     data_type = mibNode.syntax.__class__.__name__
  15.     return label[-1], data_type
  16.    
  17. find_name_type((1,3,6,1,2,1,31,1,1,1,6), 'IF-MIB')
  18.    
  19. find_name_type((1, 3, 6, 1, 4, 1, 9, 10, 117, 1, 1, 2, 1, 17), 'CISCO-IETF-IPMROUTE-MIB')
  20.    
  21. CISCO-IETF-IPMROUTE-MIB.mib  
  22. IF-MIB.mib
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top