Fix undefined variables.
Fixes bug 1038585 Change-Id: Ie38d2fd9408a3efaf876ff100d1576a170ff9f8d
This commit is contained in:
parent
7afb37af76
commit
477cdc48cf
@ -62,7 +62,7 @@ class QuotaSetsController(wsgi.Controller):
|
|||||||
return dict((k, v['limit']) for k, v in values.items())
|
return dict((k, v['limit']) for k, v in values.items())
|
||||||
|
|
||||||
def create(self, request, body=None):
|
def create(self, request, body=None):
|
||||||
raise NotImplemented()
|
raise NotImplementedError()
|
||||||
|
|
||||||
def index(self, request):
|
def index(self, request):
|
||||||
context = request.context
|
context = request.context
|
||||||
|
@ -15,6 +15,8 @@
|
|||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
|
import logging
|
||||||
|
|
||||||
from quantum.db import api as db
|
from quantum.db import api as db
|
||||||
from quantum.db import db_base_plugin_v2
|
from quantum.db import db_base_plugin_v2
|
||||||
from quantum.db import models_v2
|
from quantum.db import models_v2
|
||||||
@ -23,6 +25,9 @@ from quantumclient.common import exceptions
|
|||||||
from quantumclient.v2_0 import client
|
from quantumclient.v2_0 import client
|
||||||
|
|
||||||
|
|
||||||
|
LOG = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
class ProxyPluginV2(db_base_plugin_v2.QuantumDbPluginV2):
|
class ProxyPluginV2(db_base_plugin_v2.QuantumDbPluginV2):
|
||||||
def __init__(self, configfile=None):
|
def __init__(self, configfile=None):
|
||||||
options = {"sql_connection": cfg.CONF.DATABASE.sql_connection}
|
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)
|
self._get_client().delete_subnet(id)
|
||||||
except exceptions.NotFound:
|
except exceptions.NotFound:
|
||||||
LOG.warn("subnet in remote have already deleted")
|
LOG.warn("subnet in remote have already deleted")
|
||||||
pass
|
|
||||||
return super(ProxyPluginV2, self).delete_subnet(context, id)
|
return super(ProxyPluginV2, self).delete_subnet(context, id)
|
||||||
|
|
||||||
def create_network(self, context, network):
|
def create_network(self, context, network):
|
||||||
@ -97,9 +101,8 @@ class ProxyPluginV2(db_base_plugin_v2.QuantumDbPluginV2):
|
|||||||
def delete_network(self, context, id):
|
def delete_network(self, context, id):
|
||||||
try:
|
try:
|
||||||
self._get_client().delete_network(id)
|
self._get_client().delete_network(id)
|
||||||
except exceptions.NetworkNotFound:
|
except exceptions.NetworkNotFoundClient:
|
||||||
LOG.warn("network in remote have already deleted")
|
LOG.warn("network in remote have already deleted")
|
||||||
pass
|
|
||||||
return super(ProxyPluginV2, self).delete_network(context, id)
|
return super(ProxyPluginV2, self).delete_network(context, id)
|
||||||
|
|
||||||
def create_port(self, context, port):
|
def create_port(self, context, port):
|
||||||
@ -126,7 +129,6 @@ class ProxyPluginV2(db_base_plugin_v2.QuantumDbPluginV2):
|
|||||||
def delete_port(self, context, id):
|
def delete_port(self, context, id):
|
||||||
try:
|
try:
|
||||||
self._get_client().delete_port(id)
|
self._get_client().delete_port(id)
|
||||||
except exceptions.portNotFound:
|
except exceptions.PortNotFoundClient:
|
||||||
LOG.warn("port in remote have already deleted")
|
LOG.warn("port in remote have already deleted")
|
||||||
pass
|
|
||||||
return super(ProxyPluginV2, self).delete_port(context, id)
|
return super(ProxyPluginV2, self).delete_port(context, id)
|
||||||
|
@ -15,12 +15,20 @@
|
|||||||
# under the License.
|
# under the License.
|
||||||
# @author: Ryota MIBU
|
# @author: Ryota MIBU
|
||||||
|
|
||||||
|
import logging
|
||||||
|
|
||||||
|
from sqlalchemy.orm import exc
|
||||||
|
|
||||||
from quantum.api.v2 import attributes
|
from quantum.api.v2 import attributes
|
||||||
from quantum.common import utils
|
from quantum.common import utils
|
||||||
from quantum.db import db_base_plugin_v2
|
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
|
from quantum.plugins.nec.db import models as nmodels
|
||||||
|
|
||||||
|
|
||||||
|
LOG = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
class NECPluginV2Base(db_base_plugin_v2.QuantumDbPluginV2):
|
class NECPluginV2Base(db_base_plugin_v2.QuantumDbPluginV2):
|
||||||
|
|
||||||
""" Base class of plugins that handle packet filters. """
|
""" Base class of plugins that handle packet filters. """
|
||||||
|
Loading…
Reference in New Issue
Block a user