예제 #1
0
 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))
예제 #2
0
 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))
예제 #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):
                setattr(Manager, str(o), 1)
예제 #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):
                setattr(Manager, str(o), 1)