From 7e185ad96b043c0cb450a6dfc6245db7aa4a0fd6 Mon Sep 17 00:00:00 2001 From: Davanum Srinivas Date: Mon, 25 Sep 2017 09:25:53 -0400 Subject: http/https check rules as stevedore extensions Why? HttpCheck/HttpsCheck are examples of rule checks that can be implemented outside of the oslo.policy library. Once we setup the infra for registering and using these as stevedore extensions, we automatically get the capability of other folks contributing to writing custom rules for their own use cases. * Add HttpCheck/HttpsCheck as entrypoints in setup.cfg * parser will check get_extensions() to see if there are any external checks registered * Move HttpCheck/HttpsCheck into external module * Move related test cases to test_external.py Change-Id: Icde2b26a38d7c7842defae053228d9208454b969 --- setup.cfg | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'setup.cfg') diff --git a/setup.cfg b/setup.cfg index dc076d3..0f7b4f0 100644 --- a/setup.cfg +++ b/setup.cfg @@ -39,6 +39,10 @@ console_scripts = oslopolicy-policy-generator = oslo_policy.generator:generate_policy oslopolicy-list-redundant = oslo_policy.generator:list_redundant +oslo.policy.rule_checks = + http = oslo_policy._external:HttpCheck + https = oslo_policy._external:HttpsCheck + [build_sphinx] all-files = 1 warning-is-error = 1 -- cgit v1.2.1