)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":16708,"name":"Kendall Nelson","display_name":"Kendall (diablo_rojo)","email":"kennelson11@gmail.com","username":"kjnelson"},"change_message_id":"684fdcb334cfc42261d08ba7a0af461f260da48f","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     PranaliD \u003cpdeore@redhat.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2016-04-15 04:20:51 -0400"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Add logging when filtering returns nothing."},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"When hosts are filtered for a request, and no host passes all the"},{"line_number":10,"context_line":"filters, operators can only see the last filter run; they have no"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"1a122d0e_74bc21bb","line":7,"range":{"start_line":7,"start_character":42,"end_line":7,"end_character":43},"updated":"2016-04-20 14:50:35.000000000","message":"Please remove the \".\" from the summary line. \n\nhttps://wiki.openstack.org/wiki/GitCommitMessages#Summary_of_Git_commit_message_structure","commit_id":"f9adb6c4704dd388555735332c6962a1a0bd23a6"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"0ce537eedf6043758761152e5a75dcde257397e0","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     PranaliD \u003cpdeore@redhat.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2016-04-15 04:20:51 -0400"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Add logging when filtering returns nothing."},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"When hosts are filtered for a request, and no host passes all the"},{"line_number":10,"context_line":"filters, operators can only see the last filter run; they have no"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"1a122d0e_dd432d6b","line":7,"range":{"start_line":7,"start_character":42,"end_line":7,"end_character":43},"in_reply_to":"1a122d0e_74bc21bb","updated":"2016-04-22 11:43:59.000000000","message":"Done","commit_id":"f9adb6c4704dd388555735332c6962a1a0bd23a6"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"eb47791923ee30dfeec5a1f6e1f3c41f135d23dd","unresolved":false,"context_lines":[{"line_number":17,"context_line":"will contain the last deleted host names,LOG.debug will output the"},{"line_number":18,"context_line":"full record of each filter and the hosts remaining after each step."},{"line_number":19,"context_line":"This will better enable operators to determine why a particular host"},{"line_number":20,"context_line":"was not selected."},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"Change-Id: I3baf75a4a4430c55b30dde1cae86fa5e195ec6d3"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"1a122d0e_c7ba290a","line":20,"updated":"2016-04-18 11:12:12.000000000","message":"nit: Readability of this commit message is low, please add new lines to separate paragraphs.","commit_id":"f9adb6c4704dd388555735332c6962a1a0bd23a6"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"0ce537eedf6043758761152e5a75dcde257397e0","unresolved":false,"context_lines":[{"line_number":17,"context_line":"will contain the last deleted host names,LOG.debug will output the"},{"line_number":18,"context_line":"full record of each filter and the hosts remaining after each step."},{"line_number":19,"context_line":"This will better enable operators to determine why a particular host"},{"line_number":20,"context_line":"was not selected."},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"Change-Id: I3baf75a4a4430c55b30dde1cae86fa5e195ec6d3"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"1a122d0e_5d58bd56","line":20,"in_reply_to":"1a122d0e_c7ba290a","updated":"2016-04-22 11:43:59.000000000","message":"Done","commit_id":"f9adb6c4704dd388555735332c6962a1a0bd23a6"},{"author":{"_account_id":9171,"name":"Vipin Balachandran","email":"vipin.bl@gmail.com","username":"vbala"},"change_message_id":"e6bd8d6d828838dd2cf3f05fa0caac13720b5bcd","unresolved":false,"context_lines":[{"line_number":10,"context_line":"filters, operators can only see the last filter run; they have no"},{"line_number":11,"context_line":"visibility into which filter removed which host. This attempts to"},{"line_number":12,"context_line":"improve this situation by tracking the hosts remaining after each"},{"line_number":13,"context_line":"filter is run and the number of hosts removed. If no host is left, to"},{"line_number":14,"context_line":"log that information along with volume ID of the request."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"Since that can be a lot of information, it will call LOG.info with"},{"line_number":17,"context_line":"just the counts for all but the final filter, which will contain"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":10,"id":"bab6814e_4b6b68b9","line":14,"range":{"start_line":13,"start_character":68,"end_line":14,"end_character":8},"updated":"2016-05-26 18:39:25.000000000","message":"this patch logs that","commit_id":"ab9c28738a072cebad28f278dab4f07d3f8d6b22"},{"author":{"_account_id":9171,"name":"Vipin Balachandran","email":"vipin.bl@gmail.com","username":"vbala"},"change_message_id":"e6bd8d6d828838dd2cf3f05fa0caac13720b5bcd","unresolved":false,"context_lines":[{"line_number":15,"context_line":""},{"line_number":16,"context_line":"Since that can be a lot of information, it will call LOG.info with"},{"line_number":17,"context_line":"just the counts for all but the final filter, which will contain"},{"line_number":18,"context_line":"the last deleted host names, LOG.debug will output the full record"},{"line_number":19,"context_line":"of each filter and the hosts remaining after each step."},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"This will better enable operators to determine why a particular host"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":10,"id":"bab6814e_abbe54ab","line":18,"range":{"start_line":18,"start_character":0,"end_line":18,"end_character":27},"updated":"2016-05-26 18:39:25.000000000","message":"Why the last deleted host name? Why it is special?","commit_id":"ab9c28738a072cebad28f278dab4f07d3f8d6b22"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"6fed026427d7e7fd3ba04b8d9c369cd2faad7d33","unresolved":false,"context_lines":[{"line_number":15,"context_line":""},{"line_number":16,"context_line":"Since that can be a lot of information, it will call LOG.info with"},{"line_number":17,"context_line":"just the counts for all but the final filter, which will contain"},{"line_number":18,"context_line":"the last deleted host names, LOG.debug will output the full record"},{"line_number":19,"context_line":"of each filter and the hosts remaining after each step."},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"This will better enable operators to determine why a particular host"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":10,"id":"9abb7d3a_18d164ce","line":18,"range":{"start_line":18,"start_character":0,"end_line":18,"end_character":27},"in_reply_to":"bab6814e_abbe54ab","updated":"2016-05-27 09:37:08.000000000","message":"Because it\u0027s the one that filtered out remaining hosts leaving none.","commit_id":"ab9c28738a072cebad28f278dab4f07d3f8d6b22"}],"cinder/scheduler/base_filter.py":[{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"eb47791923ee30dfeec5a1f6e1f3c41f135d23dd","unresolved":false,"context_lines":[{"line_number":78,"context_line":"        list_objs \u003d list(objs)"},{"line_number":79,"context_line":"        LOG.debug(\"Starting with %d host(s)\", len(list_objs))"},{"line_number":80,"context_line":"        # filter, while the \u0027part_filter_results\u0027 list just tracks the number"},{"line_number":81,"context_line":"        # removed by each filter, unless the filter returns zero hosts, in"},{"line_number":82,"context_line":"        # which case it records the host/nodename for the last batch that was"},{"line_number":83,"context_line":"        # removed. Since the full_filter_results can be very large, it is only"},{"line_number":84,"context_line":"        # recorded if the LOG level is set to debug."}],"source_content_type":"text/x-python","patch_set":2,"id":"1a122d0e_c416a7f0","line":81,"updated":"2016-04-18 11:12:12.000000000","message":"?: this doesn\u0027t look to match code behavior, as it looks like stored data in part_filter_results is always the same, and it\u0027s not the number removed by each filter, but the number of candidates before and after the filter.","commit_id":"f9adb6c4704dd388555735332c6962a1a0bd23a6"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"0ce537eedf6043758761152e5a75dcde257397e0","unresolved":false,"context_lines":[{"line_number":78,"context_line":"        list_objs \u003d list(objs)"},{"line_number":79,"context_line":"        LOG.debug(\"Starting with %d host(s)\", len(list_objs))"},{"line_number":80,"context_line":"        # filter, while the \u0027part_filter_results\u0027 list just tracks the number"},{"line_number":81,"context_line":"        # removed by each filter, unless the filter returns zero hosts, in"},{"line_number":82,"context_line":"        # which case it records the host/nodename for the last batch that was"},{"line_number":83,"context_line":"        # removed. Since the full_filter_results can be very large, it is only"},{"line_number":84,"context_line":"        # recorded if the LOG level is set to debug."}],"source_content_type":"text/x-python","patch_set":2,"id":"1a122d0e_fd21c9b5","line":81,"in_reply_to":"1a122d0e_c416a7f0","updated":"2016-04-22 11:43:59.000000000","message":"Done","commit_id":"f9adb6c4704dd388555735332c6962a1a0bd23a6"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"eb47791923ee30dfeec5a1f6e1f3c41f135d23dd","unresolved":false,"context_lines":[{"line_number":84,"context_line":"        # recorded if the LOG level is set to debug."},{"line_number":85,"context_line":"        part_filter_results \u003d []"},{"line_number":86,"context_line":"        full_filter_results \u003d []"},{"line_number":87,"context_line":"        log_msg \u003d \"%(cls_name)s: (start: %(start)s, end: %(end)s)\""},{"line_number":88,"context_line":"        for filter_cls in filter_classes:"},{"line_number":89,"context_line":"            cls_name \u003d filter_cls.__name__"},{"line_number":90,"context_line":"            start_count \u003d len(list_objs)"}],"source_content_type":"text/x-python","patch_set":2,"id":"1a122d0e_a469ebc0","line":87,"updated":"2016-04-18 11:12:12.000000000","message":"-1: This is going to be logged as an info level log message, it should be `_LI(\"...\")`","commit_id":"f9adb6c4704dd388555735332c6962a1a0bd23a6"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"0ce537eedf6043758761152e5a75dcde257397e0","unresolved":false,"context_lines":[{"line_number":84,"context_line":"        # recorded if the LOG level is set to debug."},{"line_number":85,"context_line":"        part_filter_results \u003d []"},{"line_number":86,"context_line":"        full_filter_results \u003d []"},{"line_number":87,"context_line":"        log_msg \u003d \"%(cls_name)s: (start: %(start)s, end: %(end)s)\""},{"line_number":88,"context_line":"        for filter_cls in filter_classes:"},{"line_number":89,"context_line":"            cls_name \u003d filter_cls.__name__"},{"line_number":90,"context_line":"            start_count \u003d len(list_objs)"}],"source_content_type":"text/x-python","patch_set":2,"id":"1a122d0e_3d2ce1aa","line":87,"in_reply_to":"1a122d0e_a469ebc0","updated":"2016-04-22 11:43:59.000000000","message":"Done","commit_id":"f9adb6c4704dd388555735332c6962a1a0bd23a6"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"eb47791923ee30dfeec5a1f6e1f3c41f135d23dd","unresolved":false,"context_lines":[{"line_number":98,"context_line":"                    return"},{"line_number":99,"context_line":"                list_objs \u003d list(objs)"},{"line_number":100,"context_line":"                end_count \u003d len(list_objs)"},{"line_number":101,"context_line":"                part_filter_results.append(log_msg % {\"cls_name\": cls_name,"},{"line_number":102,"context_line":"                                                      \"start\": start_count,"},{"line_number":103,"context_line":"                                                      \"end\": end_count})"},{"line_number":104,"context_line":"                if list_objs:"}],"source_content_type":"text/x-python","patch_set":2,"id":"1a122d0e_64e873b5","line":101,"updated":"2016-04-18 11:12:12.000000000","message":"nit: Since most common case is the one where we don\u0027t fail we should optimize this for that case, so instead of just doing the formatting here we could just store the data as a tuple and do the string formatting inside the `if not list_objs` condition.  That way we don\u0027t spend time formatting the strings for successful cases.","commit_id":"f9adb6c4704dd388555735332c6962a1a0bd23a6"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"0ce537eedf6043758761152e5a75dcde257397e0","unresolved":false,"context_lines":[{"line_number":98,"context_line":"                    return"},{"line_number":99,"context_line":"                list_objs \u003d list(objs)"},{"line_number":100,"context_line":"                end_count \u003d len(list_objs)"},{"line_number":101,"context_line":"                part_filter_results.append(log_msg % {\"cls_name\": cls_name,"},{"line_number":102,"context_line":"                                                      \"start\": start_count,"},{"line_number":103,"context_line":"                                                      \"end\": end_count})"},{"line_number":104,"context_line":"                if list_objs:"}],"source_content_type":"text/x-python","patch_set":2,"id":"1a122d0e_5d2f1da1","line":101,"in_reply_to":"1a122d0e_64e873b5","updated":"2016-04-22 11:43:59.000000000","message":"Done","commit_id":"f9adb6c4704dd388555735332c6962a1a0bd23a6"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"eb47791923ee30dfeec5a1f6e1f3c41f135d23dd","unresolved":false,"context_lines":[{"line_number":115,"context_line":"                          {\u0027cls_name\u0027: cls_name, \u0027obj_len\u0027: len(list_objs)})"},{"line_number":116,"context_line":"        if not list_objs:"},{"line_number":117,"context_line":"            # Log the filtration history"},{"line_number":118,"context_line":"            rspec \u003d filter_properties.get(\"request_spec\")"},{"line_number":119,"context_line":"            msg_dict \u003d {\"vol_id\": rspec.get(\"volume_id\", \"\"),"},{"line_number":120,"context_line":"                        \"str_results\": str(full_filter_results),"},{"line_number":121,"context_line":"                        }"}],"source_content_type":"text/x-python","patch_set":2,"id":"1a122d0e_24ef9b88","line":118,"updated":"2016-04-18 11:12:12.000000000","message":"-1: If filter_properties may not have \"request_spec\" entry as indicated by the use of the get method instead of using [\"request_spec\"] then default value should be an empty dictionary, otherwise we\u0027ll fail on next line with error \"NoneType as no method called get\" when we try to do rspec.get since rspec will be None.","commit_id":"f9adb6c4704dd388555735332c6962a1a0bd23a6"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"0ce537eedf6043758761152e5a75dcde257397e0","unresolved":false,"context_lines":[{"line_number":115,"context_line":"                          {\u0027cls_name\u0027: cls_name, \u0027obj_len\u0027: len(list_objs)})"},{"line_number":116,"context_line":"        if not list_objs:"},{"line_number":117,"context_line":"            # Log the filtration history"},{"line_number":118,"context_line":"            rspec \u003d filter_properties.get(\"request_spec\")"},{"line_number":119,"context_line":"            msg_dict \u003d {\"vol_id\": rspec.get(\"volume_id\", \"\"),"},{"line_number":120,"context_line":"                        \"str_results\": str(full_filter_results),"},{"line_number":121,"context_line":"                        }"}],"source_content_type":"text/x-python","patch_set":2,"id":"1a122d0e_fd08a92f","line":118,"in_reply_to":"1a122d0e_24ef9b88","updated":"2016-04-22 11:43:59.000000000","message":"Done","commit_id":"f9adb6c4704dd388555735332c6962a1a0bd23a6"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"eb47791923ee30dfeec5a1f6e1f3c41f135d23dd","unresolved":false,"context_lines":[{"line_number":117,"context_line":"            # Log the filtration history"},{"line_number":118,"context_line":"            rspec \u003d filter_properties.get(\"request_spec\")"},{"line_number":119,"context_line":"            msg_dict \u003d {\"vol_id\": rspec.get(\"volume_id\", \"\"),"},{"line_number":120,"context_line":"                        \"str_results\": str(full_filter_results),"},{"line_number":121,"context_line":"                        }"},{"line_number":122,"context_line":"            full_msg \u003d (\"Filtering removed all hosts for the request with \""},{"line_number":123,"context_line":"                        \"volume ID \""}],"source_content_type":"text/x-python","patch_set":2,"id":"1a122d0e_e49483e3","line":120,"updated":"2016-04-18 11:12:12.000000000","message":"-1: Use `six.text_type` instead of `str`","commit_id":"f9adb6c4704dd388555735332c6962a1a0bd23a6"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"0ce537eedf6043758761152e5a75dcde257397e0","unresolved":false,"context_lines":[{"line_number":117,"context_line":"            # Log the filtration history"},{"line_number":118,"context_line":"            rspec \u003d filter_properties.get(\"request_spec\")"},{"line_number":119,"context_line":"            msg_dict \u003d {\"vol_id\": rspec.get(\"volume_id\", \"\"),"},{"line_number":120,"context_line":"                        \"str_results\": str(full_filter_results),"},{"line_number":121,"context_line":"                        }"},{"line_number":122,"context_line":"            full_msg \u003d (\"Filtering removed all hosts for the request with \""},{"line_number":123,"context_line":"                        \"volume ID \""}],"source_content_type":"text/x-python","patch_set":2,"id":"1a122d0e_3d034111","line":120,"in_reply_to":"1a122d0e_e49483e3","updated":"2016-04-22 11:43:59.000000000","message":"Done","commit_id":"f9adb6c4704dd388555735332c6962a1a0bd23a6"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"eb47791923ee30dfeec5a1f6e1f3c41f135d23dd","unresolved":false,"context_lines":[{"line_number":123,"context_line":"                        \"volume ID \""},{"line_number":124,"context_line":"                        \"\u0027%(vol_id)s\u0027. Filter results: %(str_results)s\""},{"line_number":125,"context_line":"                        ) % msg_dict"},{"line_number":126,"context_line":"            msg_dict[\"str_results\"] \u003d str(part_filter_results)"},{"line_number":127,"context_line":"            part_msg \u003d _LI(\"Filtering removed all hosts for the request with \""},{"line_number":128,"context_line":"                           \"volume ID \""},{"line_number":129,"context_line":"                           \"\u0027%(vol_id)s\u0027. Filter results: %(str_results)s\""}],"source_content_type":"text/x-python","patch_set":2,"id":"1a122d0e_8485cfae","line":126,"updated":"2016-04-18 11:12:12.000000000","message":"-1: Use `six.text_type` instead of `str`","commit_id":"f9adb6c4704dd388555735332c6962a1a0bd23a6"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"ba17588512618ea513cafdcec213e434a0a34188","unresolved":false,"context_lines":[{"line_number":16,"context_line":"\"\"\""},{"line_number":17,"context_line":"Filter support"},{"line_number":18,"context_line":"\"\"\""},{"line_number":19,"context_line":"import six"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"from oslo_log import log as logging"},{"line_number":22,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"1a122d0e_4fbb83c4","line":19,"updated":"2016-05-05 08:36:08.000000000","message":"-1: This should go after L21 and in that same grouping","commit_id":"2e5b7c24e3beb38e3466cb95c97811f5bffad2ee"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"ba17588512618ea513cafdcec213e434a0a34188","unresolved":false,"context_lines":[{"line_number":114,"context_line":"                          {\u0027cls_name\u0027: cls_name, \u0027obj_len\u0027: len(list_objs)})"},{"line_number":115,"context_line":"        if not list_objs:"},{"line_number":116,"context_line":"            # Log the filtration history"},{"line_number":117,"context_line":"            rspec \u003d filter_properties.get(\"request_spec\", \"\")"},{"line_number":118,"context_line":"            msg_dict \u003d {\"vol_id\": rspec.get(\"volume_id\", \"\"),"},{"line_number":119,"context_line":"                        \"str_results\": six.text_type(full_filter_results),"},{"line_number":120,"context_line":"                        }"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a122d0e_cf6f9390","line":117,"range":{"start_line":117,"start_character":58,"end_line":117,"end_character":60},"updated":"2016-05-05 08:36:08.000000000","message":"-1: It should be an empty dictionary {} and not an empty string \"\".","commit_id":"2e5b7c24e3beb38e3466cb95c97811f5bffad2ee"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"ba17588512618ea513cafdcec213e434a0a34188","unresolved":false,"context_lines":[{"line_number":123,"context_line":"                        \"\u0027%(vol_id)s\u0027. Filter results: %(str_results)s\""},{"line_number":124,"context_line":"                        ) % msg_dict"},{"line_number":125,"context_line":""},{"line_number":126,"context_line":"            msg_dict[\"str_results\"] \u003d []"},{"line_number":127,"context_line":"            for value in part_filter_results:"},{"line_number":128,"context_line":"                msg_dict[\"str_results\"].append("},{"line_number":129,"context_line":"                    (\"%(cls_name)s: (start: %(start)s, end: %(end)s)\") %"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a122d0e_2f73a74f","line":126,"updated":"2016-05-05 08:36:08.000000000","message":"nit: We could construct str_results value using list comprehension instead.","commit_id":"2e5b7c24e3beb38e3466cb95c97811f5bffad2ee"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"ba17588512618ea513cafdcec213e434a0a34188","unresolved":false,"context_lines":[{"line_number":126,"context_line":"            msg_dict[\"str_results\"] \u003d []"},{"line_number":127,"context_line":"            for value in part_filter_results:"},{"line_number":128,"context_line":"                msg_dict[\"str_results\"].append("},{"line_number":129,"context_line":"                    (\"%(cls_name)s: (start: %(start)s, end: %(end)s)\") %"},{"line_number":130,"context_line":"                    {\"cls_name\": value[0], \"start\": value[1], \"end\": value[2]})"},{"line_number":131,"context_line":"            part_msg \u003d _LI(\"Filtering removed all hosts for the request with \""},{"line_number":132,"context_line":"                           \"volume ID \""}],"source_content_type":"text/x-python","patch_set":3,"id":"1a122d0e_cf92f356","line":129,"updated":"2016-05-05 08:36:08.000000000","message":"-1: This needs to be enclosed in _LI","commit_id":"2e5b7c24e3beb38e3466cb95c97811f5bffad2ee"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"7593c18868e8aaf80c8db31e36d9e46af2bf0222","unresolved":false,"context_lines":[{"line_number":101,"context_line":"                part_filter_results.append((cls_name, start_count, end_count))"},{"line_number":102,"context_line":"                if list_objs:"},{"line_number":103,"context_line":"                    remaining \u003d [(getattr(obj, \"host\", obj),"},{"line_number":104,"context_line":"                                  getattr(obj, \"nodename\", \"\"))"},{"line_number":105,"context_line":"                                 for obj in list_objs]"},{"line_number":106,"context_line":"                    full_filter_results.append((cls_name, remaining))"},{"line_number":107,"context_line":"                else:"}],"source_content_type":"text/x-python","patch_set":5,"id":"dab17558_36786b2b","line":104,"updated":"2016-05-09 11:15:17.000000000","message":"-1: nodename is not a valid attribute, it will never exist and we\u0027ll always get default \"\" value.  A better alternative would be to use \"volume_backend_name\".","commit_id":"35a9038efd8fb926272687266eb1d0d30e941645"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"3709f7a6efa4525c07923595a31d3d5512868623","unresolved":false,"context_lines":[{"line_number":101,"context_line":"                part_filter_results.append((cls_name, start_count, end_count))"},{"line_number":102,"context_line":"                if list_objs:"},{"line_number":103,"context_line":"                    remaining \u003d [(getattr(obj, \"host\", obj),"},{"line_number":104,"context_line":"                                  getattr(obj, \"nodename\", \"\"))"},{"line_number":105,"context_line":"                                 for obj in list_objs]"},{"line_number":106,"context_line":"                    full_filter_results.append((cls_name, remaining))"},{"line_number":107,"context_line":"                else:"}],"source_content_type":"text/x-python","patch_set":5,"id":"dab17558_ae284087","line":104,"in_reply_to":"dab17558_36786b2b","updated":"2016-05-10 12:51:49.000000000","message":"Done","commit_id":"35a9038efd8fb926272687266eb1d0d30e941645"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"7593c18868e8aaf80c8db31e36d9e46af2bf0222","unresolved":false,"context_lines":[{"line_number":121,"context_line":"                        \"volume ID \""},{"line_number":122,"context_line":"                        \"\u0027%(vol_id)s\u0027. Filter results: %(str_results)s\""},{"line_number":123,"context_line":"                        ) % msg_dict"},{"line_number":124,"context_line":"            msg_dict[\"str_results\"] \u003d \\"},{"line_number":125,"context_line":"                    [\"%(cls_name)s: (start: %(start)s, end: %(end)s)\" % {"},{"line_number":126,"context_line":"                        \"cls_name\": value[0], \"start\": value[1],"},{"line_number":127,"context_line":"                        \"end\": value[2]} for value in part_filter_results]"}],"source_content_type":"text/x-python","patch_set":5,"id":"dab17558_2345cb6f","line":124,"updated":"2016-05-09 11:15:17.000000000","message":"nit: Style guidelines [1] indicate that \"It is preferred to wrap long lines in parentheses and not a backslash for line continuation.\"  So you could just place the opening [ on L124 and that way you don\u0027t need the \\ or a (.\n\n[1]: http://docs.openstack.org/developer/hacking/","commit_id":"35a9038efd8fb926272687266eb1d0d30e941645"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"3709f7a6efa4525c07923595a31d3d5512868623","unresolved":false,"context_lines":[{"line_number":121,"context_line":"                        \"volume ID \""},{"line_number":122,"context_line":"                        \"\u0027%(vol_id)s\u0027. Filter results: %(str_results)s\""},{"line_number":123,"context_line":"                        ) % msg_dict"},{"line_number":124,"context_line":"            msg_dict[\"str_results\"] \u003d \\"},{"line_number":125,"context_line":"                    [\"%(cls_name)s: (start: %(start)s, end: %(end)s)\" % {"},{"line_number":126,"context_line":"                        \"cls_name\": value[0], \"start\": value[1],"},{"line_number":127,"context_line":"                        \"end\": value[2]} for value in part_filter_results]"}],"source_content_type":"text/x-python","patch_set":5,"id":"dab17558_ce5ae429","line":124,"in_reply_to":"dab17558_2345cb6f","updated":"2016-05-10 12:51:49.000000000","message":"Done","commit_id":"35a9038efd8fb926272687266eb1d0d30e941645"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"7593c18868e8aaf80c8db31e36d9e46af2bf0222","unresolved":false,"context_lines":[{"line_number":122,"context_line":"                        \"\u0027%(vol_id)s\u0027. Filter results: %(str_results)s\""},{"line_number":123,"context_line":"                        ) % msg_dict"},{"line_number":124,"context_line":"            msg_dict[\"str_results\"] \u003d \\"},{"line_number":125,"context_line":"                    [\"%(cls_name)s: (start: %(start)s, end: %(end)s)\" % {"},{"line_number":126,"context_line":"                        \"cls_name\": value[0], \"start\": value[1],"},{"line_number":127,"context_line":"                        \"end\": value[2]} for value in part_filter_results]"},{"line_number":128,"context_line":"            part_msg \u003d _LI(\"Filtering removed all hosts for the request with \""}],"source_content_type":"text/x-python","patch_set":5,"id":"dab17558_e318e386","line":125,"updated":"2016-05-09 11:15:17.000000000","message":"-1: Missing _LI\n\n [_LI(\"%(cls_name)s: (start: %(start)s, end: %(end)s)\") % {","commit_id":"35a9038efd8fb926272687266eb1d0d30e941645"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"3709f7a6efa4525c07923595a31d3d5512868623","unresolved":false,"context_lines":[{"line_number":122,"context_line":"                        \"\u0027%(vol_id)s\u0027. Filter results: %(str_results)s\""},{"line_number":123,"context_line":"                        ) % msg_dict"},{"line_number":124,"context_line":"            msg_dict[\"str_results\"] \u003d \\"},{"line_number":125,"context_line":"                    [\"%(cls_name)s: (start: %(start)s, end: %(end)s)\" % {"},{"line_number":126,"context_line":"                        \"cls_name\": value[0], \"start\": value[1],"},{"line_number":127,"context_line":"                        \"end\": value[2]} for value in part_filter_results]"},{"line_number":128,"context_line":"            part_msg \u003d _LI(\"Filtering removed all hosts for the request with \""}],"source_content_type":"text/x-python","patch_set":5,"id":"dab17558_ce7144aa","line":125,"in_reply_to":"dab17558_e318e386","updated":"2016-05-10 12:51:49.000000000","message":"Done","commit_id":"35a9038efd8fb926272687266eb1d0d30e941645"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"3a471e04ab564cc738a1ace6d900b539da56c199","unresolved":false,"context_lines":[{"line_number":99,"context_line":"                list_objs \u003d list(objs)"},{"line_number":100,"context_line":"                end_count \u003d len(list_objs)"},{"line_number":101,"context_line":"                part_filter_results.append((cls_name, start_count, end_count))"},{"line_number":102,"context_line":"                if list_objs:"},{"line_number":103,"context_line":"                    remaining \u003d [(getattr(obj, \"host\", obj),"},{"line_number":104,"context_line":"                                  getattr(obj, \"volume_backend_name\", \"\"))"},{"line_number":105,"context_line":"                                 for obj in list_objs]"}],"source_content_type":"text/x-python","patch_set":6,"id":"dab17558_31b2f54c","line":102,"updated":"2016-05-10 13:13:13.000000000","message":"-1: We don\u0027t need to check list_objs, because we will only reach here if we have elements (otherwise L95 would be true).","commit_id":"009e96a0550ef6419d5ab8ef475c614d7ee56d7c"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"3a471e04ab564cc738a1ace6d900b539da56c199","unresolved":false,"context_lines":[{"line_number":105,"context_line":"                                 for obj in list_objs]"},{"line_number":106,"context_line":"                    full_filter_results.append((cls_name, remaining))"},{"line_number":107,"context_line":"                else:"},{"line_number":108,"context_line":"                    LOG.info(_LI(\"Filter %s returned 0 hosts\"), cls_name)"},{"line_number":109,"context_line":"                    full_filter_results.append((cls_name, None))"},{"line_number":110,"context_line":"                    break"},{"line_number":111,"context_line":"                LOG.debug(\"Filter %(cls_name)s returned \""}],"source_content_type":"text/x-python","patch_set":6,"id":"dab17558_8e38dcf0","line":108,"updated":"2016-05-10 13:13:13.000000000","message":"-1: This needs to go instead of L96-98 and needs one additional line:\n\n list_objs \u003d None","commit_id":"009e96a0550ef6419d5ab8ef475c614d7ee56d7c"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"f304859cf39cf10f5399468ee68cf9fd61f13369","unresolved":false,"context_lines":[{"line_number":93,"context_line":"            if filter_class.run_filter_for_index(index):"},{"line_number":94,"context_line":"                objs \u003d filter_class.filter_all(list_objs, filter_properties)"},{"line_number":95,"context_line":"                if objs is None:"},{"line_number":96,"context_line":"                    LOG.debug(\"Filter %(cls_name)s says to stop filtering\","},{"line_number":97,"context_line":"                              {\u0027cls_name\u0027: cls_name})"},{"line_number":98,"context_line":"                    LOG.info(_LI(\"Filter %s returned 0 hosts\"), cls_name)"},{"line_number":99,"context_line":"                    full_filter_results.append((cls_name, None))"}],"source_content_type":"text/x-python","patch_set":7,"id":"dab17558_9a48acce","line":96,"updated":"2016-05-13 11:26:55.000000000","message":"nit: I think this debug level message can now be removed.","commit_id":"ee3ca3a8af198c7411e67d8a41b05868226a7685"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"f304859cf39cf10f5399468ee68cf9fd61f13369","unresolved":false,"context_lines":[{"line_number":121,"context_line":"                        \"volume ID \""},{"line_number":122,"context_line":"                        \"\u0027%(vol_id)s\u0027. Filter results: %(str_results)s\""},{"line_number":123,"context_line":"                        ) % msg_dict"},{"line_number":124,"context_line":"            msg_dict[\"str_results\"] \u003d ["},{"line_number":125,"context_line":"                _LI(\"%(cls_name)s: (start: %(start)s, end: %(end)s)\") % {"},{"line_number":126,"context_line":"                    \"cls_name\": value[0], \"start\": value[1],"},{"line_number":127,"context_line":"                    \"end\": value[2]} for value in part_filter_results]"},{"line_number":128,"context_line":"            part_msg \u003d _LI(\"Filtering removed all hosts for the request with \""},{"line_number":129,"context_line":"                           \"volume ID \""},{"line_number":130,"context_line":"                           \"\u0027%(vol_id)s\u0027. Filter results: %(str_results)s\""}],"source_content_type":"text/x-python","patch_set":7,"id":"dab17558_aba52048","line":127,"range":{"start_line":124,"start_character":0,"end_line":127,"end_character":70},"updated":"2016-05-13 11:26:55.000000000","message":"nit: If we change this to:\n\n msg_dict[\"str_results\"] \u003d \u0027, \u0027.join(                         \n     _LI(\"%(cls_name)s: (start: %(start)s, end: %(end)s)\") % {\n         \"cls_name\": value[0], \"start\": value[1],             \n         \"end\": value[2]} for value in part_filter_results)   \n\nWe will get the same result in Python 2 and 3 because we don\u0027t rely on string formatting for lists but do it ourselves (output will be slightly different but in a good way).","commit_id":"ee3ca3a8af198c7411e67d8a41b05868226a7685"},{"author":{"_account_id":9171,"name":"Vipin Balachandran","email":"vipin.bl@gmail.com","username":"vbala"},"change_message_id":"e6bd8d6d828838dd2cf3f05fa0caac13720b5bcd","unresolved":false,"context_lines":[{"line_number":78,"context_line":"        \"\"\""},{"line_number":79,"context_line":"        list_objs \u003d list(objs)"},{"line_number":80,"context_line":"        LOG.debug(\"Starting with %d host(s)\", len(list_objs))"},{"line_number":81,"context_line":"        # filter, while the \u0027part_filter_results\u0027 list just tracks the number"},{"line_number":82,"context_line":"        # of hosts before and after the filter, unless the filter returns zero"},{"line_number":83,"context_line":"        # hosts, in which case it records the host/nodename for the last batch"},{"line_number":84,"context_line":"        # that was removed. Since the full_filter_results can be very large,"}],"source_content_type":"text/x-python","patch_set":10,"id":"bab6814e_ebbfbccd","line":81,"range":{"start_line":81,"start_character":10,"end_line":81,"end_character":23},"updated":"2016-05-26 18:39:25.000000000","message":"Is this a typo?","commit_id":"ab9c28738a072cebad28f278dab4f07d3f8d6b22"},{"author":{"_account_id":9171,"name":"Vipin Balachandran","email":"vipin.bl@gmail.com","username":"vbala"},"change_message_id":"e6bd8d6d828838dd2cf3f05fa0caac13720b5bcd","unresolved":false,"context_lines":[{"line_number":82,"context_line":"        # of hosts before and after the filter, unless the filter returns zero"},{"line_number":83,"context_line":"        # hosts, in which case it records the host/nodename for the last batch"},{"line_number":84,"context_line":"        # that was removed. Since the full_filter_results can be very large,"},{"line_number":85,"context_line":"        # it is only recorded if the LOG level is set to debug."},{"line_number":86,"context_line":"        part_filter_results \u003d []"},{"line_number":87,"context_line":"        full_filter_results \u003d []"},{"line_number":88,"context_line":"        for filter_cls in filter_classes:"}],"source_content_type":"text/x-python","patch_set":10,"id":"bab6814e_abec94bb","line":85,"range":{"start_line":85,"start_character":9,"end_line":85,"end_character":29},"updated":"2016-05-26 18:39:25.000000000","message":"We always save/record it, but it is printed only if debug is enabled.","commit_id":"ab9c28738a072cebad28f278dab4f07d3f8d6b22"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"6fed026427d7e7fd3ba04b8d9c369cd2faad7d33","unresolved":false,"context_lines":[{"line_number":82,"context_line":"        # of hosts before and after the filter, unless the filter returns zero"},{"line_number":83,"context_line":"        # hosts, in which case it records the host/nodename for the last batch"},{"line_number":84,"context_line":"        # that was removed. Since the full_filter_results can be very large,"},{"line_number":85,"context_line":"        # it is only recorded if the LOG level is set to debug."},{"line_number":86,"context_line":"        part_filter_results \u003d []"},{"line_number":87,"context_line":"        full_filter_results \u003d []"},{"line_number":88,"context_line":"        for filter_cls in filter_classes:"}],"source_content_type":"text/x-python","patch_set":10,"id":"9abb7d3a_18b6848a","line":85,"range":{"start_line":85,"start_character":9,"end_line":85,"end_character":29},"in_reply_to":"bab6814e_abec94bb","updated":"2016-05-27 09:37:08.000000000","message":"It is only recorded/logged on debug level.  Since it is using the recorded word and not saved the verb would be correct.","commit_id":"ab9c28738a072cebad28f278dab4f07d3f8d6b22"},{"author":{"_account_id":9171,"name":"Vipin Balachandran","email":"vipin.bl@gmail.com","username":"vbala"},"change_message_id":"e6bd8d6d828838dd2cf3f05fa0caac13720b5bcd","unresolved":false,"context_lines":[{"line_number":93,"context_line":"            if filter_class.run_filter_for_index(index):"},{"line_number":94,"context_line":"                objs \u003d filter_class.filter_all(list_objs, filter_properties)"},{"line_number":95,"context_line":"                if objs is None:"},{"line_number":96,"context_line":"                    LOG.info(_LI(\"Filter %s returned 0 hosts\"), cls_name)"},{"line_number":97,"context_line":"                    full_filter_results.append((cls_name, None))"},{"line_number":98,"context_line":"                    list_objs \u003d None"},{"line_number":99,"context_line":"                    break"}],"source_content_type":"text/x-python","patch_set":10,"id":"bab6814e_8bfa70bb","line":96,"updated":"2016-05-26 18:39:25.000000000","message":"I\u0027m not sure info is appropriate here.\n\n\"Messages at INFO should be a unit of work\"\nhttps://wiki.openstack.org/wiki/LoggingStandards#INFO_log_level_is_for_Operators","commit_id":"ab9c28738a072cebad28f278dab4f07d3f8d6b22"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"6fed026427d7e7fd3ba04b8d9c369cd2faad7d33","unresolved":false,"context_lines":[{"line_number":93,"context_line":"            if filter_class.run_filter_for_index(index):"},{"line_number":94,"context_line":"                objs \u003d filter_class.filter_all(list_objs, filter_properties)"},{"line_number":95,"context_line":"                if objs is None:"},{"line_number":96,"context_line":"                    LOG.info(_LI(\"Filter %s returned 0 hosts\"), cls_name)"},{"line_number":97,"context_line":"                    full_filter_results.append((cls_name, None))"},{"line_number":98,"context_line":"                    list_objs \u003d None"},{"line_number":99,"context_line":"                    break"}],"source_content_type":"text/x-python","patch_set":10,"id":"9abb7d3a_3809c832","line":96,"in_reply_to":"bab6814e_8bfa70bb","updated":"2016-05-27 09:37:08.000000000","message":"I disagree, this is INFO level message, and I\u0027m not the only one that thinks so, as Nova logs this message as INFO level as well.","commit_id":"ab9c28738a072cebad28f278dab4f07d3f8d6b22"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"f9278558884bd930aa10a8c29d7453c2121d4c53","unresolved":false,"context_lines":[{"line_number":101,"context_line":"                list_objs \u003d list(objs)"},{"line_number":102,"context_line":"                end_count \u003d len(list_objs)"},{"line_number":103,"context_line":"                part_filter_results.append((cls_name, start_count, end_count))"},{"line_number":104,"context_line":"                remaining \u003d [(getattr(obj, \"host\", obj),"},{"line_number":105,"context_line":"                              getattr(obj, \"volume_backend_name\", \"\"))"},{"line_number":106,"context_line":"                             for obj in list_objs]"},{"line_number":107,"context_line":"                full_filter_results.append((cls_name, remaining))"},{"line_number":108,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"7aa08908_24871862","line":105,"range":{"start_line":104,"start_character":0,"end_line":105,"end_character":70},"updated":"2016-06-14 12:10:29.000000000","message":"Putting both hostname and backend name here isn\u0027t too helpful in case of multibackend nodes. I wonder if it\u0027s actually worth it to put backend names here? Why not stick to having only host here?\n\n Filtering removed all hosts for the request with volume ID \u0027157d55e2-5c51-4bf8-ab82-4fd6b54837e4\u0027. Filter results: [(\u0027AvailabilityZoneFilter\u0027, [(u\u0027vagrant-ubuntu-trusty-64-cn.localdomain@lvmdriver-2#lvmdriver-2\u0027, u\u0027lvmdriver-2\u0027), (u\u0027vagrant-ubuntu-trusty-64-cn.localdomain@lvmdriver-1#lvmdriver-1\u0027, u\u0027lvmdriver-1\u0027), (u\u0027vagrant-ubuntu-trusty-64.localdomain@lvmdriver-1#lvmdriver-1\u0027, u\u0027lvmdriver-1\u0027), (u\u0027vagrant-ubuntu-trusty-64.localdomain@lvmdriver-2#lvmdriver-2\u0027, u\u0027lvmdriver-2\u0027)]), (\u0027CapacityFilter\u0027, [(u\u0027vagrant-ubuntu-trusty-64-cn.localdomain@lvmdriver-2#lvmdriver-2\u0027, u\u0027lvmdriver-2\u0027), (u\u0027vagrant-ubuntu-trusty-64-cn.localdomain@lvmdriver-1#lvmdriver-1\u0027, u\u0027lvmdriver-1\u0027), (u\u0027vagrant-ubuntu-trusty-64.localdomain@lvmdriver-1#lvmdriver-1\u0027, u\u0027lvmdriver-1\u0027), (u\u0027vagrant-ubuntu-trusty-64.localdomain@lvmdriver-2#lvmdriver-2\u0027, u\u0027lvmdriver-2\u0027)]), (\u0027CapabilitiesFilter\u0027, [])]","commit_id":"ab9c28738a072cebad28f278dab4f07d3f8d6b22"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"4c29b99af2a12813cf9cb63c5735bb190b017dc7","unresolved":false,"context_lines":[{"line_number":101,"context_line":"                list_objs \u003d list(objs)"},{"line_number":102,"context_line":"                end_count \u003d len(list_objs)"},{"line_number":103,"context_line":"                part_filter_results.append((cls_name, start_count, end_count))"},{"line_number":104,"context_line":"                remaining \u003d [(getattr(obj, \"host\", obj),"},{"line_number":105,"context_line":"                              getattr(obj, \"volume_backend_name\", \"\"))"},{"line_number":106,"context_line":"                             for obj in list_objs]"},{"line_number":107,"context_line":"                full_filter_results.append((cls_name, remaining))"},{"line_number":108,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"3aaa91ec_db5b6684","line":105,"range":{"start_line":104,"start_character":0,"end_line":105,"end_character":70},"in_reply_to":"7aa08908_24871862","updated":"2016-06-27 11:52:42.000000000","message":"You are right, that\u0027s my fault, I suggested it on patch 5 assuming host was just the host part and didn\u0027t include the volume_backend_name part.","commit_id":"ab9c28738a072cebad28f278dab4f07d3f8d6b22"},{"author":{"_account_id":9171,"name":"Vipin Balachandran","email":"vipin.bl@gmail.com","username":"vbala"},"change_message_id":"e6bd8d6d828838dd2cf3f05fa0caac13720b5bcd","unresolved":false,"context_lines":[{"line_number":110,"context_line":"                          \"%(obj_len)d host(s)\","},{"line_number":111,"context_line":"                          {\u0027cls_name\u0027: cls_name, \u0027obj_len\u0027: len(list_objs)})"},{"line_number":112,"context_line":"        if not list_objs:"},{"line_number":113,"context_line":"            # Log the filtration history"},{"line_number":114,"context_line":"            rspec \u003d filter_properties.get(\"request_spec\", {})"},{"line_number":115,"context_line":"            msg_dict \u003d {\"vol_id\": rspec.get(\"volume_id\", \"\"),"},{"line_number":116,"context_line":"                        \"str_results\": six.text_type(full_filter_results),"}],"source_content_type":"text/x-python","patch_set":10,"id":"bab6814e_0e27aeb6","line":113,"range":{"start_line":113,"start_character":12,"end_line":113,"end_character":40},"updated":"2016-05-26 18:39:25.000000000","message":"Can we extract this out to a helper method?","commit_id":"ab9c28738a072cebad28f278dab4f07d3f8d6b22"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"f9278558884bd930aa10a8c29d7453c2121d4c53","unresolved":false,"context_lines":[{"line_number":110,"context_line":"                          \"%(obj_len)d host(s)\","},{"line_number":111,"context_line":"                          {\u0027cls_name\u0027: cls_name, \u0027obj_len\u0027: len(list_objs)})"},{"line_number":112,"context_line":"        if not list_objs:"},{"line_number":113,"context_line":"            # Log the filtration history"},{"line_number":114,"context_line":"            rspec \u003d filter_properties.get(\"request_spec\", {})"},{"line_number":115,"context_line":"            msg_dict \u003d {\"vol_id\": rspec.get(\"volume_id\", \"\"),"},{"line_number":116,"context_line":"                        \"str_results\": six.text_type(full_filter_results),"}],"source_content_type":"text/x-python","patch_set":10,"id":"7aa08908_840d2cea","line":113,"range":{"start_line":113,"start_character":12,"end_line":113,"end_character":40},"in_reply_to":"9abb7d3a_db5d16ee","updated":"2016-06-14 12:10:29.000000000","message":"+1","commit_id":"ab9c28738a072cebad28f278dab4f07d3f8d6b22"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"6fed026427d7e7fd3ba04b8d9c369cd2faad7d33","unresolved":false,"context_lines":[{"line_number":110,"context_line":"                          \"%(obj_len)d host(s)\","},{"line_number":111,"context_line":"                          {\u0027cls_name\u0027: cls_name, \u0027obj_len\u0027: len(list_objs)})"},{"line_number":112,"context_line":"        if not list_objs:"},{"line_number":113,"context_line":"            # Log the filtration history"},{"line_number":114,"context_line":"            rspec \u003d filter_properties.get(\"request_spec\", {})"},{"line_number":115,"context_line":"            msg_dict \u003d {\"vol_id\": rspec.get(\"volume_id\", \"\"),"},{"line_number":116,"context_line":"                        \"str_results\": six.text_type(full_filter_results),"}],"source_content_type":"text/x-python","patch_set":10,"id":"9abb7d3a_db5d16ee","line":113,"range":{"start_line":113,"start_character":12,"end_line":113,"end_character":40},"in_reply_to":"bab6814e_0e27aeb6","updated":"2016-05-27 09:37:08.000000000","message":"I agree, even if Nova does it this way it would make our code easier to read if we extract this from the get_filtered_objects method.","commit_id":"ab9c28738a072cebad28f278dab4f07d3f8d6b22"},{"author":{"_account_id":9171,"name":"Vipin Balachandran","email":"vipin.bl@gmail.com","username":"vbala"},"change_message_id":"e6bd8d6d828838dd2cf3f05fa0caac13720b5bcd","unresolved":false,"context_lines":[{"line_number":119,"context_line":"                        \"volume ID \""},{"line_number":120,"context_line":"                        \"\u0027%(vol_id)s\u0027. Filter results: %(str_results)s\""},{"line_number":121,"context_line":"                        ) % msg_dict"},{"line_number":122,"context_line":"            msg_dict[\"str_results\"] \u003d \u0027, \u0027.join("},{"line_number":123,"context_line":"                _LI(\"%(cls_name)s: (start: %(start)s, end: %(end)s)\") % {"},{"line_number":124,"context_line":"                    \"cls_name\": value[0], \"start\": value[1],"},{"line_number":125,"context_line":"                    \"end\": value[2]} for value in part_filter_results)"},{"line_number":126,"context_line":"            part_msg \u003d _LI(\"Filtering removed all hosts for the request with \""},{"line_number":127,"context_line":"                           \"volume ID \""},{"line_number":128,"context_line":"                           \"\u0027%(vol_id)s\u0027. Filter results: %(str_results)s\""}],"source_content_type":"text/x-python","patch_set":10,"id":"bab6814e_4e6b76b9","line":125,"range":{"start_line":122,"start_character":11,"end_line":125,"end_character":70},"updated":"2016-05-26 18:39:25.000000000","message":"If possible please refactor this or format it, it\u0027s not that readable.","commit_id":"ab9c28738a072cebad28f278dab4f07d3f8d6b22"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"4c29b99af2a12813cf9cb63c5735bb190b017dc7","unresolved":false,"context_lines":[{"line_number":119,"context_line":"                        \"volume ID \""},{"line_number":120,"context_line":"                        \"\u0027%(vol_id)s\u0027. Filter results: %(str_results)s\""},{"line_number":121,"context_line":"                        ) % msg_dict"},{"line_number":122,"context_line":"            msg_dict[\"str_results\"] \u003d \u0027, \u0027.join("},{"line_number":123,"context_line":"                _LI(\"%(cls_name)s: (start: %(start)s, end: %(end)s)\") % {"},{"line_number":124,"context_line":"                    \"cls_name\": value[0], \"start\": value[1],"},{"line_number":125,"context_line":"                    \"end\": value[2]} for value in part_filter_results)"},{"line_number":126,"context_line":"            part_msg \u003d _LI(\"Filtering removed all hosts for the request with \""},{"line_number":127,"context_line":"                           \"volume ID \""},{"line_number":128,"context_line":"                           \"\u0027%(vol_id)s\u0027. Filter results: %(str_results)s\""}],"source_content_type":"text/x-python","patch_set":10,"id":"3aaa91ec_40614504","line":125,"range":{"start_line":122,"start_character":11,"end_line":125,"end_character":70},"in_reply_to":"7aa08908_64276063","updated":"2016-06-27 11:52:42.000000000","message":"I don\u0027t see what the problem to read this is, seems pretty straightforward to me...\n\nMaybe it would be more readable as:\n\n msg_dict[\"str_results\"] \u003d \u0027, \u0027.join(                               \n     _LI(\"%(cls_name)s: (start: %(start)s, end: %(end)s)\") % (      \n         {\"cls_name\": value[0], \"start\": value[1], \"end\": value[2]})\n     for value in part_filter_results)","commit_id":"ab9c28738a072cebad28f278dab4f07d3f8d6b22"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"f9278558884bd930aa10a8c29d7453c2121d4c53","unresolved":false,"context_lines":[{"line_number":119,"context_line":"                        \"volume ID \""},{"line_number":120,"context_line":"                        \"\u0027%(vol_id)s\u0027. Filter results: %(str_results)s\""},{"line_number":121,"context_line":"                        ) % msg_dict"},{"line_number":122,"context_line":"            msg_dict[\"str_results\"] \u003d \u0027, \u0027.join("},{"line_number":123,"context_line":"                _LI(\"%(cls_name)s: (start: %(start)s, end: %(end)s)\") % {"},{"line_number":124,"context_line":"                    \"cls_name\": value[0], \"start\": value[1],"},{"line_number":125,"context_line":"                    \"end\": value[2]} for value in part_filter_results)"},{"line_number":126,"context_line":"            part_msg \u003d _LI(\"Filtering removed all hosts for the request with \""},{"line_number":127,"context_line":"                           \"volume ID \""},{"line_number":128,"context_line":"                           \"\u0027%(vol_id)s\u0027. Filter results: %(str_results)s\""}],"source_content_type":"text/x-python","patch_set":10,"id":"7aa08908_64276063","line":125,"range":{"start_line":122,"start_character":11,"end_line":125,"end_character":70},"in_reply_to":"bab6814e_4e6b76b9","updated":"2016-06-14 12:10:29.000000000","message":"Yeah, this is terribly hard to understand. You can at least move creation of formatting dict to other statement and save it to a variable.","commit_id":"ab9c28738a072cebad28f278dab4f07d3f8d6b22"},{"author":{"_account_id":9171,"name":"Vipin Balachandran","email":"vipin.bl@gmail.com","username":"vbala"},"change_message_id":"e6bd8d6d828838dd2cf3f05fa0caac13720b5bcd","unresolved":false,"context_lines":[{"line_number":127,"context_line":"                           \"volume ID \""},{"line_number":128,"context_line":"                           \"\u0027%(vol_id)s\u0027. Filter results: %(str_results)s\""},{"line_number":129,"context_line":"                           ) % msg_dict"},{"line_number":130,"context_line":"            LOG.debug(full_msg)"},{"line_number":131,"context_line":"            LOG.info(part_msg)"},{"line_number":132,"context_line":"        return list_objs"}],"source_content_type":"text/x-python","patch_set":10,"id":"bab6814e_0b196088","line":130,"updated":"2016-05-26 18:39:25.000000000","message":"These methods can handle message formatting and can skip if the corr. level is not enabled. So why not pass the format string and arguments to the log methods?","commit_id":"ab9c28738a072cebad28f278dab4f07d3f8d6b22"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"f9278558884bd930aa10a8c29d7453c2121d4c53","unresolved":false,"context_lines":[{"line_number":127,"context_line":"                           \"volume ID \""},{"line_number":128,"context_line":"                           \"\u0027%(vol_id)s\u0027. Filter results: %(str_results)s\""},{"line_number":129,"context_line":"                           ) % msg_dict"},{"line_number":130,"context_line":"            LOG.debug(full_msg)"},{"line_number":131,"context_line":"            LOG.info(part_msg)"},{"line_number":132,"context_line":"        return list_objs"}],"source_content_type":"text/x-python","patch_set":10,"id":"7aa08908_a4e4a80c","line":130,"in_reply_to":"bab6814e_0b196088","updated":"2016-06-14 12:10:29.000000000","message":"+1","commit_id":"ab9c28738a072cebad28f278dab4f07d3f8d6b22"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"6fed026427d7e7fd3ba04b8d9c369cd2faad7d33","unresolved":false,"context_lines":[{"line_number":127,"context_line":"                           \"volume ID \""},{"line_number":128,"context_line":"                           \"\u0027%(vol_id)s\u0027. Filter results: %(str_results)s\""},{"line_number":129,"context_line":"                           ) % msg_dict"},{"line_number":130,"context_line":"            LOG.debug(full_msg)"},{"line_number":131,"context_line":"            LOG.info(part_msg)"},{"line_number":132,"context_line":"        return list_objs"}],"source_content_type":"text/x-python","patch_set":10,"id":"9abb7d3a_bbd49247","line":130,"in_reply_to":"bab6814e_0b196088","updated":"2016-05-27 09:37:08.000000000","message":"Yes, late binding is always better!  Although in this case it wouldn\u0027t do us as much good as in other cases.  :-(","commit_id":"ab9c28738a072cebad28f278dab4f07d3f8d6b22"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"2819e9b7a113595d661c8b0e07fda8f467fa0e74","unresolved":false,"context_lines":[{"line_number":123,"context_line":"                list_objs \u003d list(objs)"},{"line_number":124,"context_line":"                end_count \u003d len(list_objs)"},{"line_number":125,"context_line":"                part_filter_results.append((cls_name, start_count, end_count))"},{"line_number":126,"context_line":"                remaining \u003d [(getattr(obj, \"host\", obj))"},{"line_number":127,"context_line":"                             for obj in list_objs]"},{"line_number":128,"context_line":"                full_filter_results.append((cls_name, remaining))"},{"line_number":129,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"1aa78d24_e958c7fc","line":126,"range":{"start_line":126,"start_character":29,"end_line":126,"end_character":56},"updated":"2016-07-05 08:47:48.000000000","message":"nit: Outermost parenthesis are unnecessary.","commit_id":"4fefb996779cd53665b89d4b3c8b3b14434d8242"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"2819e9b7a113595d661c8b0e07fda8f467fa0e74","unresolved":false,"context_lines":[{"line_number":131,"context_line":"                          \"%(obj_len)d host(s)\","},{"line_number":132,"context_line":"                          {\u0027cls_name\u0027: cls_name, \u0027obj_len\u0027: len(list_objs)})"},{"line_number":133,"context_line":"        if not list_objs:"},{"line_number":134,"context_line":"            self._log_filterartion(full_filter_results,"},{"line_number":135,"context_line":"                                   part_filter_results, filter_properties)"},{"line_number":136,"context_line":"        return list_objs"}],"source_content_type":"text/x-python","patch_set":11,"id":"1aa78d24_49163bf2","line":134,"range":{"start_line":134,"start_character":22,"end_line":134,"end_character":34},"updated":"2016-07-05 08:47:48.000000000","message":"?: What does this word mean? I tried Collins and Cambridge dictionaries and couldn\u0027t find it.  Or is it a typo and it was meant to be filteraction or filtration?","commit_id":"4fefb996779cd53665b89d4b3c8b3b14434d8242"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"50508ad57011470f891a87cfd3fef4d15e02551f","unresolved":false,"context_lines":[{"line_number":131,"context_line":"                          \"%(obj_len)d host(s)\","},{"line_number":132,"context_line":"                          {\u0027cls_name\u0027: cls_name, \u0027obj_len\u0027: len(list_objs)})"},{"line_number":133,"context_line":"        if not list_objs:"},{"line_number":134,"context_line":"            self._log_filterartion(full_filter_results,"},{"line_number":135,"context_line":"                                   part_filter_results, filter_properties)"},{"line_number":136,"context_line":"        return list_objs"}],"source_content_type":"text/x-python","patch_set":11,"id":"1aa78d24_ef9f2701","line":134,"range":{"start_line":134,"start_character":22,"end_line":134,"end_character":34},"in_reply_to":"1aa78d24_49163bf2","updated":"2016-07-05 09:19:35.000000000","message":"Sorry, it was a typo.. :(","commit_id":"4fefb996779cd53665b89d4b3c8b3b14434d8242"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"7c2c1b6de9972093eacc366c7560317e87b52fea","unresolved":false,"context_lines":[{"line_number":131,"context_line":"                          \"%(obj_len)d host(s)\","},{"line_number":132,"context_line":"                          {\u0027cls_name\u0027: cls_name, \u0027obj_len\u0027: len(list_objs)})"},{"line_number":133,"context_line":"        if not list_objs:"},{"line_number":134,"context_line":"            self._log_filterartion(full_filter_results,"},{"line_number":135,"context_line":"                                   part_filter_results, filter_properties)"},{"line_number":136,"context_line":"        return list_objs"}],"source_content_type":"text/x-python","patch_set":11,"id":"1aa78d24_9e2172fe","line":134,"range":{"start_line":134,"start_character":22,"end_line":134,"end_character":34},"in_reply_to":"1aa78d24_ef9f2701","updated":"2016-07-05 09:45:28.000000000","message":"Don\u0027t worry, I was mostly worried that my English was getting worse.  ;-)","commit_id":"4fefb996779cd53665b89d4b3c8b3b14434d8242"}],"cinder/tests/unit/scheduler/test_base_filter.py":[{"author":{"_account_id":16708,"name":"Kendall Nelson","display_name":"Kendall (diablo_rojo)","email":"kennelson11@gmail.com","username":"kjnelson"},"change_message_id":"684fdcb334cfc42261d08ba7a0af461f260da48f","unresolved":false,"context_lines":[{"line_number":170,"context_line":"    def test_get_filtered_objects_info_log_none_returned(self):"},{"line_number":171,"context_line":"        LOG \u003d base_filter.LOG"},{"line_number":172,"context_line":""},{"line_number":173,"context_line":"        class FilterA(base_filter.BaseFilter):"},{"line_number":174,"context_line":"            def filter_all(self, list_objs, filter_properties):"},{"line_number":175,"context_line":"                # return all but the first object"},{"line_number":176,"context_line":"                return list_objs[1:]"},{"line_number":177,"context_line":""},{"line_number":178,"context_line":"        class FilterB(base_filter.BaseFilter):"},{"line_number":179,"context_line":"            def filter_all(self, list_objs, filter_properties):"},{"line_number":180,"context_line":"                # return an empty list"},{"line_number":181,"context_line":"                return []"},{"line_number":182,"context_line":""},{"line_number":183,"context_line":"        all_filters \u003d [FilterA, FilterB]"},{"line_number":184,"context_line":"        hosts \u003d [\"Host0\", \"Host1\", \"Host2\"]"}],"source_content_type":"text/x-python","patch_set":2,"id":"1a122d0e_83a1c1fa","line":181,"range":{"start_line":173,"start_character":8,"end_line":181,"end_character":25},"updated":"2016-04-20 14:50:35.000000000","message":"Since you are using these in multiple places, maybe it would be worth it to move them out of the tests and make them more global? Then you could just reference them?","commit_id":"f9adb6c4704dd388555735332c6962a1a0bd23a6"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"0ce537eedf6043758761152e5a75dcde257397e0","unresolved":false,"context_lines":[{"line_number":170,"context_line":"    def test_get_filtered_objects_info_log_none_returned(self):"},{"line_number":171,"context_line":"        LOG \u003d base_filter.LOG"},{"line_number":172,"context_line":""},{"line_number":173,"context_line":"        class FilterA(base_filter.BaseFilter):"},{"line_number":174,"context_line":"            def filter_all(self, list_objs, filter_properties):"},{"line_number":175,"context_line":"                # return all but the first object"},{"line_number":176,"context_line":"                return list_objs[1:]"},{"line_number":177,"context_line":""},{"line_number":178,"context_line":"        class FilterB(base_filter.BaseFilter):"},{"line_number":179,"context_line":"            def filter_all(self, list_objs, filter_properties):"},{"line_number":180,"context_line":"                # return an empty list"},{"line_number":181,"context_line":"                return []"},{"line_number":182,"context_line":""},{"line_number":183,"context_line":"        all_filters \u003d [FilterA, FilterB]"},{"line_number":184,"context_line":"        hosts \u003d [\"Host0\", \"Host1\", \"Host2\"]"}],"source_content_type":"text/x-python","patch_set":2,"id":"1a122d0e_782ae77f","line":181,"range":{"start_line":173,"start_character":8,"end_line":181,"end_character":25},"in_reply_to":"1a122d0e_83a1c1fa","updated":"2016-04-22 11:43:59.000000000","message":"Done","commit_id":"f9adb6c4704dd388555735332c6962a1a0bd23a6"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"eb47791923ee30dfeec5a1f6e1f3c41f135d23dd","unresolved":false,"context_lines":[{"line_number":182,"context_line":""},{"line_number":183,"context_line":"        all_filters \u003d [FilterA, FilterB]"},{"line_number":184,"context_line":"        hosts \u003d [\"Host0\", \"Host1\", \"Host2\"]"},{"line_number":185,"context_line":"        fake_uuid \u003d \u00271\u0027"},{"line_number":186,"context_line":"        filt_props \u003d {\"request_spec\": {\u0027volume_id\u0027: 1,"},{"line_number":187,"context_line":"                      \u0027volume_properties\u0027: {\u0027project_id\u0027: 1,"},{"line_number":188,"context_line":"                                            \u0027size\u0027: 2048,"}],"source_content_type":"text/x-python","patch_set":2,"id":"1a122d0e_274e7d6f","line":185,"updated":"2016-04-18 11:12:12.000000000","message":"nit: Better use a real uuid from cinder.tests.unit.fake_constants","commit_id":"f9adb6c4704dd388555735332c6962a1a0bd23a6"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"0ce537eedf6043758761152e5a75dcde257397e0","unresolved":false,"context_lines":[{"line_number":182,"context_line":""},{"line_number":183,"context_line":"        all_filters \u003d [FilterA, FilterB]"},{"line_number":184,"context_line":"        hosts \u003d [\"Host0\", \"Host1\", \"Host2\"]"},{"line_number":185,"context_line":"        fake_uuid \u003d \u00271\u0027"},{"line_number":186,"context_line":"        filt_props \u003d {\"request_spec\": {\u0027volume_id\u0027: 1,"},{"line_number":187,"context_line":"                      \u0027volume_properties\u0027: {\u0027project_id\u0027: 1,"},{"line_number":188,"context_line":"                                            \u0027size\u0027: 2048,"}],"source_content_type":"text/x-python","patch_set":2,"id":"1a122d0e_58344bdd","line":185,"in_reply_to":"1a122d0e_274e7d6f","updated":"2016-04-22 11:43:59.000000000","message":"Done","commit_id":"f9adb6c4704dd388555735332c6962a1a0bd23a6"},{"author":{"_account_id":16708,"name":"Kendall Nelson","display_name":"Kendall (diablo_rojo)","email":"kennelson11@gmail.com","username":"kjnelson"},"change_message_id":"684fdcb334cfc42261d08ba7a0af461f260da48f","unresolved":false,"context_lines":[{"line_number":183,"context_line":"        all_filters \u003d [FilterA, FilterB]"},{"line_number":184,"context_line":"        hosts \u003d [\"Host0\", \"Host1\", \"Host2\"]"},{"line_number":185,"context_line":"        fake_uuid \u003d \u00271\u0027"},{"line_number":186,"context_line":"        filt_props \u003d {\"request_spec\": {\u0027volume_id\u0027: 1,"},{"line_number":187,"context_line":"                      \u0027volume_properties\u0027: {\u0027project_id\u0027: 1,"},{"line_number":188,"context_line":"                                            \u0027size\u0027: 2048,"},{"line_number":189,"context_line":"                                            \u0027host\u0027: \u0027host4\u0027}}}"},{"line_number":190,"context_line":"        with mock.patch.object(LOG, \"info\") as mock_log:"}],"source_content_type":"text/x-python","patch_set":2,"id":"1a122d0e_83054112","line":187,"range":{"start_line":186,"start_character":39,"end_line":187,"end_character":60},"updated":"2016-04-20 14:50:35.000000000","message":"There are volume_id\u0027s and project_id\u0027s in cinder/tests/unit/fake_constants.py as well.","commit_id":"f9adb6c4704dd388555735332c6962a1a0bd23a6"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"0ce537eedf6043758761152e5a75dcde257397e0","unresolved":false,"context_lines":[{"line_number":183,"context_line":"        all_filters \u003d [FilterA, FilterB]"},{"line_number":184,"context_line":"        hosts \u003d [\"Host0\", \"Host1\", \"Host2\"]"},{"line_number":185,"context_line":"        fake_uuid \u003d \u00271\u0027"},{"line_number":186,"context_line":"        filt_props \u003d {\"request_spec\": {\u0027volume_id\u0027: 1,"},{"line_number":187,"context_line":"                      \u0027volume_properties\u0027: {\u0027project_id\u0027: 1,"},{"line_number":188,"context_line":"                                            \u0027size\u0027: 2048,"},{"line_number":189,"context_line":"                                            \u0027host\u0027: \u0027host4\u0027}}}"},{"line_number":190,"context_line":"        with mock.patch.object(LOG, \"info\") as mock_log:"}],"source_content_type":"text/x-python","patch_set":2,"id":"1a122d0e_984c2378","line":187,"range":{"start_line":186,"start_character":39,"end_line":187,"end_character":60},"in_reply_to":"1a122d0e_83054112","updated":"2016-04-22 11:43:59.000000000","message":"Done","commit_id":"f9adb6c4704dd388555735332c6962a1a0bd23a6"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"eb47791923ee30dfeec5a1f6e1f3c41f135d23dd","unresolved":false,"context_lines":[{"line_number":198,"context_line":"            self.assertIn(\"with volume ID \u0027%s\u0027\" % fake_uuid, cargs)"},{"line_number":199,"context_line":"            self.assertIn(exp_output, cargs)"},{"line_number":200,"context_line":""},{"line_number":201,"context_line":"    def test_get_filtered_objects_debug_log_none_returned(self):"},{"line_number":202,"context_line":"        LOG \u003d base_filter.LOG"},{"line_number":203,"context_line":""},{"line_number":204,"context_line":"        class FilterA(BaseFakeFilter):"}],"source_content_type":"text/x-python","patch_set":2,"id":"1a122d0e_27831d58","line":201,"updated":"2016-04-18 11:12:12.000000000","message":"-1: Since you are not actually changing the log debug level and just checking calls to LOG.debug method and all the setup for the test is exactly the same as with the test above you should either combine them both into a single test (you could just mock LOG and then check info and debug instead of having 2 mocks) or abstract common code to a method an use it in both tests.","commit_id":"f9adb6c4704dd388555735332c6962a1a0bd23a6"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"ba17588512618ea513cafdcec213e434a0a34188","unresolved":false,"context_lines":[{"line_number":200,"context_line":"            self.assertIn(\"with volume ID \u0027%s\u0027\" % fake.volume_id, cargs)"},{"line_number":201,"context_line":"            self.assertIn(exp_output, cargs)"},{"line_number":202,"context_line":""},{"line_number":203,"context_line":"    def test_get_filtered_objects_debug_log_none_returned(self):"},{"line_number":204,"context_line":"        LOG \u003d base_filter.LOG"},{"line_number":205,"context_line":""},{"line_number":206,"context_line":"        all_filters \u003d [FilterA, FilterB]"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a122d0e_ef0c0f44","line":203,"updated":"2016-05-05 08:36:08.000000000","message":"nit: I still believe this should be combined into just 1 test since the test case is the same.  You could probably just mock LOG and then test calls to info and debug.","commit_id":"2e5b7c24e3beb38e3466cb95c97811f5bffad2ee"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"7593c18868e8aaf80c8db31e36d9e46af2bf0222","unresolved":false,"context_lines":[{"line_number":184,"context_line":"        LOG \u003d base_filter.LOG"},{"line_number":185,"context_line":""},{"line_number":186,"context_line":"        all_filters \u003d [FilterA, FilterB]"},{"line_number":187,"context_line":"        hosts \u003d [\"Host0\", \"Host1\", \"Host2\"]"},{"line_number":188,"context_line":"        filt_props \u003d {\"request_spec\": {\u0027volume_id\u0027: fake.VOLUME_ID,"},{"line_number":189,"context_line":"                      \u0027volume_properties\u0027: {\u0027project_id\u0027: fake.PROJECT_ID,"},{"line_number":190,"context_line":"                                            \u0027size\u0027: 2048,"}],"source_content_type":"text/x-python","patch_set":5,"id":"dab17558_b6f1fb6c","line":187,"updated":"2016-05-09 11:15:17.000000000","message":"-1: You should be using \"real\" data instead of just strings, because with these you will always get default value on the .get methods you have added instead of the attributes (ie: .host).  Please use instances of HostState class.","commit_id":"35a9038efd8fb926272687266eb1d0d30e941645"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"3709f7a6efa4525c07923595a31d3d5512868623","unresolved":false,"context_lines":[{"line_number":184,"context_line":"        LOG \u003d base_filter.LOG"},{"line_number":185,"context_line":""},{"line_number":186,"context_line":"        all_filters \u003d [FilterA, FilterB]"},{"line_number":187,"context_line":"        hosts \u003d [\"Host0\", \"Host1\", \"Host2\"]"},{"line_number":188,"context_line":"        filt_props \u003d {\"request_spec\": {\u0027volume_id\u0027: fake.VOLUME_ID,"},{"line_number":189,"context_line":"                      \u0027volume_properties\u0027: {\u0027project_id\u0027: fake.PROJECT_ID,"},{"line_number":190,"context_line":"                                            \u0027size\u0027: 2048,"}],"source_content_type":"text/x-python","patch_set":5,"id":"dab17558_4eb5542f","line":187,"in_reply_to":"dab17558_b6f1fb6c","updated":"2016-05-10 12:51:49.000000000","message":"Done","commit_id":"35a9038efd8fb926272687266eb1d0d30e941645"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"7593c18868e8aaf80c8db31e36d9e46af2bf0222","unresolved":false,"context_lines":[{"line_number":198,"context_line":"                          \"\u0027FilterB: (start: 2, end: 0)\u0027]\")"},{"line_number":199,"context_line":"            cargs \u003d mock_log.call_args[0][0]"},{"line_number":200,"context_line":"            self.assertIn(\"with volume ID \u0027%s\u0027\" % fake.VOLUME_ID, cargs)"},{"line_number":201,"context_line":"            self.assertIn(exp_output, cargs)"},{"line_number":202,"context_line":""},{"line_number":203,"context_line":"        with mock.patch.object(LOG, \"debug\") as mock_log:"},{"line_number":204,"context_line":"            result \u003d self.handler.get_filtered_objects("}],"source_content_type":"text/x-python","patch_set":5,"id":"dab17558_f644231c","line":201,"updated":"2016-05-09 11:15:17.000000000","message":"-1: What I meant was:\n\n with mock.patch.object(base_filter, \u0027LOG\u0027) as mock_log:\n  result \u003d self.handler.get_filtered_objects(\n                  all_filters, hosts, filt_props)\n  self.assertFalse(result)\n  msg \u003d \"with volume ID \u0027%s\u0027\" % fake.VOLUME_ID\n  # FilterA should leave Host1 and Host2; FilterB should leave None.\n  exp_output \u003d (\"[\u0027FilterA: (start: 3, end: 2)\u0027, \"\n                \"\u0027FilterB: (start: 2, end: 0)\u0027]\")\n  cargs \u003d mock_log.info.call_args[0][0]\n  self.assertIn(msg, cargs)\n  self.assertIn(exp_output, cargs)\n\n  exp_output \u003d (\"[(\u0027FilterA\u0027, [(\u0027Host1\u0027, \u0027\u0027), (\u0027Host2\u0027, \u0027\u0027)]), \" +\n                \"(\u0027FilterB\u0027, None)]\")\n  cargs \u003d mock_log.debug.call_args[0][0]\n  self.assertIn(msg, cargs)\n  self.assertIn(exp_output, cargs)","commit_id":"35a9038efd8fb926272687266eb1d0d30e941645"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"3709f7a6efa4525c07923595a31d3d5512868623","unresolved":false,"context_lines":[{"line_number":198,"context_line":"                          \"\u0027FilterB: (start: 2, end: 0)\u0027]\")"},{"line_number":199,"context_line":"            cargs \u003d mock_log.call_args[0][0]"},{"line_number":200,"context_line":"            self.assertIn(\"with volume ID \u0027%s\u0027\" % fake.VOLUME_ID, cargs)"},{"line_number":201,"context_line":"            self.assertIn(exp_output, cargs)"},{"line_number":202,"context_line":""},{"line_number":203,"context_line":"        with mock.patch.object(LOG, \"debug\") as mock_log:"},{"line_number":204,"context_line":"            result \u003d self.handler.get_filtered_objects("}],"source_content_type":"text/x-python","patch_set":5,"id":"dab17558_4e8c347f","line":201,"in_reply_to":"dab17558_f644231c","updated":"2016-05-10 12:51:49.000000000","message":"Done","commit_id":"35a9038efd8fb926272687266eb1d0d30e941645"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"3a471e04ab564cc738a1ace6d900b539da56c199","unresolved":false,"context_lines":[{"line_number":106,"context_line":"class FilterB(base_filter.BaseFilter):"},{"line_number":107,"context_line":"    def filter_all(self, list_objs, filter_properties):"},{"line_number":108,"context_line":"        # return an empty list"},{"line_number":109,"context_line":"        return []"},{"line_number":110,"context_line":""},{"line_number":111,"context_line":""},{"line_number":112,"context_line":"class FakeExtensionManager(list):"}],"source_content_type":"text/x-python","patch_set":6,"id":"dab17558_7102bdb5","line":109,"updated":"2016-05-10 13:13:13.000000000","message":"-1: filter_all returns None when there\u0027s no elements that pass the filter","commit_id":"009e96a0550ef6419d5ab8ef475c614d7ee56d7c"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"f304859cf39cf10f5399468ee68cf9fd61f13369","unresolved":false,"context_lines":[{"line_number":183,"context_line":""},{"line_number":184,"context_line":"    def test_get_filtered_objects_info_and_debug_log_none_returned(self):"},{"line_number":185,"context_line":""},{"line_number":186,"context_line":"        all_filters \u003d [FilterA, FilterB]"},{"line_number":187,"context_line":"        fake_hosts \u003d [host_manager.HostState(\u0027fake_host%s\u0027 % x)"},{"line_number":188,"context_line":"                      for x in range(1, 4)]"},{"line_number":189,"context_line":"        filt_props \u003d {\"request_spec\": {\u0027volume_id\u0027: fake.VOLUME_ID,"}],"source_content_type":"text/x-python","patch_set":7,"id":"dab17558_0b954ce3","line":186,"updated":"2016-05-13 11:26:55.000000000","message":"nit: If you change this to:\n\n all_filters \u003d [FilterA, FilterA, FilterB]\n\nyou can actually test that multiple filters show in the info log level: \"FilterA: (start: 3, end: 2), FilterA: (start: 2, end: 1)\"","commit_id":"ee3ca3a8af198c7411e67d8a41b05868226a7685"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"f304859cf39cf10f5399468ee68cf9fd61f13369","unresolved":false,"context_lines":[{"line_number":185,"context_line":""},{"line_number":186,"context_line":"        all_filters \u003d [FilterA, FilterB]"},{"line_number":187,"context_line":"        fake_hosts \u003d [host_manager.HostState(\u0027fake_host%s\u0027 % x)"},{"line_number":188,"context_line":"                      for x in range(1, 4)]"},{"line_number":189,"context_line":"        filt_props \u003d {\"request_spec\": {\u0027volume_id\u0027: fake.VOLUME_ID,"},{"line_number":190,"context_line":"                      \u0027volume_properties\u0027: {\u0027project_id\u0027: fake.PROJECT_ID,"},{"line_number":191,"context_line":"                                            \u0027size\u0027: 2048,"}],"source_content_type":"text/x-python","patch_set":7,"id":"dab17558_3a08a02d","line":188,"updated":"2016-05-13 11:26:55.000000000","message":"nit: Would look even better if we also did:\n\n for host in fake_hosts:\n     host.volume_backend_name \u003d host.host + \u0027_backend\u0027\n\nSo we can check the output in the asserts.","commit_id":"ee3ca3a8af198c7411e67d8a41b05868226a7685"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"f304859cf39cf10f5399468ee68cf9fd61f13369","unresolved":false,"context_lines":[{"line_number":196,"context_line":"            self.assertFalse(result)"},{"line_number":197,"context_line":"            msg \u003d \"with volume ID \u0027%s\u0027\" % fake.VOLUME_ID"},{"line_number":198,"context_line":"            # FilterA should leave Host1 and Host2; FilterB should leave None."},{"line_number":199,"context_line":"            exp_output \u003d (\"[u\u0027FilterA: (start: 3, end: 2)\u0027]\")"},{"line_number":200,"context_line":"            cargs \u003d mock_log.info.call_args[0][0]"},{"line_number":201,"context_line":"            self.assertIn(msg, cargs)"},{"line_number":202,"context_line":"            self.assertIn(exp_output, cargs)"}],"source_content_type":"text/x-python","patch_set":7,"id":"dab17558_cb9344f9","line":199,"range":{"start_line":199,"start_character":28,"end_line":199,"end_character":29},"updated":"2016-05-13 11:26:55.000000000","message":"-1: This fails on Python3","commit_id":"ee3ca3a8af198c7411e67d8a41b05868226a7685"},{"author":{"_account_id":8358,"name":"zhangguoqing","email":"zhang.guoqing@99cloud.net","username":"zhangguoqing"},"change_message_id":"45f49af228c150b35e54a16d30798eec18c88e3b","unresolved":false,"context_lines":[{"line_number":199,"context_line":"            exp_output \u003d (\"[u\u0027FilterA: (start: 3, end: 2)\u0027]\")"},{"line_number":200,"context_line":"            cargs \u003d mock_log.info.call_args[0][0]"},{"line_number":201,"context_line":"            self.assertIn(msg, cargs)"},{"line_number":202,"context_line":"            self.assertIn(exp_output, cargs)"},{"line_number":203,"context_line":""},{"line_number":204,"context_line":"            exp_output \u003d (\"[(\u0027FilterA\u0027, [(\u0027fake_host2\u0027, None), \""},{"line_number":205,"context_line":"                          \"(\u0027fake_host3\u0027, None)]), \" + \"(\u0027FilterB\u0027, None)]\")"}],"source_content_type":"text/x-python","patch_set":7,"id":"dab17558_79f64dfa","line":202,"range":{"start_line":202,"start_character":12,"end_line":202,"end_character":44},"updated":"2016-05-14 08:41:19.000000000","message":"Agree with above Gorka Eguileor comment.","commit_id":"ee3ca3a8af198c7411e67d8a41b05868226a7685"}]}
