sample code to implement oslo policy
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
oslo.policy |
Expired
|
Undecided
|
Unassigned |
Bug Description
Hi,
I am trying to implement the pecan rest framework with policy. How can I do that. I tried with the following but getting error on that. Please help
My policy file (policy.json = which is in the folder "controller")
http://
I am trying to call the following from my pecan rootcontroller
rbac.enforce(
My rbac.py file (oslo code)
http://
I am trying to call it using the following
http://
Getting following o/p while printing the self from load_rules()
print self.__dict__
{'policy_file': 'policy.json', 'policy_path': None, 'rules': {}, 'file_rules': {}, 'overwrite': True, 'conf': <oslo_config.
Is this correct behaviour? But I am passing the file as policy.json. Please give me an opening for this.
what I find now, policy_file want to find 'policy.json', but you provide 'test.json'