Policy in code for Sahara
This patch is part of the community goal to move policies into code. https://governance.openstack.org/tc/goals/queens/policy-in-code.html Change-Id: I8f228ca40acc589b9aa41fc1e80a1c0308f179cf
This commit is contained in:
parent
c16588e905
commit
b665ca7c22
|
@ -28,7 +28,6 @@ packages =
|
||||||
data_files =
|
data_files =
|
||||||
etc/sahara =
|
etc/sahara =
|
||||||
etc/sahara/api-paste.ini
|
etc/sahara/api-paste.ini
|
||||||
etc/sahara/policy.json
|
|
||||||
etc/sahara/rootwrap.conf
|
etc/sahara/rootwrap.conf
|
||||||
etc/sahara/rootwrap.d = etc/sahara/rootwrap.d/*
|
etc/sahara/rootwrap.d = etc/sahara/rootwrap.d/*
|
||||||
|
|
||||||
|
@ -82,6 +81,9 @@ oslo.config.opts =
|
||||||
oslo.config.opts.defaults =
|
oslo.config.opts.defaults =
|
||||||
sahara.config = sahara.common.config:set_cors_middleware_defaults
|
sahara.config = sahara.common.config:set_cors_middleware_defaults
|
||||||
|
|
||||||
|
oslo.policy.policies =
|
||||||
|
sahara = sahara.common.policies:list_rules
|
||||||
|
|
||||||
[build_sphinx]
|
[build_sphinx]
|
||||||
all_files = 1
|
all_files = 1
|
||||||
build-dir = doc/build
|
build-dir = doc/build
|
||||||
|
|
5
tox.ini
5
tox.ini
|
@ -1,5 +1,5 @@
|
||||||
[tox]
|
[tox]
|
||||||
envlist = py35,py27,pep8
|
envlist = py35,py27,pep8,genpolicy
|
||||||
minversion = 1.6
|
minversion = 1.6
|
||||||
skipsdist = True
|
skipsdist = True
|
||||||
|
|
||||||
|
@ -36,6 +36,9 @@ commands =
|
||||||
# Run security linter
|
# Run security linter
|
||||||
bandit -c bandit.yaml -r sahara -n5 -p sahara_default -x tests
|
bandit -c bandit.yaml -r sahara -n5 -p sahara_default -x tests
|
||||||
|
|
||||||
|
[testenv:genpolicy]
|
||||||
|
commands = oslopolicy-sample-generator --config-file tools/config/sahara-policy-generator.conf
|
||||||
|
|
||||||
[testenv:venv]
|
[testenv:venv]
|
||||||
commands = {posargs}
|
commands = {posargs}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue