Merge "Trim whitespace in multi-line env descriptions"

This commit is contained in:
Zuul 2019-04-16 05:28:25 +00:00 committed by Gerrit Code Review
commit 47126b8431
4 changed files with 9 additions and 6 deletions

View File

@ -8,7 +8,7 @@
# description: | # description: |
# EXPERIMENTAL: This service is not considered ready for production and # EXPERIMENTAL: This service is not considered ready for production and
# should only be used for development and test purposes at this time. # should only be used for development and test purposes at this time.
# #
# This environment enables the Designate services. One of the # This environment enables the Designate services. One of the
# designate-config* environment files must also be included. # designate-config* environment files must also be included.
resource_registry: resource_registry:

View File

@ -8,7 +8,7 @@
# description: | # description: |
# A Heat environment that can be used to deploy a single node all-in-one # A Heat environment that can be used to deploy a single node all-in-one
# node via an Undercloud using the normal Overcloud deployment process. # node via an Undercloud using the normal Overcloud deployment process.
# #
# By default we only want the following OpenStack services to be enabled: # By default we only want the following OpenStack services to be enabled:
# * Keystone # * Keystone
# * Nova (and related) # * Nova (and related)
@ -19,7 +19,7 @@
# * Horizon # * Horizon
# This file disables any other OpenStack services that would normally be # This file disables any other OpenStack services that would normally be
# enabled. # enabled.
# #
# openstack overcloud roles generate -o ~/roles_data.yaml Standalone # openstack overcloud roles generate -o ~/roles_data.yaml Standalone
parameter_defaults: parameter_defaults:
# DNS servers to use for the Overcloud (2 max for some implementations). If not set the nameservers configured in the ctlplane subnet's dns_nameservers attribute will be used. # DNS servers to use for the Overcloud (2 max for some implementations). If not set the nameservers configured in the ctlplane subnet's dns_nameservers attribute will be used.

View File

@ -10,7 +10,7 @@
# node via the 'overcloud tripleo deploy' command. This does not # node via the 'overcloud tripleo deploy' command. This does not
# require an Undercloud for the deployment and can be used to deploy # require an Undercloud for the deployment and can be used to deploy
# a single node on the local machine. # a single node on the local machine.
# #
# By default we only want the following OpenStack services to be enabled: # By default we only want the following OpenStack services to be enabled:
# * Keystone # * Keystone
# * Nova (and related) # * Nova (and related)
@ -21,7 +21,7 @@
# * Horizon # * Horizon
# This file disables any other OpenStack services that would normally be # This file disables any other OpenStack services that would normally be
# enabled. # enabled.
# #
# openstack overcloud roles generate -o ~/roles_data.yaml Standalone # openstack overcloud roles generate -o ~/roles_data.yaml Standalone
parameter_defaults: parameter_defaults:
# Set to true to append per network Vips to /etc/hosts on each node. # Set to true to append per network Vips to /etc/hosts on each node.

View File

@ -181,7 +181,10 @@ def _generate_environment(input_env, output_path, parent_env=None):
env_desc = env.get('description', '') env_desc = env.get('description', '')
env_file.write(u'# description: |\n') env_file.write(u'# description: |\n')
for line in env_desc.splitlines(): for line in env_desc.splitlines():
env_file.write(u'# %s\n' % line) if line:
env_file.write(u'# %s\n' % line)
else:
env_file.write('#\n')
if parameter_defaults or static_defaults: if parameter_defaults or static_defaults:
env_file.write(u'parameter_defaults:\n') env_file.write(u'parameter_defaults:\n')
write_params_entry(env_file, parameter_defaults[_PARAMETERS], write_params_entry(env_file, parameter_defaults[_PARAMETERS],