'Returns True if the pool\'s owner is the same as the host.'

def _is_pool_owned(self, pdata):

    svc = '/api/system/v1/version'
    ret = self.rclient.get(svc)
    if (ret.status != restclient.Status.OK):
        exception_msg = (_('Error    getting    version:    svc:    %(svc)s.Return    code:    %(ret.status)d    Message:    %(ret.data)s.') % {'svc': svc, 'ret.status': ret.status, 'ret.data': ret.data})
        LOG.error(exception_msg)
        raise exception.VolumeBackendAPIException(data=exception_msg)
    vdata = json.loads(ret.data)
    return ((vdata['version']['asn'] == pdata['pool']['asn']) and (vdata['version']['nodename'] == pdata['pool']['owner']))
