Ensure CONFIG_PROVISION_* variables always get set
Also removes some now-unnecessary checks. Change-Id: I19cc2ba4a9b733a78648d9f58f0f1538442d574d
This commit is contained in:
@@ -825,12 +825,20 @@ def validateSingleFlag(options, flag):
|
|||||||
msg = output_messages.ERR_ONLY_1_FLAG % ("--%s" % flag)
|
msg = output_messages.ERR_ONLY_1_FLAG % ("--%s" % flag)
|
||||||
raise FlagValidationError(msg)
|
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():
|
def initPluginsConfig():
|
||||||
for plugin in controller.getAllPlugins():
|
for plugin in controller.getAllPlugins():
|
||||||
plugin.initConfig(controller)
|
plugin.initConfig(controller)
|
||||||
|
|
||||||
def initPluginsSequences():
|
def initPluginsSequences():
|
||||||
|
setProvisioningDefaults()
|
||||||
for plugin in controller.getAllPlugins():
|
for plugin in controller.getAllPlugins():
|
||||||
plugin.initSequences(controller)
|
plugin.initSequences(controller)
|
||||||
|
|
||||||
|
@@ -59,8 +59,6 @@ def initSequences(controller):
|
|||||||
|
|
||||||
def createmanifest(config):
|
def createmanifest(config):
|
||||||
client_host = controller.CONF['CONFIG_OSCLIENT_HOST'].strip()
|
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
|
manifestfile = "%s_osclient.pp" % client_host
|
||||||
manifestdata = getManifestTemplate("openstack_client.pp")
|
manifestdata = getManifestTemplate("openstack_client.pp")
|
||||||
appendManifestFile(manifestfile, manifestdata)
|
appendManifestFile(manifestfile, manifestdata)
|
||||||
|
@@ -128,11 +128,9 @@ def marshall_conf_bool(conf, key):
|
|||||||
|
|
||||||
def initSequences(controller):
|
def initSequences(controller):
|
||||||
provisioning_required = (
|
provisioning_required = (
|
||||||
(controller.CONF['CONFIG_QUANTUM_INSTALL']== 'y' and
|
controller.CONF['CONFIG_PROVISION_DEMO'] == 'y'
|
||||||
(controller.CONF['CONFIG_PROVISION_DEMO'] == 'y'
|
|
||||||
or
|
or
|
||||||
controller.CONF['CONFIG_PROVISION_TEMPEST'] == 'y')
|
controller.CONF['CONFIG_PROVISION_TEMPEST'] == 'y'
|
||||||
)
|
|
||||||
)
|
)
|
||||||
if not provisioning_required:
|
if not provisioning_required:
|
||||||
return
|
return
|
||||||
|
Reference in New Issue
Block a user