def _get_interface_type(self, if_name):
    if_type = None
    if_id = None
    for (interface_type, interface_regex) in iteritems(self.IF_TYPE_MAP):
        match = interface_regex.match(if_name)
        if match:
            if_type = interface_type
            if_id = match.group(1)
            break
    return (if_type, if_id)
def _get_interface_type(self, if_name):
    if_type = None
    if_id = None
    for (interface_type, interface_regex) in iteritems(self.IF_TYPE_MAP):
        match = interface_regex.match(if_name)
        if match:
            if_type = interface_type
            if_id = match.group(1)
            break
    return (if_type, if_id)