)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":13900,"name":"Accela Zhao","email":"accelazh@gmail.com","username":"accelazh"},"change_message_id":"73c0bcaa752b37c5cb9898eddfc5acf1d8900d8c","unresolved":false,"context_lines":[{"line_number":19,"context_line":"item for them."},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"Change-Id: I0f1f449c73d51675281497a095d869c1e72c889f"},{"line_number":22,"context_line":"closes-bug: #1350558"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":36,"id":"3a961159_c9393641","line":22,"updated":"2014-12-25 14:17:18.000000000","message":"The \u0027c\u0027 in \u0027closes-bug\u0027 should be capitalized.","commit_id":"917d87b24dc1d97e91364b5e0d97fa2ac05dd87f"},{"author":{"_account_id":10559,"name":"Steven Kaufer","email":"kaufer@us.ibm.com","username":"kaufer"},"change_message_id":"8d28ad974f5f5136b50c7a2ad5ece2f030cd54cf","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Remove the useless next link for volumes, transfers and backups"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"* Currently if the limit or osapi_max_limit equals to the length of"},{"line_number":10,"context_line":"the volume list and limit is None, a next link is generated in the"},{"line_number":11,"context_line":"response, though this next link will return empty volume list. In"},{"line_number":12,"context_line":"fact it is unnecessary to generate the next link in this case."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":39,"id":"3a961159_0a6cfa9c","line":9,"updated":"2015-01-12 04:35:20.000000000","message":"This is not accurate, the proposed fix will not address the scenario when the user-defined limit equals the number of items; in this case the \"next\" link will still be generated.\n\nAs far as I can tell, the proposed fix will only address the case when the user-defined limit is not given and either:\n\n- The number of items equals the osapi_max_limit\n- The last page of items equals the osapi_max_limit","commit_id":"bcd7c739f166d4f6a2563c356fc46fd0a8d21d35"},{"author":{"_account_id":2861,"name":"Vincent Hou","email":"shou@us.ibm.com","username":"houshengbo"},"change_message_id":"fe79d1a00388ff74bddbf7fa9e19ab9e4ca662b9","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Remove the useless next link for volumes, transfers and backups"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"* Currently if the limit or osapi_max_limit equals to the length of"},{"line_number":10,"context_line":"the volume list and limit is None, a next link is generated in the"},{"line_number":11,"context_line":"response, though this next link will return empty volume list. In"},{"line_number":12,"context_line":"fact it is unnecessary to generate the next link in this case."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":39,"id":"3a961159_ea9fae4f","line":9,"in_reply_to":"3a961159_0a6cfa9c","updated":"2015-01-12 04:56:56.000000000","message":"I agree with this comment and I shall revise the commit message.","commit_id":"bcd7c739f166d4f6a2563c356fc46fd0a8d21d35"}],"cinder/api/common.py":[{"author":{"_account_id":4355,"name":"Avishay Traeger","email":"avishay@stratoscale.com","username":"avishay-il"},"change_message_id":"05d896d07129f36ff790fc22a09db01326c92c1d","unresolved":false,"context_lines":[{"line_number":252,"context_line":"                              id_key\u003d\"uuid\", origin_volumes\u003dNone):"},{"line_number":253,"context_line":"        \"\"\"Retrieve \u0027next\u0027 link, if applicable."},{"line_number":254,"context_line":""},{"line_number":255,"context_line":"        The next link is included if:"},{"line_number":256,"context_line":"        1) \u0027limit\u0027 param is specified and equals the number of volumes."},{"line_number":257,"context_line":"        2) \u0027limit\u0027 param is specified but it exceeds CONF.osapi_max_limit,"},{"line_number":258,"context_line":"        in this case the number of volumes is CONF.osapi_max_limit."}],"source_content_type":"text/x-python","patch_set":4,"id":"7a8c0949_6d000e02","line":255,"updated":"2014-11-04 08:34:39.000000000","message":"Need to update this comment","commit_id":"1b684655da9d377d49261926e209565256e82a67"},{"author":{"_account_id":4355,"name":"Avishay Traeger","email":"avishay@stratoscale.com","username":"avishay-il"},"change_message_id":"05d896d07129f36ff790fc22a09db01326c92c1d","unresolved":false,"context_lines":[{"line_number":276,"context_line":"        origin_size \u003d 0"},{"line_number":277,"context_line":"        if origin_volumes:"},{"line_number":278,"context_line":"            origin_size \u003d len(origin_volumes)"},{"line_number":279,"context_line":"        if max_items and max_items \u003d\u003d len(items) and (not max_items or"},{"line_number":280,"context_line":"                                                      max_items \u003c origin_size):"},{"line_number":281,"context_line":"            last_item \u003d items[-1]"},{"line_number":282,"context_line":"            if id_key in last_item:"}],"source_content_type":"text/x-python","patch_set":4,"id":"7a8c0949_4d199278","line":279,"updated":"2014-11-04 08:34:39.000000000","message":"This \u0027if\u0027 statement seems overly complex, and also includes \u0027max_items\u0027 and \u0027not max_items\u0027, which I don\u0027t understand.  Why do we even care about max_items?  Why not simply:  if len(items) \u003c origin_size ?","commit_id":"1b684655da9d377d49261926e209565256e82a67"},{"author":{"_account_id":2861,"name":"Vincent Hou","email":"shou@us.ibm.com","username":"houshengbo"},"change_message_id":"8a9a79e2020516a3f7f2330c0a3443c72c71bfb7","unresolved":false,"context_lines":[{"line_number":276,"context_line":"        origin_size \u003d 0"},{"line_number":277,"context_line":"        if origin_volumes:"},{"line_number":278,"context_line":"            origin_size \u003d len(origin_volumes)"},{"line_number":279,"context_line":"        if max_items and max_items \u003d\u003d len(items) and (not max_items or"},{"line_number":280,"context_line":"                                                      max_items \u003c origin_size):"},{"line_number":281,"context_line":"            last_item \u003d items[-1]"},{"line_number":282,"context_line":"            if id_key in last_item:"}],"source_content_type":"text/x-python","patch_set":4,"id":"5a890539_ee46bb20","line":279,"in_reply_to":"7a8c0949_4d199278","updated":"2014-11-12 06:09:37.000000000","message":"max_items is the maximum number of items that one response can return.\nlen(items) won\u0027t exceed max_items. So under the condition of max_items \u003d\u003d len(items), it is possible to have the next link.\n\norigin_volumes could be None here. I need to change \"not max_items\" to \"not origin_volumes\", so that if origin_volumes is none, the original check works; if origin_volumes is not none, we need to check if max_items \u003c origin_size.","commit_id":"1b684655da9d377d49261926e209565256e82a67"},{"author":{"_account_id":4355,"name":"Avishay Traeger","email":"avishay@stratoscale.com","username":"avishay-il"},"change_message_id":"529217f87ca8269050efad20e096b2878f320c1c","unresolved":false,"context_lines":[{"line_number":270,"context_line":"        :returns links"},{"line_number":271,"context_line":"        \"\"\""},{"line_number":272,"context_line":"        links \u003d []"},{"line_number":273,"context_line":"        if origin_volumes:"},{"line_number":274,"context_line":"            origin_size \u003d len(origin_volumes)"},{"line_number":275,"context_line":"            if len(items) \u003c origin_size:"},{"line_number":276,"context_line":"                links \u003d self._add_next_link(links, items, id_key, request,"}],"source_content_type":"text/x-python","patch_set":6,"id":"5a890539_b9f79ff4","line":273,"updated":"2014-11-12 07:18:40.000000000","message":"Please be explicit in checks like this - can lead to bugs:\n\n if origin_volumes is not None:","commit_id":"872a680759f193b3a37ef3f62b3ae27757aab096"},{"author":{"_account_id":4355,"name":"Avishay Traeger","email":"avishay@stratoscale.com","username":"avishay-il"},"change_message_id":"529217f87ca8269050efad20e096b2878f320c1c","unresolved":false,"context_lines":[{"line_number":275,"context_line":"            if len(items) \u003c origin_size:"},{"line_number":276,"context_line":"                links \u003d self._add_next_link(links, items, id_key, request,"},{"line_number":277,"context_line":"                                            collection_name)"},{"line_number":278,"context_line":"        else:"},{"line_number":279,"context_line":"            max_items \u003d min("},{"line_number":280,"context_line":"                int(request.params.get(\"limit\", CONF.osapi_max_limit)),"},{"line_number":281,"context_line":"                CONF.osapi_max_limit)"}],"source_content_type":"text/x-python","patch_set":6,"id":"5a890539_39ff2fac","line":278,"updated":"2014-11-12 07:18:40.000000000","message":"Why allow origin_volumes to be None?  Why not make it a regular argument, and get rid of the \u0027else\u0027?  The code in the \u0027else\u0027 here seems to have the same bug that you are trying to fix, no?","commit_id":"872a680759f193b3a37ef3f62b3ae27757aab096"},{"author":{"_account_id":7198,"name":"Jay Bryant","email":"jungleboyj@electronicjungle.net","username":"jsbryant"},"change_message_id":"f46d6b4b637abda7de23d974ba6441552706784c","unresolved":false,"context_lines":[{"line_number":252,"context_line":"        :param collection_name: Name of collection, used to generate the"},{"line_number":253,"context_line":"                                next link for a pagination query"},{"line_number":254,"context_line":"        :param origin_items: List of the original collection items, which"},{"line_number":255,"context_line":"                               can be longer than items"},{"line_number":256,"context_line":"        :param id_key: Attribute key used to retrieve the unique ID, used"},{"line_number":257,"context_line":"                       to generate the next link marker for a pagination query"},{"line_number":258,"context_line":"        :returns links"}],"source_content_type":"text/x-python","patch_set":31,"id":"3a961159_04b4eaf0","line":255,"updated":"2014-12-16 15:55:56.000000000","message":"If you push another patch you should fix the indenting here.","commit_id":"86103211b3cfe7449f26eb02b17bcdd1e6f01589"},{"author":{"_account_id":10559,"name":"Steven Kaufer","email":"kaufer@us.ibm.com","username":"kaufer"},"change_message_id":"12e699d5b2f43849a152a5f386df227b11bf72d7","unresolved":false,"context_lines":[{"line_number":252,"context_line":"        :param collection_name: Name of collection, used to generate the"},{"line_number":253,"context_line":"                                next link for a pagination query"},{"line_number":254,"context_line":"        :param origin_items: List of the original collection items, which"},{"line_number":255,"context_line":"                             can be longer than items"},{"line_number":256,"context_line":"        :param id_key: Attribute key used to retrieve the unique ID, used"},{"line_number":257,"context_line":"                       to generate the next link marker for a pagination query"},{"line_number":258,"context_line":"        :returns links"}],"source_content_type":"text/x-python","patch_set":37,"id":"3a961159_053dd32c","line":255,"updated":"2014-12-26 21:18:34.000000000","message":"This will not be longer then items for the volume query.","commit_id":"a4ca64e776dd5dc5eb1a95ead71c22eadfd458ab"},{"author":{"_account_id":10559,"name":"Steven Kaufer","email":"kaufer@us.ibm.com","username":"kaufer"},"change_message_id":"12e699d5b2f43849a152a5f386df227b11bf72d7","unresolved":false,"context_lines":[{"line_number":269,"context_line":"            # limited by osapi_max_limit and we need to generate the"},{"line_number":270,"context_line":"            # next link. Otherwise, all the items will be returned in"},{"line_number":271,"context_line":"            # the response, no next link is generated."},{"line_number":272,"context_line":"            if limited_size \u003c origin_size:"},{"line_number":273,"context_line":"                self._generate_next_link(items, id_key, links, request,"},{"line_number":274,"context_line":"                                         collection_name)"},{"line_number":275,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":37,"id":"3a961159_a515df9c","line":272,"updated":"2014-12-26 21:18:34.000000000","message":"What about the case when the default limit is 1k and there are exactly 2k items?\n\n    First query: Return 1k items and the next link\n    Second query: Return 1k items and the next link\n\nShouldn\u0027t the second query not have the next link?","commit_id":"a4ca64e776dd5dc5eb1a95ead71c22eadfd458ab"},{"author":{"_account_id":10559,"name":"Steven Kaufer","email":"kaufer@us.ibm.com","username":"kaufer"},"change_message_id":"8d28ad974f5f5136b50c7a2ad5ece2f030cd54cf","unresolved":false,"context_lines":[{"line_number":240,"context_line":"                            str(identifier))"},{"line_number":241,"context_line":""},{"line_number":242,"context_line":"    def _get_collection_links(self, request, items, collection_name,"},{"line_number":243,"context_line":"                              origin_items, id_key\u003d\"uuid\"):"},{"line_number":244,"context_line":"        \"\"\"Retrieve \u0027next\u0027 link, if applicable."},{"line_number":245,"context_line":""},{"line_number":246,"context_line":"        The next link is included if:"}],"source_content_type":"text/x-python","patch_set":39,"id":"3a961159_aada0649","line":243,"updated":"2015-01-12 04:35:20.000000000","message":"See comment about the entire list vs. just the count in cinder/api/v2/volumes.py","commit_id":"bcd7c739f166d4f6a2563c356fc46fd0a8d21d35"},{"author":{"_account_id":2861,"name":"Vincent Hou","email":"shou@us.ibm.com","username":"houshengbo"},"change_message_id":"fe79d1a00388ff74bddbf7fa9e19ab9e4ca662b9","unresolved":false,"context_lines":[{"line_number":240,"context_line":"                            str(identifier))"},{"line_number":241,"context_line":""},{"line_number":242,"context_line":"    def _get_collection_links(self, request, items, collection_name,"},{"line_number":243,"context_line":"                              origin_items, id_key\u003d\"uuid\"):"},{"line_number":244,"context_line":"        \"\"\"Retrieve \u0027next\u0027 link, if applicable."},{"line_number":245,"context_line":""},{"line_number":246,"context_line":"        The next link is included if:"}],"source_content_type":"text/x-python","patch_set":39,"id":"3a961159_ca003269","line":243,"in_reply_to":"3a961159_aada0649","updated":"2015-01-12 04:56:56.000000000","message":"I think this argument can be simplified to a volume count.","commit_id":"bcd7c739f166d4f6a2563c356fc46fd0a8d21d35"},{"author":{"_account_id":10559,"name":"Steven Kaufer","email":"kaufer@us.ibm.com","username":"kaufer"},"change_message_id":"8d28ad974f5f5136b50c7a2ad5ece2f030cd54cf","unresolved":false,"context_lines":[{"line_number":263,"context_line":"        limited_size \u003d len(items)"},{"line_number":264,"context_line":"        # In order to keep the logic clear, the following code will be left in"},{"line_number":265,"context_line":"        # this way without further combination."},{"line_number":266,"context_line":"        if limit is None:"},{"line_number":267,"context_line":"            # If limit is not set in the request, all the items will be"},{"line_number":268,"context_line":"            # returned. If limited_size \u003c origin_size, the items are"},{"line_number":269,"context_line":"            # limited by osapi_max_limit and we need to generate the"}],"source_content_type":"text/x-python","patch_set":39,"id":"3a961159_aab12603","line":266,"updated":"2015-01-12 04:35:20.000000000","message":"Maybe it\u0027s just me, but this seems overly complex. What about something like (with appropriate comments):\n\n        limit \u003d request.params.get(\"limit\", None)\n\n        if limit is None:\n            if len(items) \u003c len(origin_items):\n                self._generate_next_link(...)\n\n        else:\n            max_items \u003d min(\n                int(request.params.get(\"limit\", CONF.osapi_max_limit)),\n                CONF.osapi_max_limit)\n            if max_items and max_items \u003d\u003d len(items):\n                self._generate_next_link(...)\n        return links","commit_id":"bcd7c739f166d4f6a2563c356fc46fd0a8d21d35"},{"author":{"_account_id":10559,"name":"Steven Kaufer","email":"kaufer@us.ibm.com","username":"kaufer"},"change_message_id":"79d3baa766f1589cb9e6e11fb13437628ecd9979","unresolved":false,"context_lines":[{"line_number":263,"context_line":"        limited_size \u003d len(items)"},{"line_number":264,"context_line":"        # In order to keep the logic clear, the following code will be left in"},{"line_number":265,"context_line":"        # this way without further combination."},{"line_number":266,"context_line":"        if limit is None:"},{"line_number":267,"context_line":"            # If limit is not set in the request, all the items will be"},{"line_number":268,"context_line":"            # returned. If limited_size \u003c origin_size, the items are"},{"line_number":269,"context_line":"            # limited by osapi_max_limit and we need to generate the"}],"source_content_type":"text/x-python","patch_set":39,"id":"3a961159_4b06fa22","line":266,"in_reply_to":"3a961159_36c75c48","updated":"2015-01-12 14:46:01.000000000","message":"So, in this scenario, the volumes api will trim the volumes returned to the osapi_max_limit of 5 here [1].  Therefore, the first query will only have 5 volumes and the \"next\" link and the second query (with the marker from the first) will have a single volume and no \"next\" link.  Is this not what you are seeing?\n\n[1]: https://github.com/openstack/cinder/blob/master/cinder/api/v2/volumes.py#L248","commit_id":"bcd7c739f166d4f6a2563c356fc46fd0a8d21d35"},{"author":{"_account_id":2861,"name":"Vincent Hou","email":"shou@us.ibm.com","username":"houshengbo"},"change_message_id":"8ae3de43decadd5be25ba8610906d35fa67768d8","unresolved":false,"context_lines":[{"line_number":263,"context_line":"        limited_size \u003d len(items)"},{"line_number":264,"context_line":"        # In order to keep the logic clear, the following code will be left in"},{"line_number":265,"context_line":"        # this way without further combination."},{"line_number":266,"context_line":"        if limit is None:"},{"line_number":267,"context_line":"            # If limit is not set in the request, all the items will be"},{"line_number":268,"context_line":"            # returned. If limited_size \u003c origin_size, the items are"},{"line_number":269,"context_line":"            # limited by osapi_max_limit and we need to generate the"}],"source_content_type":"text/x-python","patch_set":39,"id":"3a961159_36c75c48","line":266,"in_reply_to":"3a961159_73ee56ef","updated":"2015-01-12 09:15:43.000000000","message":"Sorry, I have to restore to my code, since there is a case does not return the result I expect.\nIf there are 5 volumes and osapi_max is 5, when we try cinder list --limit 6, there are still next link generated. Actually we are sure to say there is no more volume left for this case.\nPlease spend some time reading the comments I add in this code, I think I made the logic clear here.","commit_id":"bcd7c739f166d4f6a2563c356fc46fd0a8d21d35"},{"author":{"_account_id":2861,"name":"Vincent Hou","email":"shou@us.ibm.com","username":"houshengbo"},"change_message_id":"f92e7df3eae621ee1ecb2ce46739f89902786e54","unresolved":false,"context_lines":[{"line_number":263,"context_line":"        limited_size \u003d len(items)"},{"line_number":264,"context_line":"        # In order to keep the logic clear, the following code will be left in"},{"line_number":265,"context_line":"        # this way without further combination."},{"line_number":266,"context_line":"        if limit is None:"},{"line_number":267,"context_line":"            # If limit is not set in the request, all the items will be"},{"line_number":268,"context_line":"            # returned. If limited_size \u003c origin_size, the items are"},{"line_number":269,"context_line":"            # limited by osapi_max_limit and we need to generate the"}],"source_content_type":"text/x-python","patch_set":39,"id":"3a961159_73ee56ef","line":266,"in_reply_to":"3a961159_aab12603","updated":"2015-01-12 07:46:20.000000000","message":"Initially I thought there were ways to simplify the code as I stated in the comments. Since there is only one scenario to resolve in this patch, I will accept the way Steven recommended to simplify the code.","commit_id":"bcd7c739f166d4f6a2563c356fc46fd0a8d21d35"},{"author":{"_account_id":10559,"name":"Steven Kaufer","email":"kaufer@us.ibm.com","username":"kaufer"},"change_message_id":"6dec4c1c3428a34ecf5e4b374bd48fba2294acd9","unresolved":false,"context_lines":[{"line_number":240,"context_line":"                            str(identifier))"},{"line_number":241,"context_line":""},{"line_number":242,"context_line":"    def _get_collection_links(self, request, items, collection_name,"},{"line_number":243,"context_line":"                              item_counts, id_key\u003d\"uuid\"):"},{"line_number":244,"context_line":"        \"\"\"Retrieve \u0027next\u0027 link, if applicable."},{"line_number":245,"context_line":""},{"line_number":246,"context_line":"        The next link is included if:"}],"source_content_type":"text/x-python","patch_set":43,"id":"3a961159_46398f3e","line":243,"updated":"2015-01-12 14:46:29.000000000","message":"Can this be changed to a singular parameter name? \"item_counts\" seems like it should be a list of count values instead of a single value.\n\nThis same comment applies to all of the files.","commit_id":"da7c3c318b94e70822bfdeb31e586db71a22b190"},{"author":{"_account_id":10559,"name":"Steven Kaufer","email":"kaufer@us.ibm.com","username":"kaufer"},"change_message_id":"6dec4c1c3428a34ecf5e4b374bd48fba2294acd9","unresolved":false,"context_lines":[{"line_number":244,"context_line":"        \"\"\"Retrieve \u0027next\u0027 link, if applicable."},{"line_number":245,"context_line":""},{"line_number":246,"context_line":"        The next link is included if:"},{"line_number":247,"context_line":"        The number of items to be returned in the response is smaller"},{"line_number":248,"context_line":"        than items_counts."},{"line_number":249,"context_line":""},{"line_number":250,"context_line":"        :param request: API request"}],"source_content_type":"text/x-python","patch_set":43,"id":"3a961159_864377ae","line":247,"updated":"2015-01-12 14:46:29.000000000","message":"This is not accurate if limit is supplied; the \"next\" link will be included if the items in the response matches the count.\n\nCould you include the original list (with numbers 1-3) and simply modify 3 to contain the following?\n\n3) \u0027limit\u0027 param is NOT specified but the number of volumes is less then CONF.osapi_max_limit.","commit_id":"da7c3c318b94e70822bfdeb31e586db71a22b190"},{"author":{"_account_id":2861,"name":"Vincent Hou","email":"shou@us.ibm.com","username":"houshengbo"},"change_message_id":"45fdc41e7b5c65fabad8c5f42d754b9a146e40f3","unresolved":false,"context_lines":[{"line_number":244,"context_line":"        \"\"\"Retrieve \u0027next\u0027 link, if applicable."},{"line_number":245,"context_line":""},{"line_number":246,"context_line":"        The next link is included if:"},{"line_number":247,"context_line":"        The number of items to be returned in the response is smaller"},{"line_number":248,"context_line":"        than items_counts."},{"line_number":249,"context_line":""},{"line_number":250,"context_line":"        :param request: API request"}],"source_content_type":"text/x-python","patch_set":43,"id":"3a961159_816601ba","line":247,"in_reply_to":"3a961159_864377ae","updated":"2015-01-12 14:57:43.000000000","message":"I will restore the explanations back to the format with numbers 1 -3 .","commit_id":"da7c3c318b94e70822bfdeb31e586db71a22b190"},{"author":{"_account_id":10559,"name":"Steven Kaufer","email":"kaufer@us.ibm.com","username":"kaufer"},"change_message_id":"6dec4c1c3428a34ecf5e4b374bd48fba2294acd9","unresolved":false,"context_lines":[{"line_number":262,"context_line":"        limited_size \u003d len(items)"},{"line_number":263,"context_line":"        # In order to keep the logic clear, the following code will be left in"},{"line_number":264,"context_line":"        # this way without further combination."},{"line_number":265,"context_line":"        if limit is None:"},{"line_number":266,"context_line":"            # If limit is not set in the request, all the items will be"},{"line_number":267,"context_line":"            # returned. If limited_size \u003c origin_size, the items are"},{"line_number":268,"context_line":"            # limited by osapi_max_limit and we need to generate the"}],"source_content_type":"text/x-python","patch_set":43,"id":"3a961159_a676b30a","line":265,"updated":"2015-01-12 14:46:29.000000000","message":"Please see comment in patch set 39.\n\nAlso, I think that the logic here can be simplified ever further then what I proposed in patch set 39:\n\n        limit \u003d request.params.get(\"limit\", None)\n\n        if limit is None:\n            if len(items) \u003c origin_item_count:\n                self._generate_next_link(items, id_key, links, request,\n                                         collection_name)\n\n        else:\n            max_items \u003d min(int(limit), CONF.osapi_max_limit)\n            if max_items and max_items \u003d\u003d len(items):\n                self._generate_next_link(items, id_key, links, request,\n                                         collection_name)\n        return links","commit_id":"da7c3c318b94e70822bfdeb31e586db71a22b190"},{"author":{"_account_id":2861,"name":"Vincent Hou","email":"shou@us.ibm.com","username":"houshengbo"},"change_message_id":"f853eb93f4294cd9365e01a9db7005fedd8389b1","unresolved":false,"context_lines":[{"line_number":262,"context_line":"        limited_size \u003d len(items)"},{"line_number":263,"context_line":"        # In order to keep the logic clear, the following code will be left in"},{"line_number":264,"context_line":"        # this way without further combination."},{"line_number":265,"context_line":"        if limit is None:"},{"line_number":266,"context_line":"            # If limit is not set in the request, all the items will be"},{"line_number":267,"context_line":"            # returned. If limited_size \u003c origin_size, the items are"},{"line_number":268,"context_line":"            # limited by osapi_max_limit and we need to generate the"}],"source_content_type":"text/x-python","patch_set":43,"id":"3a961159_53805649","line":265,"in_reply_to":"3a961159_1c799630","updated":"2015-01-13 02:45:39.000000000","message":"If limit is greater than osapi_max_limit, there is one case your code cannot cover. For example, if osapi_max_limit \u003d 5 and there are totally 5 volumes in DB, when the user tries cinder list --limit 6.  The code you proposed will generate a next link, which returns nothing.\nIn fact, for this case, we can know there are no more volumes left, no next link needs to be generated.\n\nMy code clearly has two parts: one is limit \u003c\u003d osapi_max_limit(Line 283), and the other is elif limited_size \u003c item_counts(Line 291). Your code covers the first part well, but not the second.\n\nlimit and osapi_max_limit, which one is greater will lead to different considerations. What do you think?","commit_id":"da7c3c318b94e70822bfdeb31e586db71a22b190"},{"author":{"_account_id":10559,"name":"Steven Kaufer","email":"kaufer@us.ibm.com","username":"kaufer"},"change_message_id":"0855a120a0021073c20e0842a963090348ad9a02","unresolved":false,"context_lines":[{"line_number":262,"context_line":"        limited_size \u003d len(items)"},{"line_number":263,"context_line":"        # In order to keep the logic clear, the following code will be left in"},{"line_number":264,"context_line":"        # this way without further combination."},{"line_number":265,"context_line":"        if limit is None:"},{"line_number":266,"context_line":"            # If limit is not set in the request, all the items will be"},{"line_number":267,"context_line":"            # returned. If limited_size \u003c origin_size, the items are"},{"line_number":268,"context_line":"            # limited by osapi_max_limit and we need to generate the"}],"source_content_type":"text/x-python","patch_set":43,"id":"3a961159_1ee335a5","line":265,"in_reply_to":"3a961159_53805649","updated":"2015-01-13 04:24:12.000000000","message":"This is outside of the scope of this change; according to your commit message the limit parameter is not being specified.\n\nIf you are intending to cover this scenario then please update the commit message.","commit_id":"da7c3c318b94e70822bfdeb31e586db71a22b190"},{"author":{"_account_id":2861,"name":"Vincent Hou","email":"shou@us.ibm.com","username":"houshengbo"},"change_message_id":"ad338579a904b33b2a8aec2590519ca5afd88af2","unresolved":false,"context_lines":[{"line_number":262,"context_line":"        limited_size \u003d len(items)"},{"line_number":263,"context_line":"        # In order to keep the logic clear, the following code will be left in"},{"line_number":264,"context_line":"        # this way without further combination."},{"line_number":265,"context_line":"        if limit is None:"},{"line_number":266,"context_line":"            # If limit is not set in the request, all the items will be"},{"line_number":267,"context_line":"            # returned. If limited_size \u003c origin_size, the items are"},{"line_number":268,"context_line":"            # limited by osapi_max_limit and we need to generate the"}],"source_content_type":"text/x-python","patch_set":43,"id":"3a961159_1c799630","line":265,"in_reply_to":"3a961159_a676b30a","updated":"2015-01-12 15:19:21.000000000","message":"I am verifying this code.","commit_id":"da7c3c318b94e70822bfdeb31e586db71a22b190"},{"author":{"_account_id":10559,"name":"Steven Kaufer","email":"kaufer@us.ibm.com","username":"kaufer"},"change_message_id":"8733d2eb1ec4d1de14587df56c90818f1cd6f49c","unresolved":false,"context_lines":[{"line_number":255,"context_line":"        :param collection_name: Name of collection, used to generate the"},{"line_number":256,"context_line":"                                next link for a pagination query"},{"line_number":257,"context_line":"        :param item_count: Length of the list of the original collection"},{"line_number":258,"context_line":"                              items"},{"line_number":259,"context_line":"        :param id_key: Attribute key used to retrieve the unique ID, used"},{"line_number":260,"context_line":"                       to generate the next link marker for a pagination query"},{"line_number":261,"context_line":"        :returns links"}],"source_content_type":"text/x-python","patch_set":46,"id":"3a961159_deffed33","line":258,"updated":"2015-01-13 04:41:35.000000000","message":"Please fix the indentation here.","commit_id":"7615db7a89c2555f514ab96a78ec049206cee4cf"},{"author":{"_account_id":2861,"name":"Vincent Hou","email":"shou@us.ibm.com","username":"houshengbo"},"change_message_id":"35720e3e600b4697affb6f3d657143e4bc542a58","unresolved":false,"context_lines":[{"line_number":255,"context_line":"        :param collection_name: Name of collection, used to generate the"},{"line_number":256,"context_line":"                                next link for a pagination query"},{"line_number":257,"context_line":"        :param item_count: Length of the list of the original collection"},{"line_number":258,"context_line":"                              items"},{"line_number":259,"context_line":"        :param id_key: Attribute key used to retrieve the unique ID, used"},{"line_number":260,"context_line":"                       to generate the next link marker for a pagination query"},{"line_number":261,"context_line":"        :returns links"}],"source_content_type":"text/x-python","patch_set":46,"id":"3a961159_99b2df04","line":258,"in_reply_to":"3a961159_deffed33","updated":"2015-01-13 05:11:44.000000000","message":"Done","commit_id":"7615db7a89c2555f514ab96a78ec049206cee4cf"},{"author":{"_account_id":10559,"name":"Steven Kaufer","email":"kaufer@us.ibm.com","username":"kaufer"},"change_message_id":"67d8cdaff0398264617e532c85c6a115d1675bd2","unresolved":false,"context_lines":[{"line_number":243,"context_line":"                              item_count, id_key\u003d\"uuid\"):"},{"line_number":244,"context_line":"        \"\"\"Retrieve \u0027next\u0027 link, if applicable."},{"line_number":245,"context_line":""},{"line_number":246,"context_line":"        The next link is included if:"},{"line_number":247,"context_line":"        1) \u0027limit\u0027 param is specified and equals the number of volumes."},{"line_number":248,"context_line":"        2) \u0027limit\u0027 param is specified but it exceeds CONF.osapi_max_limit,"},{"line_number":249,"context_line":"        in this case the number of volumes greater than CONF.osapi_max_limit."}],"source_content_type":"text/x-python","patch_set":48,"id":"3a961159_809df10c","line":246,"updated":"2015-01-13 15:24:27.000000000","message":"nit: Can you change the references here from \u0027volumes\u0027 to \u0027items\u0027 since this is a common function?","commit_id":"f384a231244131457a12d28d315644d20d0ac8a1"},{"author":{"_account_id":2861,"name":"Vincent Hou","email":"shou@us.ibm.com","username":"houshengbo"},"change_message_id":"5c639198bf1e522e77043fa72bd190f316ddfbd2","unresolved":false,"context_lines":[{"line_number":243,"context_line":"                              item_count, id_key\u003d\"uuid\"):"},{"line_number":244,"context_line":"        \"\"\"Retrieve \u0027next\u0027 link, if applicable."},{"line_number":245,"context_line":""},{"line_number":246,"context_line":"        The next link is included if:"},{"line_number":247,"context_line":"        1) \u0027limit\u0027 param is specified and equals the number of volumes."},{"line_number":248,"context_line":"        2) \u0027limit\u0027 param is specified but it exceeds CONF.osapi_max_limit,"},{"line_number":249,"context_line":"        in this case the number of volumes greater than CONF.osapi_max_limit."}],"source_content_type":"text/x-python","patch_set":48,"id":"3a961159_f413c1b4","line":246,"in_reply_to":"3a961159_809df10c","updated":"2015-01-14 02:52:30.000000000","message":"Done","commit_id":"f384a231244131457a12d28d315644d20d0ac8a1"},{"author":{"_account_id":10559,"name":"Steven Kaufer","email":"kaufer@us.ibm.com","username":"kaufer"},"change_message_id":"67d8cdaff0398264617e532c85c6a115d1675bd2","unresolved":false,"context_lines":[{"line_number":245,"context_line":""},{"line_number":246,"context_line":"        The next link is included if:"},{"line_number":247,"context_line":"        1) \u0027limit\u0027 param is specified and equals the number of volumes."},{"line_number":248,"context_line":"        2) \u0027limit\u0027 param is specified but it exceeds CONF.osapi_max_limit,"},{"line_number":249,"context_line":"        in this case the number of volumes greater than CONF.osapi_max_limit."},{"line_number":250,"context_line":"        3) \u0027limit\u0027 param is NOT specified but the number of volumes is"},{"line_number":251,"context_line":"        less than CONF.osapi_max_limit."}],"source_content_type":"text/x-python","patch_set":48,"id":"3a961159_b3108550","line":248,"updated":"2015-01-13 15:24:27.000000000","message":"The language here is confusing to me.  I think you want it to state that if the limit param is specified and it exceeds CONF.osapi_max_limit, then the next link is only included if the number of items is greater than CONF.osapi_max_items (even if the number is less then the limit param)","commit_id":"f384a231244131457a12d28d315644d20d0ac8a1"},{"author":{"_account_id":2861,"name":"Vincent Hou","email":"shou@us.ibm.com","username":"houshengbo"},"change_message_id":"5c639198bf1e522e77043fa72bd190f316ddfbd2","unresolved":false,"context_lines":[{"line_number":245,"context_line":""},{"line_number":246,"context_line":"        The next link is included if:"},{"line_number":247,"context_line":"        1) \u0027limit\u0027 param is specified and equals the number of volumes."},{"line_number":248,"context_line":"        2) \u0027limit\u0027 param is specified but it exceeds CONF.osapi_max_limit,"},{"line_number":249,"context_line":"        in this case the number of volumes greater than CONF.osapi_max_limit."},{"line_number":250,"context_line":"        3) \u0027limit\u0027 param is NOT specified but the number of volumes is"},{"line_number":251,"context_line":"        less than CONF.osapi_max_limit."}],"source_content_type":"text/x-python","patch_set":48,"id":"3a961159_9a6547b1","line":248,"in_reply_to":"3a961159_b3108550","updated":"2015-01-14 02:52:30.000000000","message":"I will change to \n\u0027limit\u0027 param is specified and both of limit and the number\n        of items are greater than CONF.osapi_max_limit, even if limit\n        is greater than the number of items","commit_id":"f384a231244131457a12d28d315644d20d0ac8a1"},{"author":{"_account_id":10559,"name":"Steven Kaufer","email":"kaufer@us.ibm.com","username":"kaufer"},"change_message_id":"67d8cdaff0398264617e532c85c6a115d1675bd2","unresolved":false,"context_lines":[{"line_number":247,"context_line":"        1) \u0027limit\u0027 param is specified and equals the number of volumes."},{"line_number":248,"context_line":"        2) \u0027limit\u0027 param is specified but it exceeds CONF.osapi_max_limit,"},{"line_number":249,"context_line":"        in this case the number of volumes greater than CONF.osapi_max_limit."},{"line_number":250,"context_line":"        3) \u0027limit\u0027 param is NOT specified but the number of volumes is"},{"line_number":251,"context_line":"        less than CONF.osapi_max_limit."},{"line_number":252,"context_line":""},{"line_number":253,"context_line":"        :param request: API request"}],"source_content_type":"text/x-python","patch_set":48,"id":"3a961159_1344f945","line":250,"updated":"2015-01-13 15:24:27.000000000","message":"Again, this is confusing to me.  This patch set alters this behavior so that, if the limit param is not specified, then the next link is included if the number of items is greater than CONF.osapi_max_limit","commit_id":"f384a231244131457a12d28d315644d20d0ac8a1"},{"author":{"_account_id":2861,"name":"Vincent Hou","email":"shou@us.ibm.com","username":"houshengbo"},"change_message_id":"5c639198bf1e522e77043fa72bd190f316ddfbd2","unresolved":false,"context_lines":[{"line_number":247,"context_line":"        1) \u0027limit\u0027 param is specified and equals the number of volumes."},{"line_number":248,"context_line":"        2) \u0027limit\u0027 param is specified but it exceeds CONF.osapi_max_limit,"},{"line_number":249,"context_line":"        in this case the number of volumes greater than CONF.osapi_max_limit."},{"line_number":250,"context_line":"        3) \u0027limit\u0027 param is NOT specified but the number of volumes is"},{"line_number":251,"context_line":"        less than CONF.osapi_max_limit."},{"line_number":252,"context_line":""},{"line_number":253,"context_line":"        :param request: API request"}],"source_content_type":"text/x-python","patch_set":48,"id":"3a961159_f4610139","line":250,"in_reply_to":"3a961159_1344f945","updated":"2015-01-14 02:52:30.000000000","message":"Done","commit_id":"f384a231244131457a12d28d315644d20d0ac8a1"},{"author":{"_account_id":10559,"name":"Steven Kaufer","email":"kaufer@us.ibm.com","username":"kaufer"},"change_message_id":"7f52101e22290c3bea246ee7d83f61ef705aaa17","unresolved":false,"context_lines":[{"line_number":246,"context_line":"        The next link is included if:"},{"line_number":247,"context_line":"        1) \u0027limit\u0027 param is specified and equal to or less than the"},{"line_number":248,"context_line":"        number of items."},{"line_number":249,"context_line":"        2) \u0027limit\u0027 param is specified and both of limit and the number"},{"line_number":250,"context_line":"        of items are greater than CONF.osapi_max_limit, even if limit"},{"line_number":251,"context_line":"        is greater than the number of items"},{"line_number":252,"context_line":"        3) \u0027limit\u0027 param is NOT specified and the number of items is"}],"source_content_type":"text/x-python","patch_set":54,"id":"3a961159_725a421f","line":249,"updated":"2015-01-15 14:38:17.000000000","message":"nit: Can you change \"and both of limit\" to \"and both the limit\"","commit_id":"3a785d79fec109571524927048182ca992436a76"},{"author":{"_account_id":2861,"name":"Vincent Hou","email":"shou@us.ibm.com","username":"houshengbo"},"change_message_id":"749709a79696a8a4b8439ba97b86b483db0a9c75","unresolved":false,"context_lines":[{"line_number":246,"context_line":"        The next link is included if:"},{"line_number":247,"context_line":"        1) \u0027limit\u0027 param is specified and equal to or less than the"},{"line_number":248,"context_line":"        number of items."},{"line_number":249,"context_line":"        2) \u0027limit\u0027 param is specified and both of limit and the number"},{"line_number":250,"context_line":"        of items are greater than CONF.osapi_max_limit, even if limit"},{"line_number":251,"context_line":"        is greater than the number of items"},{"line_number":252,"context_line":"        3) \u0027limit\u0027 param is NOT specified and the number of items is"}],"source_content_type":"text/x-python","patch_set":54,"id":"3a961159_c926d9ca","line":249,"in_reply_to":"3a961159_725a421f","updated":"2015-01-16 02:18:27.000000000","message":"Done","commit_id":"3a785d79fec109571524927048182ca992436a76"},{"author":{"_account_id":10559,"name":"Steven Kaufer","email":"kaufer@us.ibm.com","username":"kaufer"},"change_message_id":"7f52101e22290c3bea246ee7d83f61ef705aaa17","unresolved":false,"context_lines":[{"line_number":271,"context_line":"            # next link. Otherwise, all the items will be returned in"},{"line_number":272,"context_line":"            # the response, no next link is generated."},{"line_number":273,"context_line":"            if len(items) \u003c item_count:"},{"line_number":274,"context_line":"                return self._generate_next_link(items, id_key, links,"},{"line_number":275,"context_line":"                                                request, collection_name)"},{"line_number":276,"context_line":"        else:"},{"line_number":277,"context_line":"            # If limit is set in the request and not more than"}],"source_content_type":"text/x-python","patch_set":54,"id":"3a961159_52b9c614","line":274,"updated":"2015-01-15 14:38:17.000000000","message":"IMO, if you are simply returning the result of this function then there is no need to pass the \u0027links\u0027 argument since it is just an empty list.","commit_id":"3a785d79fec109571524927048182ca992436a76"},{"author":{"_account_id":2861,"name":"Vincent Hou","email":"shou@us.ibm.com","username":"houshengbo"},"change_message_id":"749709a79696a8a4b8439ba97b86b483db0a9c75","unresolved":false,"context_lines":[{"line_number":271,"context_line":"            # next link. Otherwise, all the items will be returned in"},{"line_number":272,"context_line":"            # the response, no next link is generated."},{"line_number":273,"context_line":"            if len(items) \u003c item_count:"},{"line_number":274,"context_line":"                return self._generate_next_link(items, id_key, links,"},{"line_number":275,"context_line":"                                                request, collection_name)"},{"line_number":276,"context_line":"        else:"},{"line_number":277,"context_line":"            # If limit is set in the request and not more than"}],"source_content_type":"text/x-python","patch_set":54,"id":"3a961159_a92b4d93","line":274,"in_reply_to":"3a961159_52b9c614","updated":"2015-01-16 02:18:27.000000000","message":"I will remove the parameter links for _generate_next_link.","commit_id":"3a785d79fec109571524927048182ca992436a76"},{"author":{"_account_id":10559,"name":"Steven Kaufer","email":"kaufer@us.ibm.com","username":"kaufer"},"change_message_id":"e0fdf07f5b15c4e978440ccd551339514349eae6","unresolved":false,"context_lines":[{"line_number":262,"context_line":"                       to generate the next link marker for a pagination query"},{"line_number":263,"context_line":"        :returns links"},{"line_number":264,"context_line":"        \"\"\""},{"line_number":265,"context_line":"        links \u003d []"},{"line_number":266,"context_line":"        limit \u003d request.params.get(\"limit\", None)"},{"line_number":267,"context_line":"        if limit is None or int(limit) \u003e CONF.osapi_max_limit:"},{"line_number":268,"context_line":"            # If limit is not set in the request or greater than"}],"source_content_type":"text/x-python","patch_set":56,"id":"3a961159_e3cabf18","line":265,"updated":"2015-01-16 16:30:22.000000000","message":"Since you are no longer using this variable you can remove the initialization here.","commit_id":"e1ffa6719a9d554d90f1361c98f46c70013d464b"},{"author":{"_account_id":10559,"name":"Steven Kaufer","email":"kaufer@us.ibm.com","username":"kaufer"},"change_message_id":"e0fdf07f5b15c4e978440ccd551339514349eae6","unresolved":false,"context_lines":[{"line_number":282,"context_line":"            if limit and limit \u003d\u003d len(items):"},{"line_number":283,"context_line":"                return self._generate_next_link(items, id_key, request,"},{"line_number":284,"context_line":"                                                collection_name)"},{"line_number":285,"context_line":"        return links"},{"line_number":286,"context_line":""},{"line_number":287,"context_line":"    def _generate_next_link(self, items, id_key, request,"},{"line_number":288,"context_line":"                            collection_name):"}],"source_content_type":"text/x-python","patch_set":56,"id":"3a961159_a3dc37e2","line":285,"updated":"2015-01-16 16:30:22.000000000","message":"And then you can simply return [] here.","commit_id":"e1ffa6719a9d554d90f1361c98f46c70013d464b"},{"author":{"_account_id":10559,"name":"Steven Kaufer","email":"kaufer@us.ibm.com","username":"kaufer"},"change_message_id":"aecd2ae114229bd6c0185e412340e5ea122db0ab","unresolved":false,"context_lines":[{"line_number":277,"context_line":"            # osapi_max_limit, limit \u003d\u003d len(items) means it is possible"},{"line_number":278,"context_line":"            # that the DB still have more items left. In thie case,"},{"line_number":279,"context_line":"            # we generate the next link."},{"line_number":280,"context_line":"            if int(limit) \u003d\u003d len(items):"},{"line_number":281,"context_line":"                return self._generate_next_link(items, id_key, request,"},{"line_number":282,"context_line":"                                                collection_name)"},{"line_number":283,"context_line":"        return []"}],"source_content_type":"text/x-python","patch_set":59,"id":"3a961159_8aa48e07","line":280,"updated":"2015-01-19 03:58:21.000000000","message":"This will fail if limit is 0.\n\nThe first part of this conditional (in a previous iteration) handled this case:\n\n     limit \u003d int(limit)\n     if limit and limit \u003d\u003d len(items):\n\nThe \"if limit\" here equates to true if the integer is non-0.  Removing this will cause your UT to fail at: api.v2.test_volumes.VolumeApiTest.test_volume_with_limit_zero","commit_id":"05c90bd8a59943432feef2a5c8b492cedff73131"},{"author":{"_account_id":2861,"name":"Vincent Hou","email":"shou@us.ibm.com","username":"houshengbo"},"change_message_id":"f0d9fab09071e94caa7e817e10184e9894445c92","unresolved":false,"context_lines":[{"line_number":277,"context_line":"            # osapi_max_limit, limit \u003d\u003d len(items) means it is possible"},{"line_number":278,"context_line":"            # that the DB still have more items left. In thie case,"},{"line_number":279,"context_line":"            # we generate the next link."},{"line_number":280,"context_line":"            if int(limit) \u003d\u003d len(items):"},{"line_number":281,"context_line":"                return self._generate_next_link(items, id_key, request,"},{"line_number":282,"context_line":"                                                collection_name)"},{"line_number":283,"context_line":"        return []"}],"source_content_type":"text/x-python","patch_set":59,"id":"3a961159_0a45fe99","line":280,"in_reply_to":"3a961159_8aa48e07","updated":"2015-01-19 04:57:24.000000000","message":"I realize that.\nSo shall I put len(items) \u003d\u003d 0: return [] at the beginning? \n\nBecause if len(items) \u003d\u003d 0, it is possible that limit is 0 or CONF.osapi_max_limit is 0 or total item number is 0. We do not need to generate next links for any of the cases.","commit_id":"05c90bd8a59943432feef2a5c8b492cedff73131"}],"cinder/api/contrib/backups.py":[{"author":{"_account_id":10559,"name":"Steven Kaufer","email":"kaufer@us.ibm.com","username":"kaufer"},"change_message_id":"8d28ad974f5f5136b50c7a2ad5ece2f030cd54cf","unresolved":false,"context_lines":[{"line_number":220,"context_line":""},{"line_number":221,"context_line":"        if is_detail:"},{"line_number":222,"context_line":"            backups \u003d self._view_builder.detail_list(req, limited_list,"},{"line_number":223,"context_line":"                                                     backups)"},{"line_number":224,"context_line":"        else:"},{"line_number":225,"context_line":"            backups \u003d self._view_builder.summary_list(req, limited_list,"},{"line_number":226,"context_line":"                                                      backups)"}],"source_content_type":"text/x-python","patch_set":39,"id":"3a961159_6a857e09","line":223,"updated":"2015-01-12 04:35:20.000000000","message":"See comment about the entire list vs. just the count in cinder/api/v2/volumes.py","commit_id":"bcd7c739f166d4f6a2563c356fc46fd0a8d21d35"},{"author":{"_account_id":2861,"name":"Vincent Hou","email":"shou@us.ibm.com","username":"houshengbo"},"change_message_id":"fe79d1a00388ff74bddbf7fa9e19ab9e4ca662b9","unresolved":false,"context_lines":[{"line_number":220,"context_line":""},{"line_number":221,"context_line":"        if is_detail:"},{"line_number":222,"context_line":"            backups \u003d self._view_builder.detail_list(req, limited_list,"},{"line_number":223,"context_line":"                                                     backups)"},{"line_number":224,"context_line":"        else:"},{"line_number":225,"context_line":"            backups \u003d self._view_builder.summary_list(req, limited_list,"},{"line_number":226,"context_line":"                                                      backups)"}],"source_content_type":"text/x-python","patch_set":39,"id":"3a961159_8a062a84","line":223,"in_reply_to":"3a961159_6a857e09","updated":"2015-01-12 04:56:56.000000000","message":"I think this argument can be simplified to a volume count.","commit_id":"bcd7c739f166d4f6a2563c356fc46fd0a8d21d35"}],"cinder/api/contrib/volume_transfer.py":[{"author":{"_account_id":10559,"name":"Steven Kaufer","email":"kaufer@us.ibm.com","username":"kaufer"},"change_message_id":"8d28ad974f5f5136b50c7a2ad5ece2f030cd54cf","unresolved":false,"context_lines":[{"line_number":135,"context_line":""},{"line_number":136,"context_line":"        if is_detail:"},{"line_number":137,"context_line":"            transfers \u003d self._view_builder.detail_list(req, limited_list,"},{"line_number":138,"context_line":"                                                       transfers)"},{"line_number":139,"context_line":"        else:"},{"line_number":140,"context_line":"            transfers \u003d self._view_builder.summary_list(req, limited_list,"},{"line_number":141,"context_line":"                                                        transfers)"}],"source_content_type":"text/x-python","patch_set":39,"id":"3a961159_aaa8468d","line":138,"updated":"2015-01-12 04:35:20.000000000","message":"See comment about the entire list vs. just the count in cinder/api/v2/volumes.py","commit_id":"bcd7c739f166d4f6a2563c356fc46fd0a8d21d35"},{"author":{"_account_id":2861,"name":"Vincent Hou","email":"shou@us.ibm.com","username":"houshengbo"},"change_message_id":"fe79d1a00388ff74bddbf7fa9e19ab9e4ca662b9","unresolved":false,"context_lines":[{"line_number":135,"context_line":""},{"line_number":136,"context_line":"        if is_detail:"},{"line_number":137,"context_line":"            transfers \u003d self._view_builder.detail_list(req, limited_list,"},{"line_number":138,"context_line":"                                                       transfers)"},{"line_number":139,"context_line":"        else:"},{"line_number":140,"context_line":"            transfers \u003d self._view_builder.summary_list(req, limited_list,"},{"line_number":141,"context_line":"                                                        transfers)"}],"source_content_type":"text/x-python","patch_set":39,"id":"3a961159_aafbe679","line":138,"in_reply_to":"3a961159_aaa8468d","updated":"2015-01-12 04:56:56.000000000","message":"I think this argument can be simplified to a volume count.","commit_id":"bcd7c739f166d4f6a2563c356fc46fd0a8d21d35"}],"cinder/api/v2/views/volumes.py":[{"author":{"_account_id":10559,"name":"Steven Kaufer","email":"kaufer@us.ibm.com","username":"kaufer"},"change_message_id":"8d28ad974f5f5136b50c7a2ad5ece2f030cd54cf","unresolved":false,"context_lines":[{"line_number":29,"context_line":"        \"\"\"Initialize view builder.\"\"\""},{"line_number":30,"context_line":"        super(ViewBuilder, self).__init__()"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"    def summary_list(self, request, volumes, origin_volumes):"},{"line_number":33,"context_line":"        \"\"\"Show a list of volumes without many details.\"\"\""},{"line_number":34,"context_line":"        return self._list_view(self.summary, request, volumes,"},{"line_number":35,"context_line":"                               origin_volumes)"}],"source_content_type":"text/x-python","patch_set":39,"id":"3a961159_aa23e656","line":32,"updated":"2015-01-12 04:35:20.000000000","message":"See comment about the entire list vs. just the count in cinder/api/v2/volumes.py","commit_id":"bcd7c739f166d4f6a2563c356fc46fd0a8d21d35"},{"author":{"_account_id":2861,"name":"Vincent Hou","email":"shou@us.ibm.com","username":"houshengbo"},"change_message_id":"fe79d1a00388ff74bddbf7fa9e19ab9e4ca662b9","unresolved":false,"context_lines":[{"line_number":29,"context_line":"        \"\"\"Initialize view builder.\"\"\""},{"line_number":30,"context_line":"        super(ViewBuilder, self).__init__()"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"    def summary_list(self, request, volumes, origin_volumes):"},{"line_number":33,"context_line":"        \"\"\"Show a list of volumes without many details.\"\"\""},{"line_number":34,"context_line":"        return self._list_view(self.summary, request, volumes,"},{"line_number":35,"context_line":"                               origin_volumes)"}],"source_content_type":"text/x-python","patch_set":39,"id":"3a961159_0af23a9b","line":32,"in_reply_to":"3a961159_aa23e656","updated":"2015-01-12 04:56:56.000000000","message":"I think this argument can be simplified to a volume count.","commit_id":"bcd7c739f166d4f6a2563c356fc46fd0a8d21d35"}],"cinder/api/v2/volumes.py":[{"author":{"_account_id":10559,"name":"Steven Kaufer","email":"kaufer@us.ibm.com","username":"kaufer"},"change_message_id":"12e699d5b2f43849a152a5f386df227b11bf72d7","unresolved":false,"context_lines":[{"line_number":242,"context_line":"        for volume in volumes:"},{"line_number":243,"context_line":"            utils.add_visible_admin_metadata(volume)"},{"line_number":244,"context_line":""},{"line_number":245,"context_line":"        limited_list \u003d common.limited(volumes, req)"},{"line_number":246,"context_line":"        req.cache_db_volumes(limited_list)"},{"line_number":247,"context_line":""},{"line_number":248,"context_line":"        if is_detail:"}],"source_content_type":"text/x-python","patch_set":37,"id":"3a961159_25c9ef79","line":245,"updated":"2014-12-26 21:18:34.000000000","message":"The \u0027limited_list\u0027 returned here will never differ in length from the \u0027volumes\u0027 list returned above since the limit is passed down to the volume/DB API.","commit_id":"a4ca64e776dd5dc5eb1a95ead71c22eadfd458ab"},{"author":{"_account_id":10559,"name":"Steven Kaufer","email":"kaufer@us.ibm.com","username":"kaufer"},"change_message_id":"12e699d5b2f43849a152a5f386df227b11bf72d7","unresolved":false,"context_lines":[{"line_number":247,"context_line":""},{"line_number":248,"context_line":"        if is_detail:"},{"line_number":249,"context_line":"            volumes \u003d self._view_builder.detail_list(req, limited_list,"},{"line_number":250,"context_line":"                                                     volumes)"},{"line_number":251,"context_line":"        else:"},{"line_number":252,"context_line":"            volumes \u003d self._view_builder.summary_list(req, limited_list,"},{"line_number":253,"context_line":"                                                      volumes)"}],"source_content_type":"text/x-python","patch_set":37,"id":"3a961159_45c6fb69","line":250,"updated":"2014-12-26 21:18:34.000000000","message":"The \u0027volumes\u0027 argument here will not be the full original list of volumes (see above comment).","commit_id":"a4ca64e776dd5dc5eb1a95ead71c22eadfd458ab"},{"author":{"_account_id":10559,"name":"Steven Kaufer","email":"kaufer@us.ibm.com","username":"kaufer"},"change_message_id":"12e699d5b2f43849a152a5f386df227b11bf72d7","unresolved":false,"context_lines":[{"line_number":250,"context_line":"                                                     volumes)"},{"line_number":251,"context_line":"        else:"},{"line_number":252,"context_line":"            volumes \u003d self._view_builder.summary_list(req, limited_list,"},{"line_number":253,"context_line":"                                                      volumes)"},{"line_number":254,"context_line":"        return volumes"},{"line_number":255,"context_line":""},{"line_number":256,"context_line":"    def _image_uuid_from_ref(self, image_ref, context):"}],"source_content_type":"text/x-python","patch_set":37,"id":"3a961159_65c3f757","line":253,"updated":"2014-12-26 21:18:34.000000000","message":"Same comment here.","commit_id":"a4ca64e776dd5dc5eb1a95ead71c22eadfd458ab"},{"author":{"_account_id":10559,"name":"Steven Kaufer","email":"kaufer@us.ibm.com","username":"kaufer"},"change_message_id":"8d28ad974f5f5136b50c7a2ad5ece2f030cd54cf","unresolved":false,"context_lines":[{"line_number":250,"context_line":""},{"line_number":251,"context_line":"        if is_detail:"},{"line_number":252,"context_line":"            volumes \u003d self._view_builder.detail_list(req, limited_list,"},{"line_number":253,"context_line":"                                                     volumes)"},{"line_number":254,"context_line":"        else:"},{"line_number":255,"context_line":"            volumes \u003d self._view_builder.summary_list(req, limited_list,"},{"line_number":256,"context_line":"                                                      volumes)"}],"source_content_type":"text/x-python","patch_set":39,"id":"3a961159_eaf5eecc","line":253,"updated":"2015-01-12 04:35:20.000000000","message":"Why does the entire \u0027volumes\u0027 list need to be passed here?  Can this simply be the volume count instead?\n\nIn the event that we hit the default osapi_max_limit of 1000, then passing all 1000 volumes when we only need the count is not desirable.","commit_id":"bcd7c739f166d4f6a2563c356fc46fd0a8d21d35"},{"author":{"_account_id":2861,"name":"Vincent Hou","email":"shou@us.ibm.com","username":"houshengbo"},"change_message_id":"fe79d1a00388ff74bddbf7fa9e19ab9e4ca662b9","unresolved":false,"context_lines":[{"line_number":250,"context_line":""},{"line_number":251,"context_line":"        if is_detail:"},{"line_number":252,"context_line":"            volumes \u003d self._view_builder.detail_list(req, limited_list,"},{"line_number":253,"context_line":"                                                     volumes)"},{"line_number":254,"context_line":"        else:"},{"line_number":255,"context_line":"            volumes \u003d self._view_builder.summary_list(req, limited_list,"},{"line_number":256,"context_line":"                                                      volumes)"}],"source_content_type":"text/x-python","patch_set":39,"id":"3a961159_cae912b9","line":253,"in_reply_to":"3a961159_eaf5eecc","updated":"2015-01-12 04:56:56.000000000","message":"I think this argument can be simplified to a volume count.","commit_id":"bcd7c739f166d4f6a2563c356fc46fd0a8d21d35"},{"author":{"_account_id":10559,"name":"Steven Kaufer","email":"kaufer@us.ibm.com","username":"kaufer"},"change_message_id":"8d28ad974f5f5136b50c7a2ad5ece2f030cd54cf","unresolved":false,"context_lines":[{"line_number":253,"context_line":"                                                     volumes)"},{"line_number":254,"context_line":"        else:"},{"line_number":255,"context_line":"            volumes \u003d self._view_builder.summary_list(req, limited_list,"},{"line_number":256,"context_line":"                                                      volumes)"},{"line_number":257,"context_line":"        return volumes"},{"line_number":258,"context_line":""},{"line_number":259,"context_line":"    def _image_uuid_from_ref(self, image_ref, context):"}],"source_content_type":"text/x-python","patch_set":39,"id":"3a961159_0af31ae8","line":256,"updated":"2015-01-12 04:35:20.000000000","message":"See above.","commit_id":"bcd7c739f166d4f6a2563c356fc46fd0a8d21d35"},{"author":{"_account_id":2861,"name":"Vincent Hou","email":"shou@us.ibm.com","username":"houshengbo"},"change_message_id":"fe79d1a00388ff74bddbf7fa9e19ab9e4ca662b9","unresolved":false,"context_lines":[{"line_number":253,"context_line":"                                                     volumes)"},{"line_number":254,"context_line":"        else:"},{"line_number":255,"context_line":"            volumes \u003d self._view_builder.summary_list(req, limited_list,"},{"line_number":256,"context_line":"                                                      volumes)"},{"line_number":257,"context_line":"        return volumes"},{"line_number":258,"context_line":""},{"line_number":259,"context_line":"    def _image_uuid_from_ref(self, image_ref, context):"}],"source_content_type":"text/x-python","patch_set":39,"id":"3a961159_eacdee5f","line":256,"in_reply_to":"3a961159_0af31ae8","updated":"2015-01-12 04:56:56.000000000","message":"I think this argument can be simplified to a volume count.","commit_id":"bcd7c739f166d4f6a2563c356fc46fd0a8d21d35"}],"cinder/api/views/backups.py":[{"author":{"_account_id":10559,"name":"Steven Kaufer","email":"kaufer@us.ibm.com","username":"kaufer"},"change_message_id":"8d28ad974f5f5136b50c7a2ad5ece2f030cd54cf","unresolved":false,"context_lines":[{"line_number":29,"context_line":"        \"\"\"Initialize view builder.\"\"\""},{"line_number":30,"context_line":"        super(ViewBuilder, self).__init__()"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"    def summary_list(self, request, backups, origin_backups):"},{"line_number":33,"context_line":"        \"\"\"Show a list of backups without many details.\"\"\""},{"line_number":34,"context_line":"        return self._list_view(self.summary, request, backups,"},{"line_number":35,"context_line":"                               origin_backups)"}],"source_content_type":"text/x-python","patch_set":39,"id":"3a961159_caad929d","line":32,"updated":"2015-01-12 04:35:20.000000000","message":"See comment about the entire list vs. just the count in cinder/api/v2/volumes.py","commit_id":"bcd7c739f166d4f6a2563c356fc46fd0a8d21d35"},{"author":{"_account_id":2861,"name":"Vincent Hou","email":"shou@us.ibm.com","username":"houshengbo"},"change_message_id":"fe79d1a00388ff74bddbf7fa9e19ab9e4ca662b9","unresolved":false,"context_lines":[{"line_number":29,"context_line":"        \"\"\"Initialize view builder.\"\"\""},{"line_number":30,"context_line":"        super(ViewBuilder, self).__init__()"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"    def summary_list(self, request, backups, origin_backups):"},{"line_number":33,"context_line":"        \"\"\"Show a list of backups without many details.\"\"\""},{"line_number":34,"context_line":"        return self._list_view(self.summary, request, backups,"},{"line_number":35,"context_line":"                               origin_backups)"}],"source_content_type":"text/x-python","patch_set":39,"id":"3a961159_4aec42bc","line":32,"in_reply_to":"3a961159_caad929d","updated":"2015-01-12 04:56:56.000000000","message":"I think this argument can be simplified to a volume count.","commit_id":"bcd7c739f166d4f6a2563c356fc46fd0a8d21d35"}],"cinder/api/views/transfers.py":[{"author":{"_account_id":10559,"name":"Steven Kaufer","email":"kaufer@us.ibm.com","username":"kaufer"},"change_message_id":"8d28ad974f5f5136b50c7a2ad5ece2f030cd54cf","unresolved":false,"context_lines":[{"line_number":29,"context_line":"        \"\"\"Initialize view builder.\"\"\""},{"line_number":30,"context_line":"        super(ViewBuilder, self).__init__()"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"    def summary_list(self, request, transfers, origin_transfers):"},{"line_number":33,"context_line":"        \"\"\"Show a list of transfers without many details.\"\"\""},{"line_number":34,"context_line":"        return self._list_view(self.summary, request, transfers,"},{"line_number":35,"context_line":"                               origin_transfers)"}],"source_content_type":"text/x-python","patch_set":39,"id":"3a961159_ea916e54","line":32,"updated":"2015-01-12 04:35:20.000000000","message":"See comment about the entire list vs. just the count in cinder/api/v2/volumes.py","commit_id":"bcd7c739f166d4f6a2563c356fc46fd0a8d21d35"},{"author":{"_account_id":2861,"name":"Vincent Hou","email":"shou@us.ibm.com","username":"houshengbo"},"change_message_id":"fe79d1a00388ff74bddbf7fa9e19ab9e4ca662b9","unresolved":false,"context_lines":[{"line_number":29,"context_line":"        \"\"\"Initialize view builder.\"\"\""},{"line_number":30,"context_line":"        super(ViewBuilder, self).__init__()"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"    def summary_list(self, request, transfers, origin_transfers):"},{"line_number":33,"context_line":"        \"\"\"Show a list of transfers without many details.\"\"\""},{"line_number":34,"context_line":"        return self._list_view(self.summary, request, transfers,"},{"line_number":35,"context_line":"                               origin_transfers)"}],"source_content_type":"text/x-python","patch_set":39,"id":"3a961159_6a01fe6c","line":32,"in_reply_to":"3a961159_ea916e54","updated":"2015-01-12 04:56:56.000000000","message":"I think this argument can be simplified to a volume count.","commit_id":"bcd7c739f166d4f6a2563c356fc46fd0a8d21d35"}],"cinder/tests/api/test_common.py":[{"author":{"_account_id":10559,"name":"Steven Kaufer","email":"kaufer@us.ibm.com","username":"kaufer"},"change_message_id":"67d8cdaff0398264617e532c85c6a115d1675bd2","unresolved":false,"context_lines":[{"line_number":256,"context_line":"                          fixture)"},{"line_number":257,"context_line":""},{"line_number":258,"context_line":""},{"line_number":259,"context_line":"class TestCollectionLinks(test.TestCase):"},{"line_number":260,"context_line":"    \"\"\"Tests the _get_collection_links method.\"\"\""},{"line_number":261,"context_line":""},{"line_number":262,"context_line":"    @mock.patch(\u0027cinder.api.common.ViewBuilder._get_next_link\u0027)"}],"source_content_type":"text/x-python","patch_set":48,"id":"3a961159_f39ccd6c","line":259,"updated":"2015-01-13 15:24:27.000000000","message":"I do not think that these test are executing correctly.\n\nThe 4th param being passed in _get_collection_links in these tests is \"uuid\" but this should be the the number of items (ie, \"item_count\").\n\nAlso, why are you mocking \"_get_next_link\", shouldn\u0027t you instead mock \"_generate_next_link\" since that is what the function you are testing invokes?","commit_id":"f384a231244131457a12d28d315644d20d0ac8a1"},{"author":{"_account_id":2861,"name":"Vincent Hou","email":"shou@us.ibm.com","username":"houshengbo"},"change_message_id":"157929e33a21089c4d3cba16a26bb26284faeb3a","unresolved":false,"context_lines":[{"line_number":256,"context_line":"                          fixture)"},{"line_number":257,"context_line":""},{"line_number":258,"context_line":""},{"line_number":259,"context_line":"class TestCollectionLinks(test.TestCase):"},{"line_number":260,"context_line":"    \"\"\"Tests the _get_collection_links method.\"\"\""},{"line_number":261,"context_line":""},{"line_number":262,"context_line":"    @mock.patch(\u0027cinder.api.common.ViewBuilder._get_next_link\u0027)"}],"source_content_type":"text/x-python","patch_set":48,"id":"3a961159_a313beff","line":259,"in_reply_to":"3a961159_f39ccd6c","updated":"2015-01-14 06:03:17.000000000","message":"Done","commit_id":"f384a231244131457a12d28d315644d20d0ac8a1"},{"author":{"_account_id":8846,"name":"Hao Wang","display_name":"Hao Wang","email":"sxmatch1986@gmail.com","username":"sxmatch"},"change_message_id":"6eaced4f5dcc56ee8426af9798e00e806e6672d9","unresolved":false,"context_lines":[{"line_number":268,"context_line":"        params \u003d mock.PropertyMock(return_value\u003ddict(limit\u003d10))"},{"line_number":269,"context_line":"        type(req).params \u003d params"},{"line_number":270,"context_line":"        builder \u003d common.ViewBuilder()"},{"line_number":271,"context_line":"        results \u003d builder._get_collection_links(req, items, \"ignored\", \"uuid\")"},{"line_number":272,"context_line":"        self.assertFalse(href_link_mock.called)"},{"line_number":273,"context_line":"        self.assertThat(results, matchers.HasLength(0))"},{"line_number":274,"context_line":""}],"source_content_type":"text/x-python","patch_set":48,"id":"3a961159_399b8467","line":271,"updated":"2015-01-14 01:24:44.000000000","message":"agree with steven, the params should be (request, items, collection_name, item_count, id_key\u003d\"uuid\").","commit_id":"f384a231244131457a12d28d315644d20d0ac8a1"},{"author":{"_account_id":2861,"name":"Vincent Hou","email":"shou@us.ibm.com","username":"houshengbo"},"change_message_id":"157929e33a21089c4d3cba16a26bb26284faeb3a","unresolved":false,"context_lines":[{"line_number":268,"context_line":"        params \u003d mock.PropertyMock(return_value\u003ddict(limit\u003d10))"},{"line_number":269,"context_line":"        type(req).params \u003d params"},{"line_number":270,"context_line":"        builder \u003d common.ViewBuilder()"},{"line_number":271,"context_line":"        results \u003d builder._get_collection_links(req, items, \"ignored\", \"uuid\")"},{"line_number":272,"context_line":"        self.assertFalse(href_link_mock.called)"},{"line_number":273,"context_line":"        self.assertThat(results, matchers.HasLength(0))"},{"line_number":274,"context_line":""}],"source_content_type":"text/x-python","patch_set":48,"id":"3a961159_8318821f","line":271,"in_reply_to":"3a961159_399b8467","updated":"2015-01-14 06:03:17.000000000","message":"Done","commit_id":"f384a231244131457a12d28d315644d20d0ac8a1"},{"author":{"_account_id":10559,"name":"Steven Kaufer","email":"kaufer@us.ibm.com","username":"kaufer"},"change_message_id":"67d8cdaff0398264617e532c85c6a115d1675bd2","unresolved":false,"context_lines":[{"line_number":301,"context_line":"        results \u003d builder._get_collection_links(req, items,"},{"line_number":302,"context_line":"                                                mock.sentinel.coll_key,"},{"line_number":303,"context_line":"                                                \"uuid\")"},{"line_number":304,"context_line":"        href_link_mock.assert_called_once_with(req, \"123\","},{"line_number":305,"context_line":"                                               mock.sentinel.coll_key)"},{"line_number":306,"context_line":"        self.assertThat(results, matchers.HasLength(1))"},{"line_number":307,"context_line":""}],"source_content_type":"text/x-python","patch_set":48,"id":"3a961159_f373ed4b","line":304,"updated":"2015-01-13 15:24:27.000000000","message":"Shouldn\u0027t this test not result in a \"next\" link since the number of items equals the osapi_max_limit?","commit_id":"f384a231244131457a12d28d315644d20d0ac8a1"},{"author":{"_account_id":2861,"name":"Vincent Hou","email":"shou@us.ibm.com","username":"houshengbo"},"change_message_id":"73b7fdf2867cadfd35379bab7daae0b4a725f7dd","unresolved":false,"context_lines":[{"line_number":301,"context_line":"        results \u003d builder._get_collection_links(req, items,"},{"line_number":302,"context_line":"                                                mock.sentinel.coll_key,"},{"line_number":303,"context_line":"                                                \"uuid\")"},{"line_number":304,"context_line":"        href_link_mock.assert_called_once_with(req, \"123\","},{"line_number":305,"context_line":"                                               mock.sentinel.coll_key)"},{"line_number":306,"context_line":"        self.assertThat(results, matchers.HasLength(1))"},{"line_number":307,"context_line":""}],"source_content_type":"text/x-python","patch_set":48,"id":"3a961159_7ad97b21","line":304,"in_reply_to":"3a961159_f373ed4b","updated":"2015-01-14 05:29:27.000000000","message":"Done","commit_id":"f384a231244131457a12d28d315644d20d0ac8a1"},{"author":{"_account_id":10559,"name":"Steven Kaufer","email":"kaufer@us.ibm.com","username":"kaufer"},"change_message_id":"7f52101e22290c3bea246ee7d83f61ef705aaa17","unresolved":false,"context_lines":[{"line_number":256,"context_line":"                          fixture)"},{"line_number":257,"context_line":""},{"line_number":258,"context_line":""},{"line_number":259,"context_line":"class TestCollectionLinks(test.TestCase):"},{"line_number":260,"context_line":"    \"\"\"Tests the _get_collection_links method.\"\"\""},{"line_number":261,"context_line":""},{"line_number":262,"context_line":"    @mock.patch(\u0027cinder.api.common.ViewBuilder._generate_next_link\u0027)"}],"source_content_type":"text/x-python","patch_set":54,"id":"3a961159_f282b2fd","line":259,"updated":"2015-01-15 14:38:17.000000000","message":"These unit test functions are quite long. Would it be possible to break then into individual checks?  For example, the first function seems like it tests 3 scenarios:\n\n- Items equals osapi_max_limit and limit less than items\n- Items equals osapi_max_limit and limit equals items\n- Items equals osapi_max_limit and limit great than items\n\nCould you break these tests into multiple functions so that the scope of each is clearly defined?\n\nThe same idea applies to the 3 current functions in this new class.","commit_id":"3a785d79fec109571524927048182ca992436a76"},{"author":{"_account_id":2861,"name":"Vincent Hou","email":"shou@us.ibm.com","username":"houshengbo"},"change_message_id":"749709a79696a8a4b8439ba97b86b483db0a9c75","unresolved":false,"context_lines":[{"line_number":256,"context_line":"                          fixture)"},{"line_number":257,"context_line":""},{"line_number":258,"context_line":""},{"line_number":259,"context_line":"class TestCollectionLinks(test.TestCase):"},{"line_number":260,"context_line":"    \"\"\"Tests the _get_collection_links method.\"\"\""},{"line_number":261,"context_line":""},{"line_number":262,"context_line":"    @mock.patch(\u0027cinder.api.common.ViewBuilder._generate_next_link\u0027)"}],"source_content_type":"text/x-python","patch_set":54,"id":"3a961159_4912e961","line":259,"in_reply_to":"3a961159_f282b2fd","updated":"2015-01-16 02:18:27.000000000","message":"I will have more small methods rather than the HUGE one.","commit_id":"3a785d79fec109571524927048182ca992436a76"},{"author":{"_account_id":10559,"name":"Steven Kaufer","email":"kaufer@us.ibm.com","username":"kaufer"},"change_message_id":"7f52101e22290c3bea246ee7d83f61ef705aaa17","unresolved":false,"context_lines":[{"line_number":273,"context_line":"        limit \u003d item_count - 1"},{"line_number":274,"context_line":"        # The length of items is the min value among limit, osapi_max_limit"},{"line_number":275,"context_line":"        # and the number of items."},{"line_number":276,"context_line":"        items \u003d ["},{"line_number":277,"context_line":"            {\"uuid\": \"1\"}, {\"uuid\": \"2\"}, {\"uuid\": \"3\"},"},{"line_number":278,"context_line":"            {\"uuid\": \"4\"}"},{"line_number":279,"context_line":"        ]"}],"source_content_type":"text/x-python","patch_set":54,"id":"3a961159_323b5a39","line":276,"updated":"2015-01-15 14:38:17.000000000","message":"Shouldn\u0027t the number of items equal the osapi_max_limit of 5?  \n\nThe code here could instead be:\n\n    items \u003d [{\"uuid\": str(i)} for i in range(item_count)]","commit_id":"3a785d79fec109571524927048182ca992436a76"},{"author":{"_account_id":2861,"name":"Vincent Hou","email":"shou@us.ibm.com","username":"houshengbo"},"change_message_id":"749709a79696a8a4b8439ba97b86b483db0a9c75","unresolved":false,"context_lines":[{"line_number":273,"context_line":"        limit \u003d item_count - 1"},{"line_number":274,"context_line":"        # The length of items is the min value among limit, osapi_max_limit"},{"line_number":275,"context_line":"        # and the number of items."},{"line_number":276,"context_line":"        items \u003d ["},{"line_number":277,"context_line":"            {\"uuid\": \"1\"}, {\"uuid\": \"2\"}, {\"uuid\": \"3\"},"},{"line_number":278,"context_line":"            {\"uuid\": \"4\"}"},{"line_number":279,"context_line":"        ]"}],"source_content_type":"text/x-python","patch_set":54,"id":"3a961159_493bc9e9","line":276,"in_reply_to":"3a961159_323b5a39","updated":"2015-01-16 02:18:27.000000000","message":"The length of items is the min value among limit, osapi_max_limit and the number of items as I commented above this line, because items is the \"limited_list\", assigned with \"limited_list \u003d common.limited(volumes, req) in Line 248 of cinder/api/v2/volumes.py\". Both the limit and osapi_max_limit are the parameters to limit the volumes.\nSo the length of items the min value of three of the variables.","commit_id":"3a785d79fec109571524927048182ca992436a76"},{"author":{"_account_id":10559,"name":"Steven Kaufer","email":"kaufer@us.ibm.com","username":"kaufer"},"change_message_id":"7f52101e22290c3bea246ee7d83f61ef705aaa17","unresolved":false,"context_lines":[{"line_number":488,"context_line":"        href_link_mock.assert_called_once_with(items, \"uuid\","},{"line_number":489,"context_line":"                                               links, req,"},{"line_number":490,"context_line":"                                               mock.sentinel.coll_key)"},{"line_number":491,"context_line":"        self.assertThat(results, matchers.HasLength(1))"}],"source_content_type":"text/x-python","patch_set":54,"id":"3a961159_b2082a92","line":491,"updated":"2015-01-15 14:38:17.000000000","message":"Also, can you include tests for when the limit parameter is not specified?","commit_id":"3a785d79fec109571524927048182ca992436a76"},{"author":{"_account_id":2861,"name":"Vincent Hou","email":"shou@us.ibm.com","username":"houshengbo"},"change_message_id":"749709a79696a8a4b8439ba97b86b483db0a9c75","unresolved":false,"context_lines":[{"line_number":488,"context_line":"        href_link_mock.assert_called_once_with(items, \"uuid\","},{"line_number":489,"context_line":"                                               links, req,"},{"line_number":490,"context_line":"                                               mock.sentinel.coll_key)"},{"line_number":491,"context_line":"        self.assertThat(results, matchers.HasLength(1))"}],"source_content_type":"text/x-python","patch_set":54,"id":"3a961159_c9fdf90a","line":491,"in_reply_to":"3a961159_b2082a92","updated":"2015-01-16 02:18:27.000000000","message":"They will be put in three other methods.","commit_id":"3a785d79fec109571524927048182ca992436a76"},{"author":{"_account_id":10559,"name":"Steven Kaufer","email":"kaufer@us.ibm.com","username":"kaufer"},"change_message_id":"e0fdf07f5b15c4e978440ccd551339514349eae6","unresolved":false,"context_lines":[{"line_number":256,"context_line":"                          fixture)"},{"line_number":257,"context_line":""},{"line_number":258,"context_line":""},{"line_number":259,"context_line":"class TestCollectionLinks(test.TestCase):"},{"line_number":260,"context_line":"    \"\"\"Tests the _get_collection_links method.\"\"\""},{"line_number":261,"context_line":""},{"line_number":262,"context_line":"    @mock.patch(\u0027cinder.api.common.ViewBuilder._generate_next_link\u0027)"}],"source_content_type":"text/x-python","patch_set":56,"id":"3a961159_bca1b4aa","line":259,"updated":"2015-01-16 16:30:22.000000000","message":"I am really having a hard time following the 16 different functions here and understanding the subtle differences between each. Would it be possible to define a utility fn that does all of the validation like:\n\n    def _validate(href_link_mock, item_count, osapi_max_limit, limited_list_size, limit, should_link_exist):\n        ....\n\nAnd then each function can simply invoke the new function and explicitly define the associated values like:\n\n    @mock.patch(\u0027cinder.api.common.ViewBuilder._generate_next_link\u0027)\n    def test_items_equals_osapi_max_no_limit(self, href_link_mock):\n        item_count \u003d 5\n        osapi_max_limit \u003d 5\n        limited_list_size \u003d 5\n        limit \u003d None\n        should_link_exist \u003d True\n        self._validate(href_link_mock, item_count, osapi_max_limit, limited_list_size, limit, should_link_exist)\n\nI think that this will be much more readable and it would reduce a lot of the duplicate code. Thoughts?","commit_id":"e1ffa6719a9d554d90f1361c98f46c70013d464b"},{"author":{"_account_id":10559,"name":"Steven Kaufer","email":"kaufer@us.ibm.com","username":"kaufer"},"change_message_id":"e0fdf07f5b15c4e978440ccd551339514349eae6","unresolved":false,"context_lines":[{"line_number":525,"context_line":"        self.flags(osapi_max_limit\u003ditem_count - 2)"},{"line_number":526,"context_line":"        # Pass a limit which equals to osapi_max_limit, the next link should"},{"line_number":527,"context_line":"        # be available."},{"line_number":528,"context_line":"        href_link_mock.reset_mock()"},{"line_number":529,"context_line":"        limit \u003d item_count - 2"},{"line_number":530,"context_line":"        # The length of items is the min value among limit, osapi_max_limit"},{"line_number":531,"context_line":"        # and the number of items."}],"source_content_type":"text/x-python","patch_set":56,"id":"3a961159_0338abec","line":528,"updated":"2015-01-16 16:30:22.000000000","message":"I assume that this was left over from when you broke the larger function into multiple?  I believe that you no longer need this \u0027reset_mock\u0027.","commit_id":"e1ffa6719a9d554d90f1361c98f46c70013d464b"},{"author":{"_account_id":10559,"name":"Steven Kaufer","email":"kaufer@us.ibm.com","username":"kaufer"},"change_message_id":"e0fdf07f5b15c4e978440ccd551339514349eae6","unresolved":false,"context_lines":[{"line_number":551,"context_line":"        self.flags(osapi_max_limit\u003ditem_count - 2)"},{"line_number":552,"context_line":"        # Pass a limit which is between osapi_max_limit and the number of"},{"line_number":553,"context_line":"        # volumes, the next link should be available."},{"line_number":554,"context_line":"        href_link_mock.reset_mock()"},{"line_number":555,"context_line":"        limit \u003d item_count - 1"},{"line_number":556,"context_line":"        limited_list \u003d [{\"uuid\": str(i)} for i in range(item_count - 2)]"},{"line_number":557,"context_line":"        params \u003d mock.PropertyMock(return_value\u003ddict(limit\u003dlimit))"}],"source_content_type":"text/x-python","patch_set":56,"id":"3a961159_432553c0","line":554,"updated":"2015-01-16 16:30:22.000000000","message":"ditto","commit_id":"e1ffa6719a9d554d90f1361c98f46c70013d464b"},{"author":{"_account_id":10559,"name":"Steven Kaufer","email":"kaufer@us.ibm.com","username":"kaufer"},"change_message_id":"e0fdf07f5b15c4e978440ccd551339514349eae6","unresolved":false,"context_lines":[{"line_number":575,"context_line":"        self.flags(osapi_max_limit\u003ditem_count - 2)"},{"line_number":576,"context_line":"        # Pass a limit which equals to the number of volumes, the next link"},{"line_number":577,"context_line":"        # should be available."},{"line_number":578,"context_line":"        href_link_mock.reset_mock()"},{"line_number":579,"context_line":"        limit \u003d item_count"},{"line_number":580,"context_line":"        limited_list \u003d [{\"uuid\": str(i)} for i in range(item_count - 2)]"},{"line_number":581,"context_line":"        params \u003d mock.PropertyMock(return_value\u003ddict(limit\u003dlimit))"}],"source_content_type":"text/x-python","patch_set":56,"id":"3a961159_e31b9f7d","line":578,"updated":"2015-01-16 16:30:22.000000000","message":"ditto","commit_id":"e1ffa6719a9d554d90f1361c98f46c70013d464b"},{"author":{"_account_id":10559,"name":"Steven Kaufer","email":"kaufer@us.ibm.com","username":"kaufer"},"change_message_id":"e0fdf07f5b15c4e978440ccd551339514349eae6","unresolved":false,"context_lines":[{"line_number":599,"context_line":"        self.flags(osapi_max_limit\u003ditem_count - 2)"},{"line_number":600,"context_line":"        # Pass a limit which is greater than the number of volumes, the next"},{"line_number":601,"context_line":"        # link should be available."},{"line_number":602,"context_line":"        href_link_mock.reset_mock()"},{"line_number":603,"context_line":"        limit \u003d item_count + 1"},{"line_number":604,"context_line":"        limited_list \u003d [{\"uuid\": str(i)} for i in range(item_count - 2)]"},{"line_number":605,"context_line":"        params \u003d mock.PropertyMock(return_value\u003ddict(limit\u003dlimit))"}],"source_content_type":"text/x-python","patch_set":56,"id":"3a961159_23120761","line":602,"updated":"2015-01-16 16:30:22.000000000","message":"ditto","commit_id":"e1ffa6719a9d554d90f1361c98f46c70013d464b"}],"cinder/tests/api/v2/stubs.py":[{"author":{"_account_id":12561,"name":"Adrien Vergé","email":"adrienverge@gmail.com","username":"adrien.verge"},"change_message_id":"cff39ff710a34d76ced80561dd791dd213facaf8","unresolved":false,"context_lines":[{"line_number":124,"context_line":"def stub_volume_get_all_by_project(self, context, marker, limit, sort_key,"},{"line_number":125,"context_line":"                                   sort_dir, filters\u003dNone,"},{"line_number":126,"context_line":"                                   viewable_admin_meta\u003dFalse):"},{"line_number":127,"context_line":"    filters \u003d filters or {}"},{"line_number":128,"context_line":"    return [stub_volume_get(self, context, \u00271\u0027)]"},{"line_number":129,"context_line":""},{"line_number":130,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"7a8c0949_a509622e","line":127,"updated":"2014-10-30 14:13:58.000000000","message":"Can you remove this line?","commit_id":"1b684655da9d377d49261926e209565256e82a67"},{"author":{"_account_id":12561,"name":"Adrien Vergé","email":"adrienverge@gmail.com","username":"adrien.verge"},"change_message_id":"cff39ff710a34d76ced80561dd791dd213facaf8","unresolved":false,"context_lines":[{"line_number":131,"context_line":"def stub_multiple_volume_get_all_by_project(self, context, marker, limit,"},{"line_number":132,"context_line":"                                            sort_key, sort_dir, filters\u003dNone,"},{"line_number":133,"context_line":"                                            viewable_admin_meta\u003dFalse):"},{"line_number":134,"context_line":"    filters \u003d filters or {}"},{"line_number":135,"context_line":"    return [stub_volume_get(self, context, \u00271\u0027),"},{"line_number":136,"context_line":"            stub_volume_get(self, context, \u00272\u0027)]"},{"line_number":137,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"7a8c0949_a29f9802","line":134,"updated":"2014-10-30 14:13:58.000000000","message":"and this one also","commit_id":"1b684655da9d377d49261926e209565256e82a67"},{"author":{"_account_id":10559,"name":"Steven Kaufer","email":"kaufer@us.ibm.com","username":"kaufer"},"change_message_id":"8d28ad974f5f5136b50c7a2ad5ece2f030cd54cf","unresolved":false,"context_lines":[{"line_number":137,"context_line":"    return [stub_volume_get(self, context, \u00271\u0027)]"},{"line_number":138,"context_line":""},{"line_number":139,"context_line":""},{"line_number":140,"context_line":"def stub_multiple_volume_get_all_by_project(self, context, marker, limit,"},{"line_number":141,"context_line":"                                            sort_key, sort_dir, filters\u003dNone,"},{"line_number":142,"context_line":"                                            viewable_admin_meta\u003dFalse):"},{"line_number":143,"context_line":"    return [stub_volume_get(self, context, \u00271\u0027),"}],"source_content_type":"text/x-python","patch_set":39,"id":"3a961159_8ad54a1d","line":140,"updated":"2015-01-12 04:35:20.000000000","message":"Why is this function necessary?  Why isn\u0027t the existing \u0027stub_volume_get_all_by_project\u0027 function sufficient?","commit_id":"bcd7c739f166d4f6a2563c356fc46fd0a8d21d35"}],"cinder/tests/api/v2/test_volumes.py":[{"author":{"_account_id":10559,"name":"Steven Kaufer","email":"kaufer@us.ibm.com","username":"kaufer"},"change_message_id":"8d28ad974f5f5136b50c7a2ad5ece2f030cd54cf","unresolved":false,"context_lines":[{"line_number":1134,"context_line":"        api_keys \u003d [\u0027volumes\u0027, \u0027volumes/detail\u0027]"},{"line_number":1135,"context_line":"        fns \u003d [self.controller.index, self.controller.detail]"},{"line_number":1136,"context_line":""},{"line_number":1137,"context_line":"        # Number of volumes is less than the max, include next link"},{"line_number":1138,"context_line":"        def stub_volume_get_all(context, marker, limit,"},{"line_number":1139,"context_line":"                                sort_key, sort_dir,"},{"line_number":1140,"context_line":"                                filters\u003dNone,"}],"source_content_type":"text/x-python","patch_set":39,"id":"3a961159_0a1a3a18","line":1137,"updated":"2015-01-12 04:35:20.000000000","message":"Why did you remove the case where the volumes equals the max, should not we still verify this case?\n\nAlso, isn\u0027t the number of values MORE than the max (+1 was added on line 1143).\n\nLastly, the purpose of this function is to test the cases where the count is 1 fewer then the max, equal to the max, and 1 more then the max -- this function already tests the 3 cases.","commit_id":"bcd7c739f166d4f6a2563c356fc46fd0a8d21d35"},{"author":{"_account_id":10559,"name":"Steven Kaufer","email":"kaufer@us.ibm.com","username":"kaufer"},"change_message_id":"e6552036fb6365ff09053e727f9bd54e86d14d91","unresolved":false,"context_lines":[{"line_number":1134,"context_line":"        api_keys \u003d [\u0027volumes\u0027, \u0027volumes/detail\u0027]"},{"line_number":1135,"context_line":"        fns \u003d [self.controller.index, self.controller.detail]"},{"line_number":1136,"context_line":""},{"line_number":1137,"context_line":"        # Number of volumes is less than the max, include next link"},{"line_number":1138,"context_line":"        def stub_volume_get_all(context, marker, limit,"},{"line_number":1139,"context_line":"                                sort_key, sort_dir,"},{"line_number":1140,"context_line":"                                filters\u003dNone,"}],"source_content_type":"text/x-python","patch_set":39,"id":"3a961159_2aeff6b2","line":1137,"in_reply_to":"3a961159_0a1a3a18","updated":"2015-01-12 04:58:37.000000000","message":"Sorry, I misspoke here -- it is not \"1 more then the max\", but simply \"more then the max\" (max +100 on line 1180).","commit_id":"bcd7c739f166d4f6a2563c356fc46fd0a8d21d35"},{"author":{"_account_id":10559,"name":"Steven Kaufer","email":"kaufer@us.ibm.com","username":"kaufer"},"change_message_id":"6dec4c1c3428a34ecf5e4b374bd48fba2294acd9","unresolved":false,"context_lines":[{"line_number":1134,"context_line":"        api_keys \u003d [\u0027volumes\u0027, \u0027volumes/detail\u0027]"},{"line_number":1135,"context_line":"        fns \u003d [self.controller.index, self.controller.detail]"},{"line_number":1136,"context_line":""},{"line_number":1137,"context_line":"        # Number of volumes is more than the max, include next link"},{"line_number":1138,"context_line":"        def stub_volume_get_all(context, marker, limit,"},{"line_number":1139,"context_line":"                                sort_key, sort_dir,"},{"line_number":1140,"context_line":"                                filters\u003dNone,"}],"source_content_type":"text/x-python","patch_set":43,"id":"3a961159_46834fa9","line":1137,"updated":"2015-01-12 14:46:29.000000000","message":"I still do not understand why you are changing this (see comment in patch set 39).  How is this different then the test below at line 1174?\n\nYou still need to include a test when the number of volumes equals the max.  Why aren\u0027t you changing lines 1152-1154 to reflect that there is no \u0027volumes_link\u0027 in this case?  Isn\u0027t this what this patch set is fixing?","commit_id":"da7c3c318b94e70822bfdeb31e586db71a22b190"},{"author":{"_account_id":2861,"name":"Vincent Hou","email":"shou@us.ibm.com","username":"houshengbo"},"change_message_id":"45fdc41e7b5c65fabad8c5f42d754b9a146e40f3","unresolved":false,"context_lines":[{"line_number":1134,"context_line":"        api_keys \u003d [\u0027volumes\u0027, \u0027volumes/detail\u0027]"},{"line_number":1135,"context_line":"        fns \u003d [self.controller.index, self.controller.detail]"},{"line_number":1136,"context_line":""},{"line_number":1137,"context_line":"        # Number of volumes is more than the max, include next link"},{"line_number":1138,"context_line":"        def stub_volume_get_all(context, marker, limit,"},{"line_number":1139,"context_line":"                                sort_key, sort_dir,"},{"line_number":1140,"context_line":"                                filters\u003dNone,"}],"source_content_type":"text/x-python","patch_set":43,"id":"3a961159_6152f5df","line":1137,"in_reply_to":"3a961159_46834fa9","updated":"2015-01-12 14:57:43.000000000","message":"Thanks for your reminding.\nI found out Line 1153 won\u0027t pass after the change. In fact, it is that line I should be changing, not this one.","commit_id":"da7c3c318b94e70822bfdeb31e586db71a22b190"},{"author":{"_account_id":10559,"name":"Steven Kaufer","email":"kaufer@us.ibm.com","username":"kaufer"},"change_message_id":"e6e717de94aead7a3df3bc495b267a46e798de6a","unresolved":false,"context_lines":[{"line_number":1140,"context_line":"                                filters\u003dNone,"},{"line_number":1141,"context_line":"                                viewable_admin_meta\u003dFalse):"},{"line_number":1142,"context_line":"            vols \u003d [stubs.stub_volume(i)"},{"line_number":1143,"context_line":"                    for i in xrange(CONF.osapi_max_limit + 1)]"},{"line_number":1144,"context_line":"            if limit is None or limit \u003e\u003d len(vols):"},{"line_number":1145,"context_line":"                return vols"},{"line_number":1146,"context_line":"            return vols[:limit]"}],"source_content_type":"text/x-python","patch_set":44,"id":"3a961159_5caa3e72","line":1143,"updated":"2015-01-12 15:21:29.000000000","message":"Why is this \"+ 1\" here?  This is not testing the case where the number of volumes equals the max.","commit_id":"82be07ba7abb19e774ad6d80b18f631c82868e70"},{"author":{"_account_id":10559,"name":"Steven Kaufer","email":"kaufer@us.ibm.com","username":"kaufer"},"change_message_id":"8733d2eb1ec4d1de14587df56c90818f1cd6f49c","unresolved":false,"context_lines":[{"line_number":1120,"context_line":"        res_dict \u003d self.controller.index(req)"},{"line_number":1121,"context_line":"        expected \u003d {\u0027volumes\u0027: []}"},{"line_number":1122,"context_line":"        self.assertEqual(res_dict, expected)"},{"line_number":1123,"context_line":""},{"line_number":1124,"context_line":"    def test_volume_default_limit(self):"},{"line_number":1125,"context_line":"        self.stubs.Set(volume_api.API, \u0027get\u0027, stubs.stub_volume_get)"},{"line_number":1126,"context_line":""}],"source_content_type":"text/x-python","patch_set":46,"id":"3a961159_1ea8951f","line":1123,"updated":"2015-01-13 04:41:35.000000000","message":"I do not think that the tests you added belong in this function; the purpose of this function is to verify the cases for the default limit (ie, the osapi_max_limit) and it should not have tests with the \u0027limit\u0027 parameter.\n\nPlease break this up into multiple functions.\n\nIMO, the new tests should really just exercise the corner cases of the common/api.py _get_collection_links function. Maybe you could implement something like nova did that is more focused [1].\n\n[1]: https://github.com/openstack/nova/blob/master/nova/tests/unit/api/openstack/test_common.py#L471","commit_id":"7615db7a89c2555f514ab96a78ec049206cee4cf"},{"author":{"_account_id":2861,"name":"Vincent Hou","email":"shou@us.ibm.com","username":"houshengbo"},"change_message_id":"35720e3e600b4697affb6f3d657143e4bc542a58","unresolved":false,"context_lines":[{"line_number":1120,"context_line":"        res_dict \u003d self.controller.index(req)"},{"line_number":1121,"context_line":"        expected \u003d {\u0027volumes\u0027: []}"},{"line_number":1122,"context_line":"        self.assertEqual(res_dict, expected)"},{"line_number":1123,"context_line":""},{"line_number":1124,"context_line":"    def test_volume_default_limit(self):"},{"line_number":1125,"context_line":"        self.stubs.Set(volume_api.API, \u0027get\u0027, stubs.stub_volume_get)"},{"line_number":1126,"context_line":""}],"source_content_type":"text/x-python","patch_set":46,"id":"3a961159_599f9765","line":1123,"in_reply_to":"3a961159_1ea8951f","updated":"2015-01-13 05:11:44.000000000","message":"I will split it into another class. Thanks for your suggestions.","commit_id":"7615db7a89c2555f514ab96a78ec049206cee4cf"},{"author":{"_account_id":10559,"name":"Steven Kaufer","email":"kaufer@us.ibm.com","username":"kaufer"},"change_message_id":"67d8cdaff0398264617e532c85c6a115d1675bd2","unresolved":false,"context_lines":[{"line_number":1133,"context_line":"        # Verify both the index and detail queries"},{"line_number":1134,"context_line":"        api_keys \u003d [\u0027volumes\u0027, \u0027volumes/detail\u0027]"},{"line_number":1135,"context_line":"        fns \u003d [self.controller.index, self.controller.detail]"},{"line_number":1136,"context_line":""},{"line_number":1137,"context_line":"        # Number of volumes equals the max, include next link"},{"line_number":1138,"context_line":"        def stub_volume_get_all(context, marker, limit,"},{"line_number":1139,"context_line":"                                sort_key, sort_dir,"}],"source_content_type":"text/x-python","patch_set":48,"id":"3a961159_80e5f1dd","line":1136,"updated":"2015-01-13 15:24:27.000000000","message":"I believe that this comment should reflect that the next link should not be included.","commit_id":"f384a231244131457a12d28d315644d20d0ac8a1"},{"author":{"_account_id":2861,"name":"Vincent Hou","email":"shou@us.ibm.com","username":"houshengbo"},"change_message_id":"5c639198bf1e522e77043fa72bd190f316ddfbd2","unresolved":false,"context_lines":[{"line_number":1133,"context_line":"        # Verify both the index and detail queries"},{"line_number":1134,"context_line":"        api_keys \u003d [\u0027volumes\u0027, \u0027volumes/detail\u0027]"},{"line_number":1135,"context_line":"        fns \u003d [self.controller.index, self.controller.detail]"},{"line_number":1136,"context_line":""},{"line_number":1137,"context_line":"        # Number of volumes equals the max, include next link"},{"line_number":1138,"context_line":"        def stub_volume_get_all(context, marker, limit,"},{"line_number":1139,"context_line":"                                sort_key, sort_dir,"}],"source_content_type":"text/x-python","patch_set":48,"id":"3a961159_74f19195","line":1136,"in_reply_to":"3a961159_80e5f1dd","updated":"2015-01-14 02:52:30.000000000","message":"Done","commit_id":"f384a231244131457a12d28d315644d20d0ac8a1"},{"author":{"_account_id":10559,"name":"Steven Kaufer","email":"kaufer@us.ibm.com","username":"kaufer"},"change_message_id":"67d8cdaff0398264617e532c85c6a115d1675bd2","unresolved":false,"context_lines":[{"line_number":1200,"context_line":"            volumes_links \u003d res_dict[\u0027volumes_links\u0027]"},{"line_number":1201,"context_line":"            _verify_links(volumes_links, key)"},{"line_number":1202,"context_line":""},{"line_number":1203,"context_line":"    def test_volume_with_limit(self):"},{"line_number":1204,"context_line":"        self.stubs.Set(volume_api.API, \u0027get\u0027, stubs.stub_volume_get)"},{"line_number":1205,"context_line":""},{"line_number":1206,"context_line":"        def _verify_links(links, url_key):"}],"source_content_type":"text/x-python","patch_set":48,"id":"3a961159_938469d4","line":1203,"updated":"2015-01-13 15:24:27.000000000","message":"I do not think that you need this new function if you are adding the coverage to test_common.","commit_id":"f384a231244131457a12d28d315644d20d0ac8a1"},{"author":{"_account_id":2861,"name":"Vincent Hou","email":"shou@us.ibm.com","username":"houshengbo"},"change_message_id":"5c639198bf1e522e77043fa72bd190f316ddfbd2","unresolved":false,"context_lines":[{"line_number":1200,"context_line":"            volumes_links \u003d res_dict[\u0027volumes_links\u0027]"},{"line_number":1201,"context_line":"            _verify_links(volumes_links, key)"},{"line_number":1202,"context_line":""},{"line_number":1203,"context_line":"    def test_volume_with_limit(self):"},{"line_number":1204,"context_line":"        self.stubs.Set(volume_api.API, \u0027get\u0027, stubs.stub_volume_get)"},{"line_number":1205,"context_line":""},{"line_number":1206,"context_line":"        def _verify_links(links, url_key):"}],"source_content_type":"text/x-python","patch_set":48,"id":"3a961159_fa0d6be9","line":1203,"in_reply_to":"3a961159_938469d4","updated":"2015-01-14 02:52:30.000000000","message":"I prefer to keep it cos it helps people to figure out the logic relationship among limit, number of volumes(items) and osapi_max_limit.","commit_id":"f384a231244131457a12d28d315644d20d0ac8a1"}]}
