diff options
| author | Jenkins <jenkins@review.openstack.org> | 2012-04-10 22:11:26 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2012-04-10 22:11:26 +0000 |
| commit | 35005b08401f571ccd079e4f03595b78ae0cbe38 (patch) | |
| tree | d6047c2cce7a3a3faaf686d6fbf14bacabf385e6 /nova | |
| parent | a6ac8ce04909a4f9f230373957e46d340ec93ece (diff) | |
| parent | 8fbd897b5f55be8fe56dac583c726086beb0c8b9 (diff) | |
| download | nova-35005b08401f571ccd079e4f03595b78ae0cbe38.tar.gz nova-35005b08401f571ccd079e4f03595b78ae0cbe38.tar.xz nova-35005b08401f571ccd079e4f03595b78ae0cbe38.zip | |
Merge "Remove references to RemoteError in os-networks"
Diffstat (limited to 'nova')
| -rw-r--r-- | nova/api/openstack/compute/contrib/networks.py | 16 | ||||
| -rw-r--r-- | nova/tests/api/openstack/compute/contrib/test_networks.py | 3 |
2 files changed, 1 insertions, 18 deletions
diff --git a/nova/api/openstack/compute/contrib/networks.py b/nova/api/openstack/compute/contrib/networks.py index 3da8964b0..8b7a646a2 100644 --- a/nova/api/openstack/compute/contrib/networks.py +++ b/nova/api/openstack/compute/contrib/networks.py @@ -24,7 +24,6 @@ from nova import exception from nova import flags from nova import log as logging import nova.network.api -from nova.rpc import common FLAGS = flags.FLAGS @@ -76,11 +75,6 @@ class NetworkController(object): self.network_api.disassociate(context, network_id) except exception.NetworkNotFound: raise exc.HTTPNotFound(_("Network not found")) - except common.RemoteError as ex: - if ex.exc_type in ["NetworkNotFound", "NetworkNotFoundForUUID"]: - raise exc.HTTPNotFound(_("Network not found")) - else: - raise return exc.HTTPAccepted() def index(self, req): @@ -98,11 +92,6 @@ class NetworkController(object): network = self.network_api.get(context, id) except exception.NetworkNotFound: raise exc.HTTPNotFound(_("Network not found")) - except common.RemoteError as ex: - if ex.exc_type in ["NetworkNotFound", "NetworkNotFoundForUUID"]: - raise exc.HTTPNotFound(_("Network not found")) - else: - raise return {'network': network_dict(network)} def delete(self, req, id): @@ -113,11 +102,6 @@ class NetworkController(object): self.network_api.delete(context, id) except exception.NetworkNotFound: raise exc.HTTPNotFound(_("Network not found")) - except common.RemoteError as ex: - if ex.exc_type in ["NetworkNotFound", "NetworkNotFoundForUUID"]: - raise exc.HTTPNotFound(_("Network not found")) - else: - raise return exc.HTTPAccepted() def create(self, req, id, body=None): diff --git a/nova/tests/api/openstack/compute/contrib/test_networks.py b/nova/tests/api/openstack/compute/contrib/test_networks.py index c0580c6a7..c3f44fb70 100644 --- a/nova/tests/api/openstack/compute/contrib/test_networks.py +++ b/nova/tests/api/openstack/compute/contrib/test_networks.py @@ -20,7 +20,6 @@ import webob from nova.api.openstack.compute.contrib import networks from nova import exception -from nova.rpc import common from nova import test from nova.tests.api.openstack import fakes @@ -77,7 +76,7 @@ class FakeNetworkAPI(object): for i, network in enumerate(self.networks): if network.get('uuid') == network_id: return True - raise common.RemoteError(type(exception.NetworkNotFound()).__name__) + raise exception.NetworkNotFound() def get_all(self, context): return self.networks |
