)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":7680,"name":"Alex Gaynor","email":"alex.gaynor@gmail.com","username":"alex_gaynor"},"change_message_id":"ad54ad5971958f9d5acb97aaf460e17803931dba","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Add support for HEAD requests of resources"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Allow Resource.get* to make HEAD requests by passing head\u003dTrue. When"},{"line_number":10,"context_line":"header data comes back, X-Trans-Id headers are converted into \u0027id\u0027 data"},{"line_number":11,"context_line":"to match the rest of the response types, and to match Resource.id"},{"line_number":12,"context_line":"attribute access."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"baada198_8d090798","line":9,"updated":"2014-06-30 22:41:40.000000000","message":"Does this API actually make sense? It feels like it\u0027s bleeding HTTP details into a slightly higher level API?","commit_id":"0c4e42ec181ac9c303bf7b87374f21c36ae141a2"},{"author":{"_account_id":8257,"name":"Brian Curtin","email":"brian@python.org","username":"briancurtin"},"change_message_id":"d24185dc5ad1d86a41a3e5dbe489350dabe9d9f3","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Add support for HEAD requests of resources"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Allow Resource.get* to make HEAD requests by passing head\u003dTrue. When"},{"line_number":10,"context_line":"header data comes back, X-Trans-Id headers are converted into \u0027id\u0027 data"},{"line_number":11,"context_line":"to match the rest of the response types, and to match Resource.id"},{"line_number":12,"context_line":"attribute access."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"baada198_304bee5a","line":9,"in_reply_to":"baada198_8d090798","updated":"2014-06-30 22:58:16.000000000","message":"I took the `get` methods here more as the \u0027read\u0027 part of CRUD since both HEAD and GET are for reading available information. I\u0027m not married to this API, I just need a way to get headers for the swift resource and my original hack turned into this.","commit_id":"0c4e42ec181ac9c303bf7b87374f21c36ae141a2"}],"openstack/resource.py":[{"author":{"_account_id":7680,"name":"Alex Gaynor","email":"alex.gaynor@gmail.com","username":"alex_gaynor"},"change_message_id":"ad54ad5971958f9d5acb97aaf460e17803931dba","unresolved":false,"context_lines":[{"line_number":237,"context_line":"        url \u003d utils.urljoin(cls.base_path, r_id)"},{"line_number":238,"context_line":""},{"line_number":239,"context_line":"        if head:"},{"line_number":240,"context_line":"            data \u003d session.head(url, service\u003dcls.service, accept\u003dNone).headers"},{"line_number":241,"context_line":"            resp_id \u003d data.pop(\"X-Trans-Id\", None)"},{"line_number":242,"context_line":"            if resp_id:"},{"line_number":243,"context_line":"                data.update({\"id\": resp_id})"}],"source_content_type":"text/x-python","patch_set":1,"id":"baada198_0df5f782","line":240,"updated":"2014-06-30 22:41:40.000000000","message":"Does anything else in headers actually make sense to pass along, there\u0027s probably a bunch of random stuff in there.","commit_id":"0c4e42ec181ac9c303bf7b87374f21c36ae141a2"},{"author":{"_account_id":8257,"name":"Brian Curtin","email":"brian@python.org","username":"briancurtin"},"change_message_id":"c36a44e61858ec7ae16cfa2e0fea7620919fdd92","unresolved":false,"context_lines":[{"line_number":237,"context_line":"        url \u003d utils.urljoin(cls.base_path, r_id)"},{"line_number":238,"context_line":""},{"line_number":239,"context_line":"        if head:"},{"line_number":240,"context_line":"            data \u003d session.head(url, service\u003dcls.service, accept\u003dNone).headers"},{"line_number":241,"context_line":"            resp_id \u003d data.pop(\"X-Trans-Id\", None)"},{"line_number":242,"context_line":"            if resp_id:"},{"line_number":243,"context_line":"                data.update({\"id\": resp_id})"}],"source_content_type":"text/x-python","patch_set":1,"id":"baada198_ed53636a","line":240,"in_reply_to":"baada198_0df5f782","updated":"2014-06-30 22:45:11.000000000","message":"For Swift, yes. For example, HEAD on /v1/{account} gives your account information. Same for getting container metadata.","commit_id":"0c4e42ec181ac9c303bf7b87374f21c36ae141a2"},{"author":{"_account_id":7680,"name":"Alex Gaynor","email":"alex.gaynor@gmail.com","username":"alex_gaynor"},"change_message_id":"ad54ad5971958f9d5acb97aaf460e17803931dba","unresolved":false,"context_lines":[{"line_number":240,"context_line":"            data \u003d session.head(url, service\u003dcls.service, accept\u003dNone).headers"},{"line_number":241,"context_line":"            resp_id \u003d data.pop(\"X-Trans-Id\", None)"},{"line_number":242,"context_line":"            if resp_id:"},{"line_number":243,"context_line":"                data.update({\"id\": resp_id})"},{"line_number":244,"context_line":"        else:"},{"line_number":245,"context_line":"            data \u003d session.get(url, service\u003dcls.service).body"},{"line_number":246,"context_line":"            if cls.resource_key:"}],"source_content_type":"text/x-python","patch_set":1,"id":"baada198_2df2bb9a","line":243,"updated":"2014-06-30 22:41:40.000000000","message":"data[\"id\"] \u003d resp_id","commit_id":"0c4e42ec181ac9c303bf7b87374f21c36ae141a2"},{"author":{"_account_id":8736,"name":"Terry Howe","email":"terrylhowe@gmail.com","username":"terrylhowe"},"change_message_id":"5e0fffc2d9a9a61424ba2ed563d9ed57cb19d78e","unresolved":false,"context_lines":[{"line_number":269,"context_line":"    @classmethod"},{"line_number":270,"context_line":"    def head_by_id(cls, session, r_id):"},{"line_number":271,"context_line":"        data \u003d cls.head_data_by_id(session, r_id)"},{"line_number":272,"context_line":"        return cls.existing(**data)"},{"line_number":273,"context_line":""},{"line_number":274,"context_line":"    def head(self, session):"},{"line_number":275,"context_line":"        data \u003d self.head_data_by_id(session, self.id)"}],"source_content_type":"text/x-python","patch_set":3,"id":"baada198_054a1180","line":272,"updated":"2014-07-01 14:55:21.000000000","message":"Seems like it makes more sense to put the headers in another data member called something like headers rather than jam them in as properties.  Take the header on / from swift:\n\n{\u0027content-length\u0027: \u00270\u0027, \u0027accept-ranges\u0027: \u0027bytes\u0027, \u0027x-timestamp\u0027: \u00271337619821.95544\u0027, \u0027x-trans-id\u0027: \u0027tx9052100a9be94743a150b-0053b2c9e3\u0027, \u0027date\u0027: \u0027Tue, 01 Jul 2014 14:46:59 GMT\u0027, \u0027x-account-bytes-used\u0027: \u002712367355382\u0027, \u0027x-account-container-count\u0027: \u002731\u0027, \u0027content-type\u0027: \u0027text/plain; charset\u003dutf-8\u0027, \u0027x-account-object-count\u0027: \u002778786\u0027}\n\nSome of those things just don\u0027t make sense as properties, some do.","commit_id":"f8692edb34cc0178ed17d19e225a9714ee8da5df"},{"author":{"_account_id":8257,"name":"Brian Curtin","email":"brian@python.org","username":"briancurtin"},"change_message_id":"14c538f0cc785e4ff78a11514e83307eeb3cbe9b","unresolved":false,"context_lines":[{"line_number":269,"context_line":"    @classmethod"},{"line_number":270,"context_line":"    def head_by_id(cls, session, r_id):"},{"line_number":271,"context_line":"        data \u003d cls.head_data_by_id(session, r_id)"},{"line_number":272,"context_line":"        return cls.existing(**data)"},{"line_number":273,"context_line":""},{"line_number":274,"context_line":"    def head(self, session):"},{"line_number":275,"context_line":"        data \u003d self.head_data_by_id(session, self.id)"}],"source_content_type":"text/x-python","patch_set":3,"id":"baada198_06005800","line":272,"in_reply_to":"baada198_054a1180","updated":"2014-07-01 15:15:07.000000000","message":"They\u0027d only be properties if they were created on the Resource object, though, right? For example, in the Account resource that spawned this, there\u0027s \"account_object_count \u003d prop(\u0027x-account-object-count\u0027)\" but I wouldn\u0027t put content-length or accept-ranges headers as properties.\n\nI\u0027ll put them in something else, but I had viewed this as a layer that was starting to work its way away from HTTPisms. Perhaps I\u0027m off on that.","commit_id":"f8692edb34cc0178ed17d19e225a9714ee8da5df"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"1d4ae0b3242ccaa2917e965187acf7d29a0acd1f","unresolved":false,"context_lines":[{"line_number":269,"context_line":"    @classmethod"},{"line_number":270,"context_line":"    def head_by_id(cls, session, r_id):"},{"line_number":271,"context_line":"        data \u003d cls.head_data_by_id(session, r_id)"},{"line_number":272,"context_line":"        return cls.existing(**data)"},{"line_number":273,"context_line":""},{"line_number":274,"context_line":"    def head(self, session):"},{"line_number":275,"context_line":"        data \u003d self.head_data_by_id(session, self.id)"}],"source_content_type":"text/x-python","patch_set":3,"id":"baada198_094b0b88","line":272,"in_reply_to":"baada198_06005800","updated":"2014-07-01 15:55:43.000000000","message":"Are you going to set up a mapping between the header keys and the desired properties? E.g.: translate the header \"x-account-object-count\" to \"object_count\"?","commit_id":"f8692edb34cc0178ed17d19e225a9714ee8da5df"},{"author":{"_account_id":8257,"name":"Brian Curtin","email":"brian@python.org","username":"briancurtin"},"change_message_id":"ca6c343e2aef1324c318307448e22fc33f8ab9aa","unresolved":false,"context_lines":[{"line_number":269,"context_line":"    @classmethod"},{"line_number":270,"context_line":"    def head_by_id(cls, session, r_id):"},{"line_number":271,"context_line":"        data \u003d cls.head_data_by_id(session, r_id)"},{"line_number":272,"context_line":"        return cls.existing(**data)"},{"line_number":273,"context_line":""},{"line_number":274,"context_line":"    def head(self, session):"},{"line_number":275,"context_line":"        data \u003d self.head_data_by_id(session, self.id)"}],"source_content_type":"text/x-python","patch_set":3,"id":"baada198_0c5f99e6","line":272,"in_reply_to":"baada198_094b0b88","updated":"2014-07-01 16:07:21.000000000","message":"Is more needed than \"account_object_count \u003d prop(\u0027x-account-object-count\u0027)\"? You could find out the header key by doing a_o_c.name and get x-a-o-c\n\n(further on this point should probably go on the Account resource object when I put it up)","commit_id":"f8692edb34cc0178ed17d19e225a9714ee8da5df"}]}
