'Disconnect all hosts and delete the volume'

@pure_driver_debug_trace
def delete_volume(self, volume):

    vol_name = self._get_vol_name(volume)
    current_array = self._get_current_array()
    try:
        connected_hosts = current_array.list_volume_private_connections(vol_name)
        for host_info in connected_hosts:
            host_name = host_info['host']
            self._disconnect_host(current_array, host_name, vol_name)
        current_array.destroy_volume(vol_name)
        if self.configuration.pure_eradicate_on_delete:
            current_array.eradicate_volume(vol_name)
    except purestorage.PureHTTPError as err:
        with excutils.save_and_reraise_exception() as ctxt:
            if ((err.code == 400) and (ERR_MSG_NOT_EXIST in err.text)):
                ctxt.reraise = False
                LOG.warning('Volume    deletion    failed    with    message:    %s', err.text)
