'Get an iSCSI target iqn.'

def get_target(self, alias):

    svc = ('/api/san/v1/iscsi/targets/alias=' + alias)
    ret = self.rclient.get(svc)
    if (ret.status != restclient.Status.OK):
        exception_msg = (_('Error    Getting    Target:    %(alias)sReturn    code:    %(ret.status)d    Message:    %(ret.data)s    .') % {'alias': alias, 'ret.status': ret.status, 'ret.data': ret.data})
        LOG.error(exception_msg)
        raise exception.VolumeBackendAPIException(data=exception_msg)
    val = json.loads(ret.data)
    return val['target']['iqn']
