Rename agent_loadbalancer directory to loadbalancer
Rename agent_loadbalancer directory to loadbalancer. and move plugings/services directory one level up. Fix tests and imports accordingly fixes bug 1179276 Change-Id: If9e027b00824d612dfdd03e47efa9c08e419f205
This commit is contained in:
parent
7176de17bd
commit
1d9813765d
@ -25,7 +25,7 @@ from quantum.api.v2 import base
|
||||
from quantum.common import exceptions as qexception
|
||||
from quantum import manager
|
||||
from quantum.plugins.common import constants
|
||||
from quantum.plugins.services.service_base import ServicePluginBase
|
||||
from quantum.services.service_base import ServicePluginBase
|
||||
|
||||
|
||||
# Loadbalancer Exceptions
|
||||
|
@ -23,7 +23,7 @@ from quantum.agent.common import config
|
||||
from quantum.agent.linux import interface
|
||||
from quantum.openstack.common.rpc import service as rpc_service
|
||||
from quantum.openstack.common import service
|
||||
from quantum.plugins.services.agent_loadbalancer.drivers.haproxy import (
|
||||
from quantum.services.loadbalancer.drivers.haproxy import (
|
||||
agent_manager as manager,
|
||||
plugin_driver
|
||||
)
|
@ -25,7 +25,7 @@ from quantum import context
|
||||
from quantum.openstack.common import importutils
|
||||
from quantum.openstack.common import log as logging
|
||||
from quantum.openstack.common import periodic_task
|
||||
from quantum.plugins.services.agent_loadbalancer.drivers.haproxy import (
|
||||
from quantum.services.loadbalancer.drivers.haproxy import (
|
||||
agent_api,
|
||||
plugin_driver
|
||||
)
|
@ -22,7 +22,7 @@ from oslo.config import cfg
|
||||
|
||||
from quantum.agent.linux import utils
|
||||
from quantum.plugins.common import constants as qconstants
|
||||
from quantum.plugins.services.agent_loadbalancer import constants
|
||||
from quantum.services.loadbalancer import constants
|
||||
|
||||
|
||||
PROTOCOL_MAP = {
|
@ -25,9 +25,7 @@ from quantum.agent.linux import ip_lib
|
||||
from quantum.agent.linux import utils
|
||||
from quantum.common import exceptions
|
||||
from quantum.openstack.common import log as logging
|
||||
from quantum.plugins.services.agent_loadbalancer.drivers.haproxy import (
|
||||
cfg as hacfg
|
||||
)
|
||||
from quantum.services.loadbalancer.drivers.haproxy import cfg as hacfg
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
NS_PREFIX = 'qlbaas-'
|
@ -27,9 +27,7 @@ from quantum.openstack.common import log as logging
|
||||
from quantum.openstack.common import rpc
|
||||
from quantum.openstack.common.rpc import proxy
|
||||
from quantum.plugins.common import constants
|
||||
from quantum.plugins.services.agent_loadbalancer.drivers import (
|
||||
abstract_driver
|
||||
)
|
||||
from quantum.services.loadbalancer.drivers import abstract_driver
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
@ -18,7 +18,7 @@
|
||||
|
||||
|
||||
from quantum.openstack.common import log as logging
|
||||
from quantum.plugins.services.agent_loadbalancer.drivers import (
|
||||
from quantum.services.loadbalancer.drivers import (
|
||||
abstract_driver
|
||||
)
|
||||
|
@ -25,8 +25,7 @@ from quantum.plugins.common import constants
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
DEFAULT_DRIVER = ("quantum.plugins.services.agent_loadbalancer"
|
||||
".drivers.haproxy"
|
||||
DEFAULT_DRIVER = ("quantum.services.loadbalancer.drivers.haproxy"
|
||||
".plugin_driver.HaproxyOnHostPluginDriver")
|
||||
|
||||
lbaas_plugin_opts = [
|
@ -28,7 +28,7 @@ from quantum.db.loadbalancer import loadbalancer_db as ldb
|
||||
import quantum.extensions
|
||||
from quantum.extensions import loadbalancer
|
||||
from quantum.plugins.common import constants
|
||||
from quantum.plugins.services.agent_loadbalancer import (
|
||||
from quantum.services.loadbalancer import (
|
||||
plugin as loadbalancer_plugin
|
||||
)
|
||||
from quantum.tests.unit import test_db_plugin
|
||||
@ -38,7 +38,7 @@ LOG = logging.getLogger(__name__)
|
||||
|
||||
DB_CORE_PLUGIN_KLASS = 'quantum.db.db_base_plugin_v2.QuantumDbPluginV2'
|
||||
DB_LB_PLUGIN_KLASS = (
|
||||
"quantum.plugins.services.agent_loadbalancer."
|
||||
"quantum.services.loadbalancer."
|
||||
"plugin.LoadBalancerPlugin"
|
||||
)
|
||||
ROOTDIR = os.path.dirname(__file__) + '../../../..'
|
||||
|
@ -23,7 +23,7 @@ from quantum.extensions import servicetype
|
||||
from quantum import manager
|
||||
from quantum.openstack.common import uuidutils
|
||||
from quantum.plugins.common import constants
|
||||
from quantum.plugins.services.service_base import ServicePluginBase
|
||||
from quantum.services.service_base import ServicePluginBase
|
||||
|
||||
|
||||
DUMMY_PLUGIN_NAME = "dummy_plugin"
|
||||
|
@ -20,7 +20,7 @@ import contextlib
|
||||
import mock
|
||||
from oslo.config import cfg
|
||||
|
||||
from quantum.plugins.services.agent_loadbalancer.drivers.haproxy import agent
|
||||
from quantum.services.loadbalancer.drivers.haproxy import agent
|
||||
from quantum.tests import base
|
||||
|
||||
|
@ -20,7 +20,7 @@ import contextlib
|
||||
|
||||
import mock
|
||||
|
||||
from quantum.plugins.services.agent_loadbalancer.drivers.haproxy import (
|
||||
from quantum.services.loadbalancer.drivers.haproxy import (
|
||||
agent_manager as manager
|
||||
)
|
||||
from quantum.tests import base
|
||||
@ -147,7 +147,7 @@ class TestManager(base.BaseTestCase):
|
||||
self.mock_importer = mock.patch.object(manager, 'importutils').start()
|
||||
|
||||
rpc_mock_cls = mock.patch(
|
||||
'quantum.plugins.services.agent_loadbalancer.drivers'
|
||||
'quantum.services.loadbalancer.drivers'
|
||||
'.haproxy.agent_api.LbaasAgentApi'
|
||||
).start()
|
||||
|
@ -18,7 +18,7 @@
|
||||
|
||||
import mock
|
||||
|
||||
from quantum.plugins.services.agent_loadbalancer.drivers.haproxy import (
|
||||
from quantum.services.loadbalancer.drivers.haproxy import (
|
||||
agent_api as api
|
||||
)
|
||||
from quantum.tests import base
|
@ -22,20 +22,20 @@ import mock
|
||||
|
||||
from oslo.config import cfg as config
|
||||
|
||||
from quantum.plugins.services.agent_loadbalancer.drivers.haproxy import cfg
|
||||
from quantum.services.loadbalancer.drivers.haproxy import cfg
|
||||
from quantum.tests import base
|
||||
|
||||
|
||||
class TestHaproxyCfg(base.BaseTestCase):
|
||||
def test_save_config(self):
|
||||
with contextlib.nested(
|
||||
mock.patch('quantum.plugins.services.agent_loadbalancer.'
|
||||
mock.patch('quantum.services.loadbalancer.'
|
||||
'drivers.haproxy.cfg._build_global'),
|
||||
mock.patch('quantum.plugins.services.agent_loadbalancer.'
|
||||
mock.patch('quantum.services.loadbalancer.'
|
||||
'drivers.haproxy.cfg._build_defaults'),
|
||||
mock.patch('quantum.plugins.services.agent_loadbalancer.'
|
||||
mock.patch('quantum.services.loadbalancer.'
|
||||
'drivers.haproxy.cfg._build_frontend'),
|
||||
mock.patch('quantum.plugins.services.agent_loadbalancer.'
|
||||
mock.patch('quantum.services.loadbalancer.'
|
||||
'drivers.haproxy.cfg._build_backend'),
|
||||
mock.patch('quantum.agent.linux.utils.replace_file')
|
||||
) as (b_g, b_d, b_f, b_b, replace):
|
@ -20,7 +20,7 @@ import contextlib
|
||||
import mock
|
||||
|
||||
from quantum.common import exceptions
|
||||
from quantum.plugins.services.agent_loadbalancer.drivers.haproxy import (
|
||||
from quantum.services.loadbalancer.drivers.haproxy import (
|
||||
namespace_driver
|
||||
)
|
||||
from quantum.tests import base
|
@ -24,7 +24,7 @@ from quantum.db.loadbalancer import loadbalancer_db as ldb
|
||||
from quantum import manager
|
||||
from quantum.openstack.common import uuidutils
|
||||
from quantum.plugins.common import constants
|
||||
from quantum.plugins.services.agent_loadbalancer.drivers.haproxy import (
|
||||
from quantum.services.loadbalancer.drivers.haproxy import (
|
||||
plugin_driver
|
||||
)
|
||||
from quantum.tests import base
|
Loading…
Reference in New Issue
Block a user