)]}'
{"nova/pci/utils.py":[{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"60aed9c1583032788942477481a1dd356151c948","unresolved":false,"context_lines":[{"line_number":83,"context_line":"    if os.path.isdir(dev_path):"},{"line_number":84,"context_line":"        try:"},{"line_number":85,"context_line":"            # sriov_totalvfs contains the maximum possible VFs for this PF"},{"line_number":86,"context_line":"            with open(dev_path + \u0027/\u0027 + _SRIOV_TOTALVFS) as fd:"},{"line_number":87,"context_line":"                sriov_totalvfs \u003d int(fd.read())"},{"line_number":88,"context_line":"                return (os.readlink(dev_path).strip(\"./\"),"},{"line_number":89,"context_line":"                        sriov_totalvfs \u003e 0)"}],"source_content_type":"text/x-python","patch_set":1,"id":"7a8ec9b2_0f59ea8e","line":86,"updated":"2016-09-19 15:36:47.000000000","message":"Honestly, this should probably be using os.path.join():\n\n    with open(os.path.join(dev_path, _SRIOV_TOTALVFS)) as fd:","commit_id":"d07ebdcff7276a5396d224066fe4def8a976239f"},{"author":{"_account_id":21683,"name":"edan david","email":"edand@mellanox.com","username":"edand"},"change_message_id":"13e04d561a2263148d0e82a52fe02fbd0db13473","unresolved":false,"context_lines":[{"line_number":83,"context_line":"    if os.path.isdir(dev_path):"},{"line_number":84,"context_line":"        try:"},{"line_number":85,"context_line":"            # sriov_totalvfs contains the maximum possible VFs for this PF"},{"line_number":86,"context_line":"            with open(dev_path + \u0027/\u0027 + _SRIOV_TOTALVFS) as fd:"},{"line_number":87,"context_line":"                sriov_totalvfs \u003d int(fd.read())"},{"line_number":88,"context_line":"                return (os.readlink(dev_path).strip(\"./\"),"},{"line_number":89,"context_line":"                        sriov_totalvfs \u003e 0)"}],"source_content_type":"text/x-python","patch_set":1,"id":"7a8ec9b2_9d5b582e","line":86,"in_reply_to":"7a8ec9b2_0f59ea8e","updated":"2016-09-20 06:06:28.000000000","message":"Done","commit_id":"d07ebdcff7276a5396d224066fe4def8a976239f"}],"nova/tests/unit/pci/test_utils.py":[{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"463148227e85bd8d41f9ba797ce1f522dc33c1ad","unresolved":false,"context_lines":[{"line_number":99,"context_line":"        mock_readlink.return_value \u003d \u0027../../../0000:00:00.1\u0027"},{"line_number":100,"context_line":"        with mock.patch.object("},{"line_number":101,"context_line":"            builtins, \u0027open\u0027, mock.mock_open(read_data\u003d\u00274\u0027)) as mock_open:"},{"line_number":102,"context_line":"            utils.get_function_by_ifname(ifname)"},{"line_number":103,"context_line":"            mock_open.assert_called_once_with(totalvf_path)"},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"    @mock.patch(\u0027os.path.isdir\u0027, return_value\u003dFalse)"}],"source_content_type":"text/x-python","patch_set":2,"id":"7a8ec9b2_8d2f7f87","line":102,"range":{"start_line":102,"start_character":12,"end_line":102,"end_character":48},"updated":"2016-09-20 15:34:34.000000000","message":"I would expect some sort of assertion on the return values from the function.","commit_id":"c7d2ac8884836a4a46ce1aa912e64a963d1e6d60"},{"author":{"_account_id":21683,"name":"edan david","email":"edand@mellanox.com","username":"edand"},"change_message_id":"7e279d1097614a97ac16a649f15a0300f2768675","unresolved":false,"context_lines":[{"line_number":99,"context_line":"        mock_readlink.return_value \u003d \u0027../../../0000:00:00.1\u0027"},{"line_number":100,"context_line":"        with mock.patch.object("},{"line_number":101,"context_line":"            builtins, \u0027open\u0027, mock.mock_open(read_data\u003d\u00274\u0027)) as mock_open:"},{"line_number":102,"context_line":"            utils.get_function_by_ifname(ifname)"},{"line_number":103,"context_line":"            mock_open.assert_called_once_with(totalvf_path)"},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"    @mock.patch(\u0027os.path.isdir\u0027, return_value\u003dFalse)"}],"source_content_type":"text/x-python","patch_set":2,"id":"7a8ec9b2_0636d3e6","line":102,"range":{"start_line":102,"start_character":12,"end_line":102,"end_character":48},"in_reply_to":"7a8ec9b2_8d2f7f87","updated":"2016-09-21 05:35:56.000000000","message":"I\u0027ve squashed this test with \u0027test_physical_function\u0027,\nseems less code duplication and that the path should be validated there anyway.","commit_id":"c7d2ac8884836a4a46ce1aa912e64a963d1e6d60"}]}
