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:
Eugene Nikanorov 2013-06-13 13:40:05 +04:00
parent 7176de17bd
commit 1d9813765d
29 changed files with 22 additions and 27 deletions

View File

@ -25,7 +25,7 @@ from quantum.api.v2 import base
from quantum.common import exceptions as qexception from quantum.common import exceptions as qexception
from quantum import manager from quantum import manager
from quantum.plugins.common import constants from quantum.plugins.common import constants
from quantum.plugins.services.service_base import ServicePluginBase from quantum.services.service_base import ServicePluginBase
# Loadbalancer Exceptions # Loadbalancer Exceptions

View File

@ -23,7 +23,7 @@ from quantum.agent.common import config
from quantum.agent.linux import interface from quantum.agent.linux import interface
from quantum.openstack.common.rpc import service as rpc_service from quantum.openstack.common.rpc import service as rpc_service
from quantum.openstack.common import 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, agent_manager as manager,
plugin_driver plugin_driver
) )

View File

@ -25,7 +25,7 @@ from quantum import context
from quantum.openstack.common import importutils from quantum.openstack.common import importutils
from quantum.openstack.common import log as logging from quantum.openstack.common import log as logging
from quantum.openstack.common import periodic_task 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, agent_api,
plugin_driver plugin_driver
) )

View File

@ -22,7 +22,7 @@ from oslo.config import cfg
from quantum.agent.linux import utils from quantum.agent.linux import utils
from quantum.plugins.common import constants as qconstants from quantum.plugins.common import constants as qconstants
from quantum.plugins.services.agent_loadbalancer import constants from quantum.services.loadbalancer import constants
PROTOCOL_MAP = { PROTOCOL_MAP = {

View File

@ -25,9 +25,7 @@ from quantum.agent.linux import ip_lib
from quantum.agent.linux import utils from quantum.agent.linux import utils
from quantum.common import exceptions from quantum.common import exceptions
from quantum.openstack.common import log as logging from quantum.openstack.common import log as logging
from quantum.plugins.services.agent_loadbalancer.drivers.haproxy import ( from quantum.services.loadbalancer.drivers.haproxy import cfg as hacfg
cfg as hacfg
)
LOG = logging.getLogger(__name__) LOG = logging.getLogger(__name__)
NS_PREFIX = 'qlbaas-' NS_PREFIX = 'qlbaas-'

View File

@ -27,9 +27,7 @@ from quantum.openstack.common import log as logging
from quantum.openstack.common import rpc from quantum.openstack.common import rpc
from quantum.openstack.common.rpc import proxy from quantum.openstack.common.rpc import proxy
from quantum.plugins.common import constants from quantum.plugins.common import constants
from quantum.plugins.services.agent_loadbalancer.drivers import ( from quantum.services.loadbalancer.drivers import abstract_driver
abstract_driver
)
LOG = logging.getLogger(__name__) LOG = logging.getLogger(__name__)

View File

@ -18,7 +18,7 @@
from quantum.openstack.common import log as logging from quantum.openstack.common import log as logging
from quantum.plugins.services.agent_loadbalancer.drivers import ( from quantum.services.loadbalancer.drivers import (
abstract_driver abstract_driver
) )

View File

@ -25,8 +25,7 @@ from quantum.plugins.common import constants
LOG = logging.getLogger(__name__) LOG = logging.getLogger(__name__)
DEFAULT_DRIVER = ("quantum.plugins.services.agent_loadbalancer" DEFAULT_DRIVER = ("quantum.services.loadbalancer.drivers.haproxy"
".drivers.haproxy"
".plugin_driver.HaproxyOnHostPluginDriver") ".plugin_driver.HaproxyOnHostPluginDriver")
lbaas_plugin_opts = [ lbaas_plugin_opts = [

View File

@ -28,7 +28,7 @@ from quantum.db.loadbalancer import loadbalancer_db as ldb
import quantum.extensions import quantum.extensions
from quantum.extensions import loadbalancer from quantum.extensions import loadbalancer
from quantum.plugins.common import constants from quantum.plugins.common import constants
from quantum.plugins.services.agent_loadbalancer import ( from quantum.services.loadbalancer import (
plugin as loadbalancer_plugin plugin as loadbalancer_plugin
) )
from quantum.tests.unit import test_db_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_CORE_PLUGIN_KLASS = 'quantum.db.db_base_plugin_v2.QuantumDbPluginV2'
DB_LB_PLUGIN_KLASS = ( DB_LB_PLUGIN_KLASS = (
"quantum.plugins.services.agent_loadbalancer." "quantum.services.loadbalancer."
"plugin.LoadBalancerPlugin" "plugin.LoadBalancerPlugin"
) )
ROOTDIR = os.path.dirname(__file__) + '../../../..' ROOTDIR = os.path.dirname(__file__) + '../../../..'

View File

@ -23,7 +23,7 @@ from quantum.extensions import servicetype
from quantum import manager from quantum import manager
from quantum.openstack.common import uuidutils from quantum.openstack.common import uuidutils
from quantum.plugins.common import constants 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" DUMMY_PLUGIN_NAME = "dummy_plugin"

View File

@ -20,7 +20,7 @@ import contextlib
import mock import mock
from oslo.config import cfg 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 from quantum.tests import base

View File

@ -20,7 +20,7 @@ import contextlib
import mock import mock
from quantum.plugins.services.agent_loadbalancer.drivers.haproxy import ( from quantum.services.loadbalancer.drivers.haproxy import (
agent_manager as manager agent_manager as manager
) )
from quantum.tests import base from quantum.tests import base
@ -147,7 +147,7 @@ class TestManager(base.BaseTestCase):
self.mock_importer = mock.patch.object(manager, 'importutils').start() self.mock_importer = mock.patch.object(manager, 'importutils').start()
rpc_mock_cls = mock.patch( rpc_mock_cls = mock.patch(
'quantum.plugins.services.agent_loadbalancer.drivers' 'quantum.services.loadbalancer.drivers'
'.haproxy.agent_api.LbaasAgentApi' '.haproxy.agent_api.LbaasAgentApi'
).start() ).start()

View File

@ -18,7 +18,7 @@
import mock import mock
from quantum.plugins.services.agent_loadbalancer.drivers.haproxy import ( from quantum.services.loadbalancer.drivers.haproxy import (
agent_api as api agent_api as api
) )
from quantum.tests import base from quantum.tests import base

View File

@ -22,20 +22,20 @@ import mock
from oslo.config import cfg as config 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 from quantum.tests import base
class TestHaproxyCfg(base.BaseTestCase): class TestHaproxyCfg(base.BaseTestCase):
def test_save_config(self): def test_save_config(self):
with contextlib.nested( with contextlib.nested(
mock.patch('quantum.plugins.services.agent_loadbalancer.' mock.patch('quantum.services.loadbalancer.'
'drivers.haproxy.cfg._build_global'), 'drivers.haproxy.cfg._build_global'),
mock.patch('quantum.plugins.services.agent_loadbalancer.' mock.patch('quantum.services.loadbalancer.'
'drivers.haproxy.cfg._build_defaults'), 'drivers.haproxy.cfg._build_defaults'),
mock.patch('quantum.plugins.services.agent_loadbalancer.' mock.patch('quantum.services.loadbalancer.'
'drivers.haproxy.cfg._build_frontend'), 'drivers.haproxy.cfg._build_frontend'),
mock.patch('quantum.plugins.services.agent_loadbalancer.' mock.patch('quantum.services.loadbalancer.'
'drivers.haproxy.cfg._build_backend'), 'drivers.haproxy.cfg._build_backend'),
mock.patch('quantum.agent.linux.utils.replace_file') mock.patch('quantum.agent.linux.utils.replace_file')
) as (b_g, b_d, b_f, b_b, replace): ) as (b_g, b_d, b_f, b_b, replace):

View File

@ -20,7 +20,7 @@ import contextlib
import mock import mock
from quantum.common import exceptions from quantum.common import exceptions
from quantum.plugins.services.agent_loadbalancer.drivers.haproxy import ( from quantum.services.loadbalancer.drivers.haproxy import (
namespace_driver namespace_driver
) )
from quantum.tests import base from quantum.tests import base

View File

@ -24,7 +24,7 @@ from quantum.db.loadbalancer import loadbalancer_db as ldb
from quantum import manager from quantum import manager
from quantum.openstack.common import uuidutils from quantum.openstack.common import uuidutils
from quantum.plugins.common import constants from quantum.plugins.common import constants
from quantum.plugins.services.agent_loadbalancer.drivers.haproxy import ( from quantum.services.loadbalancer.drivers.haproxy import (
plugin_driver plugin_driver
) )
from quantum.tests import base from quantum.tests import base