def testGetScalars(self): """Test that we can get all scalars""" scalars = mib.getScalars("SNIMPY-MIB") sscalars = sorted([str(a) for a in scalars]) self.assertEqual(self.scalars, sscalars) for n in scalars: self.assert_(isinstance(n, mib.Scalar))
def testGetScalars(self): """Test that we can get all scalars""" scalars = mib.getScalars('SNIMPY-MIB') sscalars = sorted([str(a) for a in scalars]) self.assertEqual(self.scalars, sscalars) for n in scalars: self.assert_(isinstance(n, mib.Scalar))
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): setattr(Manager, str(o), 1)
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): setattr(Manager, str(o), 1)