'Create a volume access group(vag).
Returns the vag_id.'

def _create_vag(self, iqn, vol_id=None):

    vag_name = re.sub('[^0-9a-zA-Z]+', '-', iqn)
    params = {'name': vag_name, 'initiators': [iqn], 'volumes': [vol_id], 'attributes': {'openstack': True}}
    try:
        result = self._issue_api_request('CreateVolumeAccessGroup', params, version='7.0')
        return result['result']['volumeAccessGroupID']
    except exception.SolidFireAPIException as error:
        if (xExceededLimit in error.msg):
            if (iqn in error.msg):
                return self._safe_create_vag(iqn, vol_id)
            else:
                self._purge_vags()
                return self._safe_create_vag(iqn, vol_id)
        else:
            raise
