Consolidate all oslo_config.cfg.CONF imports to fuel_cpp.config
Also move config initialization to fuel_ccp.config. This is the first step to replacing oslo.config with YAML-based config. Change-Id: If1b1faf006b40df95a661ecd00cb744e9fd0aafa
This commit is contained in:
parent
3999f08321
commit
d9ab3b4ccc
|
@ -9,16 +9,15 @@ import tempfile
|
|||
|
||||
import docker
|
||||
import git
|
||||
from oslo_config import cfg
|
||||
from oslo_log import log as logging
|
||||
|
||||
from fuel_ccp.common import jinja_utils
|
||||
from fuel_ccp.common import utils
|
||||
|
||||
from fuel_ccp import config
|
||||
|
||||
BUILD_TIMEOUT = 2 ** 16 # in seconds
|
||||
|
||||
CONF = cfg.CONF
|
||||
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')
|
||||
|
|
|
@ -6,17 +6,15 @@ from keystoneauth1.identity import v3
|
|||
from keystoneauth1 import session as keystone_session
|
||||
from neutronclient.v2_0 import client as neutron_client
|
||||
from novaclient import client as nova_client
|
||||
from oslo_config import cfg
|
||||
from oslo_log import log as logging
|
||||
|
||||
from fuel_ccp.common import utils
|
||||
from fuel_ccp import config
|
||||
from fuel_ccp import kubernetes
|
||||
|
||||
|
||||
CONF = cfg.CONF
|
||||
CONF = config.CONF
|
||||
CONF.import_group('kubernetes', 'fuel_ccp.config.kubernetes')
|
||||
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
|
||||
|
|
|
@ -1,17 +1,14 @@
|
|||
import signal
|
||||
import sys
|
||||
|
||||
from oslo_config import cfg
|
||||
from oslo_log import log as logging
|
||||
|
||||
from fuel_ccp import build
|
||||
from fuel_ccp import cleanup
|
||||
from fuel_ccp import config
|
||||
from fuel_ccp import dependencies
|
||||
from fuel_ccp import deploy
|
||||
from fuel_ccp import fetch
|
||||
|
||||
|
||||
CONF = cfg.CONF
|
||||
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')
|
||||
|
@ -53,9 +50,7 @@ def signal_handler(signo, frame):
|
|||
def main():
|
||||
signal.signal(signal.SIGTERM, signal_handler)
|
||||
signal.signal(signal.SIGINT, signal_handler)
|
||||
logging.register_options(CONF)
|
||||
CONF(project='ccp')
|
||||
logging.setup(CONF, 'fuel-ccp')
|
||||
config.setup_config()
|
||||
|
||||
func = globals()['do_%s' % CONF.action.name.replace('-', '_')]
|
||||
func()
|
||||
|
|
|
@ -1,15 +1,15 @@
|
|||
import os
|
||||
import pkg_resources
|
||||
|
||||
from oslo_config import cfg
|
||||
from oslo_log import log as logging
|
||||
import yaml
|
||||
|
||||
import fuel_ccp
|
||||
from fuel_ccp import config
|
||||
from fuel_ccp import kubernetes
|
||||
|
||||
|
||||
CONF = cfg.CONF
|
||||
CONF = config.CONF
|
||||
CONF.import_group('repositories', 'fuel_ccp.config.repositories')
|
||||
CONF.import_opt("deploy_config", "fuel_ccp.config.cli")
|
||||
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
from oslo_config import cfg
|
||||
from oslo_log import log
|
||||
|
||||
CONF = cfg.CONF
|
||||
|
||||
|
||||
def setup_config():
|
||||
log.register_options(CONF)
|
||||
CONF(project='ccp')
|
||||
log.setup(CONF, 'fuel-ccp')
|
|
@ -2,18 +2,18 @@ import os
|
|||
import re
|
||||
import yaml
|
||||
|
||||
from oslo_config import cfg
|
||||
from oslo_log import log as logging
|
||||
|
||||
from fuel_ccp.common import jinja_utils
|
||||
from fuel_ccp.common import utils
|
||||
from fuel_ccp import config
|
||||
from fuel_ccp import kubernetes
|
||||
from fuel_ccp import templates
|
||||
from fuel_ccp.validation import base as base_validation
|
||||
from fuel_ccp.validation import deploy as deploy_validation
|
||||
|
||||
|
||||
CONF = cfg.CONF
|
||||
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")
|
||||
|
|
|
@ -2,11 +2,12 @@ import os
|
|||
|
||||
from concurrent import futures
|
||||
import git
|
||||
from oslo_config import cfg
|
||||
from oslo_log import log as logging
|
||||
|
||||
from fuel_ccp import config
|
||||
|
||||
CONF = cfg.CONF
|
||||
|
||||
CONF = config.CONF
|
||||
CONF.import_group('repositories', 'fuel_ccp.config.repositories')
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
|
|
@ -6,11 +6,12 @@ from k8sclient.client.apis import apisbatchv_api
|
|||
from k8sclient.client.apis import apisextensionsvbeta_api
|
||||
from k8sclient.client.apis import apiv_api
|
||||
import k8sclient.client.rest
|
||||
from oslo_config import cfg
|
||||
from oslo_log import log as logging
|
||||
|
||||
from fuel_ccp import config
|
||||
|
||||
CONF = cfg.CONF
|
||||
|
||||
CONF = config.CONF
|
||||
CONF.import_opt("action", "fuel_ccp.config.cli")
|
||||
CONF.import_group('kubernetes', 'fuel_ccp.config.kubernetes')
|
||||
|
||||
|
|
|
@ -1,11 +1,10 @@
|
|||
import json
|
||||
|
||||
from oslo_config import cfg
|
||||
|
||||
from fuel_ccp.common import utils
|
||||
from fuel_ccp import config
|
||||
|
||||
|
||||
CONF = cfg.CONF
|
||||
CONF = config.CONF
|
||||
CONF.import_group('images', 'fuel_ccp.config.images')
|
||||
CONF.import_group('registry', 'fuel_ccp.config.registry')
|
||||
|
||||
|
|
Loading…
Reference in New Issue