summaryrefslogtreecommitdiffstats
path: root/tests/unit/test_cfgfilter.py
Commit message (Collapse)AuthorAgeFilesLines
* Update to use flake8.Monty Taylor2013-03-241-16/+17
| | | | | | | flake8 is pluggable and handles pep8 and pyflakes, as well as configuration through tox.ini. It also removes the need for flakes.py. Change-Id: If5f7d8ad348b4fb8119fa4ec7b5e9d17bdc72a39
* Add ConfigFilter wrapper classMark McLoughlin2013-02-181-0/+119
Implements blueprint cfg-filter-view At the moment, if a module requires a configuration option from another module, we do: CONF.import_opt('source.module', 'option_name') but, in fact, all options from the imported module are available for use. The new ConfigFilter class makes it possible to enforce which options are available within a module e.g. with CONF = cfgfilter.ConfigFilter(cfg.CONF) CONF.import_opt('foo', 'source.module') CONF.register_opt(StrOpt('bar')) then the foo and bar options would be the only options available via this CONF object while still being available via the global cfg.CONF object. Change-Id: Ie3aa2cd090a626da8afd27ecb78853cbf279bc8b