'Updates the file size of the specified image.'

def _update_image_size(self, vi):

    ds_browser = self._get_ds_browser(vi.datastore.ref)
    flat_file = ('%s-flat.vmdk' % vi.ii.image_id)
    new_size = ds_util.file_size(self._session, ds_browser, vi.cache_image_folder, flat_file)
    if (new_size is not None):
        vi.ii.file_size = new_size
