)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":17973,"name":"Ludovic Beliveau","email":"lbeliveau@gmail.com","username":"lbeliveau"},"change_message_id":"2ee5369eabdc2b77282369442f31a9a55032bb02","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     zhaolihui \u003czhaolh@awcloud.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2016-11-23 10:09:25 +0800"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Fix failed to boot vm with pci_alias\u0027s name including space"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Ensure the same name pci_alias\u0027s name in config file and"},{"line_number":10,"context_line":"pci_passthrough:alias\u0027s key name in flavor extra_specs."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":7,"id":"5a74a57a_7672337e","line":7,"updated":"2016-11-23 13:32:38.000000000","message":"Fix pci_alias that include white spaces","commit_id":"b71b5a65b3438171875578f3a549ba6dd0f75f8e"},{"author":{"_account_id":17973,"name":"Ludovic Beliveau","email":"lbeliveau@gmail.com","username":"lbeliveau"},"change_message_id":"2ee5369eabdc2b77282369442f31a9a55032bb02","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Fix failed to boot vm with pci_alias\u0027s name including space"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Ensure the same name pci_alias\u0027s name in config file and"},{"line_number":10,"context_line":"pci_passthrough:alias\u0027s key name in flavor extra_specs."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"Change-Id: I2888b03faf6c25bcb6011db40100d925972c2231"},{"line_number":13,"context_line":"Closes-Bug: #1638200"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":7,"id":"5a74a57a_d65227dd","line":10,"updated":"2016-11-23 13:32:38.000000000","message":"Can you please rephrase ?","commit_id":"b71b5a65b3438171875578f3a549ba6dd0f75f8e"},{"author":{"_account_id":17973,"name":"Ludovic Beliveau","email":"lbeliveau@gmail.com","username":"lbeliveau"},"change_message_id":"0c787911e9dd42a77993aa223a432c4e9d860975","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Fix pci_alias that include white spaces"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Ensure the same name pci_alias\u0027s name in config file and"},{"line_number":10,"context_line":"pci_passthrough:alias\u0027s key name in flavor extra_specs."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"Change-Id: I2888b03faf6c25bcb6011db40100d925972c2231"},{"line_number":13,"context_line":"Closes-Bug: #1638200"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":8,"id":"5a74a57a_8b43c141","line":10,"updated":"2016-11-25 14:25:44.000000000","message":"I would change the description for the following:\n\nWhen the PCI alias was getting translated to a PCI request, all the white spaces were getting removed.  So the pci_passthrough:alias specified in the flavor never matched the device in pci_alias.\n\nThis patch fixes the bug by only stripping the white spaces at the beginning or the end of the elements.","commit_id":"4084ac937af945364594a376366dc41c5457fa9e"},{"author":{"_account_id":17973,"name":"Ludovic Beliveau","email":"lbeliveau@gmail.com","username":"lbeliveau"},"change_message_id":"7b3838ae5ec94ca3ba2d3e41932caca9b427509e","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     zhaolihui \u003czhaolh@awcloud.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2016-11-30 14:17:34 +0800"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Fix pci_alias that include white spaces"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"When the PCI alias was getting translated to a PCI request,"},{"line_number":10,"context_line":"all the white spaces were getting removed. So the pci_passthrough:alias"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":9,"id":"5a74a57a_2ac11981","line":7,"range":{"start_line":7,"start_character":26,"end_line":7,"end_character":27},"updated":"2016-11-30 13:24:40.000000000","message":"s/include/includes/\n\nMy bad ...","commit_id":"888c2044f4015ed90e67ae77b2ee6fdb242e30d3"},{"author":{"_account_id":17973,"name":"Ludovic Beliveau","email":"lbeliveau@gmail.com","username":"lbeliveau"},"change_message_id":"7b3838ae5ec94ca3ba2d3e41932caca9b427509e","unresolved":false,"context_lines":[{"line_number":10,"context_line":"all the white spaces were getting removed. So the pci_passthrough:alias"},{"line_number":11,"context_line":"specified in the flavor never matched the device in pci_alias."},{"line_number":12,"context_line":"This patch fixes the bug by only stripping the white spaces"},{"line_number":13,"context_line":"at the beginning or the end of the elements"},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Change-Id: I2888b03faf6c25bcb6011db40100d925972c2231"},{"line_number":16,"context_line":"Closes-Bug: #1638200"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":9,"id":"5a74a57a_ea456117","line":13,"updated":"2016-11-30 13:24:40.000000000","message":"s/elements/elements./","commit_id":"888c2044f4015ed90e67ae77b2ee6fdb242e30d3"}],"nova/pci/request.py":[{"author":{"_account_id":6167,"name":"Ken\u0027ichi Ohmichi","email":"ken1ohmichi@gmail.com","username":"oomichi"},"change_message_id":"70c29a9c04fbd868aeb5ed4b925e521ab27f7a9e","unresolved":false,"context_lines":[{"line_number":105,"context_line":"        for jsonspecs in jaliases:"},{"line_number":106,"context_line":"            spec \u003d jsonutils.loads(jsonspecs)"},{"line_number":107,"context_line":"            jsonschema.validate(spec, _ALIAS_SCHEMA)"},{"line_number":108,"context_line":"            name \u003d spec.pop(\"name\").strip()"},{"line_number":109,"context_line":"            dev_type \u003d spec.pop(\u0027device_type\u0027, None)"},{"line_number":110,"context_line":"            if dev_type:"},{"line_number":111,"context_line":"                spec[\u0027dev_type\u0027] \u003d dev_type"}],"source_content_type":"text/x-python","patch_set":10,"id":"3a71b18c_6dc179e4","line":108,"range":{"start_line":108,"start_character":12,"end_line":108,"end_character":43},"updated":"2016-12-01 19:26:06.000000000","message":"I think line 136\u0027s strip() is fine because it removes spaces around \":\". However this strip() seems to add more complex thing Nova needs to support \" Cirrus Logic \" etc. I don\u0027t think that is mandatory for fixing the bug.","commit_id":"0866075c9fe707c5c6d696abc11755bb4aa198f6"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"9e0a36f0f1e0a73a17d6443354c5e35c33311cfb","unresolved":false,"context_lines":[{"line_number":105,"context_line":"        for jsonspecs in jaliases:"},{"line_number":106,"context_line":"            spec \u003d jsonutils.loads(jsonspecs)"},{"line_number":107,"context_line":"            jsonschema.validate(spec, _ALIAS_SCHEMA)"},{"line_number":108,"context_line":"            name \u003d spec.pop(\"name\").strip()"},{"line_number":109,"context_line":"            dev_type \u003d spec.pop(\u0027device_type\u0027, None)"},{"line_number":110,"context_line":"            if dev_type:"},{"line_number":111,"context_line":"                spec[\u0027dev_type\u0027] \u003d dev_type"}],"source_content_type":"text/x-python","patch_set":10,"id":"3a71b18c_9ea0aff6","line":108,"range":{"start_line":108,"start_character":12,"end_line":108,"end_character":43},"in_reply_to":"3a71b18c_6dc179e4","updated":"2016-12-02 01:02:09.000000000","message":"If we didn\u0027t strip at here. So there may have configuration like\"   Cirrus Logic   \",  then when user input this into the flavor. The string is stripped. They can\u0027t match again. So I think we should keep consistent behaviour in configuration and extra specs","commit_id":"0866075c9fe707c5c6d696abc11755bb4aa198f6"},{"author":{"_account_id":6167,"name":"Ken\u0027ichi Ohmichi","email":"ken1ohmichi@gmail.com","username":"oomichi"},"change_message_id":"b0a3b65448620426e313723811c78d84d6f776b0","unresolved":false,"context_lines":[{"line_number":105,"context_line":"        for jsonspecs in jaliases:"},{"line_number":106,"context_line":"            spec \u003d jsonutils.loads(jsonspecs)"},{"line_number":107,"context_line":"            jsonschema.validate(spec, _ALIAS_SCHEMA)"},{"line_number":108,"context_line":"            name \u003d spec.pop(\"name\").strip()"},{"line_number":109,"context_line":"            dev_type \u003d spec.pop(\u0027device_type\u0027, None)"},{"line_number":110,"context_line":"            if dev_type:"},{"line_number":111,"context_line":"                spec[\u0027dev_type\u0027] \u003d dev_type"}],"source_content_type":"text/x-python","patch_set":10,"id":"3a71b18c_1e3d7f2b","line":108,"range":{"start_line":108,"start_character":12,"end_line":108,"end_character":43},"in_reply_to":"3a71b18c_9ea0aff6","updated":"2016-12-02 01:28:20.000000000","message":"My understanding is that the original alias_spec.replace(\u0027 \u0027, \u0027\u0027) of line 135 is for removing spaces around \":\" like\n\n \"Cirrus Logic: 4, IntelNIC: 3\"\n\nfrom flavor extra-spec. \" Cirrus Logic\" doesn\u0027t seem a main purpose.\n\nYeah, as you said, the mismatch can happen but that is a corner case for me. If we really need this strip(), it is nice to write NOTE why we need this strip() here for the maintenance.","commit_id":"0866075c9fe707c5c6d696abc11755bb4aa198f6"},{"author":{"_account_id":6167,"name":"Ken\u0027ichi Ohmichi","email":"ken1ohmichi@gmail.com","username":"oomichi"},"change_message_id":"7298f435e81ab0bd925e4ac4b9f26c06e7bc65df","unresolved":false,"context_lines":[{"line_number":133,"context_line":""},{"line_number":134,"context_line":"    pci_requests \u003d []  # list of a specs dict"},{"line_number":135,"context_line":"    for name, count in [spec.split(\u0027:\u0027) for spec in alias_spec.split(\u0027,\u0027)]:"},{"line_number":136,"context_line":"        # It should keep consistent behaviour in configuration "},{"line_number":137,"context_line":"        # and extra specs to call strip() function."},{"line_number":138,"context_line":"        name \u003d name.strip()"},{"line_number":139,"context_line":"        if name not in pci_aliases:"},{"line_number":140,"context_line":"            raise exception.PciRequestAliasNotDefined(alias\u003dname)"}],"source_content_type":"text/x-python","patch_set":11,"id":"3a71b18c_1f3819d3","line":137,"range":{"start_line":136,"start_character":8,"end_line":137,"end_character":51},"updated":"2016-12-02 02:41:14.000000000","message":"Please move this to line 108.","commit_id":"34d29aac9bd3f401cd25aab071d92a61bea8df0a"}],"nova/tests/unit/pci/test_request.py":[{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"81925575ea2480069726eb1077c02239a4e8e991","unresolved":false,"context_lines":[{"line_number":78,"context_line":"        self.flags(alias\u003d[_fake_alias4], group\u003d\u0027pci\u0027)"},{"line_number":79,"context_line":"        als \u003d request._get_alias_from_config()"},{"line_number":80,"context_line":"        self.assertIsInstance(als[\u0027Cirrus Logic\u0027], list)"},{"line_number":81,"context_line":"        expect_dict \u003d {"},{"line_number":82,"context_line":"            \"capability_type\": \"pci\","},{"line_number":83,"context_line":"            \"product_id\": \"0ff2\","},{"line_number":84,"context_line":"            \"vendor_id\": \"10de\","},{"line_number":85,"context_line":"            \"device_type\": \"type-PCI\""},{"line_number":86,"context_line":"            }"},{"line_number":87,"context_line":""},{"line_number":88,"context_line":"    def test_multispec_alias(self):"},{"line_number":89,"context_line":"        self.flags(alias\u003d[_fake_alias1, _fake_alias11], group\u003d\u0027pci\u0027)"}],"source_content_type":"text/x-python","patch_set":5,"id":"7a77a97e_ea4544b3","line":86,"range":{"start_line":81,"start_character":8,"end_line":86,"end_character":13},"updated":"2016-11-16 08:35:09.000000000","message":"test something here","commit_id":"805523e3295f5e7934376a913c9aecb21121b8c0"},{"author":{"_account_id":17973,"name":"Ludovic Beliveau","email":"lbeliveau@gmail.com","username":"lbeliveau"},"change_message_id":"44be324ac89a904d750597a39521db2b76334301","unresolved":false,"context_lines":[{"line_number":198,"context_line":"        self.assertEqual(set([p[\u0027count\u0027] for p in requests]), set([1, 3]))"},{"line_number":199,"context_line":"        self._verify_result(expect_request, requests)"},{"line_number":200,"context_line":""},{"line_number":201,"context_line":"    def test_aliase_2_request_including_space(self):"},{"line_number":202,"context_line":"        self.flags(alias\u003d[_fake_alias3, _fake_alias4], group\u003d\u0027pci\u0027)"},{"line_number":203,"context_line":"        expect_request \u003d ["},{"line_number":204,"context_line":"            {\u0027count\u0027: 4,"}],"source_content_type":"text/x-python","patch_set":6,"id":"7a77a97e_eaec64f5","line":201,"updated":"2016-11-22 14:53:02.000000000","message":"I think you should remove this unit test.  It\u0027s mostly a duplicate of test_get_pci_requests_from_flavor_including_space().\n\nget_pci_requests_from_flavor() will call _translate_alias_to_requests().  So I think this test is not needed.","commit_id":"367529d777962474b7a94c2e8b2d3a450a8d3b3a"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"27f093c1eb76ebc7d595575aa1acc6e61f7e11b3","unresolved":false,"context_lines":[{"line_number":198,"context_line":"        self.assertEqual(set([p[\u0027count\u0027] for p in requests]), set([1, 3]))"},{"line_number":199,"context_line":"        self._verify_result(expect_request, requests)"},{"line_number":200,"context_line":""},{"line_number":201,"context_line":"    def test_aliase_2_request_including_space(self):"},{"line_number":202,"context_line":"        self.flags(alias\u003d[_fake_alias3, _fake_alias4], group\u003d\u0027pci\u0027)"},{"line_number":203,"context_line":"        expect_request \u003d ["},{"line_number":204,"context_line":"            {\u0027count\u0027: 4,"}],"source_content_type":"text/x-python","patch_set":6,"id":"7a77a97e_404ff4bd","line":201,"in_reply_to":"7a77a97e_eaec64f5","updated":"2016-11-22 16:16:24.000000000","message":"There could be value in this if it tested something that was currently broken. Do aliases with the similar names - one with a space and one without - cause issues at the moment? If so, test. If not, remove this as Ludovic suggests :)","commit_id":"367529d777962474b7a94c2e8b2d3a450a8d3b3a"},{"author":{"_account_id":17973,"name":"Ludovic Beliveau","email":"lbeliveau@gmail.com","username":"lbeliveau"},"change_message_id":"7b3838ae5ec94ca3ba2d3e41932caca9b427509e","unresolved":false,"context_lines":[{"line_number":84,"context_line":"            \"vendor_id\": \"10de\","},{"line_number":85,"context_line":"            \"dev_type\": \"type-PCI\""},{"line_number":86,"context_line":"            }"},{"line_number":87,"context_line":"        self.assertEqual(expect_dict, als[\u0027Cirrus Logic\u0027][0])"},{"line_number":88,"context_line":""},{"line_number":89,"context_line":"    def test_multispec_alias(self):"},{"line_number":90,"context_line":"        self.flags(alias\u003d[_fake_alias1, _fake_alias11], group\u003d\u0027pci\u0027)"}],"source_content_type":"text/x-python","patch_set":9,"id":"5a74a57a_8a030d76","line":87,"updated":"2016-11-30 13:24:40.000000000","message":"I think we should also drop this unit test.  This case is already tested by test_get_pci_requests_from_flavor_including_space().\n\nCan you also add a test for an alias with a white space either at the beginning or the end of an alias ?","commit_id":"888c2044f4015ed90e67ae77b2ee6fdb242e30d3"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"292b08422270689f8c972aa8fe517a1540b7e50e","unresolved":false,"context_lines":[{"line_number":84,"context_line":"            \"vendor_id\": \"10de\","},{"line_number":85,"context_line":"            \"dev_type\": \"type-PCI\""},{"line_number":86,"context_line":"            }"},{"line_number":87,"context_line":"        self.assertEqual(expect_dict, als[\u0027Cirrus Logic\u0027][0])"},{"line_number":88,"context_line":""},{"line_number":89,"context_line":"    def test_multispec_alias(self):"},{"line_number":90,"context_line":"        self.flags(alias\u003d[_fake_alias1, _fake_alias11], group\u003d\u0027pci\u0027)"}],"source_content_type":"text/x-python","patch_set":9,"id":"5a74a57a_05018c6a","line":87,"in_reply_to":"5a74a57a_8a030d76","updated":"2016-12-01 03:14:28.000000000","message":"We can keep this untest, but this test case should ensure the space stripped for alias from config.","commit_id":"888c2044f4015ed90e67ae77b2ee6fdb242e30d3"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"292b08422270689f8c972aa8fe517a1540b7e50e","unresolved":false,"context_lines":[{"line_number":242,"context_line":"             \u0027alias_name\u0027: \u0027IntelNIC\u0027}, ]"},{"line_number":243,"context_line":""},{"line_number":244,"context_line":"        flavor \u003d {\u0027extra_specs\u0027: {\"pci_passthrough:alias\":"},{"line_number":245,"context_line":"                                  \"Cirrus Logic : 4, IntelNIC: 3\"}}"},{"line_number":246,"context_line":"        requests \u003d request.get_pci_requests_from_flavor(flavor)"},{"line_number":247,"context_line":"        self.assertEqual(set([3, 4]),"},{"line_number":248,"context_line":"                         set([p.count for p in requests.requests]))"}],"source_content_type":"text/x-python","patch_set":9,"id":"5a74a57a_654960d0","line":245,"range":{"start_line":245,"start_character":35,"end_line":245,"end_character":48},"updated":"2016-12-01 03:14:28.000000000","message":"Maybe just add another space in the front of \"Cirrus Logic \" is enough. \" Cirrus Logic \"","commit_id":"888c2044f4015ed90e67ae77b2ee6fdb242e30d3"},{"author":{"_account_id":6167,"name":"Ken\u0027ichi Ohmichi","email":"ken1ohmichi@gmail.com","username":"oomichi"},"change_message_id":"70c29a9c04fbd868aeb5ed4b925e521ab27f7a9e","unresolved":false,"context_lines":[{"line_number":53,"context_line":"               }\"\"\""},{"line_number":54,"context_line":""},{"line_number":55,"context_line":"_fake_alias4 \u003d \"\"\"{"},{"line_number":56,"context_line":"               \"name\": \" Cirrus Logic \","},{"line_number":57,"context_line":"               \"capability_type\": \"pci\","},{"line_number":58,"context_line":"               \"product_id\": \"0ff2\","},{"line_number":59,"context_line":"               \"vendor_id\": \"10de\","}],"source_content_type":"text/x-python","patch_set":10,"id":"3a71b18c_ada47157","line":56,"range":{"start_line":56,"start_character":23,"end_line":56,"end_character":38},"updated":"2016-12-01 19:26:06.000000000","message":"I don\u0027t think we really need to support this case, that seems to add more complex thing.","commit_id":"0866075c9fe707c5c6d696abc11755bb4aa198f6"}]}
