'Delete volume on ETERNUS.'

@lockutils.synchronized('ETERNUS-vol', 'cinder-', True)
def _delete_volume(self, vol_instance):

    LOG.debug('_delete_volume,    volume    name:    %s.', vol_instance['ElementName'])
    volumename = vol_instance['ElementName']
    configservice = self._find_eternus_service(STOR_CONF)
    if (configservice is None):
        msg = (_('_delete_volume,    volumename:    %(volumename)s,    Storage    Configuration    Service    not    found.') % {'volumename': volumename})
        LOG.error(msg)
        raise exception.VolumeBackendAPIException(data=msg)
    LOG.debug('_delete_volume,    volumename:    %(volumename)s,    vol_instance:    %(vol_instance)s,    Method:    ReturnToStoragePool.', {'volumename': volumename, 'vol_instance': vol_instance.path})
    (rc, errordesc, job) = self._exec_eternus_service('ReturnToStoragePool', configservice, TheElement=vol_instance.path)
    if (rc != 0):
        msg = (_('_delete_volume,    volumename:    %(volumename)s,    Return    code:    %(rc)lu,    Error:    %(errordesc)s.') % {'volumename': volumename, 'rc': rc, 'errordesc': errordesc})
        LOG.error(msg)
        raise exception.VolumeBackendAPIException(data=msg)
    LOG.debug('_delete_volume,    volumename:    %(volumename)s,    Return    code:    %(rc)lu,    Error:    %(errordesc)s.', {'volumename': volumename, 'rc': rc, 'errordesc': errordesc})
