Fixes converter not working for certain edge cases.
Currently, the converter framework is not robust enough to handle
all policy cases. For example, is_admin context breaks.
This patch makes the converter more robust. The converter was changed
to use oslo_policy's shell tool for figuring out which roles are
permitted for a given rule. The shell tool can be found here:
https://github.com/openstack/oslo.policy/blob/master/oslo_policy/shell.py
Because the shell tool is intended to be used as a CLI tool, it was
adapted from oslo policy to better work within Patrole.
implements blueprint: oslo-policy-converter
Change-Id: Ia0fe9113e2be44e609b0edbb4c6facd1425f28b5
15 files changed