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))
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))
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)