Ensure CONFIG_PROVISION_* variables always get set
Also removes some now-unnecessary checks. Change-Id: I19cc2ba4a9b733a78648d9f58f0f1538442d574d
This commit is contained in:
parent
0ca7d5ac37
commit
af56b69282
|
@ -825,12 +825,20 @@ def validateSingleFlag(options, flag):
|
|||
msg = output_messages.ERR_ONLY_1_FLAG % ("--%s" % flag)
|
||||
raise FlagValidationError(msg)
|
||||
|
||||
def setProvisioningDefaults():
|
||||
pnames = ['CONFIG_PROVISION_' + x for x in ['DEMO', 'TEMPEST', 'ALL_IN_ONE_OVS_BRIDGE']]
|
||||
params = [controller.getParamByName(x) for x in pnames]
|
||||
for param in params:
|
||||
controller.CONF[param.CONF_NAME] = (
|
||||
controller.CONF.get(param.CONF_NAME, param.DEFAULT_VALUE)
|
||||
)
|
||||
|
||||
def initPluginsConfig():
|
||||
for plugin in controller.getAllPlugins():
|
||||
plugin.initConfig(controller)
|
||||
|
||||
def initPluginsSequences():
|
||||
setProvisioningDefaults()
|
||||
for plugin in controller.getAllPlugins():
|
||||
plugin.initSequences(controller)
|
||||
|
||||
|
|
|
@ -59,8 +59,6 @@ def initSequences(controller):
|
|||
|
||||
def createmanifest(config):
|
||||
client_host = controller.CONF['CONFIG_OSCLIENT_HOST'].strip()
|
||||
if controller.CONF.get('CONFIG_PROVISION_DEMO', 'n') != 'y':
|
||||
controller.CONF['CONFIG_PROVISION_DEMO'] = 'n'
|
||||
manifestfile = "%s_osclient.pp" % client_host
|
||||
manifestdata = getManifestTemplate("openstack_client.pp")
|
||||
appendManifestFile(manifestfile, manifestdata)
|
||||
|
|
|
@ -128,11 +128,9 @@ def marshall_conf_bool(conf, key):
|
|||
|
||||
def initSequences(controller):
|
||||
provisioning_required = (
|
||||
(controller.CONF['CONFIG_QUANTUM_INSTALL']== 'y' and
|
||||
(controller.CONF['CONFIG_PROVISION_DEMO'] == 'y'
|
||||
controller.CONF['CONFIG_PROVISION_DEMO'] == 'y'
|
||||
or
|
||||
controller.CONF['CONFIG_PROVISION_TEMPEST'] == 'y')
|
||||
)
|
||||
controller.CONF['CONFIG_PROVISION_TEMPEST'] == 'y'
|
||||
)
|
||||
if not provisioning_required:
|
||||
return
|
||||
|
|
Loading…
Reference in New Issue