예제 #1
0
파일: forms.py 프로젝트: katzj/horizon
 def handle(self, request, data):
     image_id = data["image_id"]
     try:
         api.image_delete(request, image_id)
     except glance_exception.ClientConnectionError, e:
         LOG.exception("Error connecting to glance")
         messages.error(request, _("Error connecting to glance: %s") % e.message)
예제 #2
0
 def handle(self, request, data):
     image_id = data['image_id']
     try:
         api.image_delete(request, image_id)
     except glance_exception.ClientConnectionError, e:
         LOG.exception("Error connecting to glance")
         messages.error(request,
                        _("Error connecting to glance: %s") % e.message)
예제 #3
0
파일: forms.py 프로젝트: ehazlett/horizon
 def handle(self, request, data):
     image_id = data['image_id']
     tenant_id = request.user.tenant_id
     try:
         image = api.image_get_meta(request, image_id)
         if image.owner == request.user.username:
             api.image_delete(request, image_id)
         else:
             messages.info(request, _("Unable to delete image, you are not \
                                      its owner."))
             return redirect('dash_images_update', tenant_id, image_id)
     except glance_exception.ClientConnectionError, e:
         LOG.exception("Error connecting to glance")
         messages.error(request, _("Error connecting to glance: %s")
                                 % e.message)
예제 #4
0
파일: forms.py 프로젝트: ehazlett/horizon
 def handle(self, request, data):
     image_id = data['image_id']
     tenant_id = request.user.tenant_id
     try:
         image = api.image_get_meta(request, image_id)
         if image.owner == request.user.username:
             api.image_delete(request, image_id)
         else:
             messages.info(
                 request,
                 _("Unable to delete image, you are not \
                                      its owner."))
             return redirect('dash_images_update', tenant_id, image_id)
     except glance_exception.ClientConnectionError, e:
         LOG.exception("Error connecting to glance")
         messages.error(request,
                        _("Error connecting to glance: %s") % e.message)
 def delete(self, request, obj_id):
     api.image_delete(request, obj_id)
예제 #6
0
 def delete(self, request, obj_id):
     api.image_delete(request, obj_id)