def canonical_interface_name(interface, addl_name_map=None):
name_map = {}<EOL>name_map.update(base_interfaces)<EOL>interface_type, interface_number = split_interface(interface)<EOL>if isinstance(addl_name_map, dict):<EOL><INDENT>name_map.update(addl_name_map)<EOL><DEDENT>if name_map.get(interface_type):<EOL><INDENT>long_int = name_map.get(interface_type)<EOL>return long_int + py23_compat.text_type(interface_number)<EOL><DEDENT>else:<EOL><INDENT>return interface<EOL><DEDENT>
Function to return an interface's canonical name (fully expanded name).

    Use of explicit matches used to indicate a clear understanding on any potential
    match. Regex and other looser matching methods were not implmented to avoid false
    positive matches. As an example, it would make sense to do "[P|p][O|o]" which would
    incorrectly match PO = POS and Po = Port-channel, leading to a false positive, not
    easily troubleshot, found, or known.

    :param interface: The interface you are attempting to expand.
    :param addl_name_map (optional): A dict containing key/value pairs that updates
    the base mapping. Used if an OS has specific differences. e.g. {"Po": "PortChannel"} vs
    {"Po": "Port-Channel"}