(self, oid)
return OIDMatch(name=name, indexes=tag_index)
Resolve an OID to a name and its indexes.

        This will perform either:
        1. MIB-based resolution, if `oid` doesn't match any registered OID.
        2. Manual resolution, if `oid` matched. In this case, indexes are resolved using any registered mappings.

        Returns
        -------
        name: the name of the metric associated to `oid`.
        tag_index: a sequence of tag values. k-th item in the sequence corresponds to the k-th entry in `metric_tags`.
Resolve an OID to a name and its indexes.
Resolve an OID to a name and its indexes .
def resolve_oid(self, oid):
        # type: (OID) -> OIDMatch
        """Resolve an OID to a name and its indexes.

        This will perform either:
        1. MIB-based resolution, if `oid` doesn't match any registered OID.
        2. Manual resolution, if `oid` matched. In this case, indexes are resolved using any registered mappings.

        Returns
        -------
        name: the name of the metric associated to `oid`.
        tag_index: a sequence of tag values. k-th item in the sequence corresponds to the k-th entry in `metric_tags`.
        """
        parts = oid.as_tuple()
        prefix, name = self._resolver.match(parts)

        if name is None:
            return self._resolve_from_mibs(oid)

        # Example: parts: (1, 3, 6, 1, 2, 1, 1), prefix: (1, 3, 6, 1) -> tail: (2, 1, 1)
        tail = parts[len(prefix) :]

        tag_index = self._resolve_tag_index(tail, name=name)
        return OIDMatch(name=name, indexes=tag_index)
def resolve_oid ( self , oid ) : # type: (OID) -> OIDMatch parts = oid . as_tuple ( ) prefix , name = self . _resolver . match ( parts ) if name is None : return self . _resolve_from_mibs ( oid ) # Example: parts: (1, 3, 6, 1, 2, 1, 1), prefix: (1, 3, 6, 1) -> tail: (2, 1, 1) tail = parts [ len ( prefix ) : ] tag_index = self . _resolve_tag_index ( tail , name = name ) return OIDMatch ( name = name , indexes = tag_index )