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:
Telles Nobrega 2017-09-12 15:18:54 -06:00
parent 630e9be157
commit 0dc06f02bf
2 changed files with 7 additions and 2 deletions

View File

@ -28,7 +28,6 @@ packages =
data_files =
etc/sahara =
etc/sahara/api-paste.ini
etc/sahara/policy.json
etc/sahara/rootwrap.conf
etc/sahara/rootwrap.d = etc/sahara/rootwrap.d/*
@ -82,6 +81,9 @@ oslo.config.opts =
oslo.config.opts.defaults =
sahara.config = sahara.common.config:set_cors_middleware_defaults
oslo.policy.policies =
sahara = sahara.common.policies:list_rules
[build_sphinx]
all_files = 1
build-dir = doc/build

View File

@ -1,5 +1,5 @@
[tox]
envlist = py35,py27,pep8
envlist = py35,py27,pep8,genpolicy
minversion = 1.6
skipsdist = True
@ -36,6 +36,9 @@ commands =
# Run security linter
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]
commands = {posargs}