def handle(self, request, data): try: api.volume_detach(request, data['instance_id'], data['attachment_id']) message = (_('Detaching volume %s from instance %s') % (data['volume_id'], data['instance_id'])) LOG.info(message) messages.info(request, message) except novaclient_exceptions.ClientException, e: LOG.exception("ClientException in DetachVolume") messages.error(request, _('Error detaching volume: %s') % e.message)