示例#1
0
文件: forms.py 项目: katzj/horizon
 def handle(self, request, data):
     try:
         flavor_id = data["flavorid"]
         flavor = api.flavor_get(request, flavor_id)
         LOG.info('Deleting flavor with id "%s"' % flavor_id)
         api.flavor_delete(request, flavor_id, False)
         messages.info(request, _("Successfully deleted flavor: %s") % flavor.name)
     except api_exceptions.ApiException, e:
         messages.error(request, _("Unable to delete flavor: %s") % e.message)
示例#2
0
 def handle(self, request, data):
     try:
         flavor_id = data['flavorid']
         flavor = api.flavor_get(request, flavor_id)
         LOG.info('Deleting flavor with id "%s"' % flavor_id)
         api.flavor_delete(request, flavor_id, False)
         messages.info(request,
                       _('Successfully deleted flavor: %s') % flavor.name)
     except api_exceptions.ApiException, e:
         messages.error(request,
                        _('Unable to delete flavor: %s') % e.message)
示例#3
0
 def delete(self, request, obj_id):
     api.flavor_delete(request, obj_id)
 def delete(self, request, obj_id):
     api.flavor_delete(request, obj_id)