Browse Source

Migrate to oslo.log

Neutron has moved to oslo.log for all logging and
the log module in neutron has been removed.
networking-arista was using the log module which
caused the driver to fail loading.

Change-Id: I433a15d66a6bb7d8e3f4992d31fceedd97169616
changes/95/164295/3
Shashank Hegde 7 years ago
parent
commit
2958996cfa
  1. 8
      networking_arista/common/db_lib.py
  2. 2
      networking_arista/ml2/arista_ml2.py
  3. 2
      networking_arista/tests/unit/ml2/test_arista_mechanism_driver.py
  4. 3
      requirements.txt

8
networking_arista/common/db_lib.py

@ -331,6 +331,14 @@ class NeutronNets(db_base_plugin_v2.NeutronDbPluginV2):
return super(NeutronNets,
self).get_ports(self.admin_ctx, filters=filters) or []
def get_shared_network_owner_id(self, network_id):
filters = {'id': [network_id]}
nets = self.get_networks(self.admin_ctx, filters=filters) or []
if not nets:
return
if nets[0]['shared']:
return nets[0]['tenant_id']
def _get_network(self, tenant_id, network_id):
filters = {'tenant_id': [tenant_id],
'id': [network_id]}

2
networking_arista/ml2/arista_ml2.py

@ -17,11 +17,11 @@ import itertools
import jsonrpclib
from oslo.config import cfg
from oslo_log import log as logging
from neutron.common import constants as n_const
from neutron.i18n import _LI
from neutron.i18n import _LW
from neutron.openstack.common import log as logging
from neutron.plugins.ml2.drivers.arista import exceptions as arista_exc
from networking_arista.common import db_lib

2
networking_arista/tests/unit/ml2/test_arista_mechanism_driver.py

@ -765,7 +765,7 @@ class FakePortContext(object):
return self._original_port.get(portbindings.HOST_ID)
class SyncServiceTest(base.BaseTestCase):
class SyncServiceTest(testlib_api.SqlTestCase):
"""Test cases for the sync service."""
def setUp(self):

3
requirements.txt

@ -2,6 +2,7 @@
# of appearance. Changing the order has an impact on the overall integration
# process, which may cause wedges in the gate later.
pbr>=0.6,!=0.7,<1.0
Babel>=1.3
oslo.log>=0.4.0 # Apache-2.0
pbr>=0.6,!=0.7,<1.0
-e git://git.openstack.org/openstack/neutron.git#egg=neutron

Loading…
Cancel
Save