Remove CONF.import_group
Remove unneeded import_group lines which are not doing anything and just makes code harder to understand. Change-Id: I673dd04dd31ae9771e6af982d184eee0e9cbf2d4
This commit is contained in:
parent
7f13dbc917
commit
867b350988
octavia
amphorae
backends
agent
health_daemon
drivers
certificates/generator
cmd
common
compute/drivers
controller
healthmanager
housekeeping
worker
db
network/drivers/neutron
tests
functional
unit
certificates
controller
@ -20,9 +20,6 @@ from octavia.common.config import cfg
|
||||
from octavia.common import constants
|
||||
|
||||
CONF = cfg.CONF
|
||||
CONF.import_group('amphora_agent', 'octavia.common.config')
|
||||
CONF.import_group('haproxy_amphora', 'octavia.common.config')
|
||||
CONF.import_group('health_manager', 'octavia.common.config')
|
||||
|
||||
TEMPLATES_DIR = (os.path.dirname(os.path.realpath(__file__)) +
|
||||
constants.AGENT_API_TEMPLATES + '/')
|
||||
|
@ -21,7 +21,6 @@ from oslo_config import cfg
|
||||
BUFFER = 1024
|
||||
|
||||
CONF = cfg.CONF
|
||||
CONF.import_group('amphora_agent', 'octavia.common.config')
|
||||
|
||||
|
||||
def upload_server_cert():
|
||||
|
@ -35,7 +35,6 @@ from octavia.i18n import _LE, _LI
|
||||
|
||||
|
||||
CONF = cfg.CONF
|
||||
CONF.import_group('amphora_agent', 'octavia.common.config')
|
||||
|
||||
ETH_X_VIP_CONF = 'plug_vip_ethX.conf.j2'
|
||||
ETH_X_PORT_CONF = 'plug_port_ethX.conf.j2'
|
||||
|
@ -21,8 +21,6 @@ from oslo_config import cfg
|
||||
from octavia.common import constants as consts
|
||||
|
||||
CONF = cfg.CONF
|
||||
CONF.import_group('amphora_agent', 'octavia.common.config')
|
||||
CONF.import_group('haproxy_amphora', 'octavia.common.config')
|
||||
|
||||
|
||||
class UnknownInitError(Exception):
|
||||
|
@ -32,9 +32,6 @@ else:
|
||||
import queue
|
||||
|
||||
CONF = cfg.CONF
|
||||
CONF.import_group('amphora_agent', 'octavia.common.config')
|
||||
CONF.import_group('haproxy_amphora', 'octavia.common.config')
|
||||
CONF.import_group('health_manager', 'octavia.common.config')
|
||||
LOG = logging.getLogger(__name__)
|
||||
SEQ = 0
|
||||
|
||||
|
@ -21,7 +21,6 @@ from octavia.amphorae.backends.health_daemon import status_message
|
||||
from octavia.i18n import _LE
|
||||
|
||||
CONF = cfg.CONF
|
||||
CONF.import_group('health_manager', 'octavia.common.config')
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
|
||||
|
@ -39,7 +39,6 @@ OCTAVIA_API_CLIENT = (
|
||||
"Octavia HaProxy Rest Client/{version} "
|
||||
"(https://wiki.openstack.org/wiki/Octavia)").format(version=API_VERSION)
|
||||
CONF = cfg.CONF
|
||||
CONF.import_group('haproxy_amphora', 'octavia.common.config')
|
||||
|
||||
|
||||
class HaproxyAmphoraLoadBalancerDriver(
|
||||
|
@ -26,7 +26,6 @@ KEEPALIVED_TEMPLATE = os.path.abspath(
|
||||
os.path.join(os.path.dirname(__file__),
|
||||
'templates/keepalived_base.template'))
|
||||
CONF = cfg.CONF
|
||||
CONF.import_group('keepalived_vrrp', 'octavia.common.config')
|
||||
|
||||
|
||||
class KeepalivedJinjaTemplater(object):
|
||||
|
@ -25,7 +25,6 @@ from octavia.i18n import _LE
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
CONF = cfg.CONF
|
||||
CONF.import_group('anchor', 'octavia.common.config')
|
||||
|
||||
|
||||
class AnchorException(exceptions.CertificateGenerationException):
|
||||
|
@ -30,8 +30,6 @@ from octavia import version
|
||||
|
||||
|
||||
CONF = cfg.CONF
|
||||
CONF.import_group('amphora_agent', 'octavia.common.config')
|
||||
CONF.import_group('haproxy_amphora', 'octavia.common.config')
|
||||
HM_SENDER_CMD_QUEUE = multiproc.Queue()
|
||||
|
||||
|
||||
|
@ -29,7 +29,6 @@ from octavia import version
|
||||
|
||||
CONF = cfg.CONF
|
||||
LOG = logging.getLogger(__name__)
|
||||
CONF.import_group('health_manager', 'octavia.common.config')
|
||||
|
||||
|
||||
def hm_listener():
|
||||
|
@ -30,7 +30,6 @@ from octavia import version
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
CONF = cfg.CONF
|
||||
CONF.import_group('house_keeping', 'octavia.common.config')
|
||||
|
||||
spare_amp_thread_event = threading.Event()
|
||||
db_cleanup_thread_event = threading.Event()
|
||||
|
@ -19,7 +19,6 @@ from taskflow import engines as tf_engines
|
||||
|
||||
|
||||
CONF = cfg.CONF
|
||||
CONF.import_group('task_flow', 'octavia.common.config')
|
||||
|
||||
|
||||
class BaseTaskFlowEngine(object):
|
||||
|
@ -46,7 +46,6 @@ HAPROXY_TEMPLATE = os.path.abspath(
|
||||
'templates/haproxy.cfg.j2'))
|
||||
|
||||
CONF = cfg.CONF
|
||||
CONF.import_group('haproxy_amphora', 'octavia.common.config')
|
||||
|
||||
JINJA_ENV = None
|
||||
|
||||
|
@ -20,9 +20,6 @@ from octavia.common.config import cfg
|
||||
from octavia.common import constants
|
||||
|
||||
CONF = cfg.CONF
|
||||
CONF.import_group('amphora_agent', 'octavia.common.config')
|
||||
CONF.import_group('haproxy_amphora', 'octavia.common.config')
|
||||
CONF.import_group('health_manager', 'octavia.common.config')
|
||||
|
||||
TEMPLATES_DIR = (os.path.dirname(os.path.realpath(__file__)) +
|
||||
constants.TEMPLATES + '/')
|
||||
|
@ -26,7 +26,6 @@ from octavia.i18n import _LE, _LW
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
CONF = cfg.CONF
|
||||
CONF.import_group('networking', 'octavia.common.config')
|
||||
|
||||
|
||||
def _extract_amp_image_id_by_tag(client, image_tag, image_owner):
|
||||
|
@ -25,7 +25,6 @@ from octavia.i18n import _LI
|
||||
|
||||
CONF = cfg.CONF
|
||||
LOG = logging.getLogger(__name__)
|
||||
CONF.import_group('health_manager', 'octavia.common.config')
|
||||
|
||||
|
||||
class HealthManager(object):
|
||||
|
@ -26,7 +26,6 @@ from octavia.i18n import _LI
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
CONF = cfg.CONF
|
||||
CONF.import_group('house_keeping', 'octavia.common.config')
|
||||
|
||||
|
||||
class SpareAmphora(object):
|
||||
|
@ -26,8 +26,6 @@ from octavia.controller.worker.tasks import lifecycle_tasks
|
||||
from octavia.controller.worker.tasks import network_tasks
|
||||
|
||||
CONF = cfg.CONF
|
||||
CONF.import_group('controller_worker', 'octavia.common.config')
|
||||
CONF.import_group('nova', 'octavia.common.config')
|
||||
|
||||
|
||||
class AmphoraFlows(object):
|
||||
|
@ -34,8 +34,6 @@ from octavia.i18n import _LE
|
||||
|
||||
|
||||
CONF = cfg.CONF
|
||||
CONF.import_group('controller_worker', 'octavia.common.config')
|
||||
CONF.import_group('nova', 'octavia.common.config')
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
|
||||
|
@ -28,7 +28,6 @@ from octavia.db import repositories as repo
|
||||
from octavia.i18n import _LE, _LW
|
||||
|
||||
CONF = cfg.CONF
|
||||
CONF.import_group('controller_worker', 'octavia.common.config')
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
|
||||
|
@ -19,7 +19,6 @@ from taskflow import task
|
||||
|
||||
|
||||
CONF = cfg.CONF
|
||||
CONF.import_group('controller_worker', 'octavia.common.config')
|
||||
CERT_VALIDITY = 2 * 365 * 24 * 60 * 60
|
||||
|
||||
|
||||
|
@ -29,7 +29,6 @@ from octavia.common.jinja import user_data_jinja_cfg
|
||||
from octavia.i18n import _LE, _LW
|
||||
|
||||
CONF = cfg.CONF
|
||||
CONF.import_group('controller_worker', 'octavia.common.config')
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
|
||||
|
@ -33,7 +33,6 @@ from octavia.i18n import _LE, _LI, _LW
|
||||
|
||||
CONF = cfg.CONF
|
||||
LOG = logging.getLogger(__name__)
|
||||
CONF.import_group('keepalived_vrrp', 'octavia.common.config')
|
||||
|
||||
|
||||
class BaseDatabaseTask(task.Task):
|
||||
|
@ -28,7 +28,6 @@ from octavia.network import data_models as n_data_models
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
CONF = cfg.CONF
|
||||
CONF.import_group('controller_worker', 'octavia.common.config')
|
||||
|
||||
|
||||
class BaseNetworkTask(task.Task):
|
||||
|
@ -31,8 +31,6 @@ from octavia.db import models
|
||||
|
||||
|
||||
CONF = cfg.CONF
|
||||
CONF.import_group('health_manager', 'octavia.common.config')
|
||||
CONF.import_group('house_keeping', 'octavia.common.config')
|
||||
|
||||
|
||||
class BaseRepository(object):
|
||||
|
@ -38,9 +38,6 @@ VIP_SECURITY_GRP_PREFIX = 'lb-'
|
||||
OCTAVIA_OWNER = 'Octavia'
|
||||
|
||||
CONF = cfg.CONF
|
||||
CONF.import_group('nova', 'octavia.common.config')
|
||||
CONF.import_group('controller_worker', 'octavia.common.config')
|
||||
CONF.import_group('networking', 'octavia.common.config')
|
||||
|
||||
|
||||
class AllowedAddressPairsDriver(neutron_base.BaseNeutronDriver):
|
||||
|
@ -21,7 +21,6 @@ import subprocess
|
||||
|
||||
import mock
|
||||
import netifaces
|
||||
from oslo_config import cfg
|
||||
from oslo_config import fixture as oslo_fixture
|
||||
import six
|
||||
|
||||
@ -29,6 +28,7 @@ from octavia.amphorae.backends.agent import api_server
|
||||
from octavia.amphorae.backends.agent.api_server import certificate_update
|
||||
from octavia.amphorae.backends.agent.api_server import server
|
||||
from octavia.amphorae.backends.agent.api_server import util
|
||||
from octavia.common import config
|
||||
from octavia.common import constants as consts
|
||||
from octavia.common import utils as octavia_utils
|
||||
from octavia.tests.common import utils as test_utils
|
||||
@ -48,7 +48,7 @@ class TestServerTestCase(base.TestCase):
|
||||
self.test_server = server.Server()
|
||||
self.app = self.test_server.app.test_client()
|
||||
|
||||
conf = self.useFixture(oslo_fixture.Config(cfg.CONF))
|
||||
conf = self.useFixture(oslo_fixture.Config(config.cfg.CONF))
|
||||
conf.config(group="haproxy_amphora", base_path='/var/lib/octavia')
|
||||
|
||||
@mock.patch('octavia.amphorae.backends.agent.api_server.util.'
|
||||
|
@ -25,7 +25,6 @@ from octavia.db import repositories as repo
|
||||
from octavia.tests.functional.db import base
|
||||
|
||||
CONF = cfg.CONF
|
||||
CONF.import_group('house_keeping', 'octavia.common.config')
|
||||
|
||||
|
||||
class BaseRepositoryTest(base.OctaviaDBTestBase):
|
||||
|
@ -23,7 +23,6 @@ from octavia.common import keystone
|
||||
import octavia.tests.unit.base as base
|
||||
|
||||
CONF = cfg.CONF
|
||||
CONF.import_group('certificates', 'octavia.common.config')
|
||||
|
||||
|
||||
class TestBarbicanACLAuth(base.TestCase):
|
||||
|
@ -22,7 +22,6 @@ from octavia.tests.unit.certificates.generator import local_csr
|
||||
|
||||
|
||||
CONF = cfg.CONF
|
||||
CONF.import_group('anchor', 'octavia.common.config')
|
||||
|
||||
|
||||
class TestAnchorGenerator(local_csr.BaseLocalCSRTestCase):
|
||||
|
@ -21,7 +21,6 @@ import octavia.tests.unit.base as base
|
||||
|
||||
|
||||
CONF = cfg.CONF
|
||||
CONF.import_group('health_manager', 'octavia.common.config')
|
||||
|
||||
AMPHORA_ID = uuidutils.generate_uuid()
|
||||
|
||||
|
@ -23,7 +23,6 @@ import octavia.tests.unit.base as base
|
||||
|
||||
|
||||
CONF = cfg.CONF
|
||||
CONF.import_group('house_keeping', 'octavia.common.config')
|
||||
AMPHORA_ID = uuidutils.generate_uuid()
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user