09c76e2380
The config_template comment parser will now respect all comments in INI files, as they are written. This will ensure spacing, paragraphs, and other comments bits that may be in an INI file remain intact, even when overriding options and sections. With this feature we'll now be able to insert options in OSLO config generated files without truncating or making a mess of the file structure. This is an internal enhancement and requires no change from the operator or from within any ansible task. To ensure enhanced comments are working, new tests have been added which will run though all of the `config_template` INI file functions using a mock service file. Existing tests for the old comment structure has been removed. This includes tests that were running redundant tasks for file diffs or expected the only style, merged, comment layout. All of the tests have been broken out into descriptive task files. This was largely done for readability. It was difficult to see what tests we had and how I needed to extend them to test the enhanced comments functionality given the INI type tests were all thoughout the `tests/test-common-tasks.yml`. Now that the files have been broken out developers will easily be able to audit our tests making it simple to extend. Change-Id: Ia6cdc215c35fa9ac45b718c211616a9887a74e37 Signed-off-by: Kevin Carter <kecarter@redhat.com>
39 lines
1008 B
INI
39 lines
1008 B
INI
[DEFAULT]
|
|
|
|
#
|
|
# From nova.conf
|
|
#
|
|
|
|
#
|
|
# Availability zone for internal services. For more information, refer to the
|
|
# documentation. (string value)
|
|
#internal_service_availability_zone = internal
|
|
|
|
#
|
|
# Default availability zone for compute services. For more information, refer to
|
|
# the documentation. (string value)
|
|
#default_availability_zone = nova
|
|
|
|
#
|
|
# Default availability zone for instances. For more information, refer to the
|
|
# documentation. (string value)
|
|
#default_schedule_zone = <None>
|
|
|
|
# Length of generated instance admin passwords (integer value)
|
|
# Minimum value: 0
|
|
#password_length = 12
|
|
|
|
#
|
|
# Time period to generate instance usages for. It is possible to define optional
|
|
# offset to given period by appending @ character followed by a number defining
|
|
# offset. For more information, refer to the documentation. (string value)
|
|
#instance_usage_audit_period = month
|
|
|
|
[SubSection]
|
|
#Comments and overrides in a subsection
|
|
#testopt1 = 9000
|
|
testopt1 = 9000
|
|
|
|
# This is another test opt
|
|
#testop2 = over 9000
|