)]}'
{"api-ref/source/queues.inc":[{"author":{"_account_id":22484,"name":"gengchc2","email":"geng.changcai2@zte.com.cn","username":"gengchc2"},"change_message_id":"01175ce68754f45de677263aecb3f59128eb1024","unresolved":false,"context_lines":[{"line_number":26,"context_line":"When queue listing , we can add filter option in message body to filter queue."},{"line_number":27,"context_line":"If metadata of queue is consistent with the filter,the queue will be listed to"},{"line_number":28,"context_line":"the user, otherwise the queue will be filtered. When setting the request body"},{"line_number":29,"context_line":"of listing queue, the body must be a list which contains json object which"},{"line_number":30,"context_line":"includes the key \u0027filter\u0027 ."},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"Normal response codes: 200"},{"line_number":33,"context_line":""}],"source_content_type":"text/x-c++src","patch_set":12,"id":"df87a7cf_f9b33f4c","line":30,"range":{"start_line":29,"start_character":18,"end_line":30,"end_character":24},"updated":"2017-12-05 01:59:23.000000000","message":"Suggest a little more concise","commit_id":"b28a1602a5306d757d64cd74a659cfc36c0a36ae"},{"author":{"_account_id":21387,"name":"gecong","email":"ge.cong@zte.com.cn","username":"gecong"},"change_message_id":"c3301192bed8b87f2a668f9bf6258fd5b880fd9d","unresolved":false,"context_lines":[{"line_number":26,"context_line":"When queue listing , we can add filter option in message body to filter queue."},{"line_number":27,"context_line":"If metadata of queue is consistent with the filter,the queue will be listed to"},{"line_number":28,"context_line":"the user, otherwise the queue will be filtered. When setting the request body"},{"line_number":29,"context_line":"of listing queue, the body must be a list which contains json object which"},{"line_number":30,"context_line":"includes the key \u0027filter\u0027 ."},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"Normal response codes: 200"},{"line_number":33,"context_line":""}],"source_content_type":"text/x-c++src","patch_set":12,"id":"df87a7cf_fc5ecd10","line":30,"range":{"start_line":29,"start_character":18,"end_line":30,"end_character":24},"in_reply_to":"df87a7cf_f9b33f4c","updated":"2017-12-05 03:00:02.000000000","message":"Done","commit_id":"b28a1602a5306d757d64cd74a659cfc36c0a36ae"}],"zaqar/transport/wsgi/v2_0/queues.py":[{"author":{"_account_id":19853,"name":"Nguyen Hung Phuong","email":"phuongnh@vn.fujitsu.com","username":"phuongnh"},"change_message_id":"b38df94a419781bde6b0d935f62a2e6bed95913e","unresolved":false,"context_lines":[{"line_number":253,"context_line":"    def on_get(self, req, resp, project_id):"},{"line_number":254,"context_line":"        kwargs \u003d {}"},{"line_number":255,"context_line":"        filter \u003d {}"},{"line_number":256,"context_line":"        field \u003d[\u0027marker\u0027,\u0027limit\u0027,\u0027detailed\u0027,\u0027name\u0027]"},{"line_number":257,"context_line":""},{"line_number":258,"context_line":"        # NOTE(kgriffs): This syntax ensures that"},{"line_number":259,"context_line":"        # we don\u0027t clobber default values with None."}],"source_content_type":"text/x-python","patch_set":25,"id":"9f91af0f_82fa6fba","line":256,"range":{"start_line":256,"start_character":8,"end_line":256,"end_character":51},"updated":"2018-01-08 06:35:14.000000000","message":"should be\nfield \u003d [\u0027marker\u0027, \u0027limit\u0027, \u0027detailed\u0027, \u0027name\u0027]","commit_id":"7b48f58556411af04e0e257ea5147d47b38e20c7"},{"author":{"_account_id":21387,"name":"gecong","email":"ge.cong@zte.com.cn","username":"gecong"},"change_message_id":"d39efd8ae5ca2fd1488a309360c842bda1aed912","unresolved":false,"context_lines":[{"line_number":253,"context_line":"    def on_get(self, req, resp, project_id):"},{"line_number":254,"context_line":"        kwargs \u003d {}"},{"line_number":255,"context_line":"        filter \u003d {}"},{"line_number":256,"context_line":"        field \u003d[\u0027marker\u0027,\u0027limit\u0027,\u0027detailed\u0027,\u0027name\u0027]"},{"line_number":257,"context_line":""},{"line_number":258,"context_line":"        # NOTE(kgriffs): This syntax ensures that"},{"line_number":259,"context_line":"        # we don\u0027t clobber default values with None."}],"source_content_type":"text/x-python","patch_set":25,"id":"9f91af0f_6272cb4b","line":256,"range":{"start_line":256,"start_character":8,"end_line":256,"end_character":51},"in_reply_to":"9f91af0f_82fa6fba","updated":"2018-01-09 03:33:26.000000000","message":"Done","commit_id":"7b48f58556411af04e0e257ea5147d47b38e20c7"},{"author":{"_account_id":8846,"name":"Hao Wang","display_name":"Hao Wang","email":"sxmatch1986@gmail.com","username":"sxmatch"},"change_message_id":"d5dac9b3a98da71ca13871a79835007c72fbf603","unresolved":false,"context_lines":[{"line_number":295,"context_line":"                    if not each_queue.get(\u0027metadata\u0027, {}).get(meta):"},{"line_number":296,"context_line":"                        each_queue[\u0027metadata\u0027][meta] \u003d value"},{"line_number":297,"context_line":""},{"line_number":298,"context_line":"        if len(filter) \u003e 0:"},{"line_number":299,"context_line":"            dqueues \u003d copy.deepcopy(queues)"},{"line_number":300,"context_line":"            for queue in dqueues:"},{"line_number":301,"context_line":"                qmeta \u003d queue[\u0027metadata\u0027]"},{"line_number":302,"context_line":"                for key in filter.keys():"},{"line_number":303,"context_line":"                    if queue in queues and qmeta.get(key, None) !\u003d filter[key]:"},{"line_number":304,"context_line":"                        queues.remove(queue)"},{"line_number":305,"context_line":""},{"line_number":306,"context_line":"        links \u003d []"},{"line_number":307,"context_line":"        if queues:"}],"source_content_type":"text/x-python","patch_set":27,"id":"9f91af0f_f753df69","line":304,"range":{"start_line":298,"start_character":0,"end_line":304,"end_character":44},"updated":"2018-01-09 03:26:26.000000000","message":"I think we cloudn\u0027t do this filter like this,  it will break the limit rule. We should do the filter in storage layer.  You can see the name filter patch.","commit_id":"fb8ffef6afacc68d647e67a3a4650b8faf9a9a5d"},{"author":{"_account_id":8846,"name":"Hao Wang","display_name":"Hao Wang","email":"sxmatch1986@gmail.com","username":"sxmatch"},"change_message_id":"8ee329a25cf5546d873f5b18ad3e572b4abf445e","unresolved":false,"context_lines":[{"line_number":295,"context_line":"                    if not each_queue.get(\u0027metadata\u0027, {}).get(meta):"},{"line_number":296,"context_line":"                        each_queue[\u0027metadata\u0027][meta] \u003d value"},{"line_number":297,"context_line":""},{"line_number":298,"context_line":"        if len(filter) \u003e 0:"},{"line_number":299,"context_line":"            dqueues \u003d copy.deepcopy(queues)"},{"line_number":300,"context_line":"            for queue in dqueues:"},{"line_number":301,"context_line":"                qmeta \u003d queue[\u0027metadata\u0027]"},{"line_number":302,"context_line":"                for key in filter.keys():"},{"line_number":303,"context_line":"                    if queue in queues and qmeta.get(key, None) !\u003d filter[key]:"},{"line_number":304,"context_line":"                        queues.remove(queue)"},{"line_number":305,"context_line":""},{"line_number":306,"context_line":"        links \u003d []"},{"line_number":307,"context_line":"        if queues:"}],"source_content_type":"text/x-python","patch_set":27,"id":"9f91af0f_a38f59cb","line":304,"range":{"start_line":298,"start_character":0,"end_line":304,"end_character":44},"in_reply_to":"9f91af0f_a81e56b8","updated":"2018-01-09 07:50:35.000000000","message":"For example,  if there are 100 queues fits the filter and the limit is 10,  so the result should be 10 queues returned.  But now you change the logic,  first Zaqar will return 10 queues, and then there to find the queues which fit the filter.  So the result could less than 10.  It\u0027s not right I think.  That\u0027s why I said we should do the filter in storage layer like name does.","commit_id":"fb8ffef6afacc68d647e67a3a4650b8faf9a9a5d"},{"author":{"_account_id":21387,"name":"gecong","email":"ge.cong@zte.com.cn","username":"gecong"},"change_message_id":"f06666ac6e289453e740a9b63aa4bea7fcfa6c0e","unresolved":false,"context_lines":[{"line_number":295,"context_line":"                    if not each_queue.get(\u0027metadata\u0027, {}).get(meta):"},{"line_number":296,"context_line":"                        each_queue[\u0027metadata\u0027][meta] \u003d value"},{"line_number":297,"context_line":""},{"line_number":298,"context_line":"        if len(filter) \u003e 0:"},{"line_number":299,"context_line":"            dqueues \u003d copy.deepcopy(queues)"},{"line_number":300,"context_line":"            for queue in dqueues:"},{"line_number":301,"context_line":"                qmeta \u003d queue[\u0027metadata\u0027]"},{"line_number":302,"context_line":"                for key in filter.keys():"},{"line_number":303,"context_line":"                    if queue in queues and qmeta.get(key, None) !\u003d filter[key]:"},{"line_number":304,"context_line":"                        queues.remove(queue)"},{"line_number":305,"context_line":""},{"line_number":306,"context_line":"        links \u003d []"},{"line_number":307,"context_line":"        if queues:"}],"source_content_type":"text/x-python","patch_set":27,"id":"9f91af0f_a81e56b8","line":304,"range":{"start_line":298,"start_character":0,"end_line":304,"end_character":44},"in_reply_to":"9f91af0f_f753df69","updated":"2018-01-09 06:40:36.000000000","message":"what do you mean break the limit rule? I test locally and have no such a question.thanks","commit_id":"fb8ffef6afacc68d647e67a3a4650b8faf9a9a5d"},{"author":{"_account_id":8846,"name":"Hao Wang","display_name":"Hao Wang","email":"sxmatch1986@gmail.com","username":"sxmatch"},"change_message_id":"ec804e1b02b26229794e288aedf0f6f016c886aa","unresolved":false,"context_lines":[{"line_number":268,"context_line":"                filter.pop(key)"},{"line_number":269,"context_line":""},{"line_number":270,"context_line":"        if len(filter) \u003e 0:"},{"line_number":271,"context_line":"            kwargs[\u0027detailed\u0027] \u003d True"},{"line_number":272,"context_line":"            limit \u003d kwargs.get(\u0027limit\u0027, storage.DEFAULT_QUEUES_PER_PAGE)"},{"line_number":273,"context_line":"            kwargs[\u0027limit\u0027] \u003d self._validate._limits_conf.max_queues_per_page"},{"line_number":274,"context_line":""}],"source_content_type":"text/x-python","patch_set":52,"id":"7f96bb07_de2e2842","line":271,"range":{"start_line":271,"start_character":12,"end_line":271,"end_character":37},"updated":"2018-01-16 01:15:58.000000000","message":"I know you want to get the metadata for filtering below. But I think we can\u0027t do it like this.  In your logic,  whether user specifies the detailed\u003dFalse or detailed\u003dTrue, once there is some filter, user will only get the detailed information.\n\nSo I suggest to move the logic to storage layer,  we get the detailed and filter arguments in storage layer,  if detailed\u003dFalse and some filters given,  first we can got max limit items of queues, and we do the filter,  and then we remove the metadata from results and handler the right limit as same as you did below.","commit_id":"d3aa23cf26c35d33e6d4531aa2ac737aaa46894c"},{"author":{"_account_id":21387,"name":"gecong","email":"ge.cong@zte.com.cn","username":"gecong"},"change_message_id":"506d07219cbfc2c383b9fcbdc2b4d213a14fc580","unresolved":false,"context_lines":[{"line_number":268,"context_line":"                filter.pop(key)"},{"line_number":269,"context_line":""},{"line_number":270,"context_line":"        if len(filter) \u003e 0:"},{"line_number":271,"context_line":"            kwargs[\u0027detailed\u0027] \u003d True"},{"line_number":272,"context_line":"            limit \u003d kwargs.get(\u0027limit\u0027, storage.DEFAULT_QUEUES_PER_PAGE)"},{"line_number":273,"context_line":"            kwargs[\u0027limit\u0027] \u003d self._validate._limits_conf.max_queues_per_page"},{"line_number":274,"context_line":""}],"source_content_type":"text/x-python","patch_set":52,"id":"7f96bb07_b9cfb6ae","line":271,"range":{"start_line":271,"start_character":12,"end_line":271,"end_character":37},"in_reply_to":"7f96bb07_59af92e2","updated":"2018-01-16 01:32:58.000000000","message":"Done","commit_id":"d3aa23cf26c35d33e6d4531aa2ac737aaa46894c"},{"author":{"_account_id":8846,"name":"Hao Wang","display_name":"Hao Wang","email":"sxmatch1986@gmail.com","username":"sxmatch"},"change_message_id":"ced90105519a2883d895b3d952831e75c267e84a","unresolved":false,"context_lines":[{"line_number":268,"context_line":"                filter.pop(key)"},{"line_number":269,"context_line":""},{"line_number":270,"context_line":"        if len(filter) \u003e 0:"},{"line_number":271,"context_line":"            kwargs[\u0027detailed\u0027] \u003d True"},{"line_number":272,"context_line":"            limit \u003d kwargs.get(\u0027limit\u0027, storage.DEFAULT_QUEUES_PER_PAGE)"},{"line_number":273,"context_line":"            kwargs[\u0027limit\u0027] \u003d self._validate._limits_conf.max_queues_per_page"},{"line_number":274,"context_line":""}],"source_content_type":"text/x-python","patch_set":52,"id":"7f96bb07_59af92e2","line":271,"range":{"start_line":271,"start_character":12,"end_line":271,"end_character":37},"in_reply_to":"7f96bb07_790e0e33","updated":"2018-01-16 01:29:30.000000000","message":"or you can remove the metadata according the argument detailed user specified after #311 in transport layer.","commit_id":"d3aa23cf26c35d33e6d4531aa2ac737aaa46894c"},{"author":{"_account_id":8846,"name":"Hao Wang","display_name":"Hao Wang","email":"sxmatch1986@gmail.com","username":"sxmatch"},"change_message_id":"007dee294eee75a54371be8c6bd6cdfe399c1ec1","unresolved":false,"context_lines":[{"line_number":268,"context_line":"                filter.pop(key)"},{"line_number":269,"context_line":""},{"line_number":270,"context_line":"        if len(filter) \u003e 0:"},{"line_number":271,"context_line":"            kwargs[\u0027detailed\u0027] \u003d True"},{"line_number":272,"context_line":"            limit \u003d kwargs.get(\u0027limit\u0027, storage.DEFAULT_QUEUES_PER_PAGE)"},{"line_number":273,"context_line":"            kwargs[\u0027limit\u0027] \u003d self._validate._limits_conf.max_queues_per_page"},{"line_number":274,"context_line":""}],"source_content_type":"text/x-python","patch_set":52,"id":"7f96bb07_f9bf7ecd","line":271,"range":{"start_line":271,"start_character":12,"end_line":271,"end_character":37},"in_reply_to":"7f96bb07_b9cfb6ae","updated":"2018-01-16 01:43:48.000000000","message":"okay, I think the logic is clear now.  You can move the code to https://review.openstack.org/#/c/531106/ and add yourself as co-author.  I hope we can merge this in Pike later.","commit_id":"d3aa23cf26c35d33e6d4531aa2ac737aaa46894c"},{"author":{"_account_id":21387,"name":"gecong","email":"ge.cong@zte.com.cn","username":"gecong"},"change_message_id":"e1b0cf8014c5d6a32edc98d365b0e141266cc713","unresolved":false,"context_lines":[{"line_number":268,"context_line":"                filter.pop(key)"},{"line_number":269,"context_line":""},{"line_number":270,"context_line":"        if len(filter) \u003e 0:"},{"line_number":271,"context_line":"            kwargs[\u0027detailed\u0027] \u003d True"},{"line_number":272,"context_line":"            limit \u003d kwargs.get(\u0027limit\u0027, storage.DEFAULT_QUEUES_PER_PAGE)"},{"line_number":273,"context_line":"            kwargs[\u0027limit\u0027] \u003d self._validate._limits_conf.max_queues_per_page"},{"line_number":274,"context_line":""}],"source_content_type":"text/x-python","patch_set":52,"id":"7f96bb07_790e0e33","line":271,"range":{"start_line":271,"start_character":12,"end_line":271,"end_character":37},"in_reply_to":"7f96bb07_de2e2842","updated":"2018-01-16 01:26:03.000000000","message":"Hi guys! thank your for your review, I did filter in storage layer and find that it\u0027s too complex. you can look at my historical code. what if I solve the detailed problem in transport layer?","commit_id":"d3aa23cf26c35d33e6d4531aa2ac737aaa46894c"},{"author":{"_account_id":8846,"name":"Hao Wang","display_name":"Hao Wang","email":"sxmatch1986@gmail.com","username":"sxmatch"},"change_message_id":"ec804e1b02b26229794e288aedf0f6f016c886aa","unresolved":false,"context_lines":[{"line_number":307,"context_line":"                    queues.remove(queue)"},{"line_number":308,"context_line":"                else:"},{"line_number":309,"context_line":"                    kwargs[\u0027marker\u0027] \u003d queue[\u0027name\u0027]"},{"line_number":310,"context_line":"                    kwargs[\u0027limit\u0027] \u003d limit"},{"line_number":311,"context_line":"                    count +\u003d 1"},{"line_number":312,"context_line":""},{"line_number":313,"context_line":"        links \u003d []"}],"source_content_type":"text/x-python","patch_set":52,"id":"7f96bb07_7e1d940d","line":310,"range":{"start_line":310,"start_character":20,"end_line":310,"end_character":43},"updated":"2018-01-16 01:15:58.000000000","message":"I think don\u0027t need set kwargs[\u0027limit\u0027] over and over again in this loop.  You can put it out of this loop.","commit_id":"d3aa23cf26c35d33e6d4531aa2ac737aaa46894c"},{"author":{"_account_id":21387,"name":"gecong","email":"ge.cong@zte.com.cn","username":"gecong"},"change_message_id":"e1b0cf8014c5d6a32edc98d365b0e141266cc713","unresolved":false,"context_lines":[{"line_number":307,"context_line":"                    queues.remove(queue)"},{"line_number":308,"context_line":"                else:"},{"line_number":309,"context_line":"                    kwargs[\u0027marker\u0027] \u003d queue[\u0027name\u0027]"},{"line_number":310,"context_line":"                    kwargs[\u0027limit\u0027] \u003d limit"},{"line_number":311,"context_line":"                    count +\u003d 1"},{"line_number":312,"context_line":""},{"line_number":313,"context_line":"        links \u003d []"}],"source_content_type":"text/x-python","patch_set":52,"id":"7f96bb07_191d8a65","line":310,"range":{"start_line":310,"start_character":20,"end_line":310,"end_character":43},"in_reply_to":"7f96bb07_7e1d940d","updated":"2018-01-16 01:26:03.000000000","message":"Done","commit_id":"d3aa23cf26c35d33e6d4531aa2ac737aaa46894c"}]}
