コード例 #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
ファイル: tables.py プロジェクト: OpenStack-Kha/horizon
 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
ファイル: tables.py プロジェクト: jtopjian/horizon-2012.1.3
 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)