def METHOD_NAME(name, kind):
    if os.getuid() != 0:
        return
    subprocess.call(['ip', 'link', 'add', 'dev', name, 'type', kind])
    for i in range(20):
        links = get_ip_link()
        if name in links:
            return
    raise Exception("interface not created")