Merge "Move undercloud.conf to the undercloud config namespace"
This commit is contained in:
commit
5a6fc0058c
@ -99,5 +99,5 @@ openstack.tripleoclient.v1 =
|
||||
undercloud_upgrade = tripleoclient.v1.undercloud:UpgradeUndercloud
|
||||
undercloud_backup = tripleoclient.v1.undercloud_backup:BackupUndercloud
|
||||
oslo.config.opts =
|
||||
undercloud_config = tripleoclient.v1.undercloud_config:list_opts
|
||||
undercloud_config = tripleoclient.config.undercloud:list_opts
|
||||
standalone_config = tripleoclient.config.standalone:list_opts
|
||||
|
@ -13,10 +13,14 @@
|
||||
# under the License.
|
||||
#
|
||||
|
||||
import copy
|
||||
|
||||
from osc_lib.i18n import _
|
||||
from oslo_config import cfg
|
||||
from tripleoclient.config.standalone import StandaloneConfig
|
||||
|
||||
CONF = cfg.CONF
|
||||
|
||||
# Control plane network name
|
||||
SUBNETS_DEFAULT = ['ctlplane-subnet']
|
||||
|
||||
@ -346,3 +350,17 @@ class UndercloudConfig(StandaloneConfig):
|
||||
'access.')),
|
||||
]
|
||||
return self.sort_opts(_subnets_opts)
|
||||
|
||||
|
||||
def list_opts():
|
||||
"""List config opts for oslo config generator"""
|
||||
config = UndercloudConfig()
|
||||
_opts = config.get_opts()
|
||||
return [(None, copy.deepcopy(_opts)),
|
||||
(SUBNETS_DEFAULT[0], copy.deepcopy(config.get_subnet_opts()))]
|
||||
|
||||
|
||||
def load_global_config():
|
||||
"""Register UndercloudConfig options into global config"""
|
||||
_opts = UndercloudConfig().get_opts()
|
||||
CONF.register_opts(_opts)
|
||||
|
@ -15,7 +15,6 @@
|
||||
|
||||
"""Plugin action implementation"""
|
||||
|
||||
import copy
|
||||
import jinja2
|
||||
import json
|
||||
import logging
|
||||
@ -32,7 +31,7 @@ from osc_lib.i18n import _
|
||||
from oslo_config import cfg
|
||||
from tripleo_common.image import kolla_builder
|
||||
|
||||
from tripleoclient.config.undercloud import SUBNETS_DEFAULT
|
||||
from tripleoclient.config.undercloud import load_global_config
|
||||
from tripleoclient.config.undercloud import UndercloudConfig
|
||||
from tripleoclient import constants
|
||||
from tripleoclient import exceptions
|
||||
@ -105,7 +104,7 @@ config = UndercloudConfig()
|
||||
|
||||
# Routed subnets
|
||||
_opts = config.get_opts()
|
||||
CONF.register_opts(_opts)
|
||||
load_global_config()
|
||||
|
||||
|
||||
def _load_subnets_config_groups():
|
||||
@ -113,16 +112,9 @@ def _load_subnets_config_groups():
|
||||
g = cfg.OptGroup(name=group, title=group)
|
||||
CONF.register_opts(config.get_subnet_opts(), group=g)
|
||||
|
||||
|
||||
LOG = logging.getLogger(__name__ + ".undercloud_config")
|
||||
|
||||
|
||||
# this is needed for the oslo config generator
|
||||
def list_opts():
|
||||
return [(None, copy.deepcopy(_opts)),
|
||||
(SUBNETS_DEFAULT[0], copy.deepcopy(config.get_subnet_opts()))]
|
||||
|
||||
|
||||
def _load_config():
|
||||
conf_params = []
|
||||
if os.path.isfile(PATHS.CONF_PATH):
|
||||
|
Loading…
Reference in New Issue
Block a user