diff options
author | Jenkins <jenkins@review.openstack.org> | 2016-10-11 15:02:51 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2016-10-11 15:02:51 +0000 |
commit | 035c1177ded9fa8a40ad40950e5971b3cd707eaf (patch) | |
tree | 227e7e73b6febfa589773da594d986f0ca22396c /nova/hacking | |
parent | c307cbe5672ae93437f7cbb027adbe64d6393fb2 (diff) | |
parent | 8ddf174a3081b0a60964fa196c46c97e8a475fff (diff) | |
download | nova-035c1177ded9fa8a40ad40950e5971b3cd707eaf.tar.gz |
Merge "Fix check_config_option_in_central_place"
Diffstat (limited to 'nova/hacking')
-rw-r--r-- | nova/hacking/checks.py | 26 |
1 files changed, 15 insertions, 11 deletions
diff --git a/nova/hacking/checks.py b/nova/hacking/checks.py index e679b0c145..5500beba3a 100644 --- a/nova/hacking/checks.py +++ b/nova/hacking/checks.py @@ -660,17 +660,21 @@ def check_config_option_in_central_place(logical_line, filename): # That's the correct location if "nova/conf/" in filename: return - # TODO(markus_z) This is just temporary until all config options are - # moved to the central place. To avoid that a once cleaned up place - # introduces new config options, we do a check here. This array will - # get quite huge over the time, but will be removed at the end of the - # reorganization. - # You can add the full path to a module or folder. It's just a substring - # check, which makes it flexible enough. - cleaned_up = ["nova/console/serial.py", - "nova/cmd/serialproxy.py", - ] - if not any(c in filename for c in cleaned_up): + + # (macsz) All config options (with exceptions that are clarified + # in the list below) were moved to the central place. List below is for + # all options that were impossible to move without doing a major impact + # on code. Add full path to a module or folder. + conf_exceptions = [ + # CLI opts are allowed to be outside of nova/conf directory + 'nova/cmd/manage.py', + 'nova/cmd/policy_check.py', + # config options should not be declared in tests, but there is + # another checker for it (N320) + 'nova/tests', + ] + + if any(f in filename for f in conf_exceptions): return if cfg_opt_re.match(logical_line): |