From: Salvatore Orlando Date: Mon, 22 Aug 2011 14:30:54 +0000 (+0100) Subject: Merge trunk X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=4fc835dca3746a45f3a4eb8a03cbede3021f71dc;p=openstack-build%2Fneutron-build.git Merge trunk Solving conflict in common/exceptions.py Removing unused error code from client.py --- 4fc835dca3746a45f3a4eb8a03cbede3021f71dc diff --cc quantum/client.py index 517ba6d66,2e55dfb3e..6a58e641a --- a/quantum/client.py +++ b/quantum/client.py @@@ -20,12 -20,26 +20,24 @@@ import httpli import socket import urllib from quantum.common.wsgi import Serializer + from quantum.common import exceptions + EXCEPTIONS = { + 400: exceptions.BadInputError, + 401: exceptions.NotAuthorized, + 420: exceptions.NetworkNotFound, + 421: exceptions.NetworkInUse, - 422: exceptions.NetworkNameExists, + 430: exceptions.PortNotFound, + 431: exceptions.StateInvalid, + 432: exceptions.PortInUse, - 440: exceptions.AlreadyAttached, - 441: exceptions.AttachmentNotReady, ++ 440: exceptions.AlreadyAttached + } - class api_call(object): + + class ApiCall(object): """A Decorator to add support for format and tenant overriding""" - def __init__(self, f): - self.f = f + def __init__(self, function): + self.function = function def __get__(self, instance, owner): def with_params(*args, **kwargs):