Browse Source

Merge "Cleanup Arista VLAN Type Driver"

changes/29/569529/1
Zuul 3 years ago
committed by Gerrit Code Review
parent
commit
a181359061
  1. 2
      networking_arista/common/constants.py
  2. 4
      networking_arista/common/exceptions.py
  3. 0
      networking_arista/ml2/type_drivers/__init__.py
  4. 0
      networking_arista/ml2/type_drivers/driver_helpers.py
  5. 4
      networking_arista/ml2/type_drivers/type_arista_vlan.py
  6. 0
      networking_arista/tests/unit/ml2/type_drivers/test_arista_type_driver.py
  7. 2
      setup.cfg

2
networking_arista/common/constants.py

@ -53,6 +53,4 @@ MECHANISM_DRV_NAME = 'arista'
# EAPI error messages of interest
EOS_UNREACHABLE_MSG = _('Unable to reach EOS')
UNABLE_TO_DELETE_PORT_MSG = _('Unable to delete port from EOS')
UNABLE_TO_DELETE_DEVICE_MSG = _('Unable to delete device')
ERR_CVX_NOT_LEADER = _('Only available on cluster leader')

4
networking_arista/common/exceptions.py

@ -37,10 +37,6 @@ class AristaServicePluginConfigError(exceptions.NeutronException):
message = _('%(msg)s')
class AristaSecurityGroupError(exceptions.NeutronException):
message = _('%(msg)s')
class VlanUnavailable(exceptions.NeutronException):
"""An exception indicating VLAN creation failed because it's not available.

0
networking_arista/ml2/drivers/__init__.py → networking_arista/ml2/type_drivers/__init__.py

0
networking_arista/ml2/drivers/driver_helpers.py → networking_arista/ml2/type_drivers/driver_helpers.py

4
networking_arista/ml2/drivers/type_arista_vlan.py → networking_arista/ml2/type_drivers/type_arista_vlan.py

@ -21,7 +21,6 @@ from oslo_log import log
from neutron.plugins.ml2.drivers import type_vlan
from networking_arista._i18n import _LI
from networking_arista.common import db_lib
from networking_arista.common import exceptions as exc
from networking_arista.ml2.drivers import driver_helpers
from networking_arista.ml2.rpc.arista_eapi import AristaRPCWrapperEapi
@ -43,8 +42,7 @@ class AristaVlanTypeDriver(type_vlan.VlanTypeDriver):
def __init__(self):
super(AristaVlanTypeDriver, self).__init__()
ndb = db_lib.NeutronNets()
self.rpc = AristaRPCWrapperEapi(ndb)
self.rpc = AristaRPCWrapperEapi()
self.sync_service = driver_helpers.VlanSyncService(self.rpc)
self.network_vlan_ranges = dict()
self.sync_timeout = cfg.CONF.arista_type_driver['sync_interval']

0
networking_arista/tests/unit/ml2/drivers/test_arista_type_driver.py → networking_arista/tests/unit/ml2/type_drivers/test_arista_type_driver.py

2
setup.cfg

@ -40,7 +40,7 @@ neutron.service_plugins =
neutron.db.alembic_migrations =
networking-arista = networking_arista.db.migration:alembic_migrations
neutron.ml2.type_drivers =
arista_vlan = networking_arista.ml2.drivers.type_arista_vlan:AristaVlanTypeDriver
arista_vlan = networking_arista.ml2.type_drivers.type_arista_vlan:AristaVlanTypeDriver
[build_sphinx]
source-dir = doc/source

Loading…
Cancel
Save