Move all CONF.import_* to config/__init__.py

We're importing all modules from CLI anyway, so we always import all
config modules, spreading this across all modules provides no benefit.

This is another step towards YAML config.

Change-Id: I38e2e8ae7596829311388498df68a048ab1cd981
This commit is contained in:
Yuriy Taraday 2016-09-05 17:14:55 +03:00
parent d9ab3b4ccc
commit 2d025a5701
9 changed files with 7 additions and 18 deletions

View File

@ -18,10 +18,6 @@ from fuel_ccp import config
BUILD_TIMEOUT = 2 ** 16 # in seconds
CONF = config.CONF
CONF.import_group('builder', 'fuel_ccp.config.builder')
CONF.import_group('images', 'fuel_ccp.config.images')
CONF.import_group('repositories', 'fuel_ccp.config.repositories')
CONF.import_group('registry', 'fuel_ccp.config.registry')
LOG = logging.getLogger(__name__)

View File

@ -13,7 +13,6 @@ from fuel_ccp import config
from fuel_ccp import kubernetes
CONF = config.CONF
CONF.import_group('kubernetes', 'fuel_ccp.config.kubernetes')
LOG = logging.getLogger(__name__)

View File

@ -9,9 +9,6 @@ from fuel_ccp import deploy
from fuel_ccp import fetch
CONF = config.CONF
CONF.import_group('registry', 'fuel_ccp.config.registry')
CONF.import_group('repositories', 'fuel_ccp.config.repositories')
CONF.import_opt('action', 'fuel_ccp.config.cli')
def do_build():

View File

@ -10,8 +10,6 @@ from fuel_ccp import kubernetes
CONF = config.CONF
CONF.import_group('repositories', 'fuel_ccp.config.repositories')
CONF.import_opt("deploy_config", "fuel_ccp.config.cli")
LOG = logging.getLogger(__name__)

View File

@ -2,6 +2,13 @@ from oslo_config import cfg
from oslo_log import log
CONF = cfg.CONF
CONF.import_group('builder', 'fuel_ccp.config.builder')
CONF.import_opt("action", "fuel_ccp.config.cli")
CONF.import_opt("deploy_config", "fuel_ccp.config.cli")
CONF.import_group('images', 'fuel_ccp.config.images')
CONF.import_group('kubernetes', 'fuel_ccp.config.kubernetes')
CONF.import_group('registry', 'fuel_ccp.config.registry')
CONF.import_group('repositories', 'fuel_ccp.config.repositories')
def setup_config():

View File

@ -14,9 +14,6 @@ from fuel_ccp.validation import deploy as deploy_validation
CONF = config.CONF
CONF.import_group('repositories', 'fuel_ccp.config.repositories')
CONF.import_group('kubernetes', 'fuel_ccp.config.kubernetes')
CONF.import_opt("action", "fuel_ccp.config.cli")
LOG = logging.getLogger(__name__)

View File

@ -8,7 +8,6 @@ from fuel_ccp import config
CONF = config.CONF
CONF.import_group('repositories', 'fuel_ccp.config.repositories')
LOG = logging.getLogger(__name__)

View File

@ -12,8 +12,6 @@ from fuel_ccp import config
CONF = config.CONF
CONF.import_opt("action", "fuel_ccp.config.cli")
CONF.import_group('kubernetes', 'fuel_ccp.config.kubernetes')
LOG = logging.getLogger(__name__)

View File

@ -5,8 +5,6 @@ from fuel_ccp import config
CONF = config.CONF
CONF.import_group('images', 'fuel_ccp.config.images')
CONF.import_group('registry', 'fuel_ccp.config.registry')
GLOBAL_CONFIG = "globals"
SCRIPT_CONFIG = "start-script"