Example #1
0
 def testGetTables(self):
     """Test that we can get all tables"""
     tables = mib.getTables('SNIMPY-MIB')
     stables = sorted([str(a) for a in tables])
     self.assertEqual(self.tables, stables)
     for n in tables:
         self.assert_(isinstance(n, mib.Table))
Example #2
0
 def testGetTables(self):
     """Test that we can get all tables"""
     tables = mib.getTables("SNIMPY-MIB")
     stables = sorted([str(a) for a in tables])
     self.assertEqual(self.tables, stables)
     for n in tables:
         self.assert_(isinstance(n, mib.Table))
Example #3
0
def load(mibname):
    """Load a MIB in memory.

    :param mibname: MIB name or filename
    :type mibname: str
    """
    m = mib.load(mibname)
    if m not in loaded:
        loaded.append(m)
        if Manager._complete:
            for o in mib.getScalars(m) + \
                    mib.getColumns(m) + \
                    mib.getTables(m):
                setattr(Manager, str(o), 1)
Example #4
0
def load(mibname):
    """Load a MIB in memory.

    :param mibname: MIB name or filename
    :type mibname: str
    """
    m = mib.load(mibname)
    if m not in loaded:
        loaded.append(m)
        if Manager._complete:
            for o in mib.getScalars(m) + \
                    mib.getColumns(m) + \
                    mib.getTables(m):
                setattr(Manager, str(o), 1)