Move the policy parsing logic to a separate module.

Registered by Nassim Babaci

==
Right now openstack.common.policy module mixes different kind of logic:
* It handle the way json policy file are retrieved (using oslo.cfg for instance)
* It contains the parsing code.
* It defines way rules are checked (the enforcer part).

Besides logging and gettext feature are done using other openstack.common modules.
==

But in some cases user that want to make use of the policy format, may already have ways to retrieve the policy file or already have a logging facility.

So in this case having a separate module that only provide the parsing and checking part would be greatly helpful, and facilitate integration of the policy feature in any other code.

Besides it may facilitate the release of the policy engine as a separate module in the future.

==
Some implementation concerns:
Attention should be taken to not change the external API of the policy.py module.

Blueprint information

Status:
Not started
Approver:
None
Priority:
Undefined
Drafter:
Nassim Babaci
Direction:
Needs approval
Assignee:
Nassim Babaci
Definition:
New
Series goal:
None
Implementation:
Unknown
Milestone target:
None

Related branches

Sprints

Whiteboard

Gerrit topic: https://review.openstack.org/#q,topic:bp/generalize-policy-engine,n,z

Addressed by: https://review.openstack.org/96718
    Move policy parser to a separate module.

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.