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)
def action(self, request, obj_id): attachment = self.table.get_object_by_id(obj_id) api.volume_detach(request, attachment.get('server_id', None), obj_id)
def action(self, request, obj_id): instance_id = self.table.get_object_by_id(obj_id)['serverId'] api.volume_detach(request, instance_id, obj_id)
def action(self, request, obj_id): instance_id = self.table.get_object_by_id(obj_id)['server_id'] api.volume_detach(request, instance_id, obj_id)