Fix import errors

Change-Id: I4d01af55904408692e991784ebab5de11cc1014a
stable/ocata
armando-migliaccio 8 years ago
parent 9abaed2f52
commit cbeb47ba42

@ -12,15 +12,16 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
from neutron.agent import rpc as agent_rpc
from neutron import context
from neutron.i18n import _LE
from neutron.i18n import _LI
from neutron.openstack.common import loopingcall
from neutron.openstack.common import periodic_task
from oslo.config import cfg
from oslo_config import cfg
from oslo_log import log as logging
from oslo_service import loopingcall
from oslo_service import periodic_task
from networking_l2gw.services.l2gateway.agent import agent_api
from networking_l2gw.services.l2gateway.common import constants as n_const
@ -33,8 +34,8 @@ class BaseAgentManager(periodic_task.PeriodicTasks):
"""Basic agent manager that handles basic RPCs and report states."""
def __init__(self, conf=None):
super(BaseAgentManager, self).__init__()
self.conf = conf or cfg.CONF
conf = getattr(self, "conf", cfg.CONF)
super(BaseAgentManager, self).__init__(conf)
self.l2gw_agent_type = ''
self.gateways = {}
self.plugin_rpc = agent_api.L2GatewayAgentApi(

@ -12,13 +12,16 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
from contextlib import contextmanager
import eventlet
from contextlib import contextmanager
from neutron import context as ctx
from neutron.i18n import _LE
from neutron.openstack.common import loopingcall
from oslo_config import cfg
from oslo_log import log as logging
from oslo_service import loopingcall
from networking_l2gw.services.l2gateway.agent import base_agent_manager
from networking_l2gw.services.l2gateway.agent import l2gateway_config
@ -26,10 +29,6 @@ from networking_l2gw.services.l2gateway.agent.ovsdb import ovsdb_monitor
from networking_l2gw.services.l2gateway.agent.ovsdb import ovsdb_writer
from networking_l2gw.services.l2gateway.common import constants as n_const
from oslo.config import cfg
from oslo_log import log as logging
LOG = logging.getLogger(__name__)

@ -12,15 +12,17 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.from oslo.config import cfg
from oslo.config import cfg
import random
from oslo_config import cfg
from oslo_log import log as logging
from oslo_service import loopingcall
from neutron import context as neutron_context
from neutron.db import agents_db
from neutron.i18n import _LE
from neutron import manager
from neutron.openstack.common import loopingcall
import random
from networking_l2gw.services.l2gateway.common import config
from networking_l2gw.services.l2gateway.common import constants as srv_const

@ -12,14 +12,15 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
from neutron.agent.common import config as agent_config
from neutron.common import config as common_config
from neutron.common import rpc as n_rpc
from neutron.openstack.common import service
import sys
from oslo.config import cfg
from oslo_config import cfg
from oslo_log import log as logging
from oslo_service import service
from networking_l2gw.services.l2gateway.agent.ovsdb import manager
from networking_l2gw.services.l2gateway.common import config
@ -45,4 +46,4 @@ def main():
topic=topics.L2GATEWAY_AGENT,
manager=mgr
)
service.launch(svc).wait()
service.launch(cfg.CONF, svc).wait()

@ -12,6 +12,7 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
import contextlib
import socket
@ -22,10 +23,10 @@ from neutron.agent.common import config as agent_config
from neutron.agent import rpc as agent_rpc
from neutron.common import rpc
from neutron import context
from neutron.openstack.common import loopingcall
from neutron.tests import base
from oslo.config import cfg
from oslo_config import cfg
from oslo_service import loopingcall
from networking_l2gw.services.l2gateway.agent import agent_api
from networking_l2gw.services.l2gateway.agent import base_agent_manager

@ -17,10 +17,10 @@ import mock
from neutron.agent.common import config as agent_config
from neutron.agent import rpc as agent_rpc
from neutron.openstack.common import loopingcall
from neutron.tests import base
from oslo.config import cfg
from oslo_config import cfg
from oslo_service import loopingcall
from networking_l2gw.services.l2gateway.agent import (base_agent_manager
as l2gw_manager)

@ -55,4 +55,4 @@ class TestL2gwAgent(base.BaseTestCase):
) as (mock_config, mock_logging, mock_launch, sys_argv,
mgr_cls, ro):
agent.main()
mock_launch.assert_called_once_with(mock.ANY)
mock_launch.assert_called_once_with(cfg.CONF, mock.ANY)

@ -13,19 +13,20 @@
# License for the specific language governing permissions and limitations
# under the License.
#
import contextlib
import copy
import datetime
import mock
from oslo.config import cfg
from oslo.utils import timeutils
from oslo_config import cfg
from oslo_service import loopingcall
from oslo_utils import timeutils
from neutron.common import topics
from neutron import context as neutron_context
from neutron.db import agents_db
from neutron import manager
from neutron.openstack.common import loopingcall
from neutron.plugins.ml2 import rpc
from neutron.tests import base

@ -2,7 +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
pbr<2.0,>=0.11
Babel>=1.3
python-neutronclient>=2.3.10
-e git+https://git.openstack.org/openstack/neutron.git#egg=neutron

Loading…
Cancel
Save