Fix undefined variables.

Fixes bug 1038585

Change-Id: Ie38d2fd9408a3efaf876ff100d1576a170ff9f8d
This commit is contained in:
Akihiro MOTOKI 2012-08-19 17:00:50 +09:00
parent 7afb37af76
commit 477cdc48cf
3 changed files with 16 additions and 6 deletions

View 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

View 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)

View File

@ -15,12 +15,20 @@
# 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. """