Removed ovsdbapp deprecation warnings
neutron/agent/ovsdb/impl_idl.py:47: DeprecationWarning: Class 'neutron.agent.ovsdb.native.connection.Connection' has moved to 'ovsdbapp.backend.ovs_idl.connection.Connection' neutron/agent/ovsdb/impl_idl.py:57: DeprecationWarning: neutron.agent.ovsdb.native.vlog.use_python_logger: moved to ovsdbapp.backend.ovs_idl.vlog.use_python_logger The patch disabled a bunch of pylint checks for an existing line because otherwise it triggers pylint failures. The workaround will be removed later when the old API of ovsdbapp is no longer referred to. TrivialFix Change-Id: If702b79152a67b04a262b37606e5649abd0057a1
This commit is contained in:
parent
b6394f8520
commit
b09537d669
|
@ -14,11 +14,12 @@
|
|||
|
||||
from debtcollector import moves
|
||||
from oslo_config import cfg
|
||||
from ovsdbapp.backend.ovs_idl import connection
|
||||
from ovsdbapp.backend.ovs_idl import transaction
|
||||
from ovsdbapp.backend.ovs_idl import vlog
|
||||
from ovsdbapp.schema.open_vswitch import impl_idl
|
||||
|
||||
from neutron.agent.ovsdb.native import connection
|
||||
from neutron.agent.ovsdb.native import vlog
|
||||
from neutron.agent.ovsdb.native import connection as n_connection
|
||||
from neutron.conf.agent import ovs_conf
|
||||
|
||||
NeutronOVSDBTransaction = moves.moved_class(
|
||||
|
@ -43,11 +44,12 @@ def api_factory(context):
|
|||
if _connection is None:
|
||||
try:
|
||||
_connection = connection.Connection(
|
||||
idl=connection.idl_factory(),
|
||||
idl=n_connection.idl_factory(),
|
||||
timeout=cfg.CONF.ovs_vsctl_timeout)
|
||||
except TypeError:
|
||||
#pylint: disable=unexpected-keyword-arg,no-value-for-parameter
|
||||
_connection = connection.Connection(
|
||||
idl_factory=connection.idl_factory,
|
||||
idl_factory=n_connection.idl_factory, # noqa
|
||||
timeout=cfg.CONF.ovs_vsctl_timeout)
|
||||
return NeutronOvsdbIdl(_connection)
|
||||
|
||||
|
|
Loading…
Reference in New Issue