2e1c685b57d73fb8e32996b4bfa717cb808c7f6f
Commit c952491 made an incompatible change to MultiConfigParser's
behaviour. The code in Quantum which was relying on the behaviour did
the following:
p = MultiConfigParser()
multi_parser.read(conf_file)
for parsed_file in multi_parser.parsed:
for section in parsed_file.keys():
if section.startswith("CLUSTER:"):
...
However, we made a change such that the keys of the 'parsed' dict were
normalized to lowercase. Restore the previous behaviour and add another
dict for tracking the values with normalized section names. We also
add a normalized=False kwarg to the get() method so that we also restore
the previous behaviour of the method by default.
This shows the need to aggressively make implementation details as not
part of the public API of our libraries. In this case, I considered
MultiConfigParser as an implementation detail and that no projects would
be using it. But, sure enough, if it's public then *someone* will use
it.
Also, add a bunch of test cases to actually test the behaviour of this
class in isolation.
Change-Id: I0344e39222b3aecad5e30f820014f4d9f672e90c
Oslo Configuration Library
The Oslo configuration API supports parsing command line arguments and .ini style configuration files.
Description
Languages
Python
99.8%
Shell
0.2%