)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":7040,"name":"GuoHui LIu","email":"liuguohui@gmail.com","username":"guohliu"},"change_message_id":"b763c31b0feb4f17d18ab17d82aa8f4d4ec7ad8e","unresolved":false,"context_lines":[{"line_number":10,"context_line":"  *only wildcard \u0027*\u0027  and number range like\u0027[1-3]\u0027 is support"},{"line_number":11,"context_line":"  *suppport mre compared to string, or sting compare to string"},{"line_number":12,"context_line":"2) flexible device group support"},{"line_number":13,"context_line":"  to achive a flexible group, pci should diffirent the basic specs and"},{"line_number":14,"context_line":"  extra specs. specs is the (k,v) pair to filter the device and k is in"},{"line_number":15,"context_line":"  the pci_object\u0027s fileds. this mean basic specs\u0027s key can be use to filter"},{"line_number":16,"context_line":"  the device come from auto discovery. on auto discovery stage only the"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"AAAATn%2F8nxk%3D","line":13,"updated":"2013-12-24 07:34:36.000000000","message":"s/achive/achieve, s/different/differentiate","commit_id":"dd8f3b40f41f64d30aec2c4a331fef320253c339"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"53a6d2ab6ceab83efb289669c1911ef5bcd18c19","unresolved":false,"context_lines":[{"line_number":7,"context_line":"PCI utils support a minimal regular expression and flexible group"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"1) minimal regular expression"},{"line_number":10,"context_line":"  *only wildcard \u0027*\u0027  and number range like\u0027[1-3]\u0027 is support"},{"line_number":11,"context_line":"  *suppport mre compared to string, or sting compare to string"},{"line_number":12,"context_line":"2) flexible device group support"},{"line_number":13,"context_line":"  to achieve flexible group, pci should differentiate the basic specs and"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"AAAAT3%2F%2F2V4%3D","line":10,"updated":"2013-12-30 08:00:27.000000000","message":"support \u003d\u003e supported","commit_id":"155e1476b9e3051207acef236115c355dacccaa6"},{"author":{"_account_id":7543,"name":"Yongli He","email":"yongli.he@intel.com","username":"yongli.he"},"change_message_id":"c366caf5fee8c004becd05ade58ddd18ad89ae73","unresolved":false,"context_lines":[{"line_number":7,"context_line":"PCI utils support a minimal regular expression and flexible group"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"1) minimal regular expression"},{"line_number":10,"context_line":"  *only wildcard \u0027*\u0027  and number range like\u0027[1-3]\u0027 is support"},{"line_number":11,"context_line":"  *suppport mre compared to string, or sting compare to string"},{"line_number":12,"context_line":"2) flexible device group support"},{"line_number":13,"context_line":"  to achieve flexible group, pci should differentiate the basic specs and"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"AAAAT3%2F%2FtiQ%3D","line":10,"in_reply_to":"AAAAT3%2F%2F2V4%3D","updated":"2014-01-03 08:39:26.000000000","message":"Done","commit_id":"155e1476b9e3051207acef236115c355dacccaa6"},{"author":{"_account_id":6598,"name":"Berezovsky Irena","email":"irenab.dev@gmail.com","username":"irenab"},"change_message_id":"f13dc2e642797b348671f6b22a5cc58bdf9b0cd0","unresolved":false,"context_lines":[{"line_number":9,"context_line":"The minimal regular expressions are rules to match PCI device properties"},{"line_number":10,"context_line":"expressed as followed:"},{"line_number":11,"context_line":"  * wildcard \u0027*\u0027  and number range like\u0027[1-3]\u0027 is supported"},{"line_number":12,"context_line":"  * OR opration must be used alone: (string1|string2)"},{"line_number":13,"context_line":"  *suppport mre compared to string, or sting compare to string"},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"bp:pci-extra-info"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":9,"id":"AAAAVn%2F%2B5w8%3D","line":12,"updated":"2014-03-11 12:45:15.000000000","message":"typo: opration, suppport","commit_id":"7b7e26798eac04a55f7001f5b4c31c0a3da50959"},{"author":{"_account_id":7543,"name":"Yongli He","email":"yongli.he@intel.com","username":"yongli.he"},"change_message_id":"10f7bb22b4297197dd4a971856ea068b38546b69","unresolved":false,"context_lines":[{"line_number":9,"context_line":"The minimal regular expressions are rules to match PCI device properties"},{"line_number":10,"context_line":"expressed as followed:"},{"line_number":11,"context_line":"  * wildcard \u0027*\u0027  and number range like\u0027[1-3]\u0027 is supported"},{"line_number":12,"context_line":"  * OR opration must be used alone: (string1|string2)"},{"line_number":13,"context_line":"  *suppport mre compared to string, or sting compare to string"},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"bp:pci-extra-info"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":9,"id":"AAAAWH%2F%2FQhc%3D","line":12,"in_reply_to":"AAAAVn%2F%2B5w8%3D","updated":"2014-03-31 06:10:42.000000000","message":"Done","commit_id":"7b7e26798eac04a55f7001f5b4c31c0a3da50959"}],"nova/pci/pci_utils.py":[{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"53a6d2ab6ceab83efb289669c1911ef5bcd18c19","unresolved":false,"context_lines":[{"line_number":43,"context_line":""},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"class pci_mre(object):"},{"line_number":46,"context_line":"    \"\"\"provide match between string and Minimal-regular expression."},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"       for pci specs match, should support a simplified regular expression,"},{"line_number":49,"context_line":"       compare the regular expression and normal string, or normal string"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAT3%2F%2F2Vk%3D","line":46,"updated":"2013-12-30 08:00:27.000000000","message":"provide \u003d\u003e Provide","commit_id":"155e1476b9e3051207acef236115c355dacccaa6"},{"author":{"_account_id":7543,"name":"Yongli He","email":"yongli.he@intel.com","username":"yongli.he"},"change_message_id":"c366caf5fee8c004becd05ade58ddd18ad89ae73","unresolved":false,"context_lines":[{"line_number":43,"context_line":""},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"class pci_mre(object):"},{"line_number":46,"context_line":"    \"\"\"provide match between string and Minimal-regular expression."},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"       for pci specs match, should support a simplified regular expression,"},{"line_number":49,"context_line":"       compare the regular expression and normal string, or normal string"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAT3%2F%2Ftig%3D","line":46,"in_reply_to":"AAAAT3%2F%2F2Vk%3D","updated":"2014-01-03 08:39:26.000000000","message":"Done","commit_id":"155e1476b9e3051207acef236115c355dacccaa6"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"53a6d2ab6ceab83efb289669c1911ef5bcd18c19","unresolved":false,"context_lines":[{"line_number":45,"context_line":"class pci_mre(object):"},{"line_number":46,"context_line":"    \"\"\"provide match between string and Minimal-regular expression."},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"       for pci specs match, should support a simplified regular expression,"},{"line_number":49,"context_line":"       compare the regular expression and normal string, or normal string"},{"line_number":50,"context_line":"       compare to normal string."},{"line_number":51,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAT3%2F%2F2V0%3D","line":48,"updated":"2013-12-30 08:00:27.000000000","message":"for \u003d\u003e For\nThis should also start 4 spaces back","commit_id":"155e1476b9e3051207acef236115c355dacccaa6"},{"author":{"_account_id":7543,"name":"Yongli He","email":"yongli.he@intel.com","username":"yongli.he"},"change_message_id":"c366caf5fee8c004becd05ade58ddd18ad89ae73","unresolved":false,"context_lines":[{"line_number":45,"context_line":"class pci_mre(object):"},{"line_number":46,"context_line":"    \"\"\"provide match between string and Minimal-regular expression."},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"       for pci specs match, should support a simplified regular expression,"},{"line_number":49,"context_line":"       compare the regular expression and normal string, or normal string"},{"line_number":50,"context_line":"       compare to normal string."},{"line_number":51,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAT3%2F%2Ftic%3D","line":48,"in_reply_to":"AAAAT3%2F%2F2V0%3D","updated":"2014-01-03 08:39:26.000000000","message":"Done","commit_id":"155e1476b9e3051207acef236115c355dacccaa6"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"53a6d2ab6ceab83efb289669c1911ef5bcd18c19","unresolved":false,"context_lines":[{"line_number":85,"context_line":"    def __init__(self, mre):"},{"line_number":86,"context_line":"        \"\"\"convert simplified regular expression to RE"},{"line_number":87,"context_line":""},{"line_number":88,"context_line":"           we support a very simple \u0027RE\u0027 to match pci values like address."},{"line_number":89,"context_line":"           first special character is *: means match everything."},{"line_number":90,"context_line":"           second is a simple number range:  [11-15], [a-f]"},{"line_number":91,"context_line":"                                             the number must be hex."}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAT3%2F%2F2Vo%3D","line":88,"updated":"2013-12-30 08:00:27.000000000","message":"Ditto for the doc string here","commit_id":"155e1476b9e3051207acef236115c355dacccaa6"},{"author":{"_account_id":7543,"name":"Yongli He","email":"yongli.he@intel.com","username":"yongli.he"},"change_message_id":"c366caf5fee8c004becd05ade58ddd18ad89ae73","unresolved":false,"context_lines":[{"line_number":85,"context_line":"    def __init__(self, mre):"},{"line_number":86,"context_line":"        \"\"\"convert simplified regular expression to RE"},{"line_number":87,"context_line":""},{"line_number":88,"context_line":"           we support a very simple \u0027RE\u0027 to match pci values like address."},{"line_number":89,"context_line":"           first special character is *: means match everything."},{"line_number":90,"context_line":"           second is a simple number range:  [11-15], [a-f]"},{"line_number":91,"context_line":"                                             the number must be hex."}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAT3%2F%2FtiY%3D","line":88,"in_reply_to":"AAAAT3%2F%2F2Vo%3D","updated":"2014-01-03 08:39:26.000000000","message":"Done","commit_id":"155e1476b9e3051207acef236115c355dacccaa6"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"903a49a20e8dd60ece285e1fea1bcad332026f4f","unresolved":false,"context_lines":[{"line_number":18,"context_line":"import re"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"from nova import exception"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"from nova.objects import pci_device as pci_device_obj"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAUX%2F%2BwQQ%3D","line":21,"updated":"2014-02-19 09:41:26.000000000","message":"new line is not required here","commit_id":"9e7b59a950743a5cf75c7464367f4e82457f3026"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"903a49a20e8dd60ece285e1fea1bcad332026f4f","unresolved":false,"context_lines":[{"line_number":74,"context_line":"pci_condition_re \u003d re.compile(pci_condition_info)"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"def pci_device_meet_spec(dev, key, value, spec):"},{"line_number":78,"context_line":"    \"\"\"Check if the PCI device\u0027s property meet the spec requirement."},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"    A spec is an expression composed as one of followed requirement:"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAUX%2F%2BwQc%3D","line":77,"updated":"2014-02-19 09:41:26.000000000","message":"please add unit tests for all of the possible flows here","commit_id":"9e7b59a950743a5cf75c7464367f4e82457f3026"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"903a49a20e8dd60ece285e1fea1bcad332026f4f","unresolved":false,"context_lines":[{"line_number":165,"context_line":"    return m.groups()"},{"line_number":166,"context_line":""},{"line_number":167,"context_line":""},{"line_number":168,"context_line":"def get_dev_property(dev_obj, dev_prop):"},{"line_number":169,"context_line":"    intrinsic_prop \u003d [\u0027vendor_id\u0027, \u0027product_id\u0027, \u0027dev_type\u0027, \u0027label\u0027]"},{"line_number":170,"context_line":"    if dev_prop in intrinsic_prop:"},{"line_number":171,"context_line":"        return dev_obj.get(dev_prop)"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAUX%2F%2BwQk%3D","line":168,"updated":"2014-02-19 09:41:26.000000000","message":"please add a unit test for this","commit_id":"9e7b59a950743a5cf75c7464367f4e82457f3026"},{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"5a2606abf7e96242395dc1fcb3b11f12603729a5","unresolved":false,"context_lines":[{"line_number":30,"context_line":"_PCI_ADDRESS_REGEX \u003d re.compile(_PCI_ADDRESS_PATTERN)"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"hexstr \u003d \"[\\da-fA-F]\""},{"line_number":34,"context_line":"wild_card \u003d \"\\\\*$\""},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"_RANGE_PATTERN \u003d \".*?\\[(hex+)-(hex+)\\].*?\".replace(\"hex\", hexstr)"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAVn%2F%2B33o%3D","line":33,"updated":"2014-03-11 17:04:23.000000000","message":"For consistency, you want to move this up top for PCI_VENDOR_PATTERN and _PCI_ADDRESS_PATTERN.\n\nWhile you\u0027re at it, oct is also used more than once.","commit_id":"7b7e26798eac04a55f7001f5b4c31c0a3da50959"},{"author":{"_account_id":7543,"name":"Yongli He","email":"yongli.he@intel.com","username":"yongli.he"},"change_message_id":"10f7bb22b4297197dd4a971856ea068b38546b69","unresolved":false,"context_lines":[{"line_number":30,"context_line":"_PCI_ADDRESS_REGEX \u003d re.compile(_PCI_ADDRESS_PATTERN)"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"hexstr \u003d \"[\\da-fA-F]\""},{"line_number":34,"context_line":"wild_card \u003d \"\\\\*$\""},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"_RANGE_PATTERN \u003d \".*?\\[(hex+)-(hex+)\\].*?\".replace(\"hex\", hexstr)"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAWH%2F%2FQ28%3D","line":33,"in_reply_to":"AAAAVn%2F%2B33o%3D","updated":"2014-03-31 06:10:42.000000000","message":"Done","commit_id":"7b7e26798eac04a55f7001f5b4c31c0a3da50959"},{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"5a2606abf7e96242395dc1fcb3b11f12603729a5","unresolved":false,"context_lines":[{"line_number":31,"context_line":""},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"hexstr \u003d \"[\\da-fA-F]\""},{"line_number":34,"context_line":"wild_card \u003d \"\\\\*$\""},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"_RANGE_PATTERN \u003d \".*?\\[(hex+)-(hex+)\\].*?\".replace(\"hex\", hexstr)"},{"line_number":37,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAVn%2F%2B3UM%3D","line":34,"updated":"2014-03-11 17:04:23.000000000","message":"The inclusion of the trailing $ is misleading. It should have a different name, or the trailing $ should be included elsewhere.\n\nAlso, it\u0027s recommended to write this r\u0027\\*\u0027. In fact, you should probably use raw strings throughout here. I won\u0027t bother will specific comments about that.","commit_id":"7b7e26798eac04a55f7001f5b4c31c0a3da50959"},{"author":{"_account_id":7543,"name":"Yongli He","email":"yongli.he@intel.com","username":"yongli.he"},"change_message_id":"10f7bb22b4297197dd4a971856ea068b38546b69","unresolved":false,"context_lines":[{"line_number":31,"context_line":""},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"hexstr \u003d \"[\\da-fA-F]\""},{"line_number":34,"context_line":"wild_card \u003d \"\\\\*$\""},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"_RANGE_PATTERN \u003d \".*?\\[(hex+)-(hex+)\\].*?\".replace(\"hex\", hexstr)"},{"line_number":37,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAWH%2F%2FQ3Y%3D","line":34,"in_reply_to":"AAAAVn%2F%2B3UM%3D","updated":"2014-03-31 06:10:42.000000000","message":"refer to new patch comments, that\u0027s for different purpose.","commit_id":"7b7e26798eac04a55f7001f5b4c31c0a3da50959"},{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"5a2606abf7e96242395dc1fcb3b11f12603729a5","unresolved":false,"context_lines":[{"line_number":35,"context_line":""},{"line_number":36,"context_line":"_RANGE_PATTERN \u003d \".*?\\[(hex+)-(hex+)\\].*?\".replace(\"hex\", hexstr)"},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"dom_range \u003d (\"(?P\u003cdomain_start\u003e((hex{4})|(\\\\*?)))\""},{"line_number":39,"context_line":"             \"(-(?P\u003cdomain_end\u003ehex{4}))?\"."},{"line_number":40,"context_line":"             replace(\"hex\", hexstr))"},{"line_number":41,"context_line":"bus_range \u003d (\"(?P\u003cbus_start\u003e((hex{2})|(\\\\*?)))\""}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAVn%2F%2B3RQ%3D","line":38,"updated":"2014-03-11 17:04:23.000000000","message":"wild_card (no trailing $)","commit_id":"7b7e26798eac04a55f7001f5b4c31c0a3da50959"},{"author":{"_account_id":7543,"name":"Yongli He","email":"yongli.he@intel.com","username":"yongli.he"},"change_message_id":"10f7bb22b4297197dd4a971856ea068b38546b69","unresolved":false,"context_lines":[{"line_number":35,"context_line":""},{"line_number":36,"context_line":"_RANGE_PATTERN \u003d \".*?\\[(hex+)-(hex+)\\].*?\".replace(\"hex\", hexstr)"},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"dom_range \u003d (\"(?P\u003cdomain_start\u003e((hex{4})|(\\\\*?)))\""},{"line_number":39,"context_line":"             \"(-(?P\u003cdomain_end\u003ehex{4}))?\"."},{"line_number":40,"context_line":"             replace(\"hex\", hexstr))"},{"line_number":41,"context_line":"bus_range \u003d (\"(?P\u003cbus_start\u003e((hex{2})|(\\\\*?)))\""}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAWH%2F%2FQ20%3D","line":38,"in_reply_to":"AAAAVn%2F%2B3RQ%3D","updated":"2014-03-31 06:10:42.000000000","message":"Done","commit_id":"7b7e26798eac04a55f7001f5b4c31c0a3da50959"},{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"5a2606abf7e96242395dc1fcb3b11f12603729a5","unresolved":false,"context_lines":[{"line_number":41,"context_line":"bus_range \u003d (\"(?P\u003cbus_start\u003e((hex{2})|(\\\\*?)))\""},{"line_number":42,"context_line":"             \"(-(?P\u003cbus_end\u003ehex{2}))?\"."},{"line_number":43,"context_line":"             replace(\"hex\", hexstr))"},{"line_number":44,"context_line":"device_range \u003d (\"(?P\u003cdevice_start\u003e((hex{2})|(\\\\*?)))\""},{"line_number":45,"context_line":"                \"(-(?P\u003cdevice_end\u003ehex{2}))?\"."},{"line_number":46,"context_line":"                replace(\"hex\", hexstr))"},{"line_number":47,"context_line":"func_range \u003d (\"(?P\u003cfunc_start\u003e((oct{1})|(\\\\*?)))\""}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAVn%2F%2B3PU%3D","line":44,"updated":"2014-03-11 17:04:23.000000000","message":"wild_card","commit_id":"7b7e26798eac04a55f7001f5b4c31c0a3da50959"},{"author":{"_account_id":7543,"name":"Yongli He","email":"yongli.he@intel.com","username":"yongli.he"},"change_message_id":"10f7bb22b4297197dd4a971856ea068b38546b69","unresolved":false,"context_lines":[{"line_number":41,"context_line":"bus_range \u003d (\"(?P\u003cbus_start\u003e((hex{2})|(\\\\*?)))\""},{"line_number":42,"context_line":"             \"(-(?P\u003cbus_end\u003ehex{2}))?\"."},{"line_number":43,"context_line":"             replace(\"hex\", hexstr))"},{"line_number":44,"context_line":"device_range \u003d (\"(?P\u003cdevice_start\u003e((hex{2})|(\\\\*?)))\""},{"line_number":45,"context_line":"                \"(-(?P\u003cdevice_end\u003ehex{2}))?\"."},{"line_number":46,"context_line":"                replace(\"hex\", hexstr))"},{"line_number":47,"context_line":"func_range \u003d (\"(?P\u003cfunc_start\u003e((oct{1})|(\\\\*?)))\""}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAWH%2F%2FQ2s%3D","line":44,"in_reply_to":"AAAAVn%2F%2B3PU%3D","updated":"2014-03-31 06:10:42.000000000","message":"Done","commit_id":"7b7e26798eac04a55f7001f5b4c31c0a3da50959"},{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"9e83f9ea3f6ddd95919a5ac25e35bafd16b0a05f","unresolved":false,"context_lines":[{"line_number":48,"context_line":"              \"(-(?P\u003cfunc_end\u003eoct{1}))?\"."},{"line_number":49,"context_line":"              replace(\"oct\", \"[0-7]\"))"},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"pci_address_range_patter \u003d (\"^(dom_range){1}:(bus_range){1}:\""},{"line_number":52,"context_line":"                            \"(dev_range){1}.(func_range){1}$\"."},{"line_number":53,"context_line":"                            replace(\"dom_range\", dom_range)."},{"line_number":54,"context_line":"                            replace(\"bus_range\", bus_range)."}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAVn%2F%2BxNk%3D","line":51,"updated":"2014-03-12 10:56:52.000000000","message":"Why not pci_address_range_pattern?","commit_id":"7b7e26798eac04a55f7001f5b4c31c0a3da50959"},{"author":{"_account_id":7543,"name":"Yongli He","email":"yongli.he@intel.com","username":"yongli.he"},"change_message_id":"10f7bb22b4297197dd4a971856ea068b38546b69","unresolved":false,"context_lines":[{"line_number":48,"context_line":"              \"(-(?P\u003cfunc_end\u003eoct{1}))?\"."},{"line_number":49,"context_line":"              replace(\"oct\", \"[0-7]\"))"},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"pci_address_range_patter \u003d (\"^(dom_range){1}:(bus_range){1}:\""},{"line_number":52,"context_line":"                            \"(dev_range){1}.(func_range){1}$\"."},{"line_number":53,"context_line":"                            replace(\"dom_range\", dom_range)."},{"line_number":54,"context_line":"                            replace(\"bus_range\", bus_range)."}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAWH%2F%2FQyk%3D","line":51,"in_reply_to":"AAAAVn%2F%2BxNk%3D","updated":"2014-03-31 06:10:42.000000000","message":"Done","commit_id":"7b7e26798eac04a55f7001f5b4c31c0a3da50959"},{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"9e83f9ea3f6ddd95919a5ac25e35bafd16b0a05f","unresolved":false,"context_lines":[{"line_number":49,"context_line":"              replace(\"oct\", \"[0-7]\"))"},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"pci_address_range_patter \u003d (\"^(dom_range){1}:(bus_range){1}:\""},{"line_number":52,"context_line":"                            \"(dev_range){1}.(func_range){1}$\"."},{"line_number":53,"context_line":"                            replace(\"dom_range\", dom_range)."},{"line_number":54,"context_line":"                            replace(\"bus_range\", bus_range)."},{"line_number":55,"context_line":"                            replace(\"dev_range\", device_range)."}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAVn%2F%2BxKw%3D","line":52,"updated":"2014-03-12 10:56:52.000000000","message":"{1} is redundant here. It only makes sense in _PCI_ADDRESS_PATTERN for consistency with the other length specifiers.","commit_id":"7b7e26798eac04a55f7001f5b4c31c0a3da50959"},{"author":{"_account_id":7543,"name":"Yongli He","email":"yongli.he@intel.com","username":"yongli.he"},"change_message_id":"10f7bb22b4297197dd4a971856ea068b38546b69","unresolved":false,"context_lines":[{"line_number":49,"context_line":"              replace(\"oct\", \"[0-7]\"))"},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"pci_address_range_patter \u003d (\"^(dom_range){1}:(bus_range){1}:\""},{"line_number":52,"context_line":"                            \"(dev_range){1}.(func_range){1}$\"."},{"line_number":53,"context_line":"                            replace(\"dom_range\", dom_range)."},{"line_number":54,"context_line":"                            replace(\"bus_range\", bus_range)."},{"line_number":55,"context_line":"                            replace(\"dev_range\", device_range)."}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAWH%2F%2FQtk%3D","line":52,"in_reply_to":"AAAAVn%2F%2BxKw%3D","updated":"2014-03-31 06:10:42.000000000","message":"Done","commit_id":"7b7e26798eac04a55f7001f5b4c31c0a3da50959"},{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"9e83f9ea3f6ddd95919a5ac25e35bafd16b0a05f","unresolved":false,"context_lines":[{"line_number":56,"context_line":"                            replace(\"func_range\", func_range))"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"GENERAL_RANGE_PATTERN \u003d (\"^.*?\\[(?P\u003cstart\u003ehex+)-(?P\u003cend\u003ehex+)\\].*?$\"."},{"line_number":60,"context_line":"                         replace(\"hex\", hexstr))"},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"condition_info \u003d (\"(?P\u003cwild\u003ewild_card)|(?P\u003crange\u003erange_p)|(?P\u003cvalue\u003e\\w+)\"."}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAVn%2F%2BxIo%3D","line":59,"updated":"2014-03-12 10:56:52.000000000","message":"\u0027*\u0027 matches zero or more, so .*? \u003d\u003d\u003d .*\n\n.* is the commonly used idiom for \u0027match anything, including nothing\u0027.\n\nHowever, what I think you mean here is to match whitespace, because a general range pattern with leading or trailing garbage wouldn\u0027t make any sense. i.e. r\u0027\\s*\u0027","commit_id":"7b7e26798eac04a55f7001f5b4c31c0a3da50959"},{"author":{"_account_id":7543,"name":"Yongli He","email":"yongli.he@intel.com","username":"yongli.he"},"change_message_id":"10f7bb22b4297197dd4a971856ea068b38546b69","unresolved":false,"context_lines":[{"line_number":56,"context_line":"                            replace(\"func_range\", func_range))"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"GENERAL_RANGE_PATTERN \u003d (\"^.*?\\[(?P\u003cstart\u003ehex+)-(?P\u003cend\u003ehex+)\\].*?$\"."},{"line_number":60,"context_line":"                         replace(\"hex\", hexstr))"},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"condition_info \u003d (\"(?P\u003cwild\u003ewild_card)|(?P\u003crange\u003erange_p)|(?P\u003cvalue\u003e\\w+)\"."}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAWH%2F%2FQx0%3D","line":59,"in_reply_to":"AAAAVn%2F%2BxIo%3D","updated":"2014-03-31 06:10:42.000000000","message":"not match for white space, it intend to match [5-8] in other value\u0027s, so it\u0027s might lead with meaning full chars.","commit_id":"7b7e26798eac04a55f7001f5b4c31c0a3da50959"},{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"9e83f9ea3f6ddd95919a5ac25e35bafd16b0a05f","unresolved":false,"context_lines":[{"line_number":59,"context_line":"GENERAL_RANGE_PATTERN \u003d (\"^.*?\\[(?P\u003cstart\u003ehex+)-(?P\u003cend\u003ehex+)\\].*?$\"."},{"line_number":60,"context_line":"                         replace(\"hex\", hexstr))"},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"condition_info \u003d (\"(?P\u003cwild\u003ewild_card)|(?P\u003crange\u003erange_p)|(?P\u003cvalue\u003e\\w+)\"."},{"line_number":63,"context_line":"                  replace(\"wild_card\", wild_card)."},{"line_number":64,"context_line":"                  replace(\"range_p\", GENERAL_RANGE_PATTERN))"},{"line_number":65,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAVn%2F%2Bw4U%3D","line":62,"updated":"2014-03-12 10:56:52.000000000","message":"You match this below with re.match(), which implicitly anchors the regexp at the beginning of the string. However, it doesn\u0027t enforce a whole string match, so you need a trailing $ here. Otherwise it\u0027s down to the quirks of the re engine whether \u0027*foo\u0027 will match a wild or value. In fact, it\u0027s still quirky whether \u0027*\u0027 matches wild or value. Better make that explicit, by asserting that values don\u0027t start with \u0027*\u0027. Of course, if \u0027*\u0027 could be a legal value then you have a syntax problem to address. Perhaps values could be enclosed in quotes? Anyway, here\u0027s a slight improvement:\n\nr\u0027(?:(?P\u003cwild\u003ewild_card)|(?P\u003crange\u003erange_p)|(?P\u003cvalue\u003e[^*]\\w*))$\u0027","commit_id":"7b7e26798eac04a55f7001f5b4c31c0a3da50959"},{"author":{"_account_id":7543,"name":"Yongli He","email":"yongli.he@intel.com","username":"yongli.he"},"change_message_id":"10f7bb22b4297197dd4a971856ea068b38546b69","unresolved":false,"context_lines":[{"line_number":59,"context_line":"GENERAL_RANGE_PATTERN \u003d (\"^.*?\\[(?P\u003cstart\u003ehex+)-(?P\u003cend\u003ehex+)\\].*?$\"."},{"line_number":60,"context_line":"                         replace(\"hex\", hexstr))"},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"condition_info \u003d (\"(?P\u003cwild\u003ewild_card)|(?P\u003crange\u003erange_p)|(?P\u003cvalue\u003e\\w+)\"."},{"line_number":63,"context_line":"                  replace(\"wild_card\", wild_card)."},{"line_number":64,"context_line":"                  replace(\"range_p\", GENERAL_RANGE_PATTERN))"},{"line_number":65,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAWH%2F%2FQtY%3D","line":62,"in_reply_to":"AAAAVn%2F%2Bw4U%3D","updated":"2014-03-31 06:10:42.000000000","message":"Done","commit_id":"7b7e26798eac04a55f7001f5b4c31c0a3da50959"},{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"9e83f9ea3f6ddd95919a5ac25e35bafd16b0a05f","unresolved":false,"context_lines":[{"line_number":64,"context_line":"                  replace(\"range_p\", GENERAL_RANGE_PATTERN))"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"pci_condition_info \u003d (\"(?P\u003cwild\u003ewild_card)|(?P\u003cvalue\u003epci_addr)\""},{"line_number":67,"context_line":"                      \"|(?P\u003crange\u003erange_p)\"."},{"line_number":68,"context_line":"                      replace(\"wild_card\", wild_card)."},{"line_number":69,"context_line":"                      replace(\"range_p\", pci_address_range_patter)."},{"line_number":70,"context_line":"                      replace(\"pci_addr\", _PCI_ADDRESS_PATTERN))"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAVn%2F%2Bw4I%3D","line":67,"updated":"2014-03-12 10:56:52.000000000","message":"See condition_info re trailing $.\n\nAlso, value is a subset of range here. I would remove value, as it\u0027s redundant, and treat all pci addresses as ranges.","commit_id":"7b7e26798eac04a55f7001f5b4c31c0a3da50959"},{"author":{"_account_id":7543,"name":"Yongli He","email":"yongli.he@intel.com","username":"yongli.he"},"change_message_id":"10f7bb22b4297197dd4a971856ea068b38546b69","unresolved":false,"context_lines":[{"line_number":64,"context_line":"                  replace(\"range_p\", GENERAL_RANGE_PATTERN))"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"pci_condition_info \u003d (\"(?P\u003cwild\u003ewild_card)|(?P\u003cvalue\u003epci_addr)\""},{"line_number":67,"context_line":"                      \"|(?P\u003crange\u003erange_p)\"."},{"line_number":68,"context_line":"                      replace(\"wild_card\", wild_card)."},{"line_number":69,"context_line":"                      replace(\"range_p\", pci_address_range_patter)."},{"line_number":70,"context_line":"                      replace(\"pci_addr\", _PCI_ADDRESS_PATTERN))"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAWH%2F%2FQsc%3D","line":67,"in_reply_to":"AAAAVn%2F%2Bw4I%3D","updated":"2014-03-31 06:10:42.000000000","message":"then we miss this:\nself.assertTrue(fmatch(\u0027address\u0027, \u00270000:00:19.0\u0027, \u00270000:00:19.0\u0027))","commit_id":"7b7e26798eac04a55f7001f5b4c31c0a3da50959"},{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"9e83f9ea3f6ddd95919a5ac25e35bafd16b0a05f","unresolved":false,"context_lines":[{"line_number":100,"context_line":"                int(value, 16) \u003c\u003d int(end, 16))"},{"line_number":101,"context_line":""},{"line_number":102,"context_line":"    def _check_value_range(key, value, checks):"},{"line_number":103,"context_line":"        if key in [\u0027address\u0027, \u0027phys_function\u0027]:"},{"line_number":104,"context_line":"            mach_obj \u003d _PCI_ADDRESS_REGEX.match(value)"},{"line_number":105,"context_line":"            if mach_obj is None:"},{"line_number":106,"context_line":"                return False"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAVn%2F%2Bww8%3D","line":103,"updated":"2014-03-12 10:56:52.000000000","message":"You have to check key a second time here because you\u0027re passing in 2 different types of value. This function would be simpler to understand if you only passed in a single type of value.","commit_id":"7b7e26798eac04a55f7001f5b4c31c0a3da50959"},{"author":{"_account_id":7543,"name":"Yongli He","email":"yongli.he@intel.com","username":"yongli.he"},"change_message_id":"10f7bb22b4297197dd4a971856ea068b38546b69","unresolved":false,"context_lines":[{"line_number":100,"context_line":"                int(value, 16) \u003c\u003d int(end, 16))"},{"line_number":101,"context_line":""},{"line_number":102,"context_line":"    def _check_value_range(key, value, checks):"},{"line_number":103,"context_line":"        if key in [\u0027address\u0027, \u0027phys_function\u0027]:"},{"line_number":104,"context_line":"            mach_obj \u003d _PCI_ADDRESS_REGEX.match(value)"},{"line_number":105,"context_line":"            if mach_obj is None:"},{"line_number":106,"context_line":"                return False"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAWH%2F%2FQsU%3D","line":103,"in_reply_to":"AAAAVn%2F%2Bww8%3D","updated":"2014-03-31 06:10:42.000000000","message":"phys_function is also a pci address, it\u0027s identical.","commit_id":"7b7e26798eac04a55f7001f5b4c31c0a3da50959"},{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"9e83f9ea3f6ddd95919a5ac25e35bafd16b0a05f","unresolved":false,"context_lines":[{"line_number":101,"context_line":""},{"line_number":102,"context_line":"    def _check_value_range(key, value, checks):"},{"line_number":103,"context_line":"        if key in [\u0027address\u0027, \u0027phys_function\u0027]:"},{"line_number":104,"context_line":"            mach_obj \u003d _PCI_ADDRESS_REGEX.match(value)"},{"line_number":105,"context_line":"            if mach_obj is None:"},{"line_number":106,"context_line":"                return False"},{"line_number":107,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAVn%2F%2BxBE%3D","line":104,"updated":"2014-03-12 10:56:52.000000000","message":"Typo: match_obj. Using just \u0027m\u0027 isn\u0027t unusual if you want brevity.","commit_id":"7b7e26798eac04a55f7001f5b4c31c0a3da50959"},{"author":{"_account_id":7543,"name":"Yongli He","email":"yongli.he@intel.com","username":"yongli.he"},"change_message_id":"10f7bb22b4297197dd4a971856ea068b38546b69","unresolved":false,"context_lines":[{"line_number":101,"context_line":""},{"line_number":102,"context_line":"    def _check_value_range(key, value, checks):"},{"line_number":103,"context_line":"        if key in [\u0027address\u0027, \u0027phys_function\u0027]:"},{"line_number":104,"context_line":"            mach_obj \u003d _PCI_ADDRESS_REGEX.match(value)"},{"line_number":105,"context_line":"            if mach_obj is None:"},{"line_number":106,"context_line":"                return False"},{"line_number":107,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAWH%2F%2FQsQ%3D","line":104,"in_reply_to":"AAAAVn%2F%2BxBE%3D","updated":"2014-03-31 06:10:42.000000000","message":"Done","commit_id":"7b7e26798eac04a55f7001f5b4c31c0a3da50959"},{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"9e83f9ea3f6ddd95919a5ac25e35bafd16b0a05f","unresolved":false,"context_lines":[{"line_number":107,"context_line":""},{"line_number":108,"context_line":"            pci_addr \u003d mach_obj.groupdict()"},{"line_number":109,"context_line":"            for field in [\u0027domain\u0027, \u0027bus\u0027, \u0027device\u0027, \u0027func\u0027]:"},{"line_number":110,"context_line":"                if not _compare_range(pci_addr.get(field),"},{"line_number":111,"context_line":"                                      checks.get(field + \u0027_start\u0027),"},{"line_number":112,"context_line":"                                      checks.get(field + \u0027_end\u0027)):"},{"line_number":113,"context_line":"                    return False"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAVn%2F%2Bw9Y%3D","line":110,"updated":"2014-03-12 10:56:52.000000000","message":"You\u0027ve used _PCI_ADDRESS_REGEX, which doesn\u0027t allow ranges. I think you wanted to match against pci_address_range_patter(n) above.","commit_id":"7b7e26798eac04a55f7001f5b4c31c0a3da50959"},{"author":{"_account_id":7543,"name":"Yongli He","email":"yongli.he@intel.com","username":"yongli.he"},"change_message_id":"10f7bb22b4297197dd4a971856ea068b38546b69","unresolved":false,"context_lines":[{"line_number":107,"context_line":""},{"line_number":108,"context_line":"            pci_addr \u003d mach_obj.groupdict()"},{"line_number":109,"context_line":"            for field in [\u0027domain\u0027, \u0027bus\u0027, \u0027device\u0027, \u0027func\u0027]:"},{"line_number":110,"context_line":"                if not _compare_range(pci_addr.get(field),"},{"line_number":111,"context_line":"                                      checks.get(field + \u0027_start\u0027),"},{"line_number":112,"context_line":"                                      checks.get(field + \u0027_end\u0027)):"},{"line_number":113,"context_line":"                    return False"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAWH%2F%2FQrg%3D","line":110,"in_reply_to":"AAAAVn%2F%2Bw9Y%3D","updated":"2014-03-31 06:10:42.000000000","message":"no, the value is always no regular in that, only the specs contain the range part.","commit_id":"7b7e26798eac04a55f7001f5b4c31c0a3da50959"},{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"9e83f9ea3f6ddd95919a5ac25e35bafd16b0a05f","unresolved":false,"context_lines":[{"line_number":108,"context_line":"            pci_addr \u003d mach_obj.groupdict()"},{"line_number":109,"context_line":"            for field in [\u0027domain\u0027, \u0027bus\u0027, \u0027device\u0027, \u0027func\u0027]:"},{"line_number":110,"context_line":"                if not _compare_range(pci_addr.get(field),"},{"line_number":111,"context_line":"                                      checks.get(field + \u0027_start\u0027),"},{"line_number":112,"context_line":"                                      checks.get(field + \u0027_end\u0027)):"},{"line_number":113,"context_line":"                    return False"},{"line_number":114,"context_line":"            return True"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAVn%2F%2Bw8U%3D","line":111,"updated":"2014-03-12 10:56:52.000000000","message":"field _start and field _end will always be None, because they aren\u0027t part of the matched regular expression. Therefore, this will always return False.","commit_id":"7b7e26798eac04a55f7001f5b4c31c0a3da50959"},{"author":{"_account_id":7543,"name":"Yongli He","email":"yongli.he@intel.com","username":"yongli.he"},"change_message_id":"10f7bb22b4297197dd4a971856ea068b38546b69","unresolved":false,"context_lines":[{"line_number":108,"context_line":"            pci_addr \u003d mach_obj.groupdict()"},{"line_number":109,"context_line":"            for field in [\u0027domain\u0027, \u0027bus\u0027, \u0027device\u0027, \u0027func\u0027]:"},{"line_number":110,"context_line":"                if not _compare_range(pci_addr.get(field),"},{"line_number":111,"context_line":"                                      checks.get(field + \u0027_start\u0027),"},{"line_number":112,"context_line":"                                      checks.get(field + \u0027_end\u0027)):"},{"line_number":113,"context_line":"                    return False"},{"line_number":114,"context_line":"            return True"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAWH%2F%2FQrE%3D","line":111,"in_reply_to":"AAAAVn%2F%2Bw8U%3D","updated":"2014-03-31 06:10:42.000000000","message":"do you mean domain_start or something?","commit_id":"7b7e26798eac04a55f7001f5b4c31c0a3da50959"},{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"9e83f9ea3f6ddd95919a5ac25e35bafd16b0a05f","unresolved":false,"context_lines":[{"line_number":122,"context_line":"            matched \u003d condition_re.match(item)"},{"line_number":123,"context_line":"        if not matched:"},{"line_number":124,"context_line":"            continue"},{"line_number":125,"context_line":"        checks \u003d matched.groupdict()"},{"line_number":126,"context_line":"        if checks[\u0027wild\u0027]:"},{"line_number":127,"context_line":"            result \u003d True"},{"line_number":128,"context_line":"        elif checks[\u0027value\u0027]:"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAVn%2F%2Bwqk%3D","line":125,"updated":"2014-03-12 10:56:52.000000000","message":"The above 2 matches define the following types:\n\ncondition_info:\n  wild (anything)\n  range (a numeric range)\n  value (an arbitrary value)\n\npci_condition_info:\n  wild (anything)\n  range (a pci address range)\n  value (a specific pci address)\n\nwild is genuinely common between the 2. value in pci_condition_info, as I mention above, overlaps with range and should be removed. range has different types on both, and must be re-differentiated. I suggest the following:\n\ncondition_info:\n  wild (anything)\n  general_range (a numeric range)\n  value (an arbitrary value)\n\npci_condition_info:\n  wild (anything)\n  pci_range (a pci address range)\n\nThe checks below become:\n\nif \u0027wild\u0027 in checks:\n  result \u003d True\nelif \u0027value\u0027 in checks:\n  result \u003d value \u003d\u003d checks[\u0027value\u0027]\nelif \u0027pci_range\u0027 in checks:\n  result \u003d _check_pci_range(key, value, checks)\nelif \u0027general_range\u0027 in checks:\n  result \u003d _compare_range(value, checks[\u0027start\u0027], checks[\u0027end\u0027])\nelse:\n  raise \u003cprogrammer error\u003e\n\nYou can then remove the duplicate key check from _check_value_range, and rename it to _check_pci_range.","commit_id":"7b7e26798eac04a55f7001f5b4c31c0a3da50959"},{"author":{"_account_id":7543,"name":"Yongli He","email":"yongli.he@intel.com","username":"yongli.he"},"change_message_id":"10f7bb22b4297197dd4a971856ea068b38546b69","unresolved":false,"context_lines":[{"line_number":122,"context_line":"            matched \u003d condition_re.match(item)"},{"line_number":123,"context_line":"        if not matched:"},{"line_number":124,"context_line":"            continue"},{"line_number":125,"context_line":"        checks \u003d matched.groupdict()"},{"line_number":126,"context_line":"        if checks[\u0027wild\u0027]:"},{"line_number":127,"context_line":"            result \u003d True"},{"line_number":128,"context_line":"        elif checks[\u0027value\u0027]:"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAWH%2F%2FQko%3D","line":125,"in_reply_to":"AAAAVn%2F%2Bwqk%3D","updated":"2014-03-31 06:10:42.000000000","message":"good advise. btw, sth in checks is does not work, should use checks.get, cause the key is always there but None or not None.","commit_id":"7b7e26798eac04a55f7001f5b4c31c0a3da50959"}],"nova/tests/pci/test_pci_utils.py":[{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"53a6d2ab6ceab83efb289669c1911ef5bcd18c19","unresolved":false,"context_lines":[{"line_number":57,"context_line":"        self.mre \u003d pci_utils.pci_mre(\u0027\u0027)"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"    def test_range_parser(self):"},{"line_number":60,"context_line":"        self.mre._parser(\"1f-2f\")"},{"line_number":61,"context_line":"        self.mre._parser(\"[0-1]\")"},{"line_number":62,"context_line":"        self.mre._parser(\"[33-44]\")"},{"line_number":63,"context_line":"        self.mre._parser(\":[33-44]:\")"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAT3%2F%2F2Vc%3D","line":60,"updated":"2013-12-30 08:00:27.000000000","message":"the method updates the following - self.STR \u003d self.range \u003d self.RE\nCan you please check that they are set correctly","commit_id":"155e1476b9e3051207acef236115c355dacccaa6"},{"author":{"_account_id":7543,"name":"Yongli He","email":"yongli.he@intel.com","username":"yongli.he"},"change_message_id":"c366caf5fee8c004becd05ade58ddd18ad89ae73","unresolved":false,"context_lines":[{"line_number":57,"context_line":"        self.mre \u003d pci_utils.pci_mre(\u0027\u0027)"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"    def test_range_parser(self):"},{"line_number":60,"context_line":"        self.mre._parser(\"1f-2f\")"},{"line_number":61,"context_line":"        self.mre._parser(\"[0-1]\")"},{"line_number":62,"context_line":"        self.mre._parser(\"[33-44]\")"},{"line_number":63,"context_line":"        self.mre._parser(\":[33-44]:\")"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAT3%2F%2Ftio%3D","line":60,"in_reply_to":"AAAAT3%2F%2F2Vc%3D","updated":"2014-01-03 08:39:26.000000000","message":"Done","commit_id":"155e1476b9e3051207acef236115c355dacccaa6"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"53a6d2ab6ceab83efb289669c1911ef5bcd18c19","unresolved":false,"context_lines":[{"line_number":77,"context_line":"        self.assertFalse(\"\"\"\"i\u0027am stringbad\"\"\" \u003d\u003d"},{"line_number":78,"context_line":"                            pci_utils.pci_mre(\"i\u0027am string\"))"},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"    def test_pci_mre_spcialcase(self):"},{"line_number":81,"context_line":"        # trailling string"},{"line_number":82,"context_line":"        self.assertFalse(\u002734:2:x:junk\u0027 \u003d\u003d pci_utils.pci_mre(\"[33-55]:[1-3]:x\"))"},{"line_number":83,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAT3%2F%2F2Vg%3D","line":80,"updated":"2013-12-30 08:00:27.000000000","message":"spcialcase \u003d\u003e specialcase","commit_id":"155e1476b9e3051207acef236115c355dacccaa6"},{"author":{"_account_id":7543,"name":"Yongli He","email":"yongli.he@intel.com","username":"yongli.he"},"change_message_id":"c366caf5fee8c004becd05ade58ddd18ad89ae73","unresolved":false,"context_lines":[{"line_number":77,"context_line":"        self.assertFalse(\"\"\"\"i\u0027am stringbad\"\"\" \u003d\u003d"},{"line_number":78,"context_line":"                            pci_utils.pci_mre(\"i\u0027am string\"))"},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"    def test_pci_mre_spcialcase(self):"},{"line_number":81,"context_line":"        # trailling string"},{"line_number":82,"context_line":"        self.assertFalse(\u002734:2:x:junk\u0027 \u003d\u003d pci_utils.pci_mre(\"[33-55]:[1-3]:x\"))"},{"line_number":83,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAT3%2F%2Ftik%3D","line":80,"in_reply_to":"AAAAT3%2F%2F2Vg%3D","updated":"2014-01-03 08:39:26.000000000","message":"Done","commit_id":"155e1476b9e3051207acef236115c355dacccaa6"}]}
