'Get project stats.
Get available space and total space of a project
returns (avail, total).'

def get_project_stats(self, pool, project):

    svc = ('/api/storage/v1/pools/%s/projects/%s' % (pool, project))
    ret = self.rclient.get(svc)
    if (ret.status != restclient.Status.OK):
        exception_msg = (_('Error    Getting    Project    Stats:    Pool:    %(pool)s    Project:    %(project)s    Return    code:    %(ret.status)d    Message:    %(ret.data)s.') % {'pool': pool, 'project': project, 'ret.status': ret.status, 'ret.data': ret.data})
        LOG.error(exception_msg)
        raise exception.VolumeBackendAPIException(data=exception_msg)
    val = json.loads(ret.data)
    avail = val['project']['space_available']
    total = (avail + val['project']['space_total'])
    return (avail, total)
