def METHOD_NAME(index, direct=False):
    """
    Check the auto generated tap device name on the host
    param index: an integer range in {-1,}, the max index occupied, if there
                is no occupied, initial index is -1
    param direct: True or False.
                  True: the expected auto-generated tap device name should
                        be 'macvtap${index+1}'
                  False: the expected auto-generated tap device name should
                        be "vnet${index+1}"
    :return: None
    """
    cmd_output = process.run("ls /sys/class/net", shell=True,
                             ignore_status=True).stdout_text
    logging.debug("Current network interfaces on the host includes: %s",
                  cmd_output)
    index_ = int(index)
    if direct:
        expected_name = 'macvtap' + str(index_ + 1)
    else:
        expected_name = "vnet" + str(index_ + 1)
    if expected_name not in cmd_output:
        test.fail("Can not get the expected tap: %s" % expected_name)
    else:
        logging.debug("Get the expected tap: %s" % expected_name)
    return