'Returns available thin pool free space.
:param vg_name: the vg where the pool is placed
:param thin_pool_name: the thin pool to gather info for
:returns: Free space in GB (float), calculated using data_percent'

def _get_thin_pool_free_space(self, vg_name, thin_pool_name):

    cmd = (LVM.LVM_CMD_PREFIX + ['lvs', '--noheadings', '--unit=g', '-o', 'size,data_percent', '--separator', ':', '--nosuffix'])
    cmd.append(('/dev/%s/%s' % (vg_name, thin_pool_name)))
    free_space = 0.0
    try:
        (out, err) = self._execute(root_helper=self._root_helper, run_as_root=True, *cmd)
        if (out is not None):
            out = out.strip()
            data = out.split(':')
            pool_size = float(data[0])
            data_percent = float(data[1])
            consumed_space = ((pool_size / 100) * data_percent)
            free_space = (pool_size - consumed_space)
            free_space = round(free_space, 2)
    except putils.ProcessExecutionError as err:
        LOG.exception('Error    querying    thin    pool    about    data_percent')
        LOG.error('Cmd                    :%s', err.cmd)
        LOG.error('StdOut        :%s', err.stdout)
        LOG.error('StdErr        :%s', err.stderr)
    return free_space
