def split_interface_name(interface, ch_grp=<NUM_LIT:0>):
interface = interface.lower()<EOL>if ch_grp != <NUM_LIT:0>:<EOL><INDENT>intf_type = '<STR_LIT>'<EOL>port = str(ch_grp)<EOL><DEDENT>elif '<STR_LIT::>' in interface:<EOL><INDENT>intf_type, port = interface.split('<STR_LIT::>')<EOL><DEDENT>elif interface.startswith('<STR_LIT>'):<EOL><INDENT>interface = interface.replace("<STR_LIT:U+0020>", "<STR_LIT>")<EOL>_, intf_type, port = interface.partition('<STR_LIT>')<EOL><DEDENT>elif interface.startswith('<STR_LIT>'):<EOL><INDENT>interface = interface.replace("<STR_LIT:U+0020>", "<STR_LIT>")<EOL>_, intf_type, port = interface.partition('<STR_LIT>')<EOL><DEDENT>else:<EOL><INDENT>intf_type, port = '<STR_LIT>', interface<EOL><DEDENT>return intf_type, port<EOL>
Method to split interface type, id from name.

    Takes an interface name or just interface suffix
    and returns interface type and number separately.

    :param interface: interface name or just suffix
    :param ch_grp: if non-zero, ignore interface
                   name and return 'port-channel' grp
    :returns: interface type like 'ethernet'
    :returns: returns suffix to interface name