def download_object(container_name, object_name, destination_path, profile,
                    overwrite_existing=False, delete_on_failure=True, **libcloud_kwargs):
    '''
    Download an object to the specified destination path.

    :param container_name: Container name
    :type  container_name: ``str``

    :param object_name: Object name
    :type  object_name: ``str``

    :param destination_path: Full path to a file or a directory where the
                                incoming file will be saved.
    :type destination_path: ``str``

    :param profile: The profile key
    :type  profile: ``str``

    :param overwrite_existing: True to overwrite an existing file,
                                defaults to False.
    :type overwrite_existing: ``bool``

    :param delete_on_failure: True to delete a partially downloaded file if
                                the download was not successful (hash
                                mismatch / file size).
    :type delete_on_failure: ``bool``

    :param libcloud_kwargs: Extra arguments for the driver's download_object method
    :type  libcloud_kwargs: ``dict``

    :return: True if an object has been successfully downloaded, False
                otherwise.
    :rtype: ``bool``

    CLI Example:

    .. code-block:: bash

        salt myminion libcloud_storage.download_object MyFolder me.jpg /tmp/me.jpg profile1

    '''
    conn = _get_driver(profile=profile)
    obj = conn.get_object(container_name, object_name)
    libcloud_kwargs = salt.utils.args.clean_kwargs(**libcloud_kwargs)
    return conn.download_object(obj, destination_path, overwrite_existing, delete_on_failure, **libcloud_kwargs)
def download_object ( container_name , object_name , destination_path , profile , overwrite_existing = False , delete_on_failure = True , ** libcloud_kwargs ) : conn = _get_driver ( profile = profile ) obj = conn . get_object ( container_name , object_name ) libcloud_kwargs = salt . utils . args . clean_kwargs ( ** libcloud_kwargs ) return conn . download_object ( obj , destination_path , overwrite_existing , delete_on_failure , ** libcloud_kwargs )
Download an object to the specified destination path.

    :param container_name: Container name
    :type  container_name: ``str``

    :param object_name: Object name
    :type  object_name: ``str``

    :param destination_path: Full path to a file or a directory where the
                                incoming file will be saved.
    :type destination_path: ``str``

    :param profile: The profile key
    :type  profile: ``str``

    :param overwrite_existing: True to overwrite an existing file,
                                defaults to False.
    :type overwrite_existing: ``bool``

    :param delete_on_failure: True to delete a partially downloaded file if
                                the download was not successful (hash
                                mismatch / file size).
    :type delete_on_failure: ``bool``

    :param libcloud_kwargs: Extra arguments for the driver's download_object method
    :type  libcloud_kwargs: ``dict``

    :return: True if an object has been successfully downloaded, False
                otherwise.
    :rtype: ``bool``

    CLI Example:

    .. code-block:: bash

        salt myminion libcloud_storage.download_object MyFolder me.jpg /tmp/me.jpg profile1