'Delete SolidFire Volume from device.
SolidFire allows multiple volumes with same name,
volumeID is what\'s guaranteed unique.'

def delete_volume(self, volume):

    sf_vol = None
    accounts = self._get_sfaccounts_for_tenant(volume['project_id'])
    if (accounts is None):
        LOG.error('Account    for    Volume    ID    %s    was    not    found    on    the    SolidFire    Cluster    while    attempting    delete_volume    operation!', volume['id'])
        LOG.error('This    usually    means    the    volume    was    never    successfully    created.')
        return
    for acc in accounts:
        vols = self._get_volumes_for_account(acc['accountID'], volume['name_id'])
        if vols:
            sf_vol = vols[0]
            break
    if (sf_vol is not None):
        for vp in sf_vol.get('volumePairs', []):
            LOG.debug('Deleting    paired    volume    on    remote    cluster...')
            pair_id = vp['clusterPairID']
            for cluster in self.cluster_pairs:
                if (cluster['clusterPairID'] == pair_id):
                    params = {'volumeID': vp['remoteVolumeID']}
                    LOG.debug('Issue    Delete    request    on    cluster:    %(remote)s    with    params:    %(parameters)s', {'remote': cluster['endpoint']['url'], 'parameters': params})
                    self._issue_api_request('DeleteVolume', params, endpoint=cluster['endpoint'])
                    self._issue_api_request('PurgeDeletedVolume', params, endpoint=cluster['endpoint'])
        if (sf_vol['status'] == 'active'):
            params = {'volumeID': sf_vol['volumeID']}
            self._issue_api_request('DeleteVolume', params)
            self._issue_api_request('PurgeDeletedVolume', params)
        if volume.get('multiattach'):
            self._remove_volume_from_vags(sf_vol['volumeID'])
    else:
        LOG.error('Volume    ID    %s    was    not    found    on    the    SolidFire    Cluster    while    attempting    delete_volume    operation!', volume['id'])
