diff --git a/setup.cfg b/setup.cfg index 25c5cd8..68e0374 100644 --- a/setup.cfg +++ b/setup.cfg @@ -25,6 +25,11 @@ console_scripts = glare-db-manage = glare.cmd.db_manage:main oslo.config.opts = glare = glare.opts:list_artifacts_opts +oslo.policy.enforcer = + glare = glare.common.policy:_get_enforcer + +oslo.policy.policies = + glare = glare.common.policy:list_rules [build_sphinx] all_files = 1 diff --git a/tox.ini b/tox.ini index 76c2a39..b12b397 100644 --- a/tox.ini +++ b/tox.ini @@ -30,24 +30,22 @@ commands = bandit -c bandit.yaml -r glare -n5 -p gate [testenv:cover] -# NOTE(jaegerandi): this target does not use constraints because -# upstream infra does not yet support it. Once that's fixed, we can -# drop the install_command. -install_command = pip install -U --force-reinstall {opts} {packages} setenv = VIRTUAL_ENV={envdir} commands = python setup.py testr --coverage --testr-args='^(?!.*test.*coverage).*$' [testenv:venv] -# NOTE(jaegerandi): this target does not use constraints because -# upstream infra does not yet support it. Once that's fixed, we can -# drop the install_command. -install_command = pip install -U --force-reinstall {opts} {packages} commands = {posargs} [testenv:genconfig] commands = oslo-config-generator --config-file etc/oslo-config-generator/glare.conf +[testenv:genpolicy] +sitepackages = False +envdir = {toxworkdir}/venv +commands = + oslopolicy-sample-generator --namespace=glare --output-file=etc/policy.json.sample + [testenv:docs] commands = python setup.py build_sphinx @@ -56,11 +54,9 @@ commands = bandit -c bandit.yaml -r glare -n5 -p gate [flake8] # TODO(dmllr): Analyze or fix the warnings blacklisted below -# E711 comparison to None should be 'if cond is not None:' -# E712 comparison to True should be 'if cond is True:' or 'if cond:' # H404 multi line docstring should start with a summary # H405 multi line docstring summary not separated with an empty line -ignore = E711,E712,H404,H405 +ignore = H404,H405 exclude = .venv,.git,.tox,dist,doc,etc,*glare/locale*,*lib/python*,*egg,build [hacking]