summaryrefslogtreecommitdiffstats
path: root/nova/api
diff options
context:
space:
mode:
Diffstat (limited to 'nova/api')
-rw-r--r--nova/api/openstack/compute/contrib/networks.py16
1 files changed, 0 insertions, 16 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):