)]}'
{"swift/common/middleware/mem_constraints.py":[{"author":{"_account_id":7479,"name":"paul luse","email":"paul.e.luse@intel.com","username":"peluse"},"change_message_id":"e55abcb3dca0ff615ae065a210699adbef8f47f3","unresolved":false,"context_lines":[{"line_number":17,"context_line":"``mem_constraints`` is a middleware which will check storage policies"},{"line_number":18,"context_line":"specific constraints on PUT requests."},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"The ``mem_constraints`` middleware should be added to the pipeline in your"},{"line_number":21,"context_line":"``/etc/swift/proxy-server.conf`` file, and a mapping of storage policies"},{"line_number":22,"context_line":"using the object mem_server should be listed in the \u0027policies\u0027 variable"},{"line_number":23,"context_line":"in the filter section. The constraints on this middleware changes the"}],"source_content_type":"text/x-python","patch_set":2,"id":"7ac7a964_1a13565d","line":20,"updated":"2014-08-14 17:12:00.000000000","message":"should there be some commentary in the sample proxy conf file for mem_constraints?  I can see points for doing it or not however spot checking I think all the middleware in the /common dir has at least a commented out filter section in the sample conf file","commit_id":"aabe3587bd62103cd95187a68ddf913e2d619e41"},{"author":{"_account_id":7479,"name":"paul luse","email":"paul.e.luse@intel.com","username":"peluse"},"change_message_id":"e55abcb3dca0ff615ae065a210699adbef8f47f3","unresolved":false,"context_lines":[{"line_number":31,"context_line":""},{"line_number":32,"context_line":"    [filter:mem_constraints]"},{"line_number":33,"context_line":"    use \u003d egg:swift#mem_constraints"},{"line_number":34,"context_line":"    policies\u003dpolicy_2"},{"line_number":35,"context_line":"    max_object_name_length\u003d10"},{"line_number":36,"context_line":"\"\"\""},{"line_number":37,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"7ac7a964_f749538c","line":34,"updated":"2014-08-14 17:12:00.000000000","message":"this is a different convention here, having the word policy concatenated with the index like this.  Would be much better here to use policy names, import POLICIES and match up the index with what you get from the container later below (since this will likely be used as an example/template for other policy specific middleware)","commit_id":"aabe3587bd62103cd95187a68ddf913e2d619e41"},{"author":{"_account_id":330,"name":"John Dickinson","email":"me@not.mn","username":"notmyname"},"change_message_id":"7634bb6eac5e2db1badeb99f04d2d27bd11ace3b","unresolved":false,"context_lines":[{"line_number":70,"context_line":"                return self.app(env, start_response)"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"            container_info \u003d get_container_info("},{"line_number":73,"context_line":"                env, self.app, swift_source\u003d\u0027LE\u0027)"},{"line_number":74,"context_line":"            policy_idx \u003d \u0027policy_%s\u0027 % container_info[\u0027storage_policy\u0027]"},{"line_number":75,"context_line":"            if policy_idx in self.policies:"},{"line_number":76,"context_line":"                env[\u0027swift.constraints\u0027] \u003d self.check_object_creation"}],"source_content_type":"text/x-python","patch_set":2,"id":"7ac7a964_555bdf53","line":73,"updated":"2014-08-14 18:10:26.000000000","message":"LE is for list_endpoints. This would need it\u0027s own and needs to be documented in the logs doc. (assuming we stick with this middleware--see review comments)","commit_id":"aabe3587bd62103cd95187a68ddf913e2d619e41"}]}
