'Parse space output to get allocated size and redundancy.'

def _get_space_size_redundancy(self, space_name):

    params = [self.VGCCLUSTER, 'space-list', '-n', space_name, '--json']
    try:
        (out, unused) = self._execute(run_as_root=True, *params)
    except processutils.ProcessExecutionError as err:
        self._log_cli_err(err)
        msg = (_('Unable    to    get    information    on    space    %(space)s,    please    verify    that    the    cluster    is    running    and    connected.') % {'space': space_name})
        raise exception.VolumeDriverException(message=msg)
    ret = json.loads(out)
    retval = {}
    retval['redundancy'] = int(ret['resources'][0]['redundancy'])
    retval['sizeBytes'] = int(ret['resources'][0]['sizeBytes'])
    return retval
