Fix no floating_network_name option
If there is no public network set, python-tempestconf doesn't set network.floating_network_name option. In order to avoid the following error when heat_plugin options are being set: No option 'floating_network_name' in section: 'network' the commit adds a try except block to catch this situation and log it for the user. Change-Id: Ib1f04584b620fc662fd415c4430a03ea92c35b76
This commit is contained in:
parent
e30addb390
commit
490a7ea40b
@ -117,6 +117,11 @@ class OrchestrationService(Service):
|
||||
conf.set('heat_plugin', 'image_ref',
|
||||
conf.get('compute', 'image_ref_alt'))
|
||||
if conf.has_section('network'):
|
||||
network = conf.get('network', 'floating_network_name')
|
||||
conf.set('heat_plugin', 'network_for_ssh', network)
|
||||
conf.set('heat_plugin', 'floating_network_name', network)
|
||||
try:
|
||||
network = conf.get('network', 'floating_network_name')
|
||||
conf.set('heat_plugin', 'network_for_ssh', network)
|
||||
conf.set('heat_plugin', 'floating_network_name', network)
|
||||
except configparser.NoOptionError:
|
||||
LOG.info("heat_plugin.network_for_ssh and heat_plugin."
|
||||
"floating_network_name are not set because there "
|
||||
"is no floating network")
|
||||
|
Loading…
x
Reference in New Issue
Block a user