)]}'
{"openstack_dashboard/api/neutron.py":[{"author":{"_account_id":2455,"name":"Tihomir Trifonov","email":"t.trifonov@gmail.com","username":"ttrifonov"},"change_message_id":"e7ffd6d5566b3df366ad119a2d028d9ca747f45c","unresolved":false,"context_lines":[{"line_number":456,"context_line":"    and call the specified list_method repeatedly."},{"line_number":457,"context_line":""},{"line_number":458,"context_line":"    :param list_method: Method used to retrieve resource list."},{"line_number":459,"context_line":"    :param listed_field: field name for which value list is specified"},{"line_number":460,"context_line":"        in filter parameters. Only one field can be specified and"},{"line_number":461,"context_line":"        the speicified value must be included in params."},{"line_number":462,"context_line":"    :param params: parameters to pass a specified listing API call."}],"source_content_type":"text/x-python","patch_set":1,"id":"baada198_bf10a901","line":459,"updated":"2014-07-29 15:16:11.000000000","message":"This listed_field is redundant. You can access it using params.keys()[0]. And also pass the request field as *args,. e.g.:\n\n    def list_resource_chunks(list_method, *args, **kwargs):\n        try:\n            list_method(*args, **kwargs)\n        except:\n            ....","commit_id":"d044bc90e9fe31a8305787862ed689ca341b9597"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"2501b32586e070b386c1c8f53505441113c3c384","unresolved":false,"context_lines":[{"line_number":456,"context_line":"    and call the specified list_method repeatedly."},{"line_number":457,"context_line":""},{"line_number":458,"context_line":"    :param list_method: Method used to retrieve resource list."},{"line_number":459,"context_line":"    :param listed_field: field name for which value list is specified"},{"line_number":460,"context_line":"        in filter parameters. Only one field can be specified and"},{"line_number":461,"context_line":"        the speicified value must be included in params."},{"line_number":462,"context_line":"    :param params: parameters to pass a specified listing API call."}],"source_content_type":"text/x-python","patch_set":1,"id":"fa81d914_201ad36e","line":459,"in_reply_to":"3a961159_35f7ce5a","updated":"2015-01-28 00:17:56.000000000","message":"Done. I hope i got your point.","commit_id":"d044bc90e9fe31a8305787862ed689ca341b9597"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"0a5f9e8393533227215b38f08cac6997f321ff98","unresolved":false,"context_lines":[{"line_number":456,"context_line":"    and call the specified list_method repeatedly."},{"line_number":457,"context_line":""},{"line_number":458,"context_line":"    :param list_method: Method used to retrieve resource list."},{"line_number":459,"context_line":"    :param listed_field: field name for which value list is specified"},{"line_number":460,"context_line":"        in filter parameters. Only one field can be specified and"},{"line_number":461,"context_line":"        the speicified value must be included in params."},{"line_number":462,"context_line":"    :param params: parameters to pass a specified listing API call."}],"source_content_type":"text/x-python","patch_set":1,"id":"baada198_fa043ec7","line":459,"in_reply_to":"baada198_bf10a901","updated":"2014-08-04 04:58:05.000000000","message":"Hmm... I thought it first but actually i can\u0027t.\n\nIn neutron, filter parameters are passed using keyword parameters, e.g. list_networks(tenant_id\u003d\u0027tenantX\u0027, id\u003d[\u0027id1\u0027, \u0027id2\u0027, ..]. No argument parameters are defined to allow to use attributes extended by extension. Thus positional parameters \"args\" cannot be used.\n\nFor kwagrs,  AFAIK, kwargs.keys() does not ensure the order of keys, so I think params.keys()[0] doesn\u0027t work.\n\nThis is the reason I use a separate parameter \"list_field\" though it may look redundant.","commit_id":"d044bc90e9fe31a8305787862ed689ca341b9597"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"819910652d1cb3043d3624d0acf1a9ea2c8856d2","unresolved":false,"context_lines":[{"line_number":456,"context_line":"    and call the specified list_method repeatedly."},{"line_number":457,"context_line":""},{"line_number":458,"context_line":"    :param list_method: Method used to retrieve resource list."},{"line_number":459,"context_line":"    :param listed_field: field name for which value list is specified"},{"line_number":460,"context_line":"        in filter parameters. Only one field can be specified and"},{"line_number":461,"context_line":"        the speicified value must be included in params."},{"line_number":462,"context_line":"    :param params: parameters to pass a specified listing API call."}],"source_content_type":"text/x-python","patch_set":1,"id":"3a961159_35f7ce5a","line":459,"in_reply_to":"baada198_ef309e57","updated":"2015-01-28 00:11:47.000000000","message":"I am not sure I got your point.\n\n\u003e\u003e \"Only one field can be specified and the speicified value must be included in params.”\n\nTo be precise, it means that multiple attributes can be specified as a filter condition but\nonly one attribute can be split into sub lists in this method if URI is too long.\nIt never means only one filter attribute can be passed to Neutron.\n\n----\n\nThe general form of Neutron listing methods like list_networks() is:\n\n  list_networks(\n     attr1\u003d[val11, val12, .... ],\n     attr2\u003d[val21, val22, .... ],\n     attr3\u003d[val31, val32, .... ],\n     ....\n  )\n\nAll arguments are used as filter conditions and this call will return networks which satisfiies all of the specified conditions.\n\nWhat I am trying to address is to deal with a case where the value of attr2 is too long, for example.\nIn this case, I try to split a list of the values for “attr2” into several sub lists.\n\n  list_networks(\n     attr1\u003d[val11, val12, ...., ],\n     attr2\u003d[val21, val22, ...., long1, long2, .... ],\n     attr3\u003d[val31, val32, .... ],\n     ....\n  )\n\nis split into:\n\n  list_networks(\n     attr1\u003d[val11, val12, .... ],\n     attr2\u003d[val21, val22, .... ], \u003c-----\n     attr3\u003d[val31, val32, .... ],\n     ....\n  )\n\nand\n\n  list_networks(\n     attr1\u003d[val11, val12, .... ],\n     attr2\u003d[long1, long2, .... ],  \u003c-----\n     attr3\u003d[val31, val32, .... ],\n     ....\n  )\n\nThere are several options for method signatures, but I need a way to specify which field (“attr2” in this case) to be split.\nIf I follow your suggestion on positional and keyword parameters, it will be:\n\n  def list_resources_with_long_filters(list_method, filter_attr, filter_values, **kwargs):\n\nand the caller side will be:\n\n  list_resources_with_long_filters(list_networks,\n      ‘attr2’, [val21, val22, ...., long1, long2, .... ],\n      attr1\u003d[val11, val12, .... ],\n      attr3\u003d[val31, val32, .... ],\n  )\n\nIs this what you suggested?","commit_id":"d044bc90e9fe31a8305787862ed689ca341b9597"},{"author":{"_account_id":2455,"name":"Tihomir Trifonov","email":"t.trifonov@gmail.com","username":"ttrifonov"},"change_message_id":"6c7c2c67e1d5690c4f052174a495fd657b7423d0","unresolved":false,"context_lines":[{"line_number":456,"context_line":"    and call the specified list_method repeatedly."},{"line_number":457,"context_line":""},{"line_number":458,"context_line":"    :param list_method: Method used to retrieve resource list."},{"line_number":459,"context_line":"    :param listed_field: field name for which value list is specified"},{"line_number":460,"context_line":"        in filter parameters. Only one field can be specified and"},{"line_number":461,"context_line":"        the speicified value must be included in params."},{"line_number":462,"context_line":"    :param params: parameters to pass a specified listing API call."}],"source_content_type":"text/x-python","patch_set":1,"id":"baada198_ef309e57","line":459,"in_reply_to":"baada198_fa043ec7","updated":"2014-08-06 09:09:47.000000000","message":"\u003e\u003e \"For kwagrs, AFAIK, kwargs.keys() does not ensure the order of keys, so I think params.keys()[0] doesn\u0027t work\"\n\n\u003e\u003e \"Only one field can be specified and the speicified value must be included in params.\"\n\nSo this should not be a problem? \n\nFor list_networks() the call will be:\n\n    networks \u003d list_resources_with_long_filters(\n            list_networks, id\u003dport_networks)\n\nSo\n\n    list_method(*args, **kwargs) \n\nwill actually pass:\n\n    network_list(id\u003dport_networks)\n\nThe suggestion for using positional args is just to allow arbitrary params passing to this method, and in the calling method you define what exactly to pass.","commit_id":"d044bc90e9fe31a8305787862ed689ca341b9597"},{"author":{"_account_id":2455,"name":"Tihomir Trifonov","email":"t.trifonov@gmail.com","username":"ttrifonov"},"change_message_id":"e7ffd6d5566b3df366ad119a2d028d9ca747f45c","unresolved":false,"context_lines":[{"line_number":478,"context_line":"        # The length will be key_len + value_maxlen + 2"},{"line_number":479,"context_line":"        filter_len \u003d key_len + value_maxlen + 2"},{"line_number":480,"context_line":"        # Maximum filter lenght which can be specified"},{"line_number":481,"context_line":"        max_size \u003d filter_len * value_count - uri_len_exc.excess"},{"line_number":482,"context_line":"        chunk_size \u003d max_size / filter_len"},{"line_number":483,"context_line":"        resources \u003d []"},{"line_number":484,"context_line":"        for i in range(0, value_count, chunk_size):"}],"source_content_type":"text/x-python","patch_set":1,"id":"baada198_f1b5f5ed","line":481,"updated":"2014-07-29 15:16:11.000000000","message":"Here we can calculate the total_filter_len, we already have the excess data, so we can easily calculate what is the max_allowed_len on the server. Then to proceed with concatenation of the filters unless we hit the max_allowed_len, send it to the server, and repeat until there are filters to consume. This would be more optimal than evaluating the max-possible chunk, in the case of variable filter lengths. For fixed-length - it would be the same.","commit_id":"d044bc90e9fe31a8305787862ed689ca341b9597"},{"author":{"_account_id":2455,"name":"Tihomir Trifonov","email":"t.trifonov@gmail.com","username":"ttrifonov"},"change_message_id":"6c7c2c67e1d5690c4f052174a495fd657b7423d0","unresolved":false,"context_lines":[{"line_number":478,"context_line":"        # The length will be key_len + value_maxlen + 2"},{"line_number":479,"context_line":"        filter_len \u003d key_len + value_maxlen + 2"},{"line_number":480,"context_line":"        # Maximum filter lenght which can be specified"},{"line_number":481,"context_line":"        max_size \u003d filter_len * value_count - uri_len_exc.excess"},{"line_number":482,"context_line":"        chunk_size \u003d max_size / filter_len"},{"line_number":483,"context_line":"        resources \u003d []"},{"line_number":484,"context_line":"        for i in range(0, value_count, chunk_size):"}],"source_content_type":"text/x-python","patch_set":1,"id":"baada198_4f6fcafa","line":481,"in_reply_to":"baada198_2019d523","updated":"2014-08-06 09:09:47.000000000","message":"Yep\n\n    [base     |         all filter                ]\n    [base     |         allowed        |    excess]\n    [base     [    allowed_filter      ]\n\n    \u003callowed_filter\u003e \u003d \u003call_filter\u003e - \u003cexcess\u003e\n\nAnd something like that:\n\n    params \u003d []\n    current_len \u003d 0\n    all_filter \u003d sum([len(x) + len(y) + 2 for x, y in params.items()])\n    allowed_filter \u003d all_filter - uri_len_exc.excess\n    for filter in filters:\n        filter_len \u003d filter.key + filter.value + 2\n        if current_len + filter_len \u003e allowed_filter:\n            # flush current filter_args to server\n            data \u003d list_method(**params)\n            ....\n            current_len\n            params \u003d []\n        params.append(filter)\n        current_len +\u003d filter_len","commit_id":"d044bc90e9fe31a8305787862ed689ca341b9597"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"819910652d1cb3043d3624d0acf1a9ea2c8856d2","unresolved":false,"context_lines":[{"line_number":478,"context_line":"        # The length will be key_len + value_maxlen + 2"},{"line_number":479,"context_line":"        filter_len \u003d key_len + value_maxlen + 2"},{"line_number":480,"context_line":"        # Maximum filter lenght which can be specified"},{"line_number":481,"context_line":"        max_size \u003d filter_len * value_count - uri_len_exc.excess"},{"line_number":482,"context_line":"        chunk_size \u003d max_size / filter_len"},{"line_number":483,"context_line":"        resources \u003d []"},{"line_number":484,"context_line":"        for i in range(0, value_count, chunk_size):"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa81d914_34d05d53","line":481,"in_reply_to":"baada198_4f6fcafa","updated":"2015-01-28 00:11:47.000000000","message":"Calculating the length of all filters is not so easy as you expected.\n\"y\" above in your comment can be a list. In this case, elements of \"y\" needs to be concatenated with \"\u0026\". In addition, one extra logic to flush the pending params is also required.  I don\u0027t think it is much simpler than my implementation, but .I don\u0027t have a strong opinion. Based on your suggestion, the logic will be as follows, but  I wonder it is simple or not compared to calculating a chunk size.\nI would like to keep the current logic.\n\n        all_filter_len \u003d sum(len(filter_attr) + len(val) + 2\n                             for val in filter_values)\n        allowed_filter_len \u003d all_filter_len - uri_len_exc.excess\n\n        current_len \u003d 0\n        pending_values \u003d []\n        resources \u003d []\n        for val in filter_values:\n            filter_len \u003d len(filter_attr) + len(val) + 2\n            if current_len + filter_len \u003e allowed_filter_len:\n                params[filter_attr] \u003d pending_values\n                data \u003d list_method(request, **params)\n                resources.extend(data)\n                pending_values \u003d []\n                current_len \u003d 0\n            pending_values.append(val)\n            current_len +\u003d filter_len\n        if pending_values:\n            params[filter_attr] \u003d pending_values\n            data \u003d list_method(request, **params)\n            resources.extend(data)\n        return resources","commit_id":"d044bc90e9fe31a8305787862ed689ca341b9597"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"0a5f9e8393533227215b38f08cac6997f321ff98","unresolved":false,"context_lines":[{"line_number":478,"context_line":"        # The length will be key_len + value_maxlen + 2"},{"line_number":479,"context_line":"        filter_len \u003d key_len + value_maxlen + 2"},{"line_number":480,"context_line":"        # Maximum filter lenght which can be specified"},{"line_number":481,"context_line":"        max_size \u003d filter_len * value_count - uri_len_exc.excess"},{"line_number":482,"context_line":"        chunk_size \u003d max_size / filter_len"},{"line_number":483,"context_line":"        resources \u003d []"},{"line_number":484,"context_line":"        for i in range(0, value_count, chunk_size):"}],"source_content_type":"text/x-python","patch_set":1,"id":"baada198_2019d523","line":481,"in_reply_to":"baada198_f1b5f5ed","updated":"2014-08-04 04:58:05.000000000","message":"The limit on maximum length consists of a base path and additional parameters (e.g, filter parameters). Precisely speaking we cannot know a length of a basic path part. It is the reason I adopted the approach to calculate max size of filter part dynamically [1].\n\nFor semi-optimal method, we can assume the maximum length of the base path as e.g. 1000 and use the total URI size by referring neutronclient internal constant MAX_URI_LEN \u003d 8192.\nThis method depends on the backend implementation, but it must be more optimal.\n\nthought?\n\n\n[1]  The following is the formula to caluculate the max size of the filter part:\n \u003call_size\u003e \u003d \u003cbase path\u003e + \u003call filters\u003e\n \u003callowed_size\u003e \u003d \u003call_size\u003e - \u003cexcess_len\u003e\n \u003callowed_size\u003e \u003d \u003cbase path\u003e + \u003cpartial filter size\u003e\n\n \u003cpartial filter size\u003e \u003d \u003callowed_size\u003e - \u003cbase_path\u003e\n  \u003d (\u003cbase_path\u003e + \u003call filter\u003e - \u003cexcess_len\u003e) - \u003cbase_path\u003e\n  \u003d \u003call_filter\u003e - \u003cexcess_len\u003e","commit_id":"d044bc90e9fe31a8305787862ed689ca341b9597"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"2501b32586e070b386c1c8f53505441113c3c384","unresolved":false,"context_lines":[{"line_number":478,"context_line":"        # The length will be key_len + value_maxlen + 2"},{"line_number":479,"context_line":"        filter_len \u003d key_len + value_maxlen + 2"},{"line_number":480,"context_line":"        # Maximum filter lenght which can be specified"},{"line_number":481,"context_line":"        max_size \u003d filter_len * value_count - uri_len_exc.excess"},{"line_number":482,"context_line":"        chunk_size \u003d max_size / filter_len"},{"line_number":483,"context_line":"        resources \u003d []"},{"line_number":484,"context_line":"        for i in range(0, value_count, chunk_size):"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa81d914_4026e7bb","line":481,"in_reply_to":"fa81d914_34d05d53","updated":"2015-01-28 00:17:56.000000000","message":"The logic is minor changed, but I keep the existing logic.","commit_id":"d044bc90e9fe31a8305787862ed689ca341b9597"},{"author":{"_account_id":2455,"name":"Tihomir Trifonov","email":"t.trifonov@gmail.com","username":"ttrifonov"},"change_message_id":"e7ffd6d5566b3df366ad119a2d028d9ca747f45c","unresolved":false,"context_lines":[{"line_number":615,"context_line":""},{"line_number":616,"context_line":""},{"line_number":617,"context_line":"def port_list(request, **params):"},{"line_number":618,"context_line":"    LOG.warning(\"port_list(): params\u003d%s\" % (params))"},{"line_number":619,"context_line":"    ports \u003d neutronclient(request).list_ports(**params).get(\u0027ports\u0027)"},{"line_number":620,"context_line":"    return [Port(p) for p in ports]"},{"line_number":621,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"baada198_04fb0c49","line":618,"updated":"2014-07-29 15:16:11.000000000","message":"Why warning?","commit_id":"d044bc90e9fe31a8305787862ed689ca341b9597"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"0a5f9e8393533227215b38f08cac6997f321ff98","unresolved":false,"context_lines":[{"line_number":615,"context_line":""},{"line_number":616,"context_line":""},{"line_number":617,"context_line":"def port_list(request, **params):"},{"line_number":618,"context_line":"    LOG.warning(\"port_list(): params\u003d%s\" % (params))"},{"line_number":619,"context_line":"    ports \u003d neutronclient(request).list_ports(**params).get(\u0027ports\u0027)"},{"line_number":620,"context_line":"    return [Port(p) for p in ports]"},{"line_number":621,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"baada198_ea27be61","line":618,"in_reply_to":"baada198_04fb0c49","updated":"2014-08-04 04:58:05.000000000","message":"Woops..... It was used to output debug message without changing local settings.","commit_id":"d044bc90e9fe31a8305787862ed689ca341b9597"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"819910652d1cb3043d3624d0acf1a9ea2c8856d2","unresolved":false,"context_lines":[{"line_number":615,"context_line":""},{"line_number":616,"context_line":""},{"line_number":617,"context_line":"def port_list(request, **params):"},{"line_number":618,"context_line":"    LOG.warning(\"port_list(): params\u003d%s\" % (params))"},{"line_number":619,"context_line":"    ports \u003d neutronclient(request).list_ports(**params).get(\u0027ports\u0027)"},{"line_number":620,"context_line":"    return [Port(p) for p in ports]"},{"line_number":621,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"fa81d914_45d0b953","line":618,"in_reply_to":"baada198_ea27be61","updated":"2015-01-28 00:11:47.000000000","message":"Done","commit_id":"d044bc90e9fe31a8305787862ed689ca341b9597"},{"author":{"_account_id":14188,"name":"Alexander Bozhenko","email":"abozhenko@mirantis.com","username":"abozhenko"},"change_message_id":"15f1a6dd2a39756ccd137d15d05e7426a28162db","unresolved":false,"context_lines":[{"line_number":551,"context_line":"        # filter_values) and do not consider other filter conditions"},{"line_number":552,"context_line":"        # which may be specified in **params."},{"line_number":553,"context_line":"        if type(filter_values) !\u003d list:"},{"line_number":554,"context_line":"            filter_values \u003d [filter_values]"},{"line_number":555,"context_line":""},{"line_number":556,"context_line":"        # Length of each query filter is:"},{"line_number":557,"context_line":"        # \u003ckey\u003e\u003d\u003cvalue\u003e\u0026 (e.g., id\u003d\u003cuuid\u003e)"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa80f949_25cf882a","line":554,"updated":"2015-11-05 23:19:16.000000000","message":"Shouldn\u0027t it be filter_values \u003d list(filter_values) ?\n\nIn my case some instances with long list of ports attached are not displaying ip information in horizon because filter_values is set, and len(filter_values) is 1","commit_id":"6e1da2634412afdb21fd5a3f27c1da1d332680f7"},{"author":{"_account_id":2455,"name":"Tihomir Trifonov","email":"t.trifonov@gmail.com","username":"ttrifonov"},"change_message_id":"a704f3a0128ab0b2cba6dd44e0e5f845838a7074","unresolved":false,"context_lines":[{"line_number":562,"context_line":""},{"line_number":563,"context_line":"        val_maxlen \u003d max(len(val) for val in filter_values)"},{"line_number":564,"context_line":"        filter_maxlen \u003d len(filter_attr) + val_maxlen + 2"},{"line_number":565,"context_line":"        chunk_size \u003d allowed_filter_len / filter_maxlen"},{"line_number":566,"context_line":""},{"line_number":567,"context_line":"        resources \u003d []"},{"line_number":568,"context_line":"        for i in range(0, len(filter_values), chunk_size):"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa81d914_1b5176d8","line":565,"updated":"2015-01-29 10:39:15.000000000","message":"I am only concerned for the situation when we have filters like: \n\n    [id\u003d\u003cuuid 40 symbols\u003e\u0026bool1\u003d1\u0026bool2\u003d0\u0026bool3\u003d1]\n\n\nIn this case, the val_maxlen will be let\u0027s say the length of the first(longest) parameter (44), and each bool param will be sent as a separate request, although all of them could be sent at once, as they are short filters(7 symbols each). That\u0027s why I proposed to construct the URL until the limit is reached and flush it to the server. I am not familiar with the nature of the possible filters that Neutron can have, but if they can have serious differences in length, the algorithm with fixed val_maxlen can be quite inefficient.","commit_id":"6e1da2634412afdb21fd5a3f27c1da1d332680f7"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"a33adb6fd03022f0aeb04e1e62fe7a20ea9751ce","unresolved":false,"context_lines":[{"line_number":562,"context_line":""},{"line_number":563,"context_line":"        val_maxlen \u003d max(len(val) for val in filter_values)"},{"line_number":564,"context_line":"        filter_maxlen \u003d len(filter_attr) + val_maxlen + 2"},{"line_number":565,"context_line":"        chunk_size \u003d allowed_filter_len / filter_maxlen"},{"line_number":566,"context_line":""},{"line_number":567,"context_line":"        resources \u003d []"},{"line_number":568,"context_line":"        for i in range(0, len(filter_values), chunk_size):"}],"source_content_type":"text/x-python","patch_set":2,"id":"da86d52c_eb9ed753","line":565,"in_reply_to":"fa81d914_1b5176d8","updated":"2015-02-07 12:24:52.000000000","message":"Tihomir, thanks for the detail review.\n\nI think there is a misunderstanding on filters (it may come from my variable naming and if so I am really sorry for that).\n\nFirst, let me explain neutron listing operation, If neutron client listing operation take the following args,\n\n  list_network(id\u003d[id1, id2, ....], bool1\u003d1, bool2\u003d0, bool3\u003d1)\n\nneutron returns resources which satisfies all of the specified args.\nIf a value is a list, it works as OR. If network with ID \"id2\" has bool2\u003d1, the network is not returned.\n\nFrom the above description, if \"id\u003d[id1, id2, ....]\" is long, we can split \"id\u003d[id1, id2, ....]\" into subsets because a list works as OR condition. On the other hand, other parameters like boolX cannot be broken down because they works as AND condition with id with a list value.\n\nIn my implementation, in a case of\n\n  list_network(id\u003d[id1, id2, ....], bool1\u003d1, bool2\u003d0, bool3\u003d1)\n\neach parameter will be:\n\n- filter_attr \u003d\u003e \u0027id\u0027\n- filter_values \u003d\u003e [id1, id2, ....]\n- **params \u003d\u003e {\u0027bool1\u0027: 1, \u0027bool2\u0027: 0, \u0027bool3\u0027: 1}\n\nThus, val_maxlen will be the maximum length of elements of filter_values. The length of remaining parameters will be contained in the base length:\n\n  | base length | all filter length of \u0027id\u0027 (filter_attr) |\n  | base length | allowed length        |  excess length  |\n\nIn most cases, elements of filter values have similar length, so I don\u0027t think the algorithm of calculating val_maxlen is so inefficient.\nIf this assumption is not correct, the algorithm needs to be changed.\n\nOf course, we have another approach of the fallback: to retrieve all resources and filter them in Horizon side. I am not sure which is efficient.","commit_id":"6e1da2634412afdb21fd5a3f27c1da1d332680f7"}]}
