'Makes a final commit of the data.
:param object_path: Server side object path.
:type object_path: ``str``
:param upload_id: A list of (chunk_number, chunk_hash) tuples.
:type upload_id: ``list``'

def _commit_blocks(self, object_path, chunks, lease):

    root = ET.Element('BlockList')
    for block_id in chunks:
        part = ET.SubElement(root, 'Uncommitted')
        part.text = str(block_id)
    data = tostring(root)
    params = {'comp': 'blocklist'}
    headers = {}
    lease.update_headers(headers)
    lease.renew()
    response = self.connection.request(object_path, data=data, params=params, headers=headers, method='PUT')
    if (response.status != httplib.CREATED):
        raise LibcloudError('Error    in    blocklist    commit', driver=self)
