def METHOD_NAME(userid, image_path, os_version, profile,
                 cpu, memory, network_info, disks_list):
    """Deploy and provision a virtual machine.
    Input parameters:
    :userid:            USERID of the guest, no more than 8.
    :image_name:        path of the image file
    :os_version:        os version of the image file
    :profile:           profile of the userid
    :cpu:               the number of vcpus
    :memory:            memory
    :network_info:      dict of network info.members:
        :ip_addr:           ip address of vm
        :gateway:           gateway of net
        :vswitch_name:      switch name
        :cidr:              CIDR
    :disks_list:            list of disks to add.eg:
        disks_list = [{'size': '3g',
                       'is_boot_disk': True,
                       'disk_pool': 'ECKD:xcateckd'}]
    """
    # Import image if not exists
    import_image(image_path, os_version)
    # Start time
    spawn_start = time.time()
    # Create userid
    print("Creating userid %s ..." % userid)
    res = sdk_client.send_request('guest_create', userid, cpu, memory,
                                  disk_list=disks_list,
                                  user_profile=profile)
    if res and 'overallRC' in res and res['overallRC']:
        print("Error in guest_create: %s" % res)
    deploy_start = time.time()
    create_time = deploy_start - spawn_start
    print("%s create takes %s seconds" % (userid, create_time))
    # Deploy image to root disk
    image_name = os.path.basename(image_path)
    print("Deploying %s to %s ..." % (image_name, userid))
    res = sdk_client.send_request('guest_deploy', userid, image_name)
    if res and 'overallRC' in res and res['overallRC']:
        print("Error in guest_deploy: %s" % res)
    network_create = time.time()
    deploy_time = network_create - deploy_start
    print("%s deploy takes %s seconds" % (userid, deploy_time))
    # Create network device and configure network interface
    res = sdk_client.send_request('guest_create_network_interface', userid,
                                  os_version, [network_info])
    if res and 'overallRC' in res and res['overallRC']:
        print("Error in guest_create_network_interface: %s" % res)
    res = sdk_client.send_request('guest_nic_couple_to_vswitch', userid,
                                  '1000', network_info['vswitch_name'])
    if res and 'overallRC' in res and res['overallRC']:
        print("Error in guest_nic_couple_to_vswitch: %s" % res)
    res = sdk_client.send_request('vswitch_grant_user',
                                  network_info['vswitch_name'],
                                  userid)
    if res and 'overallRC' in res and res['overallRC']:
        print("Error in vswitch_grant_user: %s" % res)
    guest_start = time.time()
    network_time = guest_start - network_create
    print("%s configure network %s seconds" % (userid, network_time))
    # Power on the vm
    print("Starting guest %s" % userid)
    sdk_client.send_request('guest_start', userid)
    if res and 'overallRC' in res and res['overallRC']:
        print("Error in guest_start: %s" % res)
    # End time
    spawn_time = time.time() - spawn_start
    print("%s test completed in %s seconds" % (userid, spawn_time))