)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"c500557892f4401e7df356f6b83fd1c08caccfe1","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Add request_ids attribute to resource objects"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"These changes are required to return \u0027request_id\u0027 from client to log"},{"line_number":10,"context_line":"request_id mappings of cross projects."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"Change-Id: I7b399512fcec9ecd31938656deb60e325bb76ad4"},{"line_number":13,"context_line":"Implements: blueprint return-request-id-to-caller"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"fa69d971_23725dae","line":10,"updated":"2016-01-02 17:23:25.000000000","message":"Please list all the resource objects that you\u0027ve changed, i.e., consistency groups, etc.","commit_id":"1ddd419881ae27a56270663c96306d61e29f1759"}],"cinderclient/v2/cgsnapshots.py":[{"author":{"_account_id":20105,"name":"Cao ShuFeng","email":"caosf.fnst@cn.fujitsu.com","username":"caosf.fnst"},"change_message_id":"6e1d42e16bd7bd7d1a70bf9d8ff263b5a89ef257","unresolved":false,"context_lines":[{"line_number":122,"context_line":"        body \u003d {action: info}"},{"line_number":123,"context_line":"        self.run_hooks(\u0027modify_body_for_action\u0027, body, **kwargs)"},{"line_number":124,"context_line":"        url \u003d \u0027/cgsnapshots/%s/action\u0027 % base.getid(cgsnapshot)"},{"line_number":125,"context_line":"        resp, body \u003d self.api.client.post(url, body\u003dbody)"},{"line_number":126,"context_line":"        return common_base.TupleWithMeta(resp, body)"}],"source_content_type":"text/x-python","patch_set":6,"id":"dae33548_bf1e1761","line":126,"range":{"start_line":125,"start_character":8,"end_line":126,"end_character":52},"updated":"2016-02-16 02:18:22.000000000","message":"Hi, Tushar Patil,xing-yang,Ankit Agrawal\nI suggest that we write TupleWithMeta class as under:\nclass TupleWithMeta(tuple, RequestIdMixin):\n    def __new__(cls, values, resp):\n        return super(TupleWithMeta, cls).__new__(cls, values)\n\n    def __init__(self, values, resp):\n        self.request_ids_setup()\n        self.append_request_ids(resp)\n\nand the code here can look like this:\n        resp, body \u003d self.api.client.post(url, body\u003dbody)\n        return common_base.TupleWithMeta((resp,body), resp)\n\nAlso the this implement of  TupleWithMeta[1] is not a \"real\" tuple.\nIt can recive only two elements, not one, not three, always two.\nA two-element-tuple is not a \"good\" tuple, although it works now :) .\n\nWhat Tushar Patil suggested is also a two-element-tuple, in my opintion.\n\nThanks\n\n[1]: https://review.openstack.org/#/c/257170","commit_id":"0c8ea9563de182706683fb8dbc7c1575aadfa1ed"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"b0366cc35f3ba8074368613def1db3faca810625","unresolved":false,"context_lines":[{"line_number":123,"context_line":"        self.run_hooks(\u0027modify_body_for_action\u0027, body, **kwargs)"},{"line_number":124,"context_line":"        url \u003d \u0027/cgsnapshots/%s/action\u0027 % base.getid(cgsnapshot)"},{"line_number":125,"context_line":"        resp, body \u003d self.api.client.post(url, body\u003dbody)"},{"line_number":126,"context_line":"        return common_base.TupleWithMeta(resp, body)"}],"source_content_type":"text/x-python","patch_set":6,"id":"3a57f1b5_39a305b4","line":126,"updated":"2016-02-12 14:56:46.000000000","message":"I wonder why parameters in TupleWithMeta have a different (reversed) order compared to others, but that is defined in cinderclient/openstack/common/apiclient/base.py by your first patch.  Maybe better to make them the same order to avoid confusion or do you have a reason to keep that order different?\n\nclass TupleWithMeta(tuple, RequestIdMixin):\n    def __init__(self, resp, values):\n\nclass DictWithMeta(dict, RequestIdMixin):\n    def __init__(self, values, resp):\n\nclass ListWithMeta(list, RequestIdMixin):\n    def __init__(self, values, resp):","commit_id":"0c8ea9563de182706683fb8dbc7c1575aadfa1ed"},{"author":{"_account_id":1011,"name":"Tushar Patil","email":"tushar.vitthal.patil@gmail.com","username":"tpatil"},"change_message_id":"07addf32712231bec7406d54165c4a50d72e55f7","unresolved":false,"context_lines":[{"line_number":123,"context_line":"        self.run_hooks(\u0027modify_body_for_action\u0027, body, **kwargs)"},{"line_number":124,"context_line":"        url \u003d \u0027/cgsnapshots/%s/action\u0027 % base.getid(cgsnapshot)"},{"line_number":125,"context_line":"        resp, body \u003d self.api.client.post(url, body\u003dbody)"},{"line_number":126,"context_line":"        return common_base.TupleWithMeta(resp, body)"}],"source_content_type":"text/x-python","patch_set":6,"id":"3a57f1b5_b6713778","line":126,"in_reply_to":"3a57f1b5_39a305b4","updated":"2016-02-12 17:28:36.000000000","message":"Hi xing-yang,\n\nIt\u0027s possible to maintain the same consistency by design.\n\nWrite TupleWithMeta class as under:\n\nclass TupleWithMeta(tuple):\n    def __new__(cls, values, resp):\n        return super(TupleWithMeta, cls).__new__(cls, (resp, values))\n\n    def __init__(self, resp, values):\n        self.setup()\n        self.append_request_ids(resp)\n\nTo make this change, patches [1][2] needs to be reverted. We can also make these changes later, the first thing after Mitaka release as it\u0027s won\u0027t affect data returned from the methods back to the caller so it won\u0027t introduce compatibility issue. Please suggest.\n\n[1] : https://review.openstack.org/#/c/257170\n[2] : https://review.openstack.org/#/c/257180","commit_id":"0c8ea9563de182706683fb8dbc7c1575aadfa1ed"},{"author":{"_account_id":10485,"name":"Ankit Agrawal","email":"ankitagrawal8188@gmail.com","username":"ankitagrawal"},"change_message_id":"3c05d5b2808c6c10fc5c58dacf15b05a909c7d1f","unresolved":false,"context_lines":[{"line_number":122,"context_line":"        body \u003d {action: info}"},{"line_number":123,"context_line":"        self.run_hooks(\u0027modify_body_for_action\u0027, body, **kwargs)"},{"line_number":124,"context_line":"        url \u003d \u0027/cgsnapshots/%s/action\u0027 % base.getid(cgsnapshot)"},{"line_number":125,"context_line":"        resp, body \u003d self.api.client.post(url, body\u003dbody)"},{"line_number":126,"context_line":"        return common_base.TupleWithMeta(resp, body)"}],"source_content_type":"text/x-python","patch_set":6,"id":"dae33548_08ef0788","line":126,"range":{"start_line":125,"start_character":8,"end_line":126,"end_character":52},"in_reply_to":"dae33548_48e8efb4","updated":"2016-02-16 05:41:50.000000000","message":"Thanks for your guidance, I\u0027ll make the changes as suggested and will upload the new PS soon.","commit_id":"0c8ea9563de182706683fb8dbc7c1575aadfa1ed"},{"author":{"_account_id":10485,"name":"Ankit Agrawal","email":"ankitagrawal8188@gmail.com","username":"ankitagrawal"},"change_message_id":"043827fcc7d0abe0755dfe87220245db9a606293","unresolved":false,"context_lines":[{"line_number":122,"context_line":"        body \u003d {action: info}"},{"line_number":123,"context_line":"        self.run_hooks(\u0027modify_body_for_action\u0027, body, **kwargs)"},{"line_number":124,"context_line":"        url \u003d \u0027/cgsnapshots/%s/action\u0027 % base.getid(cgsnapshot)"},{"line_number":125,"context_line":"        resp, body \u003d self.api.client.post(url, body\u003dbody)"},{"line_number":126,"context_line":"        return common_base.TupleWithMeta(resp, body)"}],"source_content_type":"text/x-python","patch_set":6,"id":"dae33548_eeec6b2b","line":126,"range":{"start_line":125,"start_character":8,"end_line":126,"end_character":52},"in_reply_to":"dae33548_bf1e1761","updated":"2016-02-16 06:43:39.000000000","message":"Hi Cao, \n\nYour concern is valid. With current design only two elements in tuple is allowed but in future if there is a case to return tuple with more than two elements then this design will not work.\n\nI will make changes in TupleWithMeta as per your suggestion and will upload new PS.","commit_id":"0c8ea9563de182706683fb8dbc7c1575aadfa1ed"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"d5d9caf1fcb24bee704b83ef134411f07b9eee46","unresolved":false,"context_lines":[{"line_number":122,"context_line":"        body \u003d {action: info}"},{"line_number":123,"context_line":"        self.run_hooks(\u0027modify_body_for_action\u0027, body, **kwargs)"},{"line_number":124,"context_line":"        url \u003d \u0027/cgsnapshots/%s/action\u0027 % base.getid(cgsnapshot)"},{"line_number":125,"context_line":"        resp, body \u003d self.api.client.post(url, body\u003dbody)"},{"line_number":126,"context_line":"        return common_base.TupleWithMeta(resp, body)"}],"source_content_type":"text/x-python","patch_set":6,"id":"dae33548_48e8efb4","line":126,"range":{"start_line":125,"start_character":8,"end_line":126,"end_character":52},"in_reply_to":"dae33548_bf1e1761","updated":"2016-02-16 05:31:33.000000000","message":"The already merged patches don\u0027t need to be reverted.  Can you submit a patch just to fix TupleWithMeta (just reverse the order of \"resp\" and \"values\" so that it is consistent with others) and rebase your other patches to be dependent on it?","commit_id":"0c8ea9563de182706683fb8dbc7c1575aadfa1ed"},{"author":{"_account_id":20105,"name":"Cao ShuFeng","email":"caosf.fnst@cn.fujitsu.com","username":"caosf.fnst"},"change_message_id":"51b09010305a16f2c07dbd4b772980a1756bc61a","unresolved":false,"context_lines":[{"line_number":77,"context_line":"    def list(self, detailed\u003dTrue, search_opts\u003dNone):"},{"line_number":78,"context_line":"        \"\"\"Lists all cgsnapshots."},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"        :rtype: list of :class:`Cgsnapshot`"},{"line_number":81,"context_line":"        \"\"\""},{"line_number":82,"context_line":"        if search_opts is None:"},{"line_number":83,"context_line":"            search_opts \u003d {}"}],"source_content_type":"text/x-python","patch_set":7,"id":"dae33548_17540cfd","line":80,"range":{"start_line":80,"start_character":16,"end_line":80,"end_character":20},"updated":"2016-02-17 02:54:09.000000000","message":"It returns ListWithMeta now.","commit_id":"ec65605eded61801b817cc1e556de0ae8cb74f7c"}],"cinderclient/v2/consistencygroups.py":[{"author":{"_account_id":20105,"name":"Cao ShuFeng","email":"caosf.fnst@cn.fujitsu.com","username":"caosf.fnst"},"change_message_id":"51b09010305a16f2c07dbd4b772980a1756bc61a","unresolved":false,"context_lines":[{"line_number":79,"context_line":"        :param description: Description of the ConsistencyGroup"},{"line_number":80,"context_line":"        :param user_id: User id derived from context"},{"line_number":81,"context_line":"        :param project_id: Project id derived from context"},{"line_number":82,"context_line":"        :rtype: :class:`Consistencygroup`"},{"line_number":83,"context_line":"        \"\"\""},{"line_number":84,"context_line":"        body \u003d {\u0027consistencygroup-from-src\u0027: {\u0027name\u0027: name,"},{"line_number":85,"context_line":"                                              \u0027description\u0027: description,"}],"source_content_type":"text/x-python","patch_set":7,"id":"dae33548_b73c40c9","line":82,"range":{"start_line":82,"start_character":16,"end_line":82,"end_character":41},"updated":"2016-02-17 02:54:09.000000000","message":"Now, it returns a DictWithMeta.","commit_id":"ec65605eded61801b817cc1e556de0ae8cb74f7c"}]}
