Go to file
Mark McLoughlin 2e1c685b57 Fix MultiConfigParser API breakage
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
2013-05-23 11:08:10 +01:00
2013-05-03 12:38:15 -04:00
2013-05-23 11:08:10 +01:00
2013-05-23 11:08:10 +01:00
2013-05-03 17:26:07 -04:00
2013-03-14 12:04:19 -07:00
2013-05-03 17:26:07 -04:00
2013-05-03 12:38:15 -04:00
2013-02-17 09:25:32 +00:00
2013-05-03 12:38:15 -04:00
2013-05-03 12:38:15 -04:00
2013-05-03 12:38:15 -04:00
2013-05-03 12:38:15 -04:00

Oslo Configuration Library

The Oslo configuration API supports parsing command line arguments and .ini style configuration files.

Description
OpenStack library for config
Readme 12 MiB
Languages
Python 99.8%
Shell 0.2%