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)
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)
def delete(self, request, obj_id): api.flavor_delete(request, obj_id)