)]}'
{"oslo_context/context.py":[{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"84965698b468849abbe7b7d148348e61e591b8f7","unresolved":false,"context_lines":[{"line_number":71,"context_line":"    def update_store(self):"},{"line_number":72,"context_line":"        _request_store.context \u003d self"},{"line_number":73,"context_line":""},{"line_number":74,"context_line":"    def to_policy_dict(self):"},{"line_number":75,"context_line":"        \"\"\"A dictionary of context attributes to enforce policy with."},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"        oslo.policy enforcement requires a dictionary of attributes"}],"source_content_type":"text/x-python","patch_set":2,"id":"7a5de9d1_44cdd164","line":74,"updated":"2016-01-29 20:32:21.000000000","message":"Since this method doesn\u0027t render the entire object, and only retrieves a part of the data, I\u0027d rather we call it get_policy_something(). For the logging parameters, we said we would call the method get_logging_values(). Maybe this could be get_policy_values()?\n\nIs it necessary to return a dictionary, or can we return something immutable like a namedtuple?","commit_id":"903d5e82e0e1b17209f7a9b407625da99c82f947"},{"author":{"_account_id":7191,"name":"Jamie Lennox","email":"jamielennox@gmail.com","username":"jamielennox"},"change_message_id":"f62d229f65892d947582c0382b3f587275de476b","unresolved":false,"context_lines":[{"line_number":71,"context_line":"    def update_store(self):"},{"line_number":72,"context_line":"        _request_store.context \u003d self"},{"line_number":73,"context_line":""},{"line_number":74,"context_line":"    def to_policy_dict(self):"},{"line_number":75,"context_line":"        \"\"\"A dictionary of context attributes to enforce policy with."},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"        oslo.policy enforcement requires a dictionary of attributes"}],"source_content_type":"text/x-python","patch_set":2,"id":"7a5de9d1_05125709","line":74,"in_reply_to":"7a5de9d1_44cdd164","updated":"2016-02-01 00:49:45.000000000","message":"Sure, i honesltly don\u0027t mind what we call things. \n\nThe reason for the dict is that I\u0027m expecting that most services at least for the deprecation period are going to need to add on the policy enforcement credentials that they are hopefully deprecating in favour of this and the policy enforcement function expects a dict [1].\n\nNow how to deprecate values here is difficult because the keywords are located in the policy.json file and we don\u0027t parse these values out as much as string interpolation. The way i know to do this is return an object with a dict interface and logging messages like i did [2]. I\u0027m not sure then exactly what interface to this object i would expose to the services.\n\n\n[1] https://github.com/openstack/oslo.policy/blob/c15ddb0dc74f437b3726009155cbc74bfa825686/oslo_policy/policy.py#L523\n[2] https://review.openstack.org/#/c/271120/1/keystoneauth1/session.py","commit_id":"903d5e82e0e1b17209f7a9b407625da99c82f947"}]}
