]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commitdiff
Fix undefined variables.
authorAkihiro MOTOKI <motoki@da.jp.nec.com>
Sun, 19 Aug 2012 08:00:50 +0000 (17:00 +0900)
committerAkihiro MOTOKI <motoki@da.jp.nec.com>
Mon, 20 Aug 2012 05:49:19 +0000 (14:49 +0900)
Fixes bug 1038585

Change-Id: Ie38d2fd9408a3efaf876ff100d1576a170ff9f8d

quantum/extensions/quotasv2.py
quantum/plugins/metaplugin/proxy_quantum_plugin.py
quantum/plugins/nec/db/nec_plugin_base.py

index 7c5c6b45541d1911759e12ee68c8b88fbc3ad7fb..693ca492201719921681c57fbd902f03d14ac78d 100644 (file)
@@ -62,7 +62,7 @@ class QuotaSetsController(wsgi.Controller):
         return dict((k, v['limit']) for k, v in values.items())
 
     def create(self, request, body=None):
-        raise NotImplemented()
+        raise NotImplementedError()
 
     def index(self, request):
         context = request.context
index 846414641d7c2e10ed5112dc011556765b43d940..70f8615511248b936dc7677d489a1375f9b20ec7 100644 (file)
@@ -15,6 +15,8 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
+import logging
+
 from quantum.db import api as db
 from quantum.db import db_base_plugin_v2
 from quantum.db import models_v2
@@ -23,6 +25,9 @@ from quantumclient.common import exceptions
 from quantumclient.v2_0 import client
 
 
+LOG = logging.getLogger(__name__)
+
+
 class ProxyPluginV2(db_base_plugin_v2.QuantumDbPluginV2):
     def __init__(self, configfile=None):
         options = {"sql_connection": cfg.CONF.DATABASE.sql_connection}
@@ -70,7 +75,6 @@ class ProxyPluginV2(db_base_plugin_v2.QuantumDbPluginV2):
             self._get_client().delete_subnet(id)
         except exceptions.NotFound:
             LOG.warn("subnet in remote have already deleted")
-            pass
         return super(ProxyPluginV2, self).delete_subnet(context, id)
 
     def create_network(self, context, network):
@@ -97,9 +101,8 @@ class ProxyPluginV2(db_base_plugin_v2.QuantumDbPluginV2):
     def delete_network(self, context, id):
         try:
             self._get_client().delete_network(id)
-        except exceptions.NetworkNotFound:
+        except exceptions.NetworkNotFoundClient:
             LOG.warn("network in remote have already deleted")
-            pass
         return super(ProxyPluginV2, self).delete_network(context, id)
 
     def create_port(self, context, port):
@@ -126,7 +129,6 @@ class ProxyPluginV2(db_base_plugin_v2.QuantumDbPluginV2):
     def delete_port(self, context, id):
         try:
             self._get_client().delete_port(id)
-        except exceptions.portNotFound:
+        except exceptions.PortNotFoundClient:
             LOG.warn("port in remote have already deleted")
-            pass
         return super(ProxyPluginV2, self).delete_port(context, id)
index d99e2e3daa22762e9ad5eb693002b66dfc4252a8..a051abf6ce76d01267097cde26c3501e9b1e34a0 100644 (file)
 #    under the License.
 # @author: Ryota MIBU
 
+import logging
+
+from sqlalchemy.orm import exc
+
 from quantum.api.v2 import attributes
 from quantum.common import utils
 from quantum.db import db_base_plugin_v2
+from quantum.plugins.nec.common import exceptions as q_exc
 from quantum.plugins.nec.db import models as nmodels
 
 
+LOG = logging.getLogger(__name__)
+
+
 class NECPluginV2Base(db_base_plugin_v2.QuantumDbPluginV2):
 
     """ Base class of plugins that handle packet filters. """