示例#1
0
文件: forms.py 项目: katzj/horizon
 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)
示例#2
0
 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)
示例#3
0
文件: tables.py 项目: artofwar/stack
 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)
示例#4
0
 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)
示例#5
0
 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)
示例#6
0
 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)