Beispiel #1
0
 def _locate(self, attribute):
     for m in loaded:
         try:
             a = mib.get(m, attribute)
             return (m, a)
         except mib.SMIException:
             pass
     raise AttributeError("%s is not an attribute" % attribute)
Beispiel #2
0
 def _locate(self, attribute):
     for m in loaded:
         try:
             a = mib.get(m, attribute)
             return (m,a)
         except mib.SMIException:
             pass
     raise AttributeError("%s is not an attribute" % attribute)
Beispiel #3
0
def build(mibname, entity, value):
    """Build a new basic type with the given value.

    @param mibname: MIB to use to locate the entity
    @param entity: entity that will be attached to this type
    @param value: initial value to set for the type
    @return: a Type instance
    """
    m = mib.get(mibname, entity)
    t = m.type(m, value)
    return t
Beispiel #4
0
def build(mibname, entity, value):
    """Build a new basic type with the given value.

    @param mibname: MIB to use to locate the entity
    @param entity: entity that will be attached to this type
    @param value: initial value to set for the type
    @return: a Type instance
    """
    m = mib.get(mibname, entity)
    t = m.type(m, value)
    return t