Add support to generate a sample undercloud.conf

This is needed to kick off undercloud install with
--use-heat option. This includes new config options
to configure containerized undercloud along with
existing instack options.

Change-Id: Ibebaf068018a790afdb599e4e6fbc79d3b2a57dc
Partially-implements: blueprint heat-undercloud
This commit is contained in:
Pradeep Kilambi 2017-11-08 13:04:09 -05:00
parent 7b1eb5bec0
commit 65dd3cb043
4 changed files with 14 additions and 0 deletions

View File

@ -0,0 +1,3 @@
[DEFAULT]
output_file = undercloud.conf.sample
namespace = undercloud_config

View File

@ -99,3 +99,6 @@ openstack.tripleoclient.v1 =
undercloud_deploy = tripleoclient.v1.undercloud_deploy:DeployUndercloud
undercloud_install = tripleoclient.v1.undercloud:InstallUndercloud
undercloud_upgrade = tripleoclient.v1.undercloud:UpgradeUndercloud
oslo.config.opts =
undercloud_config = tripleoclient.v1.undercloud_config:list_opts

View File

@ -52,5 +52,8 @@ show-source = True
builtins = _
exclude=.venv,.git,.tox,dist,doc,*openstack/common*,*lib/python*,*egg,build,releasenotes
[testenv:genconfig]
commands = oslo-config-generator --config-file config-generator/undercloud.conf
[testenv:releasenotes]
commands = bash -c tools/releasenotes_tox.sh

View File

@ -15,6 +15,7 @@
"""Plugin action implementation"""
import copy
import logging
import netaddr
import os
@ -358,6 +359,10 @@ CONF.register_opts(_opts)
LOG = logging.getLogger(__name__ + ".undercloud_config")
def list_opts():
return [(None, copy.deepcopy(_opts))]
def _load_config():
conf_params = []
if os.path.isfile(PATHS.CONF_PATH):