)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":26458,"name":"Brin Zhang","email":"zhangbailin@inspur.com","username":"zhangbailin"},"change_message_id":"c92178ef772603b9448587795da052607a1af8e5","unresolved":false,"context_lines":[{"line_number":12,"context_line":""},{"line_number":13,"context_line":"This doesn\u0027t remove the /v1/deployables/ yet."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"[1] https://opendev.org/openstack/cyborg-specs/src/branch/master/specs/train/approved/cyborg-api.rst"},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"Change-Id: Ib7cfb386fe769c7dbeb7578ff2475a41e5f447e0"},{"line_number":18,"context_line":"Story: 2006926"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"1fa4df85_394f3c35","line":15,"range":{"start_line":15,"start_character":4,"end_line":15,"end_character":100},"updated":"2020-03-19 07:14:16.000000000","message":"nit: change this to https://specs.openstack.org/openstack/cyborg-specs/specs/train/approved/cyborg-api.html","commit_id":"367402bff191a48a19ae45d2bc0fab8147bd3a5d"}],"cyborg/accelerator/drivers/fpga/intel/driver.py":[{"author":{"_account_id":21672,"name":"Sundar Nadathur","email":"sundar.nadathur@intel.com","username":"nsundar"},"change_message_id":"ad6e1a57606169c9626a57aa46883a2a710761c4","unresolved":false,"context_lines":[{"line_number":72,"context_line":"                                        expected\u003d\u0027PCI\u0027)"},{"line_number":73,"context_line":"        cmd_args \u003d []"},{"line_number":74,"context_line":"        bdf_dict \u003d controlpath_id[\u0027cpid_info\u0027]"},{"line_number":75,"context_line":"        # fitting format to the OPAE command."},{"line_number":76,"context_line":"        bdf \u003d [\u00270x\u0027 + s for s in map(lambda x: bdf_dict[x],"},{"line_number":77,"context_line":"               [\"bus\", \"device\", \"function\"])]"},{"line_number":78,"context_line":"        for i in zip([\"--bus\", \"--device\", \"--function\"], bdf):"}],"source_content_type":"text/x-python","patch_set":2,"id":"df33271e_37400c08","line":75,"updated":"2020-04-06 08:01:34.000000000","message":"What is the purpose of this change? It was working before, right?","commit_id":"9f1f39a1955e336d604846a2d3bea14a616330b2"},{"author":{"_account_id":30759,"name":"Shogo Saito","email":"shogo.saito.ac@hco.ntt.co.jp","username":"s.shogo"},"change_message_id":"338388262319b1751219890ee96720a742a21b93","unresolved":false,"context_lines":[{"line_number":72,"context_line":"                                        expected\u003d\u0027PCI\u0027)"},{"line_number":73,"context_line":"        cmd_args \u003d []"},{"line_number":74,"context_line":"        bdf_dict \u003d controlpath_id[\u0027cpid_info\u0027]"},{"line_number":75,"context_line":"        # fitting format to the OPAE command."},{"line_number":76,"context_line":"        bdf \u003d [\u00270x\u0027 + s for s in map(lambda x: bdf_dict[x],"},{"line_number":77,"context_line":"               [\"bus\", \"device\", \"function\"])]"},{"line_number":78,"context_line":"        for i in zip([\"--bus\", \"--device\", \"--function\"], bdf):"}],"source_content_type":"text/x-python","patch_set":2,"id":"3f4c43b2_39501833","line":75,"in_reply_to":"df33271e_37400c08","updated":"2020-04-13 08:29:55.000000000","message":"The before one doesn\u0027t work well in my real env with OPAE.\nLet me confirm,\"fpgaconf command\" needs \"0x\" as a prefix, right?\nThis patch intend to fit the original one to the format.\n(This might be better to discuss as another bug-patch.)","commit_id":"9f1f39a1955e336d604846a2d3bea14a616330b2"},{"author":{"_account_id":21672,"name":"Sundar Nadathur","email":"sundar.nadathur@intel.com","username":"nsundar"},"change_message_id":"ad6e1a57606169c9626a57aa46883a2a710761c4","unresolved":false,"context_lines":[{"line_number":82,"context_line":"        try:"},{"line_number":83,"context_line":"            # TODO(Sundar) Check return code if it is retryable"},{"line_number":84,"context_line":"            _fpga_program_privileged(cmd_args)"},{"line_number":85,"context_line":"            return True"},{"line_number":86,"context_line":"        except Exception:"},{"line_number":87,"context_line":"            # NOTE(Sundar): processutils.exec will log the error."},{"line_number":88,"context_line":"            # TODO(Sundar): If retryable error, try again."}],"source_content_type":"text/x-python","patch_set":2,"id":"df33271e_32213aa1","line":85,"range":{"start_line":85,"start_character":19,"end_line":85,"end_character":23},"updated":"2020-04-06 08:01:34.000000000","message":"We should consider returning a meaningful error message from the driver rather than a boolean success/failure.","commit_id":"9f1f39a1955e336d604846a2d3bea14a616330b2"},{"author":{"_account_id":30759,"name":"Shogo Saito","email":"shogo.saito.ac@hco.ntt.co.jp","username":"s.shogo"},"change_message_id":"aeaa500f7145eed196cc14b6a23cb346e36654fa","unresolved":false,"context_lines":[{"line_number":82,"context_line":"        try:"},{"line_number":83,"context_line":"            # TODO(Sundar) Check return code if it is retryable"},{"line_number":84,"context_line":"            _fpga_program_privileged(cmd_args)"},{"line_number":85,"context_line":"            return True"},{"line_number":86,"context_line":"        except Exception:"},{"line_number":87,"context_line":"            # NOTE(Sundar): processutils.exec will log the error."},{"line_number":88,"context_line":"            # TODO(Sundar): If retryable error, try again."}],"source_content_type":"text/x-python","patch_set":2,"id":"bf51134e_a17152e1","line":85,"range":{"start_line":85,"start_character":19,"end_line":85,"end_character":23},"in_reply_to":"3f4c43b2_d923f4bd","updated":"2020-06-18 12:09:05.000000000","message":"Add this topic as TODO.","commit_id":"9f1f39a1955e336d604846a2d3bea14a616330b2"},{"author":{"_account_id":30759,"name":"Shogo Saito","email":"shogo.saito.ac@hco.ntt.co.jp","username":"s.shogo"},"change_message_id":"338388262319b1751219890ee96720a742a21b93","unresolved":false,"context_lines":[{"line_number":82,"context_line":"        try:"},{"line_number":83,"context_line":"            # TODO(Sundar) Check return code if it is retryable"},{"line_number":84,"context_line":"            _fpga_program_privileged(cmd_args)"},{"line_number":85,"context_line":"            return True"},{"line_number":86,"context_line":"        except Exception:"},{"line_number":87,"context_line":"            # NOTE(Sundar): processutils.exec will log the error."},{"line_number":88,"context_line":"            # TODO(Sundar): If retryable error, try again."}],"source_content_type":"text/x-python","patch_set":2,"id":"3f4c43b2_d923f4bd","line":85,"range":{"start_line":85,"start_character":19,"end_line":85,"end_character":23},"in_reply_to":"df33271e_32213aa1","updated":"2020-04-13 08:29:55.000000000","message":"I agree the meaningful error message is better.\nLet me confirm, the style of error description, your mean is like mentioned in [1] ?\nI investigated the meaning of the return value from \"fpgaconf\" and there are no information in OPAE manual[2], and found the meaning of error code in OPAE repository[3].\nI would like to write the error message according to retval\u0027s description[3], is ok?\n\n\n[1] https://specs.openstack.org/openstack/cyborg-specs/specs/rocky/approved/cyborg-fpga-programming-proposal.html\n[2] https://opae.github.io/1.0.1/docs/fpga_tools/fpgaconf/fpgaconf.html\n[3] https://github.com/OPAE/opae-sdk/blob/master/tools/fpgaconf/fpgaconf.c#L544","commit_id":"9f1f39a1955e336d604846a2d3bea14a616330b2"},{"author":{"_account_id":26458,"name":"Brin Zhang","email":"zhangbailin@inspur.com","username":"zhangbailin"},"change_message_id":"b6909baa4d17f34cec9baaeeb953645544dbf276","unresolved":false,"context_lines":[{"line_number":33,"context_line":"    # NOTE(Sundar): If we take cmd as parameter, this function can"},{"line_number":34,"context_line":"    # be abused to run abritrary commands in privileged mode. So"},{"line_number":35,"context_line":"    # only cmd_args are passed in."},{"line_number":36,"context_line":"    # TODO(Sundar) Do not hardcode fpgaconf."},{"line_number":37,"context_line":"    # Use right tool based on bitstream type."},{"line_number":38,"context_line":"    cmd \u003d [\"/usr/bin/fpgaconf\"]"},{"line_number":39,"context_line":"    cmd.extend(cmd_args)"},{"line_number":40,"context_line":"    # processutils will log the command line."}],"source_content_type":"text/x-python","patch_set":4,"id":"1f493fa4_5a4b5486","line":37,"range":{"start_line":36,"start_character":4,"end_line":37,"end_character":45},"updated":"2020-04-21 03:02:42.000000000","message":"Can be complete this TODO? is there any tools can do this thing?","commit_id":"26a36395f7d3725070a0573e1eea408441f70082"},{"author":{"_account_id":30759,"name":"Shogo Saito","email":"shogo.saito.ac@hco.ntt.co.jp","username":"s.shogo"},"change_message_id":"aeaa500f7145eed196cc14b6a23cb346e36654fa","unresolved":false,"context_lines":[{"line_number":33,"context_line":"    # NOTE(Sundar): If we take cmd as parameter, this function can"},{"line_number":34,"context_line":"    # be abused to run abritrary commands in privileged mode. So"},{"line_number":35,"context_line":"    # only cmd_args are passed in."},{"line_number":36,"context_line":"    # TODO(Sundar) Do not hardcode fpgaconf."},{"line_number":37,"context_line":"    # Use right tool based on bitstream type."},{"line_number":38,"context_line":"    cmd \u003d [\"/usr/bin/fpgaconf\"]"},{"line_number":39,"context_line":"    cmd.extend(cmd_args)"},{"line_number":40,"context_line":"    # processutils will log the command line."}],"source_content_type":"text/x-python","patch_set":4,"id":"bf51134e_46604ca6","line":37,"range":{"start_line":36,"start_character":4,"end_line":37,"end_character":45},"in_reply_to":"1f493fa4_5a4b5486","updated":"2020-06-18 12:09:05.000000000","message":"For now, it is difficult to choose proper command , that depends on OPAE versions and board.\nIMO, we need more discussions with intel folks,and improve this in another patch.","commit_id":"26a36395f7d3725070a0573e1eea408441f70082"},{"author":{"_account_id":25738,"name":"Xinran WANG","email":"xin-ran.wang@intel.com","username":"Xinran"},"change_message_id":"57b259122f522e1091701d0907422f543d70d26e","unresolved":false,"context_lines":[{"line_number":35,"context_line":"    # only cmd_args are passed in."},{"line_number":36,"context_line":"    # TODO(Sundar) Do not hardcode fpgaconf."},{"line_number":37,"context_line":"    # Use right tool based on bitstream type."},{"line_number":38,"context_line":"    cmd \u003d [\"/usr/bin/fpgaconf\"]"},{"line_number":39,"context_line":"    cmd.extend(cmd_args)"},{"line_number":40,"context_line":"    # processutils will log the command line."},{"line_number":41,"context_line":"    return processutils.execute(*cmd)"}],"source_content_type":"text/x-python","patch_set":4,"id":"3f4c43b2_49dd0f13","line":38,"range":{"start_line":38,"start_character":0,"end_line":38,"end_character":31},"updated":"2020-04-16 07:38:16.000000000","message":"Here we need to ensure the command, afaik, the newer opae version uses fpgasupdate for programming. This command should be consistent with opae version we installed.","commit_id":"26a36395f7d3725070a0573e1eea408441f70082"},{"author":{"_account_id":30759,"name":"Shogo Saito","email":"shogo.saito.ac@hco.ntt.co.jp","username":"s.shogo"},"change_message_id":"daad2e4af950a7a63463572ad193cd5562167efe","unresolved":false,"context_lines":[{"line_number":35,"context_line":"    # only cmd_args are passed in."},{"line_number":36,"context_line":"    # TODO(Sundar) Do not hardcode fpgaconf."},{"line_number":37,"context_line":"    # Use right tool based on bitstream type."},{"line_number":38,"context_line":"    cmd \u003d [\"/usr/bin/fpgaconf\"]"},{"line_number":39,"context_line":"    cmd.extend(cmd_args)"},{"line_number":40,"context_line":"    # processutils will log the command line."},{"line_number":41,"context_line":"    return processutils.execute(*cmd)"}],"source_content_type":"text/x-python","patch_set":4,"id":"3f4c43b2_92cba870","line":38,"range":{"start_line":38,"start_character":0,"end_line":38,"end_character":31},"in_reply_to":"3f4c43b2_49dd0f13","updated":"2020-04-17 07:53:50.000000000","message":"Yes,that\u0027s right.\nIMO, the \"fpgaconf\" command is still under the support, this  logic using fpgaconf should be kept here, right?\nI would like to consider how to select the command( fpgaconf or fpgasupdate ) as another patch, and add TODO here.\nToward the future patch: there idea to check the installed OPAE version?","commit_id":"26a36395f7d3725070a0573e1eea408441f70082"},{"author":{"_account_id":26458,"name":"Brin Zhang","email":"zhangbailin@inspur.com","username":"zhangbailin"},"change_message_id":"b6909baa4d17f34cec9baaeeb953645544dbf276","unresolved":false,"context_lines":[{"line_number":35,"context_line":"    # only cmd_args are passed in."},{"line_number":36,"context_line":"    # TODO(Sundar) Do not hardcode fpgaconf."},{"line_number":37,"context_line":"    # Use right tool based on bitstream type."},{"line_number":38,"context_line":"    cmd \u003d [\"/usr/bin/fpgaconf\"]"},{"line_number":39,"context_line":"    cmd.extend(cmd_args)"},{"line_number":40,"context_line":"    # processutils will log the command line."},{"line_number":41,"context_line":"    return processutils.execute(*cmd)"}],"source_content_type":"text/x-python","patch_set":4,"id":"1f493fa4_5a199486","line":38,"range":{"start_line":38,"start_character":0,"end_line":38,"end_character":31},"in_reply_to":"3f4c43b2_92cba870","updated":"2020-04-21 03:02:42.000000000","message":"Is it possible to get the current \"fpgaconf\" through command query? if we pass hardcode I am worried about the big compatibility problem.\n\nMaybe this is the TODO write by Sundar.","commit_id":"26a36395f7d3725070a0573e1eea408441f70082"},{"author":{"_account_id":14131,"name":"shaohef","email":"shaohe.feng@intel.com","username":"shaohefeng"},"change_message_id":"e101a14029dd14a9190c4202b49641150878de06","unresolved":false,"context_lines":[{"line_number":84,"context_line":"        try:"},{"line_number":85,"context_line":"            # TODO(s_shogo): We should consider returning"},{"line_number":86,"context_line":"            # a meaningful error message from the driver rather than"},{"line_number":87,"context_line":"            # a boolean success/failure."},{"line_number":88,"context_line":"            _fpga_program_privileged(cmd_args)"},{"line_number":89,"context_line":"            return True"},{"line_number":90,"context_line":"        except Exception:"}],"source_content_type":"text/x-python","patch_set":5,"id":"bf51134e_38767a3f","line":87,"range":{"start_line":87,"start_character":0,"end_line":87,"end_character":40},"updated":"2020-06-28 09:43:38.000000000","message":"Thanks.\n\nIf async program, we should consider a good way how to pass the error message to user?","commit_id":"249aef707dff60f140ba371bb3357ad4c1b3473c"},{"author":{"_account_id":26458,"name":"Brin Zhang","email":"zhangbailin@inspur.com","username":"zhangbailin"},"change_message_id":"4d24738feed8d992a584ed95113cc2634a130ebb","unresolved":false,"context_lines":[{"line_number":84,"context_line":"        try:"},{"line_number":85,"context_line":"            # TODO(s_shogo): We should consider returning"},{"line_number":86,"context_line":"            # a meaningful error message from the driver rather than"},{"line_number":87,"context_line":"            # a boolean success/failure."},{"line_number":88,"context_line":"            _fpga_program_privileged(cmd_args)"},{"line_number":89,"context_line":"            return True"},{"line_number":90,"context_line":"        except Exception:"}],"source_content_type":"text/x-python","patch_set":5,"id":"bf51134e_a1a9b690","line":87,"range":{"start_line":87,"start_character":0,"end_line":87,"end_character":40},"in_reply_to":"bf51134e_38767a3f","updated":"2020-06-29 00:16:12.000000000","message":"If we use the asyn method, we can prompt the user that the request was successful, but whether the final execution result is successful can not be traced back. IMO, the best way is to tell the user through the log that *program* execution has failed.\n\nQA: It is worth considering that the accuracy required by *program* for programming is worth considering doing so?","commit_id":"249aef707dff60f140ba371bb3357ad4c1b3473c"},{"author":{"_account_id":30759,"name":"Shogo Saito","email":"shogo.saito.ac@hco.ntt.co.jp","username":"s.shogo"},"change_message_id":"7f5ec30e12043dafe916ad83b3b9016294a17695","unresolved":false,"context_lines":[{"line_number":84,"context_line":"        try:"},{"line_number":85,"context_line":"            # TODO(s_shogo): We should consider returning"},{"line_number":86,"context_line":"            # a meaningful error message from the driver rather than"},{"line_number":87,"context_line":"            # a boolean success/failure."},{"line_number":88,"context_line":"            _fpga_program_privileged(cmd_args)"},{"line_number":89,"context_line":"            return True"},{"line_number":90,"context_line":"        except Exception:"}],"source_content_type":"text/x-python","patch_set":5,"id":"bf51134e_65fbff46","line":87,"range":{"start_line":87,"start_character":0,"end_line":87,"end_character":40},"in_reply_to":"bf51134e_a1a9b690","updated":"2020-07-20 02:00:31.000000000","message":"As we discussed IRC, to support async is big task, and that should be handled as another patch.\n(Of course, how to treat the error messages is important issue.)\nWe had better to take discussion about that, in another place (like IRC) , with team member.","commit_id":"249aef707dff60f140ba371bb3357ad4c1b3473c"},{"author":{"_account_id":31412,"name":"Wenping Song","email":"songwenping@inspur.com","username":"songwenping"},"change_message_id":"fac2cc60bfeabd2b77bc93594dca0c36ade592f7","unresolved":false,"context_lines":[{"line_number":75,"context_line":"        cmd_args \u003d []"},{"line_number":76,"context_line":"        bdf_dict \u003d controlpath_id[\u0027cpid_info\u0027]"},{"line_number":77,"context_line":"        # fitting format to the OPAE command."},{"line_number":78,"context_line":"        bdf \u003d [\u00270x\u0027 + s for s in map(lambda x: bdf_dict[x],"},{"line_number":79,"context_line":"               [\"bus\", \"device\", \"function\"])]"},{"line_number":80,"context_line":"        for i in zip([\"--bus\", \"--device\", \"--function\"], bdf):"},{"line_number":81,"context_line":"            cmd_args.extend(i)"},{"line_number":82,"context_line":"        cmd_args.append(image_file_path)"}],"source_content_type":"text/x-python","patch_set":6,"id":"bf51134e_fe4d9c3b","line":79,"range":{"start_line":78,"start_character":0,"end_line":79,"end_character":46},"updated":"2020-07-23 02:17:26.000000000","message":"Better to add `try...except...` for get value from dict.\n\n\u003e\u003e\u003e bdf_dict\u003d{\"bus\":\u002700\u0027}\n\u003e\u003e\u003e bdf \u003d [\u00270x\u0027 + s for s in map(lambda x: bdf_dict[x], [\"bus\", \"device\", \"function\"])]\nTraceback (most recent call last):\n  File \"\u003cstdin\u003e\", line 1, in \u003cmodule\u003e\n  File \"\u003cstdin\u003e\", line 1, in \u003clambda\u003e\nKeyError: \u0027device\u0027","commit_id":"6e9e12d92fcba1391091af17c242e76b37b170bb"},{"author":{"_account_id":30759,"name":"Shogo Saito","email":"shogo.saito.ac@hco.ntt.co.jp","username":"s.shogo"},"change_message_id":"cddc48690258d67961fcc17aeb099b9971955aa7","unresolved":false,"context_lines":[{"line_number":75,"context_line":"        cmd_args \u003d []"},{"line_number":76,"context_line":"        bdf_dict \u003d controlpath_id[\u0027cpid_info\u0027]"},{"line_number":77,"context_line":"        # fitting format to the OPAE command."},{"line_number":78,"context_line":"        bdf \u003d [\u00270x\u0027 + s for s in map(lambda x: bdf_dict[x],"},{"line_number":79,"context_line":"               [\"bus\", \"device\", \"function\"])]"},{"line_number":80,"context_line":"        for i in zip([\"--bus\", \"--device\", \"--function\"], bdf):"},{"line_number":81,"context_line":"            cmd_args.extend(i)"},{"line_number":82,"context_line":"        cmd_args.append(image_file_path)"}],"source_content_type":"text/x-python","patch_set":6,"id":"9f560f44_b2e3f6a3","line":79,"range":{"start_line":78,"start_character":0,"end_line":79,"end_character":46},"in_reply_to":"bf51134e_fe4d9c3b","updated":"2020-08-06 08:19:48.000000000","message":"IMHO, this depends on the specification of intel Device ( a situation that has only \"bus\" is possible or not.)\nTo avoid this, initialize them with dummy parameter like \"00\", but that may cause side effect, in my concern.\nI would like to hear opinion from Intel folks, in this topic.","commit_id":"6e9e12d92fcba1391091af17c242e76b37b170bb"}],"cyborg/accelerator/drivers/fpga/intel/sysinfo.py":[{"author":{"_account_id":25738,"name":"Xinran WANG","email":"xin-ran.wang@intel.com","username":"Xinran"},"change_message_id":"57b259122f522e1091701d0907422f543d70d26e","unresolved":false,"context_lines":[{"line_number":200,"context_line":"        traits.append(\"CUSTOM_FPGA_INTEL_\" + PRODUCT_MAP.get(product_id))"},{"line_number":201,"context_line":"    for i in get_afu_ids(device_name):"},{"line_number":202,"context_line":"        la \u003d \"CUSTOM_FPGA_FUNCTION_ID_INTEL_\" + i.upper()"},{"line_number":203,"context_line":"        traits.append(la)"},{"line_number":204,"context_line":"    for i in get_region_ids(device_name):"},{"line_number":205,"context_line":"        la \u003d \"CUSTOM_FPGA_REGION_INTEL_\" + i.upper()"},{"line_number":206,"context_line":"        traits.append(la)"}],"source_content_type":"text/x-python","patch_set":4,"id":"3f4c43b2_09db071b","line":203,"range":{"start_line":203,"start_character":22,"end_line":203,"end_character":24},"updated":"2020-04-16 07:38:16.000000000","message":"maybe we can use name which has more meaning, like trait?","commit_id":"26a36395f7d3725070a0573e1eea408441f70082"},{"author":{"_account_id":30759,"name":"Shogo Saito","email":"shogo.saito.ac@hco.ntt.co.jp","username":"s.shogo"},"change_message_id":"daad2e4af950a7a63463572ad193cd5562167efe","unresolved":false,"context_lines":[{"line_number":200,"context_line":"        traits.append(\"CUSTOM_FPGA_INTEL_\" + PRODUCT_MAP.get(product_id))"},{"line_number":201,"context_line":"    for i in get_afu_ids(device_name):"},{"line_number":202,"context_line":"        la \u003d \"CUSTOM_FPGA_FUNCTION_ID_INTEL_\" + i.upper()"},{"line_number":203,"context_line":"        traits.append(la)"},{"line_number":204,"context_line":"    for i in get_region_ids(device_name):"},{"line_number":205,"context_line":"        la \u003d \"CUSTOM_FPGA_REGION_INTEL_\" + i.upper()"},{"line_number":206,"context_line":"        traits.append(la)"}],"source_content_type":"text/x-python","patch_set":4,"id":"3f4c43b2_d29a506c","line":203,"range":{"start_line":203,"start_character":22,"end_line":203,"end_character":24},"in_reply_to":"3f4c43b2_09db071b","updated":"2020-04-17 07:53:50.000000000","message":"Yes, \"la\" is little ambiguous.I\u0027ll clarify this.","commit_id":"26a36395f7d3725070a0573e1eea408441f70082"},{"author":{"_account_id":30759,"name":"Shogo Saito","email":"shogo.saito.ac@hco.ntt.co.jp","username":"s.shogo"},"change_message_id":"aeaa500f7145eed196cc14b6a23cb346e36654fa","unresolved":false,"context_lines":[{"line_number":200,"context_line":"        traits.append(\"CUSTOM_FPGA_INTEL_\" + PRODUCT_MAP.get(product_id))"},{"line_number":201,"context_line":"    for i in get_afu_ids(device_name):"},{"line_number":202,"context_line":"        la \u003d \"CUSTOM_FPGA_FUNCTION_ID_INTEL_\" + i.upper()"},{"line_number":203,"context_line":"        traits.append(la)"},{"line_number":204,"context_line":"    for i in get_region_ids(device_name):"},{"line_number":205,"context_line":"        la \u003d \"CUSTOM_FPGA_REGION_INTEL_\" + i.upper()"},{"line_number":206,"context_line":"        traits.append(la)"}],"source_content_type":"text/x-python","patch_set":4,"id":"bf51134e_0603f4b9","line":203,"range":{"start_line":203,"start_character":22,"end_line":203,"end_character":24},"in_reply_to":"3f4c43b2_d29a506c","updated":"2020-06-18 12:09:05.000000000","message":"Done","commit_id":"26a36395f7d3725070a0573e1eea408441f70082"},{"author":{"_account_id":26458,"name":"Brin Zhang","email":"zhangbailin@inspur.com","username":"zhangbailin"},"change_message_id":"6acd3f554899d80012a5b5718102a1d68fb853c7","unresolved":false,"context_lines":[{"line_number":199,"context_line":"        traits.append(\"CUSTOM_FPGA_INTEL\")"},{"line_number":200,"context_line":"        traits.append(\"CUSTOM_FPGA_INTEL_\" + PRODUCT_MAP.get(product_id))"},{"line_number":201,"context_line":"    for i in get_afu_ids(device_name):"},{"line_number":202,"context_line":"        trait \u003d \"CUSTOM_FPGA_FUNCTION_ID_INTEL_\" + i.upper()"},{"line_number":203,"context_line":"        traits.append(trait)"},{"line_number":204,"context_line":"    for i in get_region_ids(device_name):"},{"line_number":205,"context_line":"        trait \u003d \"CUSTOM_FPGA_REGION_INTEL_\" + i.upper()"}],"source_content_type":"text/x-python","patch_set":6,"id":"bf51134e_fedf5c63","line":202,"range":{"start_line":202,"start_character":8,"end_line":202,"end_character":13},"updated":"2020-07-23 02:41:55.000000000","message":"nit: this is not this patch need to do, but it\u0027s a nit.","commit_id":"6e9e12d92fcba1391091af17c242e76b37b170bb"},{"author":{"_account_id":30759,"name":"Shogo Saito","email":"shogo.saito.ac@hco.ntt.co.jp","username":"s.shogo"},"change_message_id":"cddc48690258d67961fcc17aeb099b9971955aa7","unresolved":false,"context_lines":[{"line_number":199,"context_line":"        traits.append(\"CUSTOM_FPGA_INTEL\")"},{"line_number":200,"context_line":"        traits.append(\"CUSTOM_FPGA_INTEL_\" + PRODUCT_MAP.get(product_id))"},{"line_number":201,"context_line":"    for i in get_afu_ids(device_name):"},{"line_number":202,"context_line":"        trait \u003d \"CUSTOM_FPGA_FUNCTION_ID_INTEL_\" + i.upper()"},{"line_number":203,"context_line":"        traits.append(trait)"},{"line_number":204,"context_line":"    for i in get_region_ids(device_name):"},{"line_number":205,"context_line":"        trait \u003d \"CUSTOM_FPGA_REGION_INTEL_\" + i.upper()"}],"source_content_type":"text/x-python","patch_set":6,"id":"9f560f44_35087026","line":202,"range":{"start_line":202,"start_character":8,"end_line":202,"end_character":13},"in_reply_to":"bf51134e_fedf5c63","updated":"2020-08-06 08:19:48.000000000","message":"This fix triggered from xinran\u0027s comment in this patch, thus this is included here.\n(Sure, this should be included in the another patch is right.)","commit_id":"6e9e12d92fcba1391091af17c242e76b37b170bb"}],"cyborg/agent/manager.py":[{"author":{"_account_id":25738,"name":"Xinran WANG","email":"xin-ran.wang@intel.com","username":"Xinran"},"change_message_id":"b57f85d131d854615d1d5088ce08f374055665fc","unresolved":false,"context_lines":[{"line_number":62,"context_line":"        control_path_id \u003d self.cond_api.control_path_id_get_by_device_id("},{"line_number":63,"context_line":"            context, device_id"},{"line_number":64,"context_line":"        )"},{"line_number":65,"context_line":"        driver \u003d self.fpga_driver.create(dev.vendor)"},{"line_number":66,"context_line":"        driver.program(control_path_id.cpid_info, path)"},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"    def fpga_program_v2(self, context, controlpath_id,"}],"source_content_type":"text/x-python","patch_set":1,"id":"3fa7e38b_fbe5a507","line":65,"range":{"start_line":65,"start_character":0,"end_line":65,"end_character":52},"updated":"2019-12-13 05:46:51.000000000","message":"Better to get driver name from deployable.","commit_id":"367402bff191a48a19ae45d2bc0fab8147bd3a5d"},{"author":{"_account_id":30759,"name":"Shogo Saito","email":"shogo.saito.ac@hco.ntt.co.jp","username":"s.shogo"},"change_message_id":"aeaa500f7145eed196cc14b6a23cb346e36654fa","unresolved":false,"context_lines":[{"line_number":62,"context_line":"        control_path_id \u003d self.cond_api.control_path_id_get_by_device_id("},{"line_number":63,"context_line":"            context, device_id"},{"line_number":64,"context_line":"        )"},{"line_number":65,"context_line":"        driver \u003d self.fpga_driver.create(dev.vendor)"},{"line_number":66,"context_line":"        driver.program(control_path_id.cpid_info, path)"},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"    def fpga_program_v2(self, context, controlpath_id,"}],"source_content_type":"text/x-python","patch_set":1,"id":"bf51134e_fb29399b","line":65,"range":{"start_line":65,"start_character":0,"end_line":65,"end_character":52},"in_reply_to":"3fa7e38b_fbe5a507","updated":"2020-06-18 12:09:05.000000000","message":"This fpga_program() is old one, the latest one doesn\u0027t onclude this.","commit_id":"367402bff191a48a19ae45d2bc0fab8147bd3a5d"},{"author":{"_account_id":26458,"name":"Brin Zhang","email":"zhangbailin@inspur.com","username":"zhangbailin"},"change_message_id":"c92178ef772603b9448587795da052607a1af8e5","unresolved":false,"context_lines":[{"line_number":65,"context_line":"        driver \u003d self.fpga_driver.create(dev.vendor)"},{"line_number":66,"context_line":"        driver.program(control_path_id.cpid_info, path)"},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"    def fpga_program_v2(self, context, controlpath_id,"},{"line_number":69,"context_line":"                        bitstream_uuid, driver_name):"},{"line_number":70,"context_line":"        # TODO() Use tempfile module?"},{"line_number":71,"context_line":"        download_path \u003d \"/tmp/\" + bitstream_uuid + \".gbs\""}],"source_content_type":"text/x-python","patch_set":1,"id":"1fa4df85_99aaf082","line":68,"updated":"2020-03-19 07:14:16.000000000","message":"Since we decrepate the v1 API, I think we can remove fpga_program() function and change fpga_program_v2() name to fpga_program().\n\nAnd I saw https://review.opendev.org/#/c/710911 wants to remove fpga_program().\n\nWe will merged https://review.opendev.org/#/c/710911/ first, then you can rebase on https://review.opendev.org/#/c/712835/, and all reabse to master.","commit_id":"367402bff191a48a19ae45d2bc0fab8147bd3a5d"},{"author":{"_account_id":30759,"name":"Shogo Saito","email":"shogo.saito.ac@hco.ntt.co.jp","username":"s.shogo"},"change_message_id":"aeaa500f7145eed196cc14b6a23cb346e36654fa","unresolved":false,"context_lines":[{"line_number":65,"context_line":"        driver \u003d self.fpga_driver.create(dev.vendor)"},{"line_number":66,"context_line":"        driver.program(control_path_id.cpid_info, path)"},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"    def fpga_program_v2(self, context, controlpath_id,"},{"line_number":69,"context_line":"                        bitstream_uuid, driver_name):"},{"line_number":70,"context_line":"        # TODO() Use tempfile module?"},{"line_number":71,"context_line":"        download_path \u003d \"/tmp/\" + bitstream_uuid + \".gbs\""}],"source_content_type":"text/x-python","patch_set":1,"id":"bf51134e_8670a4a7","line":68,"in_reply_to":"1fa4df85_99aaf082","updated":"2020-06-18 12:09:05.000000000","message":"Done","commit_id":"367402bff191a48a19ae45d2bc0fab8147bd3a5d"},{"author":{"_account_id":25738,"name":"Xinran WANG","email":"xin-ran.wang@intel.com","username":"Xinran"},"change_message_id":"b57f85d131d854615d1d5088ce08f374055665fc","unresolved":false,"context_lines":[{"line_number":51,"context_line":"        \"\"\"List installed hardware.\"\"\""},{"line_number":52,"context_line":"        pass"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"    def fpga_program(self, context, deployable_uuid, image_uuid):"},{"line_number":55,"context_line":"        \"\"\"Program a FPGA region, image can be a url or local file\"\"\""},{"line_number":56,"context_line":"        # TODO(Shaohe Feng) Get image from glance."},{"line_number":57,"context_line":"        # And add claim and rollback logical."},{"line_number":58,"context_line":"        path \u003d self._download_bitstream(context, image_uuid)"},{"line_number":59,"context_line":"        dep \u003d self.cond_api.deployable_get(context, deployable_uuid)"},{"line_number":60,"context_line":"        device_id \u003d dep.device_id"},{"line_number":61,"context_line":"        dev \u003d self.cond_api.device_get_by_id(context, device_id)"},{"line_number":62,"context_line":"        control_path_id \u003d self.cond_api.control_path_id_get_by_device_id("},{"line_number":63,"context_line":"            context, device_id"},{"line_number":64,"context_line":"        )"},{"line_number":65,"context_line":"        driver \u003d self.fpga_driver.create(dev.vendor)"},{"line_number":66,"context_line":"        driver.program(control_path_id.cpid_info, path)"},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"    def fpga_program_v2(self, context, controlpath_id,"},{"line_number":69,"context_line":"                        bitstream_uuid, driver_name):"},{"line_number":70,"context_line":"        # TODO() Use tempfile module?"},{"line_number":71,"context_line":"        download_path \u003d \"/tmp/\" + bitstream_uuid + \".gbs\""},{"line_number":72,"context_line":"        self.image_api.download(context,"},{"line_number":73,"context_line":"                                bitstream_uuid,"},{"line_number":74,"context_line":"                                dest_path\u003ddownload_path)"},{"line_number":75,"context_line":"        driver \u003d self.fpga_driver.create(driver_name)"},{"line_number":76,"context_line":"        ret \u003d driver.program_v2(controlpath_id, download_path)"},{"line_number":77,"context_line":"        LOG.info(\u0027Driver program() API returned code %s\u0027, ret)"},{"line_number":78,"context_line":"        os.remove(download_path)"},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"    def _download_bitstream(self, context, bitstream_uuid):"},{"line_number":81,"context_line":"        \"\"\"Download the bistream"}],"source_content_type":"text/x-python","patch_set":1,"id":"3fa7e38b_5ba5d9b2","line":78,"range":{"start_line":54,"start_character":0,"end_line":78,"end_character":32},"updated":"2019-12-13 05:46:51.000000000","message":"1. Shall we keep one compatible version here, is there any necessity to keep both.\n2.  Should check the image_api\u0027s return value and status code.","commit_id":"367402bff191a48a19ae45d2bc0fab8147bd3a5d"},{"author":{"_account_id":26458,"name":"Brin Zhang","email":"zhangbailin@inspur.com","username":"zhangbailin"},"change_message_id":"c92178ef772603b9448587795da052607a1af8e5","unresolved":false,"context_lines":[{"line_number":51,"context_line":"        \"\"\"List installed hardware.\"\"\""},{"line_number":52,"context_line":"        pass"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"    def fpga_program(self, context, deployable_uuid, image_uuid):"},{"line_number":55,"context_line":"        \"\"\"Program a FPGA region, image can be a url or local file\"\"\""},{"line_number":56,"context_line":"        # TODO(Shaohe Feng) Get image from glance."},{"line_number":57,"context_line":"        # And add claim and rollback logical."},{"line_number":58,"context_line":"        path \u003d self._download_bitstream(context, image_uuid)"},{"line_number":59,"context_line":"        dep \u003d self.cond_api.deployable_get(context, deployable_uuid)"},{"line_number":60,"context_line":"        device_id \u003d dep.device_id"},{"line_number":61,"context_line":"        dev \u003d self.cond_api.device_get_by_id(context, device_id)"},{"line_number":62,"context_line":"        control_path_id \u003d self.cond_api.control_path_id_get_by_device_id("},{"line_number":63,"context_line":"            context, device_id"},{"line_number":64,"context_line":"        )"},{"line_number":65,"context_line":"        driver \u003d self.fpga_driver.create(dev.vendor)"},{"line_number":66,"context_line":"        driver.program(control_path_id.cpid_info, path)"},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"    def fpga_program_v2(self, context, controlpath_id,"},{"line_number":69,"context_line":"                        bitstream_uuid, driver_name):"},{"line_number":70,"context_line":"        # TODO() Use tempfile module?"},{"line_number":71,"context_line":"        download_path \u003d \"/tmp/\" + bitstream_uuid + \".gbs\""},{"line_number":72,"context_line":"        self.image_api.download(context,"},{"line_number":73,"context_line":"                                bitstream_uuid,"},{"line_number":74,"context_line":"                                dest_path\u003ddownload_path)"},{"line_number":75,"context_line":"        driver \u003d self.fpga_driver.create(driver_name)"},{"line_number":76,"context_line":"        ret \u003d driver.program_v2(controlpath_id, download_path)"},{"line_number":77,"context_line":"        LOG.info(\u0027Driver program() API returned code %s\u0027, ret)"},{"line_number":78,"context_line":"        os.remove(download_path)"},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"    def _download_bitstream(self, context, bitstream_uuid):"},{"line_number":81,"context_line":"        \"\"\"Download the bistream"}],"source_content_type":"text/x-python","patch_set":1,"id":"1fa4df85_798ff42d","line":78,"range":{"start_line":54,"start_character":0,"end_line":78,"end_character":32},"in_reply_to":"3fa7e38b_5ba5d9b2","updated":"2020-03-19 07:14:16.000000000","message":"+1","commit_id":"367402bff191a48a19ae45d2bc0fab8147bd3a5d"},{"author":{"_account_id":30759,"name":"Shogo Saito","email":"shogo.saito.ac@hco.ntt.co.jp","username":"s.shogo"},"change_message_id":"aeaa500f7145eed196cc14b6a23cb346e36654fa","unresolved":false,"context_lines":[{"line_number":51,"context_line":"        \"\"\"List installed hardware.\"\"\""},{"line_number":52,"context_line":"        pass"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"    def fpga_program(self, context, deployable_uuid, image_uuid):"},{"line_number":55,"context_line":"        \"\"\"Program a FPGA region, image can be a url or local file\"\"\""},{"line_number":56,"context_line":"        # TODO(Shaohe Feng) Get image from glance."},{"line_number":57,"context_line":"        # And add claim and rollback logical."},{"line_number":58,"context_line":"        path \u003d self._download_bitstream(context, image_uuid)"},{"line_number":59,"context_line":"        dep \u003d self.cond_api.deployable_get(context, deployable_uuid)"},{"line_number":60,"context_line":"        device_id \u003d dep.device_id"},{"line_number":61,"context_line":"        dev \u003d self.cond_api.device_get_by_id(context, device_id)"},{"line_number":62,"context_line":"        control_path_id \u003d self.cond_api.control_path_id_get_by_device_id("},{"line_number":63,"context_line":"            context, device_id"},{"line_number":64,"context_line":"        )"},{"line_number":65,"context_line":"        driver \u003d self.fpga_driver.create(dev.vendor)"},{"line_number":66,"context_line":"        driver.program(control_path_id.cpid_info, path)"},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"    def fpga_program_v2(self, context, controlpath_id,"},{"line_number":69,"context_line":"                        bitstream_uuid, driver_name):"},{"line_number":70,"context_line":"        # TODO() Use tempfile module?"},{"line_number":71,"context_line":"        download_path \u003d \"/tmp/\" + bitstream_uuid + \".gbs\""},{"line_number":72,"context_line":"        self.image_api.download(context,"},{"line_number":73,"context_line":"                                bitstream_uuid,"},{"line_number":74,"context_line":"                                dest_path\u003ddownload_path)"},{"line_number":75,"context_line":"        driver \u003d self.fpga_driver.create(driver_name)"},{"line_number":76,"context_line":"        ret \u003d driver.program_v2(controlpath_id, download_path)"},{"line_number":77,"context_line":"        LOG.info(\u0027Driver program() API returned code %s\u0027, ret)"},{"line_number":78,"context_line":"        os.remove(download_path)"},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"    def _download_bitstream(self, context, bitstream_uuid):"},{"line_number":81,"context_line":"        \"\"\"Download the bistream"}],"source_content_type":"text/x-python","patch_set":1,"id":"bf51134e_e63080eb","line":78,"range":{"start_line":54,"start_character":0,"end_line":78,"end_character":32},"in_reply_to":"3fa7e38b_5ba5d9b2","updated":"2020-06-18 12:09:05.000000000","message":"1. Agree, the latest patch deletes old \"fpga_program\" ,and change fpga_program_v2 to new \"fpga_program\"\n2. This check seems to be unnecessary, because glance.py is handling exceptions properly. Detail comment is in the latest one of your commment, here.","commit_id":"367402bff191a48a19ae45d2bc0fab8147bd3a5d"},{"author":{"_account_id":21672,"name":"Sundar Nadathur","email":"sundar.nadathur@intel.com","username":"nsundar"},"change_message_id":"ad6e1a57606169c9626a57aa46883a2a710761c4","unresolved":false,"context_lines":[{"line_number":58,"context_line":"        ret \u003d driver.program(controlpath_id, download_path)"},{"line_number":59,"context_line":"        LOG.info(\u0027Driver program() API returned code %s\u0027, ret)"},{"line_number":60,"context_line":"        os.remove(download_path)"},{"line_number":61,"context_line":"        return ret"},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"    @periodic_task.periodic_task(run_immediately\u003dTrue)"},{"line_number":64,"context_line":"    def update_available_resource(self, context, startup\u003dTrue):"}],"source_content_type":"text/x-python","patch_set":2,"id":"df33271e_f7bce46d","line":61,"updated":"2020-04-06 08:01:34.000000000","message":"Looks like this also addresses the story https://storyboard.openstack.org/#!/story/2007466","commit_id":"9f1f39a1955e336d604846a2d3bea14a616330b2"},{"author":{"_account_id":25738,"name":"Xinran WANG","email":"xin-ran.wang@intel.com","username":"Xinran"},"change_message_id":"57b259122f522e1091701d0907422f543d70d26e","unresolved":false,"context_lines":[{"line_number":51,"context_line":"                     bitstream_uuid, driver_name):"},{"line_number":52,"context_line":"        # TODO() Use tempfile module?"},{"line_number":53,"context_line":"        download_path \u003d \"/tmp/\" + bitstream_uuid + \".gbs\""},{"line_number":54,"context_line":"        self.image_api.download(context,"},{"line_number":55,"context_line":"                                bitstream_uuid,"},{"line_number":56,"context_line":"                                dest_path\u003ddownload_path)"},{"line_number":57,"context_line":"        driver \u003d self.fpga_driver.create(driver_name)"},{"line_number":58,"context_line":"        ret \u003d driver.program(controlpath_id, download_path)"},{"line_number":59,"context_line":"        LOG.info(\u0027Driver program() API returned code %s\u0027, ret)"}],"source_content_type":"text/x-python","patch_set":4,"id":"3f4c43b2_e9997b79","line":56,"range":{"start_line":54,"start_character":7,"end_line":56,"end_character":56},"updated":"2020-04-16 07:38:16.000000000","message":"We\u0027d better to check glance api\u0027s return value and stauts code here.","commit_id":"26a36395f7d3725070a0573e1eea408441f70082"},{"author":{"_account_id":26458,"name":"Brin Zhang","email":"zhangbailin@inspur.com","username":"zhangbailin"},"change_message_id":"b6909baa4d17f34cec9baaeeb953645544dbf276","unresolved":false,"context_lines":[{"line_number":51,"context_line":"                     bitstream_uuid, driver_name):"},{"line_number":52,"context_line":"        # TODO() Use tempfile module?"},{"line_number":53,"context_line":"        download_path \u003d \"/tmp/\" + bitstream_uuid + \".gbs\""},{"line_number":54,"context_line":"        self.image_api.download(context,"},{"line_number":55,"context_line":"                                bitstream_uuid,"},{"line_number":56,"context_line":"                                dest_path\u003ddownload_path)"},{"line_number":57,"context_line":"        driver \u003d self.fpga_driver.create(driver_name)"},{"line_number":58,"context_line":"        ret \u003d driver.program(controlpath_id, download_path)"},{"line_number":59,"context_line":"        LOG.info(\u0027Driver program() API returned code %s\u0027, ret)"}],"source_content_type":"text/x-python","patch_set":4,"id":"1f493fa4_7d5baa2d","line":56,"range":{"start_line":54,"start_character":7,"end_line":56,"end_character":56},"in_reply_to":"3f4c43b2_e9997b79","updated":"2020-04-21 03:02:42.000000000","message":"\u003e We\u0027d better to check glance api\u0027s return value and stauts code\n \u003e here.\n\nAgree","commit_id":"26a36395f7d3725070a0573e1eea408441f70082"},{"author":{"_account_id":30759,"name":"Shogo Saito","email":"shogo.saito.ac@hco.ntt.co.jp","username":"s.shogo"},"change_message_id":"daad2e4af950a7a63463572ad193cd5562167efe","unresolved":false,"context_lines":[{"line_number":51,"context_line":"                     bitstream_uuid, driver_name):"},{"line_number":52,"context_line":"        # TODO() Use tempfile module?"},{"line_number":53,"context_line":"        download_path \u003d \"/tmp/\" + bitstream_uuid + \".gbs\""},{"line_number":54,"context_line":"        self.image_api.download(context,"},{"line_number":55,"context_line":"                                bitstream_uuid,"},{"line_number":56,"context_line":"                                dest_path\u003ddownload_path)"},{"line_number":57,"context_line":"        driver \u003d self.fpga_driver.create(driver_name)"},{"line_number":58,"context_line":"        ret \u003d driver.program(controlpath_id, download_path)"},{"line_number":59,"context_line":"        LOG.info(\u0027Driver program() API returned code %s\u0027, ret)"}],"source_content_type":"text/x-python","patch_set":4,"id":"3f4c43b2_f2caec6a","line":56,"range":{"start_line":54,"start_character":7,"end_line":56,"end_character":56},"in_reply_to":"3f4c43b2_e9997b79","updated":"2020-04-17 07:53:50.000000000","message":"OK,that\u0027s right. I\u0027ll add check logic here.","commit_id":"26a36395f7d3725070a0573e1eea408441f70082"},{"author":{"_account_id":30759,"name":"Shogo Saito","email":"shogo.saito.ac@hco.ntt.co.jp","username":"s.shogo"},"change_message_id":"aeaa500f7145eed196cc14b6a23cb346e36654fa","unresolved":false,"context_lines":[{"line_number":51,"context_line":"                     bitstream_uuid, driver_name):"},{"line_number":52,"context_line":"        # TODO() Use tempfile module?"},{"line_number":53,"context_line":"        download_path \u003d \"/tmp/\" + bitstream_uuid + \".gbs\""},{"line_number":54,"context_line":"        self.image_api.download(context,"},{"line_number":55,"context_line":"                                bitstream_uuid,"},{"line_number":56,"context_line":"                                dest_path\u003ddownload_path)"},{"line_number":57,"context_line":"        driver \u003d self.fpga_driver.create(driver_name)"},{"line_number":58,"context_line":"        ret \u003d driver.program(controlpath_id, download_path)"},{"line_number":59,"context_line":"        LOG.info(\u0027Driver program() API returned code %s\u0027, ret)"}],"source_content_type":"text/x-python","patch_set":4,"id":"bf51134e_a692089e","line":56,"range":{"start_line":54,"start_character":7,"end_line":56,"end_character":56},"in_reply_to":"3f4c43b2_f2caec6a","updated":"2020-06-18 12:09:05.000000000","message":"I investigated here after this comment,and noticed the later 2 points.\nIMHO, the check is not necessary. \n\n1. there is no return value,from the function in glance.py[1]\n2. That handles exceptions properly.\n\n[1]https://github.com/openstack/cyborg/blob/master/cyborg/image/glance.py#242","commit_id":"26a36395f7d3725070a0573e1eea408441f70082"},{"author":{"_account_id":31412,"name":"Wenping Song","email":"songwenping@inspur.com","username":"songwenping"},"change_message_id":"fac2cc60bfeabd2b77bc93594dca0c36ade592f7","unresolved":false,"context_lines":[{"line_number":70,"context_line":"                                dest_path\u003ddownload_path.name)"},{"line_number":71,"context_line":"        driver \u003d self.fpga_driver.create(driver_name)"},{"line_number":72,"context_line":"        ret \u003d driver.program(controlpath_id, download_path.name)"},{"line_number":73,"context_line":"        LOG.info(\u0027Driver program() API returned code %s\u0027, ret)"},{"line_number":74,"context_line":"        os.remove(download_path.name)"},{"line_number":75,"context_line":"        return ret"},{"line_number":76,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"bf51134e_5e03e8be","line":73,"range":{"start_line":73,"start_character":58,"end_line":73,"end_character":61},"updated":"2020-07-23 02:17:26.000000000","message":"`ret` is boolean not a code.","commit_id":"6e9e12d92fcba1391091af17c242e76b37b170bb"},{"author":{"_account_id":30759,"name":"Shogo Saito","email":"shogo.saito.ac@hco.ntt.co.jp","username":"s.shogo"},"change_message_id":"cddc48690258d67961fcc17aeb099b9971955aa7","unresolved":false,"context_lines":[{"line_number":70,"context_line":"                                dest_path\u003ddownload_path.name)"},{"line_number":71,"context_line":"        driver \u003d self.fpga_driver.create(driver_name)"},{"line_number":72,"context_line":"        ret \u003d driver.program(controlpath_id, download_path.name)"},{"line_number":73,"context_line":"        LOG.info(\u0027Driver program() API returned code %s\u0027, ret)"},{"line_number":74,"context_line":"        os.remove(download_path.name)"},{"line_number":75,"context_line":"        return ret"},{"line_number":76,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"9f560f44_b29136f4","line":73,"range":{"start_line":73,"start_character":58,"end_line":73,"end_character":61},"in_reply_to":"bf51134e_5e03e8be","updated":"2020-08-06 08:19:48.000000000","message":"Done, removed the \"code\"\nIn my understanding, this may be changed to \"code\", in the future OPAE spec.","commit_id":"6e9e12d92fcba1391091af17c242e76b37b170bb"},{"author":{"_account_id":26458,"name":"Brin Zhang","email":"zhangbailin@inspur.com","username":"zhangbailin"},"change_message_id":"dadb1e1800430677d5cf664f6dc00c9b20676a83","unresolved":false,"context_lines":[{"line_number":38,"context_line":"    API version history:"},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"    | 1.0 - Initial version."},{"line_number":41,"context_line":"    | 1.1 - Change fpga_program_v2() to fpga_program()."},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"    \"\"\""},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"    RPC_API_VERSION \u003d \u00271.1\u0027"},{"line_number":46,"context_line":"    target \u003d messaging.Target(version\u003dRPC_API_VERSION)"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"    def __init__(self, topic, host\u003dNone):"}],"source_content_type":"text/x-python","patch_set":10,"id":"9f560f44_199c6c0c","line":45,"range":{"start_line":41,"start_character":0,"end_line":45,"end_character":27},"updated":"2020-09-11 01:05:54.000000000","message":"Here why we need to change this? it does not do anything of this change, right? \nhttps://review.opendev.org/#/c/698190/10/cyborg/agent/rpcapi.py@39 seems enough.\n\nIn other words, why we should need to record this RPC api version change? this is file just receive the rpc call, it\u0027s strange.","commit_id":"216faf8bf32b0eaa2e7a59e67c1e59cd14ab80c3"},{"author":{"_account_id":26458,"name":"Brin Zhang","email":"zhangbailin@inspur.com","username":"zhangbailin"},"change_message_id":"5b5e87220974f8535bf85d0de522e54927c161d8","unresolved":false,"context_lines":[{"line_number":38,"context_line":"    API version history:"},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"    | 1.0 - Initial version."},{"line_number":41,"context_line":"    | 1.1 - Change fpga_program_v2() to fpga_program()."},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"    \"\"\""},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"    RPC_API_VERSION \u003d \u00271.1\u0027"},{"line_number":46,"context_line":"    target \u003d messaging.Target(version\u003dRPC_API_VERSION)"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"    def __init__(self, topic, host\u003dNone):"}],"source_content_type":"text/x-python","patch_set":10,"id":"9f560f44_41cdfd5c","line":45,"range":{"start_line":41,"start_character":0,"end_line":45,"end_character":27},"in_reply_to":"9f560f44_01c945ab","updated":"2020-09-16 08:26:35.000000000","message":"Not same, this RPC_API_VERSION seem not used in this file, I think it can be removed, and has a good way to mange, we will talk later, I think it does not affect this patch.","commit_id":"216faf8bf32b0eaa2e7a59e67c1e59cd14ab80c3"},{"author":{"_account_id":30759,"name":"Shogo Saito","email":"shogo.saito.ac@hco.ntt.co.jp","username":"s.shogo"},"change_message_id":"ab89f17ffcb52933c45fdab1deaece9884c6ad81","unresolved":false,"context_lines":[{"line_number":38,"context_line":"    API version history:"},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"    | 1.0 - Initial version."},{"line_number":41,"context_line":"    | 1.1 - Change fpga_program_v2() to fpga_program()."},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"    \"\"\""},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"    RPC_API_VERSION \u003d \u00271.1\u0027"},{"line_number":46,"context_line":"    target \u003d messaging.Target(version\u003dRPC_API_VERSION)"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"    def __init__(self, topic, host\u003dNone):"}],"source_content_type":"text/x-python","patch_set":10,"id":"9f560f44_01c945ab","line":45,"range":{"start_line":41,"start_character":0,"end_line":45,"end_character":27},"in_reply_to":"9f560f44_199c6c0c","updated":"2020-09-16 08:13:34.000000000","message":"This change arises from your comment[1], originally.\nCould you check that?\n\n[1] https://review.opendev.org/#/c/698190/5/cyborg/agent/rpcapi.py@59","commit_id":"216faf8bf32b0eaa2e7a59e67c1e59cd14ab80c3"}],"cyborg/agent/rpcapi.py":[{"author":{"_account_id":26458,"name":"Brin Zhang","email":"zhangbailin@inspur.com","username":"zhangbailin"},"change_message_id":"c92178ef772603b9448587795da052607a1af8e5","unresolved":false,"context_lines":[{"line_number":64,"context_line":"        version \u003d \u00271.0\u0027"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"        dpl_get \u003d objects.Deployable.get(context, deployable_uuid)"},{"line_number":67,"context_line":"        dev_get \u003d objects.Device.get_by_id(context, dpl_get.device_id)"},{"line_number":68,"context_line":"        if not dpl_get:"},{"line_number":69,"context_line":"            # TODO(Li Liu) throw an exception here"},{"line_number":70,"context_line":"            return 0"}],"source_content_type":"text/x-python","patch_set":1,"id":"1fa4df85_7978542a","line":67,"updated":"2020-03-19 07:14:16.000000000","message":"You should move it to L71, under judge the \"if not dp1_get\", then you can reference the dpl_get.device_id, otherwise the judging conditions do not work, right?","commit_id":"367402bff191a48a19ae45d2bc0fab8147bd3a5d"},{"author":{"_account_id":30759,"name":"Shogo Saito","email":"shogo.saito.ac@hco.ntt.co.jp","username":"s.shogo"},"change_message_id":"aeaa500f7145eed196cc14b6a23cb346e36654fa","unresolved":false,"context_lines":[{"line_number":64,"context_line":"        version \u003d \u00271.0\u0027"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"        dpl_get \u003d objects.Deployable.get(context, deployable_uuid)"},{"line_number":67,"context_line":"        dev_get \u003d objects.Device.get_by_id(context, dpl_get.device_id)"},{"line_number":68,"context_line":"        if not dpl_get:"},{"line_number":69,"context_line":"            # TODO(Li Liu) throw an exception here"},{"line_number":70,"context_line":"            return 0"}],"source_content_type":"text/x-python","patch_set":1,"id":"bf51134e_e616c0f1","line":67,"in_reply_to":"1fa4df85_7978542a","updated":"2020-06-18 12:09:05.000000000","message":"Right.\nThis function is deleted along to deletion of old fpga_program.","commit_id":"367402bff191a48a19ae45d2bc0fab8147bd3a5d"},{"author":{"_account_id":26458,"name":"Brin Zhang","email":"zhangbailin@inspur.com","username":"zhangbailin"},"change_message_id":"c92178ef772603b9448587795da052607a1af8e5","unresolved":false,"context_lines":[{"line_number":76,"context_line":"                          deployable_uuid\u003ddeployable_uuid,"},{"line_number":77,"context_line":"                          image_uuid\u003dbitstream_uuid)"},{"line_number":78,"context_line":""},{"line_number":79,"context_line":"    def fpga_program_v2(self, context, hostname, controlpath_id,"},{"line_number":80,"context_line":"                        bitstream_uuid, driver_name):"},{"line_number":81,"context_line":"        LOG.info(\u0027Agent fpga_program_v2: hostname: (%s) \u0027 +"},{"line_number":82,"context_line":"                 \u0027bitstream_id: (%s)\u0027, hostname, bitstream_uuid)"}],"source_content_type":"text/x-python","patch_set":1,"id":"1fa4df85_39997c78","line":79,"range":{"start_line":79,"start_character":8,"end_line":79,"end_character":23},"updated":"2020-03-19 07:14:16.000000000","message":"I you rename it, please change here too, change to \"fpga_program()\".","commit_id":"367402bff191a48a19ae45d2bc0fab8147bd3a5d"},{"author":{"_account_id":30759,"name":"Shogo Saito","email":"shogo.saito.ac@hco.ntt.co.jp","username":"s.shogo"},"change_message_id":"aeaa500f7145eed196cc14b6a23cb346e36654fa","unresolved":false,"context_lines":[{"line_number":76,"context_line":"                          deployable_uuid\u003ddeployable_uuid,"},{"line_number":77,"context_line":"                          image_uuid\u003dbitstream_uuid)"},{"line_number":78,"context_line":""},{"line_number":79,"context_line":"    def fpga_program_v2(self, context, hostname, controlpath_id,"},{"line_number":80,"context_line":"                        bitstream_uuid, driver_name):"},{"line_number":81,"context_line":"        LOG.info(\u0027Agent fpga_program_v2: hostname: (%s) \u0027 +"},{"line_number":82,"context_line":"                 \u0027bitstream_id: (%s)\u0027, hostname, bitstream_uuid)"}],"source_content_type":"text/x-python","patch_set":1,"id":"bf51134e_86dd4444","line":79,"range":{"start_line":79,"start_character":8,"end_line":79,"end_character":23},"in_reply_to":"1fa4df85_39997c78","updated":"2020-06-18 12:09:05.000000000","message":"Done","commit_id":"367402bff191a48a19ae45d2bc0fab8147bd3a5d"},{"author":{"_account_id":21672,"name":"Sundar Nadathur","email":"sundar.nadathur@intel.com","username":"nsundar"},"change_message_id":"ad6e1a57606169c9626a57aa46883a2a710761c4","unresolved":false,"context_lines":[{"line_number":55,"context_line":"                     bitstream_uuid, driver_name):"},{"line_number":56,"context_line":"        LOG.info(\u0027Agent fpga_program: hostname: (%s) \u0027 +"},{"line_number":57,"context_line":"                 \u0027bitstream_id: (%s)\u0027, hostname, bitstream_uuid)"},{"line_number":58,"context_line":"        version \u003d \u00271.0\u0027"},{"line_number":59,"context_line":"        cctxt \u003d self.client.prepare(server\u003dhostname, version\u003dversion)"},{"line_number":60,"context_line":"        return cctxt.call(context, \u0027fpga_program\u0027,"},{"line_number":61,"context_line":"                          controlpath_id\u003dcontrolpath_id,"}],"source_content_type":"text/x-python","patch_set":2,"id":"df33271e_7772947e","line":58,"updated":"2020-04-06 08:01:34.000000000","message":"Technically, this version should be bumped. I cna accept skipping that for now, because Cyborg is not used in production yet. However, we should make this a strong requirement for the future after Ussuri.","commit_id":"9f1f39a1955e336d604846a2d3bea14a616330b2"},{"author":{"_account_id":30759,"name":"Shogo Saito","email":"shogo.saito.ac@hco.ntt.co.jp","username":"s.shogo"},"change_message_id":"338388262319b1751219890ee96720a742a21b93","unresolved":false,"context_lines":[{"line_number":55,"context_line":"                     bitstream_uuid, driver_name):"},{"line_number":56,"context_line":"        LOG.info(\u0027Agent fpga_program: hostname: (%s) \u0027 +"},{"line_number":57,"context_line":"                 \u0027bitstream_id: (%s)\u0027, hostname, bitstream_uuid)"},{"line_number":58,"context_line":"        version \u003d \u00271.0\u0027"},{"line_number":59,"context_line":"        cctxt \u003d self.client.prepare(server\u003dhostname, version\u003dversion)"},{"line_number":60,"context_line":"        return cctxt.call(context, \u0027fpga_program\u0027,"},{"line_number":61,"context_line":"                          controlpath_id\u003dcontrolpath_id,"}],"source_content_type":"text/x-python","patch_set":2,"id":"3f4c43b2_5919a486","line":58,"in_reply_to":"df33271e_7772947e","updated":"2020-04-13 08:29:55.000000000","message":"OK, I got it.","commit_id":"9f1f39a1955e336d604846a2d3bea14a616330b2"},{"author":{"_account_id":26458,"name":"Brin Zhang","email":"zhangbailin@inspur.com","username":"zhangbailin"},"change_message_id":"6c94d5e8592f39cc6f0251e75cb9cd4d3efaafc3","unresolved":false,"context_lines":[{"line_number":51,"context_line":"                                     version_cap\u003dself.RPC_API_VERSION,"},{"line_number":52,"context_line":"                                     serializer\u003dserializer)"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"    def fpga_program(self, context, hostname, controlpath_id,"},{"line_number":55,"context_line":"                     bitstream_uuid, driver_name):"},{"line_number":56,"context_line":"        LOG.info(\u0027Agent fpga_program: hostname: (%s) \u0027 +"},{"line_number":57,"context_line":"                 \u0027bitstream_id: (%s)\u0027, hostname, bitstream_uuid)"}],"source_content_type":"text/x-python","patch_set":5,"id":"bf51134e_314d7e9a","line":54,"updated":"2020-06-19 01:30:02.000000000","message":"You lost the tests to cover this rpc api change.","commit_id":"249aef707dff60f140ba371bb3357ad4c1b3473c"},{"author":{"_account_id":30759,"name":"Shogo Saito","email":"shogo.saito.ac@hco.ntt.co.jp","username":"s.shogo"},"change_message_id":"7f5ec30e12043dafe916ad83b3b9016294a17695","unresolved":false,"context_lines":[{"line_number":51,"context_line":"                                     version_cap\u003dself.RPC_API_VERSION,"},{"line_number":52,"context_line":"                                     serializer\u003dserializer)"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"    def fpga_program(self, context, hostname, controlpath_id,"},{"line_number":55,"context_line":"                     bitstream_uuid, driver_name):"},{"line_number":56,"context_line":"        LOG.info(\u0027Agent fpga_program: hostname: (%s) \u0027 +"},{"line_number":57,"context_line":"                 \u0027bitstream_id: (%s)\u0027, hostname, bitstream_uuid)"}],"source_content_type":"text/x-python","patch_set":5,"id":"bf51134e_256aa71a","line":54,"in_reply_to":"bf51134e_314d7e9a","updated":"2020-07-20 02:00:31.000000000","message":"Thanks, added a unit test.","commit_id":"249aef707dff60f140ba371bb3357ad4c1b3473c"},{"author":{"_account_id":26458,"name":"Brin Zhang","email":"zhangbailin@inspur.com","username":"zhangbailin"},"change_message_id":"6c94d5e8592f39cc6f0251e75cb9cd4d3efaafc3","unresolved":false,"context_lines":[{"line_number":56,"context_line":"        LOG.info(\u0027Agent fpga_program: hostname: (%s) \u0027 +"},{"line_number":57,"context_line":"                 \u0027bitstream_id: (%s)\u0027, hostname, bitstream_uuid)"},{"line_number":58,"context_line":"        # TODO(s_shogo): Technically, this version should be bumped."},{"line_number":59,"context_line":"        # We should make this a strong requirement for the future after Ussuri."},{"line_number":60,"context_line":"        version \u003d \u00271.0\u0027"},{"line_number":61,"context_line":"        cctxt \u003d self.client.prepare(server\u003dhostname, version\u003dversion)"},{"line_number":62,"context_line":"        return cctxt.call(context, \u0027fpga_program\u0027,"}],"source_content_type":"text/x-python","patch_set":5,"id":"bf51134e_518752d8","line":59,"range":{"start_line":59,"start_character":72,"end_line":59,"end_character":78},"updated":"2020-06-19 01:30:02.000000000","message":"I think you shuold change this rpc version in this(V) release, that we can continue the version number, to 1.1.\n\nAnd also change the description in L39:\n\n|    1.0 - Initial version.\n|    1.1 - Change fpga_program_v2() to fpga_program().","commit_id":"249aef707dff60f140ba371bb3357ad4c1b3473c"},{"author":{"_account_id":30759,"name":"Shogo Saito","email":"shogo.saito.ac@hco.ntt.co.jp","username":"s.shogo"},"change_message_id":"7f5ec30e12043dafe916ad83b3b9016294a17695","unresolved":false,"context_lines":[{"line_number":56,"context_line":"        LOG.info(\u0027Agent fpga_program: hostname: (%s) \u0027 +"},{"line_number":57,"context_line":"                 \u0027bitstream_id: (%s)\u0027, hostname, bitstream_uuid)"},{"line_number":58,"context_line":"        # TODO(s_shogo): Technically, this version should be bumped."},{"line_number":59,"context_line":"        # We should make this a strong requirement for the future after Ussuri."},{"line_number":60,"context_line":"        version \u003d \u00271.0\u0027"},{"line_number":61,"context_line":"        cctxt \u003d self.client.prepare(server\u003dhostname, version\u003dversion)"},{"line_number":62,"context_line":"        return cctxt.call(context, \u0027fpga_program\u0027,"}],"source_content_type":"text/x-python","patch_set":5,"id":"bf51134e_65749fff","line":59,"range":{"start_line":59,"start_character":72,"end_line":59,"end_character":78},"in_reply_to":"bf51134e_518752d8","updated":"2020-07-20 02:00:31.000000000","message":"Done","commit_id":"249aef707dff60f140ba371bb3357ad4c1b3473c"},{"author":{"_account_id":26458,"name":"Brin Zhang","email":"zhangbailin@inspur.com","username":"zhangbailin"},"change_message_id":"6c94d5e8592f39cc6f0251e75cb9cd4d3efaafc3","unresolved":false,"context_lines":[{"line_number":57,"context_line":"                 \u0027bitstream_id: (%s)\u0027, hostname, bitstream_uuid)"},{"line_number":58,"context_line":"        # TODO(s_shogo): Technically, this version should be bumped."},{"line_number":59,"context_line":"        # We should make this a strong requirement for the future after Ussuri."},{"line_number":60,"context_line":"        version \u003d \u00271.0\u0027"},{"line_number":61,"context_line":"        cctxt \u003d self.client.prepare(server\u003dhostname, version\u003dversion)"},{"line_number":62,"context_line":"        return cctxt.call(context, \u0027fpga_program\u0027,"},{"line_number":63,"context_line":"                          controlpath_id\u003dcontrolpath_id,"}],"source_content_type":"text/x-python","patch_set":5,"id":"bf51134e_d1a7e24e","line":60,"range":{"start_line":60,"start_character":19,"end_line":60,"end_character":22},"updated":"2020-06-19 01:30:02.000000000","message":"Doubt: Do we need to keep 1.0 in active? In this patch, you will de deprecated fpga_program_v2, that I am not sure if I can still call rpc 1.0 version can be called.","commit_id":"249aef707dff60f140ba371bb3357ad4c1b3473c"},{"author":{"_account_id":30759,"name":"Shogo Saito","email":"shogo.saito.ac@hco.ntt.co.jp","username":"s.shogo"},"change_message_id":"7f5ec30e12043dafe916ad83b3b9016294a17695","unresolved":false,"context_lines":[{"line_number":57,"context_line":"                 \u0027bitstream_id: (%s)\u0027, hostname, bitstream_uuid)"},{"line_number":58,"context_line":"        # TODO(s_shogo): Technically, this version should be bumped."},{"line_number":59,"context_line":"        # We should make this a strong requirement for the future after Ussuri."},{"line_number":60,"context_line":"        version \u003d \u00271.0\u0027"},{"line_number":61,"context_line":"        cctxt \u003d self.client.prepare(server\u003dhostname, version\u003dversion)"},{"line_number":62,"context_line":"        return cctxt.call(context, \u0027fpga_program\u0027,"},{"line_number":63,"context_line":"                          controlpath_id\u003dcontrolpath_id,"}],"source_content_type":"text/x-python","patch_set":5,"id":"bf51134e_45719b0c","line":60,"range":{"start_line":60,"start_character":19,"end_line":60,"end_character":22},"in_reply_to":"bf51134e_d1a7e24e","updated":"2020-07-20 02:00:31.000000000","message":"Done","commit_id":"249aef707dff60f140ba371bb3357ad4c1b3473c"},{"author":{"_account_id":31412,"name":"Wenping Song","email":"songwenping@inspur.com","username":"songwenping"},"change_message_id":"929cb32aa46cce513902c99300634a7c91c8796a","unresolved":false,"context_lines":[{"line_number":46,"context_line":"        super(AgentAPI, self).__init__()"},{"line_number":47,"context_line":"        self.topic \u003d topic or constants.AGENT_TOPIC"},{"line_number":48,"context_line":"        target \u003d messaging.Target(topic\u003dself.topic,"},{"line_number":49,"context_line":"                                  version\u003d\u00271.1\u0027)"},{"line_number":50,"context_line":"        serializer \u003d objects_base.CyborgObjectSerializer()"},{"line_number":51,"context_line":"        self.client \u003d rpc.get_client(target,"},{"line_number":52,"context_line":"                                     version_cap\u003dself.RPC_API_VERSION,"}],"source_content_type":"text/x-python","patch_set":10,"id":"9f560f44_b25f0d4c","line":49,"range":{"start_line":49,"start_character":42,"end_line":49,"end_character":47},"updated":"2020-09-16 02:53:02.000000000","message":"Do we should change this version?","commit_id":"216faf8bf32b0eaa2e7a59e67c1e59cd14ab80c3"}],"cyborg/api/controllers/v2/deployables.py":[{"author":{"_account_id":26458,"name":"Brin Zhang","email":"zhangbailin@inspur.com","username":"zhangbailin"},"change_message_id":"c92178ef772603b9448587795da052607a1af8e5","unresolved":false,"context_lines":[{"line_number":87,"context_line":"        return api_dep"},{"line_number":88,"context_line":""},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"class DeployableCollection(base.APIBase):"},{"line_number":91,"context_line":"    \"\"\"API representation of a collection of deployables.\"\"\""},{"line_number":92,"context_line":""},{"line_number":93,"context_line":"    deployables \u003d [Deployable]"}],"source_content_type":"text/x-python","patch_set":1,"id":"1fa4df85_f991a447","line":90,"range":{"start_line":90,"start_character":27,"end_line":90,"end_character":39},"updated":"2020-03-19 07:14:16.000000000","message":"IMHO, we should inherit Deployable class.\n1. Change convert_with_links() to convert_with_link() in Deployable Class.\n2.Called convert_with_links() by self.","commit_id":"367402bff191a48a19ae45d2bc0fab8147bd3a5d"},{"author":{"_account_id":30759,"name":"Shogo Saito","email":"shogo.saito.ac@hco.ntt.co.jp","username":"s.shogo"},"change_message_id":"aeaa500f7145eed196cc14b6a23cb346e36654fa","unresolved":false,"context_lines":[{"line_number":87,"context_line":"        return api_dep"},{"line_number":88,"context_line":""},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"class DeployableCollection(base.APIBase):"},{"line_number":91,"context_line":"    \"\"\"API representation of a collection of deployables.\"\"\""},{"line_number":92,"context_line":""},{"line_number":93,"context_line":"    deployables \u003d [Deployable]"}],"source_content_type":"text/x-python","patch_set":1,"id":"bf51134e_468a0c1b","line":90,"range":{"start_line":90,"start_character":27,"end_line":90,"end_character":39},"in_reply_to":"1fa4df85_f991a447","updated":"2020-06-18 12:09:05.000000000","message":"Done, in the Deployable V2 API patch[1].\n[1]https://review.opendev.org/#/c/712835/","commit_id":"367402bff191a48a19ae45d2bc0fab8147bd3a5d"},{"author":{"_account_id":26458,"name":"Brin Zhang","email":"zhangbailin@inspur.com","username":"zhangbailin"},"change_message_id":"c92178ef772603b9448587795da052607a1af8e5","unresolved":false,"context_lines":[{"line_number":91,"context_line":"    \"\"\"API representation of a collection of deployables.\"\"\""},{"line_number":92,"context_line":""},{"line_number":93,"context_line":"    deployables \u003d [Deployable]"},{"line_number":94,"context_line":"    \"\"\"A list containing deployable objects\"\"\""},{"line_number":95,"context_line":""},{"line_number":96,"context_line":"    @classmethod"},{"line_number":97,"context_line":"    def convert_with_links(cls, obj_deps):"}],"source_content_type":"text/x-python","patch_set":1,"id":"1fa4df85_39a73caa","line":94,"range":{"start_line":94,"start_character":4,"end_line":94,"end_character":46},"updated":"2020-03-19 07:14:16.000000000","message":"Move this comment on deployables \u003d [Deployable]， as bellow.\n\n# A list containing deployable objects\ndeployables \u003d [Deployable]","commit_id":"367402bff191a48a19ae45d2bc0fab8147bd3a5d"},{"author":{"_account_id":30759,"name":"Shogo Saito","email":"shogo.saito.ac@hco.ntt.co.jp","username":"s.shogo"},"change_message_id":"aeaa500f7145eed196cc14b6a23cb346e36654fa","unresolved":false,"context_lines":[{"line_number":91,"context_line":"    \"\"\"API representation of a collection of deployables.\"\"\""},{"line_number":92,"context_line":""},{"line_number":93,"context_line":"    deployables \u003d [Deployable]"},{"line_number":94,"context_line":"    \"\"\"A list containing deployable objects\"\"\""},{"line_number":95,"context_line":""},{"line_number":96,"context_line":"    @classmethod"},{"line_number":97,"context_line":"    def convert_with_links(cls, obj_deps):"}],"source_content_type":"text/x-python","patch_set":1,"id":"bf51134e_66875011","line":94,"range":{"start_line":94,"start_character":4,"end_line":94,"end_character":46},"in_reply_to":"1fa4df85_39a73caa","updated":"2020-06-18 12:09:05.000000000","message":"Done, in the Deployable V2 API patch[1].\n[1]https://review.opendev.org/#/c/712835/","commit_id":"367402bff191a48a19ae45d2bc0fab8147bd3a5d"},{"author":{"_account_id":26458,"name":"Brin Zhang","email":"zhangbailin@inspur.com","username":"zhangbailin"},"change_message_id":"c92178ef772603b9448587795da052607a1af8e5","unresolved":false,"context_lines":[{"line_number":96,"context_line":"    @classmethod"},{"line_number":97,"context_line":"    def convert_with_links(cls, obj_deps):"},{"line_number":98,"context_line":"        collection \u003d cls()"},{"line_number":99,"context_line":"        collection.deployables \u003d [Deployable.convert_with_links(obj_dep)"},{"line_number":100,"context_line":"                                  for obj_dep in obj_deps]"},{"line_number":101,"context_line":"        return collection"},{"line_number":102,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"1fa4df85_b99b2c64","line":99,"range":{"start_line":99,"start_character":34,"end_line":99,"end_character":63},"updated":"2020-03-19 07:14:16.000000000","message":"self.convert_with_link(...)","commit_id":"367402bff191a48a19ae45d2bc0fab8147bd3a5d"},{"author":{"_account_id":30759,"name":"Shogo Saito","email":"shogo.saito.ac@hco.ntt.co.jp","username":"s.shogo"},"change_message_id":"aeaa500f7145eed196cc14b6a23cb346e36654fa","unresolved":false,"context_lines":[{"line_number":96,"context_line":"    @classmethod"},{"line_number":97,"context_line":"    def convert_with_links(cls, obj_deps):"},{"line_number":98,"context_line":"        collection \u003d cls()"},{"line_number":99,"context_line":"        collection.deployables \u003d [Deployable.convert_with_links(obj_dep)"},{"line_number":100,"context_line":"                                  for obj_dep in obj_deps]"},{"line_number":101,"context_line":"        return collection"},{"line_number":102,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"bf51134e_a678482b","line":99,"range":{"start_line":99,"start_character":34,"end_line":99,"end_character":63},"in_reply_to":"1fa4df85_b99b2c64","updated":"2020-06-18 12:09:05.000000000","message":"Done, in the Deployable V2 API patch[1].\n[1]https://review.opendev.org/#/c/712835/","commit_id":"367402bff191a48a19ae45d2bc0fab8147bd3a5d"},{"author":{"_account_id":26458,"name":"Brin Zhang","email":"zhangbailin@inspur.com","username":"zhangbailin"},"change_message_id":"c92178ef772603b9448587795da052607a1af8e5","unresolved":false,"context_lines":[{"line_number":101,"context_line":"        return collection"},{"line_number":102,"context_line":""},{"line_number":103,"context_line":""},{"line_number":104,"context_line":"class DeployablePatchType(types.JsonPatchType):"},{"line_number":105,"context_line":""},{"line_number":106,"context_line":"    _api_base \u003d Deployable"},{"line_number":107,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"1fa4df85_f9ba04be","line":104,"range":{"start_line":104,"start_character":26,"end_line":104,"end_character":45},"updated":"2020-03-19 07:14:16.000000000","message":"Inherit DeployableCollection class","commit_id":"367402bff191a48a19ae45d2bc0fab8147bd3a5d"},{"author":{"_account_id":30759,"name":"Shogo Saito","email":"shogo.saito.ac@hco.ntt.co.jp","username":"s.shogo"},"change_message_id":"aeaa500f7145eed196cc14b6a23cb346e36654fa","unresolved":false,"context_lines":[{"line_number":101,"context_line":"        return collection"},{"line_number":102,"context_line":""},{"line_number":103,"context_line":""},{"line_number":104,"context_line":"class DeployablePatchType(types.JsonPatchType):"},{"line_number":105,"context_line":""},{"line_number":106,"context_line":"    _api_base \u003d Deployable"},{"line_number":107,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"bf51134e_06781428","line":104,"range":{"start_line":104,"start_character":26,"end_line":104,"end_character":45},"in_reply_to":"1fa4df85_f9ba04be","updated":"2020-06-18 12:09:05.000000000","message":"Done, in the Deployable V2 API patch[1].\n[1]https://review.opendev.org/#/c/712835/","commit_id":"367402bff191a48a19ae45d2bc0fab8147bd3a5d"},{"author":{"_account_id":21672,"name":"Sundar Nadathur","email":"sundar.nadathur@intel.com","username":"nsundar"},"change_message_id":"c0ff84bfd99d6b35d64614b5a620c316946af3e3","unresolved":false,"context_lines":[{"line_number":125,"context_line":"        :param program_info: JSON string containing what to program."},{"line_number":126,"context_line":"        \"\"\""},{"line_number":127,"context_line":""},{"line_number":128,"context_line":"        image_uuid \u003d program_info[0][\u0027value\u0027][0][\u0027image_uuid\u0027]"},{"line_number":129,"context_line":"        agent_api \u003d AgentAPI()"},{"line_number":130,"context_line":"        obj_dep \u003d objects.Deployable.get(pecan.request.context, uuid)"},{"line_number":131,"context_line":"        # Set attribute of the new bitstream/image information"}],"source_content_type":"text/x-python","patch_set":1,"id":"3fa7e38b_ff184684","line":128,"updated":"2019-12-12 17:30:34.000000000","message":"Inputs need validation.","commit_id":"367402bff191a48a19ae45d2bc0fab8147bd3a5d"},{"author":{"_account_id":30759,"name":"Shogo Saito","email":"shogo.saito.ac@hco.ntt.co.jp","username":"s.shogo"},"change_message_id":"aeaa500f7145eed196cc14b6a23cb346e36654fa","unresolved":false,"context_lines":[{"line_number":125,"context_line":"        :param program_info: JSON string containing what to program."},{"line_number":126,"context_line":"        \"\"\""},{"line_number":127,"context_line":""},{"line_number":128,"context_line":"        image_uuid \u003d program_info[0][\u0027value\u0027][0][\u0027image_uuid\u0027]"},{"line_number":129,"context_line":"        agent_api \u003d AgentAPI()"},{"line_number":130,"context_line":"        obj_dep \u003d objects.Deployable.get(pecan.request.context, uuid)"},{"line_number":131,"context_line":"        # Set attribute of the new bitstream/image information"}],"source_content_type":"text/x-python","patch_set":1,"id":"bf51134e_216382b3","line":128,"in_reply_to":"3fa7e38b_ff184684","updated":"2020-06-18 12:09:05.000000000","message":"Done, add UUID validattion.","commit_id":"367402bff191a48a19ae45d2bc0fab8147bd3a5d"},{"author":{"_account_id":21672,"name":"Sundar Nadathur","email":"sundar.nadathur@intel.com","username":"nsundar"},"change_message_id":"c0ff84bfd99d6b35d64614b5a620c316946af3e3","unresolved":false,"context_lines":[{"line_number":130,"context_line":"        obj_dep \u003d objects.Deployable.get(pecan.request.context, uuid)"},{"line_number":131,"context_line":"        # Set attribute of the new bitstream/image information"},{"line_number":132,"context_line":"        obj_dep.add_attribute(pecan.request.context, \u0027image_uuid\u0027, image_uuid)"},{"line_number":133,"context_line":"        # TODO(Li Liu) Trigger the program api in Agnet."},{"line_number":134,"context_line":"        agent_api.program_fpga_with_bitstream(pecan.request.context,"},{"line_number":135,"context_line":"                                              uuid,"},{"line_number":136,"context_line":"                                              image_uuid)"}],"source_content_type":"text/x-python","patch_set":1,"id":"3fa7e38b_1f1c4275","line":133,"updated":"2019-12-12 17:30:34.000000000","message":"Why is this a Todo? \n\nNit: \"Agent\"","commit_id":"367402bff191a48a19ae45d2bc0fab8147bd3a5d"},{"author":{"_account_id":30759,"name":"Shogo Saito","email":"shogo.saito.ac@hco.ntt.co.jp","username":"s.shogo"},"change_message_id":"aeaa500f7145eed196cc14b6a23cb346e36654fa","unresolved":false,"context_lines":[{"line_number":130,"context_line":"        obj_dep \u003d objects.Deployable.get(pecan.request.context, uuid)"},{"line_number":131,"context_line":"        # Set attribute of the new bitstream/image information"},{"line_number":132,"context_line":"        obj_dep.add_attribute(pecan.request.context, \u0027image_uuid\u0027, image_uuid)"},{"line_number":133,"context_line":"        # TODO(Li Liu) Trigger the program api in Agnet."},{"line_number":134,"context_line":"        agent_api.program_fpga_with_bitstream(pecan.request.context,"},{"line_number":135,"context_line":"                                              uuid,"},{"line_number":136,"context_line":"                                              image_uuid)"}],"source_content_type":"text/x-python","patch_set":1,"id":"bf51134e_016e3e94","line":133,"in_reply_to":"3fa7e38b_1f1c4275","updated":"2020-06-18 12:09:05.000000000","message":"Right, that is unnecessary, removed that.","commit_id":"367402bff191a48a19ae45d2bc0fab8147bd3a5d"},{"author":{"_account_id":21672,"name":"Sundar Nadathur","email":"sundar.nadathur@intel.com","username":"nsundar"},"change_message_id":"c0ff84bfd99d6b35d64614b5a620c316946af3e3","unresolved":false,"context_lines":[{"line_number":131,"context_line":"        # Set attribute of the new bitstream/image information"},{"line_number":132,"context_line":"        obj_dep.add_attribute(pecan.request.context, \u0027image_uuid\u0027, image_uuid)"},{"line_number":133,"context_line":"        # TODO(Li Liu) Trigger the program api in Agnet."},{"line_number":134,"context_line":"        agent_api.program_fpga_with_bitstream(pecan.request.context,"},{"line_number":135,"context_line":"                                              uuid,"},{"line_number":136,"context_line":"                                              image_uuid)"},{"line_number":137,"context_line":"        return Deployable.convert_with_links(obj_dep)"}],"source_content_type":"text/x-python","patch_set":1,"id":"3fa7e38b_df11ca5d","line":134,"updated":"2019-12-12 17:30:34.000000000","message":"Needs lots more checks. For example, is the bitstream id valid, is the bitstream already programmed, is the deployable in use, etc. This is probably better done in objects layer?","commit_id":"367402bff191a48a19ae45d2bc0fab8147bd3a5d"},{"author":{"_account_id":30759,"name":"Shogo Saito","email":"shogo.saito.ac@hco.ntt.co.jp","username":"s.shogo"},"change_message_id":"aeaa500f7145eed196cc14b6a23cb346e36654fa","unresolved":false,"context_lines":[{"line_number":131,"context_line":"        # Set attribute of the new bitstream/image information"},{"line_number":132,"context_line":"        obj_dep.add_attribute(pecan.request.context, \u0027image_uuid\u0027, image_uuid)"},{"line_number":133,"context_line":"        # TODO(Li Liu) Trigger the program api in Agnet."},{"line_number":134,"context_line":"        agent_api.program_fpga_with_bitstream(pecan.request.context,"},{"line_number":135,"context_line":"                                              uuid,"},{"line_number":136,"context_line":"                                              image_uuid)"},{"line_number":137,"context_line":"        return Deployable.convert_with_links(obj_dep)"}],"source_content_type":"text/x-python","patch_set":1,"id":"bf51134e_a178322b","line":134,"in_reply_to":"1fa4df85_b9b48cd2","updated":"2020-06-18 12:09:05.000000000","message":"IMO, as an error handling for errors occured in FPGA programming, operator may need 2nd call, thus that should be allowed.\nThe check in object layer seems to be enough.","commit_id":"367402bff191a48a19ae45d2bc0fab8147bd3a5d"},{"author":{"_account_id":26458,"name":"Brin Zhang","email":"zhangbailin@inspur.com","username":"zhangbailin"},"change_message_id":"c92178ef772603b9448587795da052607a1af8e5","unresolved":false,"context_lines":[{"line_number":131,"context_line":"        # Set attribute of the new bitstream/image information"},{"line_number":132,"context_line":"        obj_dep.add_attribute(pecan.request.context, \u0027image_uuid\u0027, image_uuid)"},{"line_number":133,"context_line":"        # TODO(Li Liu) Trigger the program api in Agnet."},{"line_number":134,"context_line":"        agent_api.program_fpga_with_bitstream(pecan.request.context,"},{"line_number":135,"context_line":"                                              uuid,"},{"line_number":136,"context_line":"                                              image_uuid)"},{"line_number":137,"context_line":"        return Deployable.convert_with_links(obj_dep)"}],"source_content_type":"text/x-python","patch_set":1,"id":"1fa4df85_b9b48cd2","line":134,"in_reply_to":"3fa7e38b_df11ca5d","updated":"2020-03-19 07:14:16.000000000","message":"Agree.\n\n\u003e This is probably better done in objects layer?\n\nI prefer check these parameter in here (deployables API), to avoid deep calls.","commit_id":"367402bff191a48a19ae45d2bc0fab8147bd3a5d"},{"author":{"_account_id":30759,"name":"Shogo Saito","email":"shogo.saito.ac@hco.ntt.co.jp","username":"s.shogo"},"change_message_id":"aeaa500f7145eed196cc14b6a23cb346e36654fa","unresolved":false,"context_lines":[{"line_number":131,"context_line":"        # Set attribute of the new bitstream/image information"},{"line_number":132,"context_line":"        obj_dep.add_attribute(pecan.request.context, \u0027image_uuid\u0027, image_uuid)"},{"line_number":133,"context_line":"        # TODO(Li Liu) Trigger the program api in Agnet."},{"line_number":134,"context_line":"        agent_api.program_fpga_with_bitstream(pecan.request.context,"},{"line_number":135,"context_line":"                                              uuid,"},{"line_number":136,"context_line":"                                              image_uuid)"},{"line_number":137,"context_line":"        return Deployable.convert_with_links(obj_dep)"}],"source_content_type":"text/x-python","patch_set":1,"id":"bf51134e_41d31639","line":134,"in_reply_to":"3fa7e38b_df11ca5d","updated":"2020-06-18 12:09:05.000000000","message":"To check validness of the id, added UUID format check.\n\n\u003ebitstream already programmed case\nIMO, when error occured in FPGA programming phase, operator may want to program again, thus this should not be blocked. is right?\n\u003edeployable in use case\nIMO, that may be reprogrammed in use and \"unbind\". is right?","commit_id":"367402bff191a48a19ae45d2bc0fab8147bd3a5d"},{"author":{"_account_id":26458,"name":"Brin Zhang","email":"zhangbailin@inspur.com","username":"zhangbailin"},"change_message_id":"c92178ef772603b9448587795da052607a1af8e5","unresolved":false,"context_lines":[{"line_number":134,"context_line":"        agent_api.program_fpga_with_bitstream(pecan.request.context,"},{"line_number":135,"context_line":"                                              uuid,"},{"line_number":136,"context_line":"                                              image_uuid)"},{"line_number":137,"context_line":"        return Deployable.convert_with_links(obj_dep)"},{"line_number":138,"context_line":""},{"line_number":139,"context_line":"    @policy.authorize_wsgi(\"cyborg:deployable\", \"create\", False)"},{"line_number":140,"context_line":"    @expose.expose(Deployable, body\u003dtypes.jsontype,"}],"source_content_type":"text/x-python","patch_set":1,"id":"1fa4df85_59cb1852","line":137,"range":{"start_line":137,"start_character":15,"end_line":137,"end_character":25},"updated":"2020-03-19 07:14:16.000000000","message":"self.convert_with_links(...)","commit_id":"367402bff191a48a19ae45d2bc0fab8147bd3a5d"},{"author":{"_account_id":30759,"name":"Shogo Saito","email":"shogo.saito.ac@hco.ntt.co.jp","username":"s.shogo"},"change_message_id":"aeaa500f7145eed196cc14b6a23cb346e36654fa","unresolved":false,"context_lines":[{"line_number":134,"context_line":"        agent_api.program_fpga_with_bitstream(pecan.request.context,"},{"line_number":135,"context_line":"                                              uuid,"},{"line_number":136,"context_line":"                                              image_uuid)"},{"line_number":137,"context_line":"        return Deployable.convert_with_links(obj_dep)"},{"line_number":138,"context_line":""},{"line_number":139,"context_line":"    @policy.authorize_wsgi(\"cyborg:deployable\", \"create\", False)"},{"line_number":140,"context_line":"    @expose.expose(Deployable, body\u003dtypes.jsontype,"}],"source_content_type":"text/x-python","patch_set":1,"id":"bf51134e_81e7eee4","line":137,"range":{"start_line":137,"start_character":15,"end_line":137,"end_character":25},"in_reply_to":"1fa4df85_59cb1852","updated":"2020-06-18 12:09:05.000000000","message":"Done in the Deployable V2 API patch [1]\n[1]https://review.opendev.org/#/c/712835/4","commit_id":"367402bff191a48a19ae45d2bc0fab8147bd3a5d"},{"author":{"_account_id":26458,"name":"Brin Zhang","email":"zhangbailin@inspur.com","username":"zhangbailin"},"change_message_id":"c92178ef772603b9448587795da052607a1af8e5","unresolved":false,"context_lines":[{"line_number":150,"context_line":"                                                                obj_dep)"},{"line_number":151,"context_line":"        # Set the HTTP Location Header"},{"line_number":152,"context_line":"        pecan.response.location \u003d link.build_url(\u0027deployables\u0027, new_dep.uuid)"},{"line_number":153,"context_line":"        return Deployable.convert_with_links(new_dep)"},{"line_number":154,"context_line":""},{"line_number":155,"context_line":"    @policy.authorize_wsgi(\"cyborg:deployable\", \"get_one\")"},{"line_number":156,"context_line":"    @expose.expose(Deployable, types.uuid)"}],"source_content_type":"text/x-python","patch_set":1,"id":"1fa4df85_19c5a03c","line":153,"range":{"start_line":153,"start_character":15,"end_line":153,"end_character":25},"updated":"2020-03-19 07:14:16.000000000","message":"self.","commit_id":"367402bff191a48a19ae45d2bc0fab8147bd3a5d"},{"author":{"_account_id":30759,"name":"Shogo Saito","email":"shogo.saito.ac@hco.ntt.co.jp","username":"s.shogo"},"change_message_id":"aeaa500f7145eed196cc14b6a23cb346e36654fa","unresolved":false,"context_lines":[{"line_number":150,"context_line":"                                                                obj_dep)"},{"line_number":151,"context_line":"        # Set the HTTP Location Header"},{"line_number":152,"context_line":"        pecan.response.location \u003d link.build_url(\u0027deployables\u0027, new_dep.uuid)"},{"line_number":153,"context_line":"        return Deployable.convert_with_links(new_dep)"},{"line_number":154,"context_line":""},{"line_number":155,"context_line":"    @policy.authorize_wsgi(\"cyborg:deployable\", \"get_one\")"},{"line_number":156,"context_line":"    @expose.expose(Deployable, types.uuid)"}],"source_content_type":"text/x-python","patch_set":1,"id":"bf51134e_01dbde1a","line":153,"range":{"start_line":153,"start_character":15,"end_line":153,"end_character":25},"in_reply_to":"1fa4df85_19c5a03c","updated":"2020-06-18 12:09:05.000000000","message":"Done in the Deployable V2 API patch [1]\n[1]https://review.opendev.org/#/c/712835/4","commit_id":"367402bff191a48a19ae45d2bc0fab8147bd3a5d"},{"author":{"_account_id":26458,"name":"Brin Zhang","email":"zhangbailin@inspur.com","username":"zhangbailin"},"change_message_id":"c92178ef772603b9448587795da052607a1af8e5","unresolved":false,"context_lines":[{"line_number":161,"context_line":"        \"\"\""},{"line_number":162,"context_line":""},{"line_number":163,"context_line":"        obj_dep \u003d objects.Deployable.get(pecan.request.context, uuid)"},{"line_number":164,"context_line":"        return Deployable.convert_with_links(obj_dep)"},{"line_number":165,"context_line":""},{"line_number":166,"context_line":"    @policy.authorize_wsgi(\"cyborg:deployable\", \"get_all\")"},{"line_number":167,"context_line":"    @expose.expose(DeployableCollection, int, types.uuid, wtypes.text,"}],"source_content_type":"text/x-python","patch_set":1,"id":"1fa4df85_39c09c2a","line":164,"range":{"start_line":164,"start_character":15,"end_line":164,"end_character":25},"updated":"2020-03-19 07:14:16.000000000","message":"self.convert_with_link(...)","commit_id":"367402bff191a48a19ae45d2bc0fab8147bd3a5d"},{"author":{"_account_id":30759,"name":"Shogo Saito","email":"shogo.saito.ac@hco.ntt.co.jp","username":"s.shogo"},"change_message_id":"aeaa500f7145eed196cc14b6a23cb346e36654fa","unresolved":false,"context_lines":[{"line_number":161,"context_line":"        \"\"\""},{"line_number":162,"context_line":""},{"line_number":163,"context_line":"        obj_dep \u003d objects.Deployable.get(pecan.request.context, uuid)"},{"line_number":164,"context_line":"        return Deployable.convert_with_links(obj_dep)"},{"line_number":165,"context_line":""},{"line_number":166,"context_line":"    @policy.authorize_wsgi(\"cyborg:deployable\", \"get_all\")"},{"line_number":167,"context_line":"    @expose.expose(DeployableCollection, int, types.uuid, wtypes.text,"}],"source_content_type":"text/x-python","patch_set":1,"id":"bf51134e_e1d50ae7","line":164,"range":{"start_line":164,"start_character":15,"end_line":164,"end_character":25},"in_reply_to":"1fa4df85_39c09c2a","updated":"2020-06-18 12:09:05.000000000","message":"Done in the Deployable V2 API patch [1]\n[1]https://review.opendev.org/#/c/712835/4","commit_id":"367402bff191a48a19ae45d2bc0fab8147bd3a5d"},{"author":{"_account_id":26458,"name":"Brin Zhang","email":"zhangbailin@inspur.com","username":"zhangbailin"},"change_message_id":"c92178ef772603b9448587795da052607a1af8e5","unresolved":false,"context_lines":[{"line_number":166,"context_line":"    @policy.authorize_wsgi(\"cyborg:deployable\", \"get_all\")"},{"line_number":167,"context_line":"    @expose.expose(DeployableCollection, int, types.uuid, wtypes.text,"},{"line_number":168,"context_line":"                   wtypes.text, wtypes.ArrayType(types.FilterType))"},{"line_number":169,"context_line":"    # TODO(wangzhh): Remove limit, marker, sort_key, sort_dir in next release."},{"line_number":170,"context_line":"    # They are used to compatible with R release client."},{"line_number":171,"context_line":"    def get_all(self, limit\u003dNone, marker\u003dNone, sort_key\u003d\u0027id\u0027, sort_dir\u003d\u0027asc\u0027,"},{"line_number":172,"context_line":"                filters\u003dNone):"},{"line_number":173,"context_line":"        \"\"\"Retrieve a list of deployables.\"\"\""}],"source_content_type":"text/x-python","patch_set":1,"id":"1fa4df85_59d0f8f7","line":170,"range":{"start_line":169,"start_character":4,"end_line":170,"end_character":56},"updated":"2020-03-19 07:14:16.000000000","message":"Do we need to achieve this TODO in this patch?","commit_id":"367402bff191a48a19ae45d2bc0fab8147bd3a5d"},{"author":{"_account_id":30759,"name":"Shogo Saito","email":"shogo.saito.ac@hco.ntt.co.jp","username":"s.shogo"},"change_message_id":"aeaa500f7145eed196cc14b6a23cb346e36654fa","unresolved":false,"context_lines":[{"line_number":166,"context_line":"    @policy.authorize_wsgi(\"cyborg:deployable\", \"get_all\")"},{"line_number":167,"context_line":"    @expose.expose(DeployableCollection, int, types.uuid, wtypes.text,"},{"line_number":168,"context_line":"                   wtypes.text, wtypes.ArrayType(types.FilterType))"},{"line_number":169,"context_line":"    # TODO(wangzhh): Remove limit, marker, sort_key, sort_dir in next release."},{"line_number":170,"context_line":"    # They are used to compatible with R release client."},{"line_number":171,"context_line":"    def get_all(self, limit\u003dNone, marker\u003dNone, sort_key\u003d\u0027id\u0027, sort_dir\u003d\u0027asc\u0027,"},{"line_number":172,"context_line":"                filters\u003dNone):"},{"line_number":173,"context_line":"        \"\"\"Retrieve a list of deployables.\"\"\""}],"source_content_type":"text/x-python","patch_set":1,"id":"bf51134e_41067688","line":170,"range":{"start_line":169,"start_character":4,"end_line":170,"end_character":56},"in_reply_to":"1fa4df85_59d0f8f7","updated":"2020-06-18 12:09:05.000000000","message":"Done in the Deployable V2 API patch [1]\n[1]https://review.opendev.org/#/c/712835/4","commit_id":"367402bff191a48a19ae45d2bc0fab8147bd3a5d"},{"author":{"_account_id":26458,"name":"Brin Zhang","email":"zhangbailin@inspur.com","username":"zhangbailin"},"change_message_id":"c92178ef772603b9448587795da052607a1af8e5","unresolved":false,"context_lines":[{"line_number":181,"context_line":"            marker_obj \u003d objects.Deployable.get(context, marker)"},{"line_number":182,"context_line":"            filters_dict[\"marker_obj\"] \u003d marker_obj"},{"line_number":183,"context_line":"        obj_deps \u003d objects.Deployable.list(context, filters\u003dfilters_dict)"},{"line_number":184,"context_line":"        return DeployableCollection.convert_with_links(obj_deps)"},{"line_number":185,"context_line":""},{"line_number":186,"context_line":"    def _generate_filters(self, limit, sort_key, sort_dir, filters_dict):"},{"line_number":187,"context_line":"        \"\"\"This method are used to compatible with R release client.\"\"\""}],"source_content_type":"text/x-python","patch_set":1,"id":"1fa4df85_d9dce819","line":184,"range":{"start_line":184,"start_character":15,"end_line":184,"end_character":35},"updated":"2020-03-19 07:14:16.000000000","message":"self.","commit_id":"367402bff191a48a19ae45d2bc0fab8147bd3a5d"},{"author":{"_account_id":30759,"name":"Shogo Saito","email":"shogo.saito.ac@hco.ntt.co.jp","username":"s.shogo"},"change_message_id":"aeaa500f7145eed196cc14b6a23cb346e36654fa","unresolved":false,"context_lines":[{"line_number":181,"context_line":"            marker_obj \u003d objects.Deployable.get(context, marker)"},{"line_number":182,"context_line":"            filters_dict[\"marker_obj\"] \u003d marker_obj"},{"line_number":183,"context_line":"        obj_deps \u003d objects.Deployable.list(context, filters\u003dfilters_dict)"},{"line_number":184,"context_line":"        return DeployableCollection.convert_with_links(obj_deps)"},{"line_number":185,"context_line":""},{"line_number":186,"context_line":"    def _generate_filters(self, limit, sort_key, sort_dir, filters_dict):"},{"line_number":187,"context_line":"        \"\"\"This method are used to compatible with R release client.\"\"\""}],"source_content_type":"text/x-python","patch_set":1,"id":"bf51134e_2109c294","line":184,"range":{"start_line":184,"start_character":15,"end_line":184,"end_character":35},"in_reply_to":"1fa4df85_d9dce819","updated":"2020-06-18 12:09:05.000000000","message":"Done in the Deployable V2 API patch [1]\n[1]https://review.opendev.org/#/c/712835/4","commit_id":"367402bff191a48a19ae45d2bc0fab8147bd3a5d"},{"author":{"_account_id":26458,"name":"Brin Zhang","email":"zhangbailin@inspur.com","username":"zhangbailin"},"change_message_id":"c92178ef772603b9448587795da052607a1af8e5","unresolved":false,"context_lines":[{"line_number":222,"context_line":""},{"line_number":223,"context_line":"        new_dep \u003d pecan.request.conductor_api.deployable_update(context,"},{"line_number":224,"context_line":"                                                                obj_dep)"},{"line_number":225,"context_line":"        return Deployable.convert_with_links(new_dep)"},{"line_number":226,"context_line":""},{"line_number":227,"context_line":"    @policy.authorize_wsgi(\"cyborg:deployable\", \"delete\")"},{"line_number":228,"context_line":"    @expose.expose(None, types.uuid, status_code\u003dhttp_client.NO_CONTENT)"}],"source_content_type":"text/x-python","patch_set":1,"id":"1fa4df85_f9df6409","line":225,"range":{"start_line":225,"start_character":15,"end_line":225,"end_character":25},"updated":"2020-03-19 07:14:16.000000000","message":"self.convert_with_link(...)","commit_id":"367402bff191a48a19ae45d2bc0fab8147bd3a5d"},{"author":{"_account_id":30759,"name":"Shogo Saito","email":"shogo.saito.ac@hco.ntt.co.jp","username":"s.shogo"},"change_message_id":"aeaa500f7145eed196cc14b6a23cb346e36654fa","unresolved":false,"context_lines":[{"line_number":222,"context_line":""},{"line_number":223,"context_line":"        new_dep \u003d pecan.request.conductor_api.deployable_update(context,"},{"line_number":224,"context_line":"                                                                obj_dep)"},{"line_number":225,"context_line":"        return Deployable.convert_with_links(new_dep)"},{"line_number":226,"context_line":""},{"line_number":227,"context_line":"    @policy.authorize_wsgi(\"cyborg:deployable\", \"delete\")"},{"line_number":228,"context_line":"    @expose.expose(None, types.uuid, status_code\u003dhttp_client.NO_CONTENT)"}],"source_content_type":"text/x-python","patch_set":1,"id":"bf51134e_81008e69","line":225,"range":{"start_line":225,"start_character":15,"end_line":225,"end_character":25},"in_reply_to":"1fa4df85_f9df6409","updated":"2020-06-18 12:09:05.000000000","message":"Done in the Deployable V2 API patch [1]\n[1]https://review.opendev.org/#/c/712835/4","commit_id":"367402bff191a48a19ae45d2bc0fab8147bd3a5d"},{"author":{"_account_id":21672,"name":"Sundar Nadathur","email":"sundar.nadathur@intel.com","username":"nsundar"},"change_message_id":"ad6e1a57606169c9626a57aa46883a2a710761c4","unresolved":false,"context_lines":[{"line_number":126,"context_line":""},{"line_number":127,"context_line":"    @policy.authorize_wsgi(\"cyborg:deployable\", \"program\", False)"},{"line_number":128,"context_line":"    @expose.expose(Deployable, types.uuid, body\u003d[DeployablePatchType])"},{"line_number":129,"context_line":"    def program(self, uuid, program_info):"},{"line_number":130,"context_line":"        \"\"\"Program a new deployable(FPGA)."},{"line_number":131,"context_line":""},{"line_number":132,"context_line":"        :param uuid: The uuid of the target deployable."}],"source_content_type":"text/x-python","patch_set":2,"id":"df33271e_572030b1","line":129,"updated":"2020-04-06 08:01:34.000000000","message":"How is this tied to HTTP PATCH?","commit_id":"9f1f39a1955e336d604846a2d3bea14a616330b2"},{"author":{"_account_id":30759,"name":"Shogo Saito","email":"shogo.saito.ac@hco.ntt.co.jp","username":"s.shogo"},"change_message_id":"daad2e4af950a7a63463572ad193cd5562167efe","unresolved":false,"context_lines":[{"line_number":126,"context_line":""},{"line_number":127,"context_line":"    @policy.authorize_wsgi(\"cyborg:deployable\", \"program\", False)"},{"line_number":128,"context_line":"    @expose.expose(Deployable, types.uuid, body\u003d[DeployablePatchType])"},{"line_number":129,"context_line":"    def program(self, uuid, program_info):"},{"line_number":130,"context_line":"        \"\"\"Program a new deployable(FPGA)."},{"line_number":131,"context_line":""},{"line_number":132,"context_line":"        :param uuid: The uuid of the target deployable."}],"source_content_type":"text/x-python","patch_set":2,"id":"3f4c43b2_320614d0","line":129,"in_reply_to":"3f4c43b2_9c6f9ac4","updated":"2020-04-17 07:53:50.000000000","message":"I re-confirmed this, Line 125( _custom_actions \u003d {\u0027program\u0027: [\u0027PATCH\u0027]} ) ties that.","commit_id":"9f1f39a1955e336d604846a2d3bea14a616330b2"},{"author":{"_account_id":30759,"name":"Shogo Saito","email":"shogo.saito.ac@hco.ntt.co.jp","username":"s.shogo"},"change_message_id":"338388262319b1751219890ee96720a742a21b93","unresolved":false,"context_lines":[{"line_number":126,"context_line":""},{"line_number":127,"context_line":"    @policy.authorize_wsgi(\"cyborg:deployable\", \"program\", False)"},{"line_number":128,"context_line":"    @expose.expose(Deployable, types.uuid, body\u003d[DeployablePatchType])"},{"line_number":129,"context_line":"    def program(self, uuid, program_info):"},{"line_number":130,"context_line":"        \"\"\"Program a new deployable(FPGA)."},{"line_number":131,"context_line":""},{"line_number":132,"context_line":"        :param uuid: The uuid of the target deployable."}],"source_content_type":"text/x-python","patch_set":2,"id":"3f4c43b2_9c6f9ac4","line":129,"in_reply_to":"df33271e_572030b1","updated":"2020-04-13 08:29:55.000000000","message":"Line 125 ties this to HTTP PATCH.\nTo make sure,I\u0027ll check this again before next patch-set.","commit_id":"9f1f39a1955e336d604846a2d3bea14a616330b2"},{"author":{"_account_id":21672,"name":"Sundar Nadathur","email":"sundar.nadathur@intel.com","username":"nsundar"},"change_message_id":"ad6e1a57606169c9626a57aa46883a2a710761c4","unresolved":false,"context_lines":[{"line_number":130,"context_line":"        \"\"\"Program a new deployable(FPGA)."},{"line_number":131,"context_line":""},{"line_number":132,"context_line":"        :param uuid: The uuid of the target deployable."},{"line_number":133,"context_line":"        :param program_info: JSON string containing what to program."},{"line_number":134,"context_line":"        \"\"\""},{"line_number":135,"context_line":""},{"line_number":136,"context_line":"        image_uuid \u003d program_info[0][\u0027value\u0027][0][\u0027image_uuid\u0027]"}],"source_content_type":"text/x-python","patch_set":2,"id":"df33271e_3713ec68","line":133,"updated":"2020-04-06 08:01:34.000000000","message":"Please follow the same PATCH argument structure as ARQ binding.","commit_id":"9f1f39a1955e336d604846a2d3bea14a616330b2"},{"author":{"_account_id":30759,"name":"Shogo Saito","email":"shogo.saito.ac@hco.ntt.co.jp","username":"s.shogo"},"change_message_id":"338388262319b1751219890ee96720a742a21b93","unresolved":false,"context_lines":[{"line_number":130,"context_line":"        \"\"\"Program a new deployable(FPGA)."},{"line_number":131,"context_line":""},{"line_number":132,"context_line":"        :param uuid: The uuid of the target deployable."},{"line_number":133,"context_line":"        :param program_info: JSON string containing what to program."},{"line_number":134,"context_line":"        \"\"\""},{"line_number":135,"context_line":""},{"line_number":136,"context_line":"        image_uuid \u003d program_info[0][\u0027value\u0027][0][\u0027image_uuid\u0027]"}],"source_content_type":"text/x-python","patch_set":2,"id":"3f4c43b2_d7e29b01","line":133,"in_reply_to":"df33271e_3713ec68","updated":"2020-04-13 08:29:55.000000000","message":"Thanks. Let me confirm, your suggestion also changes the previous spec[1][2],right?\nIf there were other reasons or history, please let me know.\n\nIMHO,　Independent-program use-case may have no instance uuid, thus it have different arguments from ARQ binding.\n\n[1]https://specs.openstack.org/openstack/cyborg-specs/specs/rocky/approved/cyborg-fpga-programming-proposal.html\n[2]https://specs.openstack.org/openstack/cyborg-specs/specs/train/approved/cyborg-api.html","commit_id":"9f1f39a1955e336d604846a2d3bea14a616330b2"},{"author":{"_account_id":21672,"name":"Sundar Nadathur","email":"sundar.nadathur@intel.com","username":"nsundar"},"change_message_id":"ad6e1a57606169c9626a57aa46883a2a710761c4","unresolved":false,"context_lines":[{"line_number":133,"context_line":"        :param program_info: JSON string containing what to program."},{"line_number":134,"context_line":"        \"\"\""},{"line_number":135,"context_line":""},{"line_number":136,"context_line":"        image_uuid \u003d program_info[0][\u0027value\u0027][0][\u0027image_uuid\u0027]"},{"line_number":137,"context_line":"        # Todo(s_shogo) validation of the image."},{"line_number":138,"context_line":"        agent_api \u003d AgentAPI()"},{"line_number":139,"context_line":"        obj_dep \u003d objects.Deployable.get(pecan.request.context, uuid)"}],"source_content_type":"text/x-python","patch_set":2,"id":"df33271e_5709502f","line":136,"updated":"2020-04-06 08:01:34.000000000","message":"The input arguments need to be validated. In particular, it should be verified that the UUID format is correct.","commit_id":"9f1f39a1955e336d604846a2d3bea14a616330b2"},{"author":{"_account_id":30759,"name":"Shogo Saito","email":"shogo.saito.ac@hco.ntt.co.jp","username":"s.shogo"},"change_message_id":"daad2e4af950a7a63463572ad193cd5562167efe","unresolved":false,"context_lines":[{"line_number":133,"context_line":"        :param program_info: JSON string containing what to program."},{"line_number":134,"context_line":"        \"\"\""},{"line_number":135,"context_line":""},{"line_number":136,"context_line":"        image_uuid \u003d program_info[0][\u0027value\u0027][0][\u0027image_uuid\u0027]"},{"line_number":137,"context_line":"        # Todo(s_shogo) validation of the image."},{"line_number":138,"context_line":"        agent_api \u003d AgentAPI()"},{"line_number":139,"context_line":"        obj_dep \u003d objects.Deployable.get(pecan.request.context, uuid)"}],"source_content_type":"text/x-python","patch_set":2,"id":"3f4c43b2_120958dc","line":136,"in_reply_to":"3f4c43b2_7c744e9a","updated":"2020-04-17 07:53:50.000000000","message":"Done","commit_id":"9f1f39a1955e336d604846a2d3bea14a616330b2"},{"author":{"_account_id":30759,"name":"Shogo Saito","email":"shogo.saito.ac@hco.ntt.co.jp","username":"s.shogo"},"change_message_id":"338388262319b1751219890ee96720a742a21b93","unresolved":false,"context_lines":[{"line_number":133,"context_line":"        :param program_info: JSON string containing what to program."},{"line_number":134,"context_line":"        \"\"\""},{"line_number":135,"context_line":""},{"line_number":136,"context_line":"        image_uuid \u003d program_info[0][\u0027value\u0027][0][\u0027image_uuid\u0027]"},{"line_number":137,"context_line":"        # Todo(s_shogo) validation of the image."},{"line_number":138,"context_line":"        agent_api \u003d AgentAPI()"},{"line_number":139,"context_line":"        obj_dep \u003d objects.Deployable.get(pecan.request.context, uuid)"}],"source_content_type":"text/x-python","patch_set":2,"id":"3f4c43b2_7c744e9a","line":136,"in_reply_to":"df33271e_5709502f","updated":"2020-04-13 08:29:55.000000000","message":"OK, I\u0027ll add validation logic.","commit_id":"9f1f39a1955e336d604846a2d3bea14a616330b2"},{"author":{"_account_id":21672,"name":"Sundar Nadathur","email":"sundar.nadathur@intel.com","username":"nsundar"},"change_message_id":"ad6e1a57606169c9626a57aa46883a2a710761c4","unresolved":false,"context_lines":[{"line_number":154,"context_line":"            image_uuid,"},{"line_number":155,"context_line":"            driver_name,"},{"line_number":156,"context_line":"            )"},{"line_number":157,"context_line":"        if ret is True:"},{"line_number":158,"context_line":"            return self.convert_with_link(obj_dep)"},{"line_number":159,"context_line":"        else:"},{"line_number":160,"context_line":"            raise exc.FPGAProgramError(ret\u003dret)"}],"source_content_type":"text/x-python","patch_set":2,"id":"df33271e_575b1053","line":157,"range":{"start_line":157,"start_character":15,"end_line":157,"end_character":22},"updated":"2020-04-06 08:01:34.000000000","message":"Why is this necessary, instead of \u0027if ret:\u0027 ?","commit_id":"9f1f39a1955e336d604846a2d3bea14a616330b2"},{"author":{"_account_id":30759,"name":"Shogo Saito","email":"shogo.saito.ac@hco.ntt.co.jp","username":"s.shogo"},"change_message_id":"daad2e4af950a7a63463572ad193cd5562167efe","unresolved":false,"context_lines":[{"line_number":154,"context_line":"            image_uuid,"},{"line_number":155,"context_line":"            driver_name,"},{"line_number":156,"context_line":"            )"},{"line_number":157,"context_line":"        if ret is True:"},{"line_number":158,"context_line":"            return self.convert_with_link(obj_dep)"},{"line_number":159,"context_line":"        else:"},{"line_number":160,"context_line":"            raise exc.FPGAProgramError(ret\u003dret)"}],"source_content_type":"text/x-python","patch_set":2,"id":"3f4c43b2_72109c02","line":157,"range":{"start_line":157,"start_character":15,"end_line":157,"end_character":22},"in_reply_to":"3f4c43b2_bc6536e4","updated":"2020-04-17 07:53:50.000000000","message":"Done","commit_id":"9f1f39a1955e336d604846a2d3bea14a616330b2"},{"author":{"_account_id":30759,"name":"Shogo Saito","email":"shogo.saito.ac@hco.ntt.co.jp","username":"s.shogo"},"change_message_id":"338388262319b1751219890ee96720a742a21b93","unresolved":false,"context_lines":[{"line_number":154,"context_line":"            image_uuid,"},{"line_number":155,"context_line":"            driver_name,"},{"line_number":156,"context_line":"            )"},{"line_number":157,"context_line":"        if ret is True:"},{"line_number":158,"context_line":"            return self.convert_with_link(obj_dep)"},{"line_number":159,"context_line":"        else:"},{"line_number":160,"context_line":"            raise exc.FPGAProgramError(ret\u003dret)"}],"source_content_type":"text/x-python","patch_set":2,"id":"3f4c43b2_bc6536e4","line":157,"range":{"start_line":157,"start_character":15,"end_line":157,"end_character":22},"in_reply_to":"df33271e_575b1053","updated":"2020-04-13 08:29:55.000000000","message":"Thanks, I fix this.","commit_id":"9f1f39a1955e336d604846a2d3bea14a616330b2"},{"author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"tag":"autogenerated:zuul:check","change_message_id":"55189c6e3dfd58f6da3efc9e587d3e7fde0bb7e8","unresolved":false,"context_lines":[{"line_number":136,"context_line":"        image_uuid \u003d program_info[0][\u0027value\u0027][0][\u0027image_uuid\u0027]"},{"line_number":137,"context_line":"        try:"},{"line_number":138,"context_line":"            types.UUIDType().validate(image_uuid)"},{"line_number":139,"context_line":"        except Exception as e:"},{"line_number":140,"context_line":"            raise"},{"line_number":141,"context_line":"        agent_api \u003d AgentAPI()"},{"line_number":142,"context_line":"        obj_dep \u003d objects.Deployable.get(pecan.request.context, uuid)"}],"source_content_type":"text/x-python","patch_set":3,"id":"3f4c43b2_a5ddd915","line":139,"updated":"2020-04-16 02:19:03.000000000","message":"pep8: F841 local variable \u0027e\u0027 is assigned to but never used","commit_id":"94d6cac15944ee9950ac22eb0b0561e433b41e02"},{"author":{"_account_id":30759,"name":"Shogo Saito","email":"shogo.saito.ac@hco.ntt.co.jp","username":"s.shogo"},"change_message_id":"aeaa500f7145eed196cc14b6a23cb346e36654fa","unresolved":false,"context_lines":[{"line_number":136,"context_line":"        image_uuid \u003d program_info[0][\u0027value\u0027][0][\u0027image_uuid\u0027]"},{"line_number":137,"context_line":"        try:"},{"line_number":138,"context_line":"            types.UUIDType().validate(image_uuid)"},{"line_number":139,"context_line":"        except Exception as e:"},{"line_number":140,"context_line":"            raise"},{"line_number":141,"context_line":"        agent_api \u003d AgentAPI()"},{"line_number":142,"context_line":"        obj_dep \u003d objects.Deployable.get(pecan.request.context, uuid)"}],"source_content_type":"text/x-python","patch_set":3,"id":"bf51134e_46068c88","line":139,"in_reply_to":"3f4c43b2_a5ddd915","updated":"2020-06-18 12:09:05.000000000","message":"Done","commit_id":"94d6cac15944ee9950ac22eb0b0561e433b41e02"},{"author":{"_account_id":26458,"name":"Brin Zhang","email":"zhangbailin@inspur.com","username":"zhangbailin"},"change_message_id":"b6909baa4d17f34cec9baaeeb953645544dbf276","unresolved":false,"context_lines":[{"line_number":126,"context_line":""},{"line_number":127,"context_line":"    @policy.authorize_wsgi(\"cyborg:deployable\", \"program\", False)"},{"line_number":128,"context_line":"    @expose.expose(Deployable, types.uuid, body\u003d[DeployablePatchType])"},{"line_number":129,"context_line":"    def program(self, uuid, program_info):"},{"line_number":130,"context_line":"        \"\"\"Program a new deployable(FPGA)."},{"line_number":131,"context_line":""},{"line_number":132,"context_line":"        :param uuid: The uuid of the target deployable."}],"source_content_type":"text/x-python","patch_set":4,"id":"1f493fa4_fd697a8b","line":129,"updated":"2020-04-21 03:02:42.000000000","message":"Maybe we need to add more comments to help developers better read and understand the code implementation, especially on the important code..","commit_id":"26a36395f7d3725070a0573e1eea408441f70082"},{"author":{"_account_id":31783,"name":"Huang Haibin","email":"hhb584520@163.com"},"change_message_id":"80ef0d9e356e06a2d715454d40bc25114a4a2aef","unresolved":false,"context_lines":[{"line_number":126,"context_line":""},{"line_number":127,"context_line":"    @policy.authorize_wsgi(\"cyborg:deployable\", \"program\", False)"},{"line_number":128,"context_line":"    @expose.expose(Deployable, types.uuid, body\u003d[DeployablePatchType])"},{"line_number":129,"context_line":"    def program(self, uuid, program_info):"},{"line_number":130,"context_line":"        \"\"\"Program a new deployable(FPGA)."},{"line_number":131,"context_line":""},{"line_number":132,"context_line":"        :param uuid: The uuid of the target deployable."}],"source_content_type":"text/x-python","patch_set":4,"id":"ff570b3c_c07335e6","line":129,"range":{"start_line":129,"start_character":4,"end_line":129,"end_character":42},"updated":"2020-06-03 11:49:07.000000000","message":"we have tested your code in the fake driver to make change like below. cyborg database have not fake driver deployable, but we have a fake device in devices tables.\nso, how to program this device to implement the device function.\n\n[stack@cyborg-compute cyborg]$ git diff cyborg/accelerator/drivers/fake.py\ndiff --git a/cyborg/accelerator/drivers/fake.py b/cyborg/accelerator/drivers/fake.py\nindex 33f540f..9fa1d8d 100644\n--- a/cyborg/accelerator/drivers/fake.py\n+++ b/cyborg/accelerator/drivers/fake.py\n@@ -74,6 +74,7 @@ class FakeDriver(GenericDriver):\n         return [attr_traits, attr_rc]\n\n     def _generate_dep_list(self, pci):\n+        return []\n         driver_dep \u003d driver_deployable.DriverDeployable()\n         driver_dep.attach_handle_list \u003d self._generate_attach_handles(\n             pci, self.NUM_ACCELERATORS)","commit_id":"26a36395f7d3725070a0573e1eea408441f70082"},{"author":{"_account_id":30759,"name":"Shogo Saito","email":"shogo.saito.ac@hco.ntt.co.jp","username":"s.shogo"},"change_message_id":"aeaa500f7145eed196cc14b6a23cb346e36654fa","unresolved":false,"context_lines":[{"line_number":126,"context_line":""},{"line_number":127,"context_line":"    @policy.authorize_wsgi(\"cyborg:deployable\", \"program\", False)"},{"line_number":128,"context_line":"    @expose.expose(Deployable, types.uuid, body\u003d[DeployablePatchType])"},{"line_number":129,"context_line":"    def program(self, uuid, program_info):"},{"line_number":130,"context_line":"        \"\"\"Program a new deployable(FPGA)."},{"line_number":131,"context_line":""},{"line_number":132,"context_line":"        :param uuid: The uuid of the target deployable."}],"source_content_type":"text/x-python","patch_set":4,"id":"bf51134e_668630de","line":129,"in_reply_to":"1f493fa4_fd697a8b","updated":"2020-06-18 12:09:05.000000000","message":"OK,that\u0027s right.\nTo describe the detail spec seems to be too much, I just add explanation for the spec of raise and return.\nPlease tell me if you have a better description","commit_id":"26a36395f7d3725070a0573e1eea408441f70082"},{"author":{"_account_id":30759,"name":"Shogo Saito","email":"shogo.saito.ac@hco.ntt.co.jp","username":"s.shogo"},"change_message_id":"aeaa500f7145eed196cc14b6a23cb346e36654fa","unresolved":false,"context_lines":[{"line_number":126,"context_line":""},{"line_number":127,"context_line":"    @policy.authorize_wsgi(\"cyborg:deployable\", \"program\", False)"},{"line_number":128,"context_line":"    @expose.expose(Deployable, types.uuid, body\u003d[DeployablePatchType])"},{"line_number":129,"context_line":"    def program(self, uuid, program_info):"},{"line_number":130,"context_line":"        \"\"\"Program a new deployable(FPGA)."},{"line_number":131,"context_line":""},{"line_number":132,"context_line":"        :param uuid: The uuid of the target deployable."}],"source_content_type":"text/x-python","patch_set":4,"id":"bf51134e_26655846","line":129,"range":{"start_line":129,"start_character":4,"end_line":129,"end_character":42},"in_reply_to":"ff570b3c_c07335e6","updated":"2020-06-18 12:09:05.000000000","message":"As discussed in the IRC and PTG, device/program API is a way to solve that.\nI would like to discuss that as another patch, is OK?","commit_id":"26a36395f7d3725070a0573e1eea408441f70082"},{"author":{"_account_id":26458,"name":"Brin Zhang","email":"zhangbailin@inspur.com","username":"zhangbailin"},"change_message_id":"b6909baa4d17f34cec9baaeeb953645544dbf276","unresolved":false,"context_lines":[{"line_number":131,"context_line":""},{"line_number":132,"context_line":"        :param uuid: The uuid of the target deployable."},{"line_number":133,"context_line":"        :param program_info: JSON string containing what to program."},{"line_number":134,"context_line":"        \"\"\""},{"line_number":135,"context_line":""},{"line_number":136,"context_line":"        image_uuid \u003d program_info[0][\u0027value\u0027][0][\u0027image_uuid\u0027]"},{"line_number":137,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":4,"id":"1f493fa4_9d6f96c4","line":134,"range":{"start_line":134,"start_character":8,"end_line":134,"end_character":11},"updated":"2020-04-21 03:02:42.000000000","message":"Need add result in comments.\n\n:raise FPGAProgramError ...\n:return ...","commit_id":"26a36395f7d3725070a0573e1eea408441f70082"},{"author":{"_account_id":30759,"name":"Shogo Saito","email":"shogo.saito.ac@hco.ntt.co.jp","username":"s.shogo"},"change_message_id":"aeaa500f7145eed196cc14b6a23cb346e36654fa","unresolved":false,"context_lines":[{"line_number":131,"context_line":""},{"line_number":132,"context_line":"        :param uuid: The uuid of the target deployable."},{"line_number":133,"context_line":"        :param program_info: JSON string containing what to program."},{"line_number":134,"context_line":"        \"\"\""},{"line_number":135,"context_line":""},{"line_number":136,"context_line":"        image_uuid \u003d program_info[0][\u0027value\u0027][0][\u0027image_uuid\u0027]"},{"line_number":137,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":4,"id":"bf51134e_a6504860","line":134,"range":{"start_line":134,"start_character":8,"end_line":134,"end_character":11},"in_reply_to":"1f493fa4_9d6f96c4","updated":"2020-06-18 12:09:05.000000000","message":"Thanks, add the explation.","commit_id":"26a36395f7d3725070a0573e1eea408441f70082"},{"author":{"_account_id":26458,"name":"Brin Zhang","email":"zhangbailin@inspur.com","username":"zhangbailin"},"change_message_id":"b6909baa4d17f34cec9baaeeb953645544dbf276","unresolved":false,"context_lines":[{"line_number":134,"context_line":"        \"\"\""},{"line_number":135,"context_line":""},{"line_number":136,"context_line":"        image_uuid \u003d program_info[0][\u0027value\u0027][0][\u0027image_uuid\u0027]"},{"line_number":137,"context_line":"        try:"},{"line_number":138,"context_line":"            types.UUIDType().validate(image_uuid)"},{"line_number":139,"context_line":"        except Exception:"},{"line_number":140,"context_line":"            raise"}],"source_content_type":"text/x-python","patch_set":4,"id":"1f493fa4_3d6482b9","line":137,"updated":"2020-04-21 03:02:42.000000000","message":"Missed test cases to cover this positive and negative scenarios.","commit_id":"26a36395f7d3725070a0573e1eea408441f70082"},{"author":{"_account_id":30759,"name":"Shogo Saito","email":"shogo.saito.ac@hco.ntt.co.jp","username":"s.shogo"},"change_message_id":"aeaa500f7145eed196cc14b6a23cb346e36654fa","unresolved":false,"context_lines":[{"line_number":134,"context_line":"        \"\"\""},{"line_number":135,"context_line":""},{"line_number":136,"context_line":"        image_uuid \u003d program_info[0][\u0027value\u0027][0][\u0027image_uuid\u0027]"},{"line_number":137,"context_line":"        try:"},{"line_number":138,"context_line":"            types.UUIDType().validate(image_uuid)"},{"line_number":139,"context_line":"        except Exception:"},{"line_number":140,"context_line":"            raise"}],"source_content_type":"text/x-python","patch_set":4,"id":"bf51134e_06fe5436","line":137,"in_reply_to":"1f493fa4_3d6482b9","updated":"2020-06-18 12:09:05.000000000","message":"That\u0027s right. I add the 3 pattern tests.\n1. unvalid uuid\n2. valid uuid, but not image_uuid\n3. valid uuid, and valid image_uuid","commit_id":"26a36395f7d3725070a0573e1eea408441f70082"},{"author":{"_account_id":25738,"name":"Xinran WANG","email":"xin-ran.wang@intel.com","username":"Xinran"},"change_message_id":"57b259122f522e1091701d0907422f543d70d26e","unresolved":false,"context_lines":[{"line_number":135,"context_line":""},{"line_number":136,"context_line":"        image_uuid \u003d program_info[0][\u0027value\u0027][0][\u0027image_uuid\u0027]"},{"line_number":137,"context_line":"        try:"},{"line_number":138,"context_line":"            types.UUIDType().validate(image_uuid)"},{"line_number":139,"context_line":"        except Exception:"},{"line_number":140,"context_line":"            raise"},{"line_number":141,"context_line":"        agent_api \u003d AgentAPI()"}],"source_content_type":"text/x-python","patch_set":4,"id":"3f4c43b2_c9211f50","line":138,"range":{"start_line":138,"start_character":0,"end_line":138,"end_character":49},"updated":"2020-04-16 07:38:16.000000000","message":"I think we can add a TODO here, cause in next release we plan to add schema check, which will help checking input parameters\u0027 format. So we can remove this validation in the future.","commit_id":"26a36395f7d3725070a0573e1eea408441f70082"},{"author":{"_account_id":30759,"name":"Shogo Saito","email":"shogo.saito.ac@hco.ntt.co.jp","username":"s.shogo"},"change_message_id":"daad2e4af950a7a63463572ad193cd5562167efe","unresolved":false,"context_lines":[{"line_number":135,"context_line":""},{"line_number":136,"context_line":"        image_uuid \u003d program_info[0][\u0027value\u0027][0][\u0027image_uuid\u0027]"},{"line_number":137,"context_line":"        try:"},{"line_number":138,"context_line":"            types.UUIDType().validate(image_uuid)"},{"line_number":139,"context_line":"        except Exception:"},{"line_number":140,"context_line":"            raise"},{"line_number":141,"context_line":"        agent_api \u003d AgentAPI()"}],"source_content_type":"text/x-python","patch_set":4,"id":"3f4c43b2_d2c5305d","line":138,"range":{"start_line":138,"start_character":0,"end_line":138,"end_character":49},"in_reply_to":"3f4c43b2_c9211f50","updated":"2020-04-17 07:53:50.000000000","message":"OK, I\u0027ll add that as TODO here.","commit_id":"26a36395f7d3725070a0573e1eea408441f70082"},{"author":{"_account_id":30759,"name":"Shogo Saito","email":"shogo.saito.ac@hco.ntt.co.jp","username":"s.shogo"},"change_message_id":"aeaa500f7145eed196cc14b6a23cb346e36654fa","unresolved":false,"context_lines":[{"line_number":135,"context_line":""},{"line_number":136,"context_line":"        image_uuid \u003d program_info[0][\u0027value\u0027][0][\u0027image_uuid\u0027]"},{"line_number":137,"context_line":"        try:"},{"line_number":138,"context_line":"            types.UUIDType().validate(image_uuid)"},{"line_number":139,"context_line":"        except Exception:"},{"line_number":140,"context_line":"            raise"},{"line_number":141,"context_line":"        agent_api \u003d AgentAPI()"}],"source_content_type":"text/x-python","patch_set":4,"id":"bf51134e_66a2b04d","line":138,"range":{"start_line":138,"start_character":0,"end_line":138,"end_character":49},"in_reply_to":"3f4c43b2_d2c5305d","updated":"2020-06-18 12:09:05.000000000","message":"Done","commit_id":"26a36395f7d3725070a0573e1eea408441f70082"},{"author":{"_account_id":26458,"name":"Brin Zhang","email":"zhangbailin@inspur.com","username":"zhangbailin"},"change_message_id":"b6909baa4d17f34cec9baaeeb953645544dbf276","unresolved":false,"context_lines":[{"line_number":137,"context_line":"        try:"},{"line_number":138,"context_line":"            types.UUIDType().validate(image_uuid)"},{"line_number":139,"context_line":"        except Exception:"},{"line_number":140,"context_line":"            raise"},{"line_number":141,"context_line":"        agent_api \u003d AgentAPI()"},{"line_number":142,"context_line":"        obj_dep \u003d objects.Deployable.get(pecan.request.context, uuid)"},{"line_number":143,"context_line":"        obj_dev \u003d objects.Device.get_by_device_id("}],"source_content_type":"text/x-python","patch_set":4,"id":"1f493fa4_fdb4da37","line":140,"range":{"start_line":140,"start_character":12,"end_line":140,"end_character":17},"updated":"2020-04-21 03:02:42.000000000","message":"Before use schema check instead of this, you should add LOG and raise accurate anomaly, not just catch Exception if you can sure which exception will be catched.","commit_id":"26a36395f7d3725070a0573e1eea408441f70082"},{"author":{"_account_id":30759,"name":"Shogo Saito","email":"shogo.saito.ac@hco.ntt.co.jp","username":"s.shogo"},"change_message_id":"aeaa500f7145eed196cc14b6a23cb346e36654fa","unresolved":false,"context_lines":[{"line_number":137,"context_line":"        try:"},{"line_number":138,"context_line":"            types.UUIDType().validate(image_uuid)"},{"line_number":139,"context_line":"        except Exception:"},{"line_number":140,"context_line":"            raise"},{"line_number":141,"context_line":"        agent_api \u003d AgentAPI()"},{"line_number":142,"context_line":"        obj_dep \u003d objects.Deployable.get(pecan.request.context, uuid)"},{"line_number":143,"context_line":"        obj_dev \u003d objects.Device.get_by_device_id("}],"source_content_type":"text/x-python","patch_set":4,"id":"bf51134e_e602400b","line":140,"range":{"start_line":140,"start_character":12,"end_line":140,"end_character":17},"in_reply_to":"1f493fa4_fdb4da37","updated":"2020-06-18 12:09:05.000000000","message":"right, the latest patch add LOG and raise the exception.","commit_id":"26a36395f7d3725070a0573e1eea408441f70082"},{"author":{"_account_id":26458,"name":"Brin Zhang","email":"zhangbailin@inspur.com","username":"zhangbailin"},"change_message_id":"b6909baa4d17f34cec9baaeeb953645544dbf276","unresolved":false,"context_lines":[{"line_number":138,"context_line":"            types.UUIDType().validate(image_uuid)"},{"line_number":139,"context_line":"        except Exception:"},{"line_number":140,"context_line":"            raise"},{"line_number":141,"context_line":"        agent_api \u003d AgentAPI()"},{"line_number":142,"context_line":"        obj_dep \u003d objects.Deployable.get(pecan.request.context, uuid)"},{"line_number":143,"context_line":"        obj_dev \u003d objects.Device.get_by_device_id("},{"line_number":144,"context_line":"            pecan.request.context,"}],"source_content_type":"text/x-python","patch_set":4,"id":"1f493fa4_fd8dfa7b","line":141,"range":{"start_line":141,"start_character":20,"end_line":141,"end_character":30},"updated":"2020-04-21 03:02:42.000000000","message":"IMHO, this is not easy for later code maintenance. Can you init AgentAPI() in setUp() that we can use it by \u0027self.agent_rpcapi.xxx\u0027.","commit_id":"26a36395f7d3725070a0573e1eea408441f70082"},{"author":{"_account_id":30759,"name":"Shogo Saito","email":"shogo.saito.ac@hco.ntt.co.jp","username":"s.shogo"},"change_message_id":"aeaa500f7145eed196cc14b6a23cb346e36654fa","unresolved":false,"context_lines":[{"line_number":138,"context_line":"            types.UUIDType().validate(image_uuid)"},{"line_number":139,"context_line":"        except Exception:"},{"line_number":140,"context_line":"            raise"},{"line_number":141,"context_line":"        agent_api \u003d AgentAPI()"},{"line_number":142,"context_line":"        obj_dep \u003d objects.Deployable.get(pecan.request.context, uuid)"},{"line_number":143,"context_line":"        obj_dev \u003d objects.Device.get_by_device_id("},{"line_number":144,"context_line":"            pecan.request.context,"}],"source_content_type":"text/x-python","patch_set":4,"id":"bf51134e_014bde58","line":141,"range":{"start_line":141,"start_character":20,"end_line":141,"end_character":30},"in_reply_to":"1f493fa4_fd8dfa7b","updated":"2020-06-18 12:09:05.000000000","message":"I try the below modification ,but that causes error in rpc.py[1]\nThat seems to be stem from RabbitMQ and so on, continue to investigate.\n\ndef __init__(self):\n    self.agent_rpcapi\u003dAgentAPI()","commit_id":"26a36395f7d3725070a0573e1eea408441f70082"},{"author":{"_account_id":14131,"name":"shaohef","email":"shaohe.feng@intel.com","username":"shaohefeng"},"change_message_id":"3fbb5d1685cf0b193b20683da65dcfcb2b56a36c","unresolved":false,"context_lines":[{"line_number":139,"context_line":"        except Exception:"},{"line_number":140,"context_line":"            raise"},{"line_number":141,"context_line":"        agent_api \u003d AgentAPI()"},{"line_number":142,"context_line":"        obj_dep \u003d objects.Deployable.get(pecan.request.context, uuid)"},{"line_number":143,"context_line":"        obj_dev \u003d objects.Device.get_by_device_id("},{"line_number":144,"context_line":"            pecan.request.context,"},{"line_number":145,"context_line":"            obj_dep.device_id"}],"source_content_type":"text/x-python","patch_set":4,"id":"ff570b3c_20f03191","line":142,"range":{"start_line":142,"start_character":0,"end_line":142,"end_character":69},"updated":"2020-06-03 11:29:33.000000000","message":"should make sure the deployable can not be consumed by a VM","commit_id":"26a36395f7d3725070a0573e1eea408441f70082"},{"author":{"_account_id":26458,"name":"Brin Zhang","email":"zhangbailin@inspur.com","username":"zhangbailin"},"change_message_id":"b6909baa4d17f34cec9baaeeb953645544dbf276","unresolved":false,"context_lines":[{"line_number":160,"context_line":"        if ret:"},{"line_number":161,"context_line":"            return self.convert_with_link(obj_dep)"},{"line_number":162,"context_line":"        else:"},{"line_number":163,"context_line":"            raise exc.FPGAProgramError(ret\u003dret)"},{"line_number":164,"context_line":""},{"line_number":165,"context_line":"    @policy.authorize_wsgi(\"cyborg:deployable\", \"get_one\")"},{"line_number":166,"context_line":"    @expose.expose(Deployable, types.uuid)"}],"source_content_type":"text/x-python","patch_set":4,"id":"1f493fa4_9d40360a","line":163,"updated":"2020-04-21 03:02:42.000000000","message":"1.Add LOG to record.\n2.Missing test case to cover this anomaly scenario.","commit_id":"26a36395f7d3725070a0573e1eea408441f70082"},{"author":{"_account_id":30759,"name":"Shogo Saito","email":"shogo.saito.ac@hco.ntt.co.jp","username":"s.shogo"},"change_message_id":"aeaa500f7145eed196cc14b6a23cb346e36654fa","unresolved":false,"context_lines":[{"line_number":160,"context_line":"        if ret:"},{"line_number":161,"context_line":"            return self.convert_with_link(obj_dep)"},{"line_number":162,"context_line":"        else:"},{"line_number":163,"context_line":"            raise exc.FPGAProgramError(ret\u003dret)"},{"line_number":164,"context_line":""},{"line_number":165,"context_line":"    @policy.authorize_wsgi(\"cyborg:deployable\", \"get_one\")"},{"line_number":166,"context_line":"    @expose.expose(Deployable, types.uuid)"}],"source_content_type":"text/x-python","patch_set":4,"id":"bf51134e_c1972690","line":163,"in_reply_to":"1f493fa4_9d40360a","updated":"2020-06-18 12:09:05.000000000","message":"1. the raise add record to log file.\n2. Done, added a test , that fails fpga_program.","commit_id":"26a36395f7d3725070a0573e1eea408441f70082"},{"author":{"_account_id":26458,"name":"Brin Zhang","email":"zhangbailin@inspur.com","username":"zhangbailin"},"change_message_id":"6c94d5e8592f39cc6f0251e75cb9cd4d3efaafc3","unresolved":false,"context_lines":[{"line_number":136,"context_line":"        \"\"\""},{"line_number":137,"context_line":""},{"line_number":138,"context_line":"        image_uuid \u003d program_info[0][\u0027value\u0027][0][\u0027image_uuid\u0027]"},{"line_number":139,"context_line":"        # TODO(s_shogo): In next release we plan to add schema check,"},{"line_number":140,"context_line":"        # which will help checking input parameters\u0027 format."},{"line_number":141,"context_line":"        # So we can remove this validation in the future."},{"line_number":142,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":5,"id":"bf51134e_d1e08299","line":139,"range":{"start_line":139,"start_character":28,"end_line":139,"end_character":40},"updated":"2020-06-19 01:30:02.000000000","message":"I would like that we can clarify it is *which* release.","commit_id":"249aef707dff60f140ba371bb3357ad4c1b3473c"},{"author":{"_account_id":30759,"name":"Shogo Saito","email":"shogo.saito.ac@hco.ntt.co.jp","username":"s.shogo"},"change_message_id":"7f5ec30e12043dafe916ad83b3b9016294a17695","unresolved":false,"context_lines":[{"line_number":136,"context_line":"        \"\"\""},{"line_number":137,"context_line":""},{"line_number":138,"context_line":"        image_uuid \u003d program_info[0][\u0027value\u0027][0][\u0027image_uuid\u0027]"},{"line_number":139,"context_line":"        # TODO(s_shogo): In next release we plan to add schema check,"},{"line_number":140,"context_line":"        # which will help checking input parameters\u0027 format."},{"line_number":141,"context_line":"        # So we can remove this validation in the future."},{"line_number":142,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":5,"id":"bf51134e_e559cf8e","line":139,"range":{"start_line":139,"start_character":28,"end_line":139,"end_character":40},"in_reply_to":"bf51134e_d1e08299","updated":"2020-07-20 02:00:31.000000000","message":"Added description of the version.\nIn fact, that depends on external middleware(Intel OPAE), thus we needs to discuss that schedule.","commit_id":"249aef707dff60f140ba371bb3357ad4c1b3473c"},{"author":{"_account_id":14131,"name":"shaohef","email":"shaohe.feng@intel.com","username":"shaohefeng"},"change_message_id":"18ed4c3d7a93dad5b3a02b03974a6aaf31055a68","unresolved":false,"context_lines":[{"line_number":156,"context_line":"        controlpath_id[\u0027cpid_info\u0027] \u003d jsonutils.loads("},{"line_number":157,"context_line":"            controlpath_id[\u0027cpid_info\u0027])"},{"line_number":158,"context_line":"        self.agent_rpcapi \u003d AgentAPI()"},{"line_number":159,"context_line":"        ret \u003d self.agent_rpcapi.fpga_program("},{"line_number":160,"context_line":"            pecan.request.context,"},{"line_number":161,"context_line":"            hostname,"},{"line_number":162,"context_line":"            controlpath_id,"},{"line_number":163,"context_line":"            image_uuid,"},{"line_number":164,"context_line":"            driver_name,"},{"line_number":165,"context_line":"            )"},{"line_number":166,"context_line":"        if ret:"},{"line_number":167,"context_line":"            return self.convert_with_link(obj_dep)"},{"line_number":168,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":5,"id":"bf51134e_d8913e54","line":165,"range":{"start_line":159,"start_character":0,"end_line":165,"end_character":13},"updated":"2020-06-28 09:40:25.000000000","message":"there maybe a problem, we have the on our FPGA based smartnic, the program took a long time.\nSo it caused timeout. \nMaybe a async task for it. \n\nThanks.","commit_id":"249aef707dff60f140ba371bb3357ad4c1b3473c"},{"author":{"_account_id":30759,"name":"Shogo Saito","email":"shogo.saito.ac@hco.ntt.co.jp","username":"s.shogo"},"change_message_id":"7f5ec30e12043dafe916ad83b3b9016294a17695","unresolved":false,"context_lines":[{"line_number":156,"context_line":"        controlpath_id[\u0027cpid_info\u0027] \u003d jsonutils.loads("},{"line_number":157,"context_line":"            controlpath_id[\u0027cpid_info\u0027])"},{"line_number":158,"context_line":"        self.agent_rpcapi \u003d AgentAPI()"},{"line_number":159,"context_line":"        ret \u003d self.agent_rpcapi.fpga_program("},{"line_number":160,"context_line":"            pecan.request.context,"},{"line_number":161,"context_line":"            hostname,"},{"line_number":162,"context_line":"            controlpath_id,"},{"line_number":163,"context_line":"            image_uuid,"},{"line_number":164,"context_line":"            driver_name,"},{"line_number":165,"context_line":"            )"},{"line_number":166,"context_line":"        if ret:"},{"line_number":167,"context_line":"            return self.convert_with_link(obj_dep)"},{"line_number":168,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":5,"id":"bf51134e_65e2dfa2","line":165,"range":{"start_line":159,"start_character":0,"end_line":165,"end_character":13},"in_reply_to":"bf51134e_d8913e54","updated":"2020-07-20 02:00:31.000000000","message":"As we discussed in the IRC, your concern is right,\nand we will treat that in another patch.","commit_id":"249aef707dff60f140ba371bb3357ad4c1b3473c"},{"author":{"_account_id":26458,"name":"Brin Zhang","email":"zhangbailin@inspur.com","username":"zhangbailin"},"change_message_id":"6c94d5e8592f39cc6f0251e75cb9cd4d3efaafc3","unresolved":false,"context_lines":[{"line_number":164,"context_line":"            driver_name,"},{"line_number":165,"context_line":"            )"},{"line_number":166,"context_line":"        if ret:"},{"line_number":167,"context_line":"            return self.convert_with_link(obj_dep)"},{"line_number":168,"context_line":"        else:"},{"line_number":169,"context_line":"            raise exc.FPGAProgramError(ret\u003dret)"},{"line_number":170,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"bf51134e_9120cab2","line":167,"updated":"2020-06-19 01:30:02.000000000","message":"In the test cases, that seems lack of the happy case to call fpga_program() suceessful.","commit_id":"249aef707dff60f140ba371bb3357ad4c1b3473c"},{"author":{"_account_id":30759,"name":"Shogo Saito","email":"shogo.saito.ac@hco.ntt.co.jp","username":"s.shogo"},"change_message_id":"7f5ec30e12043dafe916ad83b3b9016294a17695","unresolved":false,"context_lines":[{"line_number":164,"context_line":"            driver_name,"},{"line_number":165,"context_line":"            )"},{"line_number":166,"context_line":"        if ret:"},{"line_number":167,"context_line":"            return self.convert_with_link(obj_dep)"},{"line_number":168,"context_line":"        else:"},{"line_number":169,"context_line":"            raise exc.FPGAProgramError(ret\u003dret)"},{"line_number":170,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"bf51134e_454a3bac","line":167,"in_reply_to":"bf51134e_9120cab2","updated":"2020-07-20 02:00:31.000000000","message":"There is a test case[1] (or other intention?)\n\n[1]https://review.opendev.org/#/c/698190/5/cyborg/tests/unit/api/controllers/v2/test_fpga_program.py@45","commit_id":"249aef707dff60f140ba371bb3357ad4c1b3473c"},{"author":{"_account_id":26458,"name":"Brin Zhang","email":"zhangbailin@inspur.com","username":"zhangbailin"},"change_message_id":"6c94d5e8592f39cc6f0251e75cb9cd4d3efaafc3","unresolved":false,"context_lines":[{"line_number":166,"context_line":"        if ret:"},{"line_number":167,"context_line":"            return self.convert_with_link(obj_dep)"},{"line_number":168,"context_line":"        else:"},{"line_number":169,"context_line":"            raise exc.FPGAProgramError(ret\u003dret)"},{"line_number":170,"context_line":""},{"line_number":171,"context_line":"    @policy.authorize_wsgi(\"cyborg:deployable\", \"get_one\")"},{"line_number":172,"context_line":"    @expose.expose(Deployable, types.uuid)"}],"source_content_type":"text/x-python","patch_set":5,"id":"bf51134e_f12f869e","line":169,"updated":"2020-06-19 01:30:02.000000000","message":"There is no case to cover FPGAProgramError.","commit_id":"249aef707dff60f140ba371bb3357ad4c1b3473c"},{"author":{"_account_id":30759,"name":"Shogo Saito","email":"shogo.saito.ac@hco.ntt.co.jp","username":"s.shogo"},"change_message_id":"7f5ec30e12043dafe916ad83b3b9016294a17695","unresolved":false,"context_lines":[{"line_number":166,"context_line":"        if ret:"},{"line_number":167,"context_line":"            return self.convert_with_link(obj_dep)"},{"line_number":168,"context_line":"        else:"},{"line_number":169,"context_line":"            raise exc.FPGAProgramError(ret\u003dret)"},{"line_number":170,"context_line":""},{"line_number":171,"context_line":"    @policy.authorize_wsgi(\"cyborg:deployable\", \"get_one\")"},{"line_number":172,"context_line":"    @expose.expose(Deployable, types.uuid)"}],"source_content_type":"text/x-python","patch_set":5,"id":"bf51134e_c5d3ebd4","line":169,"in_reply_to":"bf51134e_f12f869e","updated":"2020-07-20 02:00:31.000000000","message":"There is a test case[2](or other intention?)\n[2]https://review.opendev.org/#/c/698190/5/cyborg/tests/unit/api/controllers/v2/test_fpga_program.py@66","commit_id":"249aef707dff60f140ba371bb3357ad4c1b3473c"},{"author":{"_account_id":31412,"name":"Wenping Song","email":"songwenping@inspur.com","username":"songwenping"},"change_message_id":"fac2cc60bfeabd2b77bc93594dca0c36ade592f7","unresolved":false,"context_lines":[{"line_number":153,"context_line":"        driver_name \u003d obj_dep.driver_name"},{"line_number":154,"context_line":"        cpid_list \u003d obj_dep.get_cpid_list(pecan.request.context)"},{"line_number":155,"context_line":"        controlpath_id \u003d cpid_list[0]"},{"line_number":156,"context_line":"        controlpath_id[\u0027cpid_info\u0027] \u003d jsonutils.loads("},{"line_number":157,"context_line":"            controlpath_id[\u0027cpid_info\u0027])"},{"line_number":158,"context_line":"        self.agent_rpcapi \u003d AgentAPI()"},{"line_number":159,"context_line":"        ret \u003d self.agent_rpcapi.fpga_program("},{"line_number":160,"context_line":"            pecan.request.context,"}],"source_content_type":"text/x-python","patch_set":6,"id":"bf51134e_7eacec9e","line":157,"range":{"start_line":156,"start_character":38,"end_line":157,"end_character":40},"updated":"2020-07-23 02:17:26.000000000","message":"Strange. how about `jsonutils.loads(\n            cpid_list[0][\u0027cpid_info\u0027])`","commit_id":"6e9e12d92fcba1391091af17c242e76b37b170bb"},{"author":{"_account_id":26458,"name":"Brin Zhang","email":"zhangbailin@inspur.com","username":"zhangbailin"},"change_message_id":"6acd3f554899d80012a5b5718102a1d68fb853c7","unresolved":false,"context_lines":[{"line_number":153,"context_line":"        driver_name \u003d obj_dep.driver_name"},{"line_number":154,"context_line":"        cpid_list \u003d obj_dep.get_cpid_list(pecan.request.context)"},{"line_number":155,"context_line":"        controlpath_id \u003d cpid_list[0]"},{"line_number":156,"context_line":"        controlpath_id[\u0027cpid_info\u0027] \u003d jsonutils.loads("},{"line_number":157,"context_line":"            controlpath_id[\u0027cpid_info\u0027])"},{"line_number":158,"context_line":"        self.agent_rpcapi \u003d AgentAPI()"},{"line_number":159,"context_line":"        ret \u003d self.agent_rpcapi.fpga_program("},{"line_number":160,"context_line":"            pecan.request.context,"}],"source_content_type":"text/x-python","patch_set":6,"id":"bf51134e_5e2c8849","line":157,"range":{"start_line":156,"start_character":8,"end_line":157,"end_character":40},"updated":"2020-07-23 02:41:55.000000000","message":"This looks strange. If we need to change the *cpid_info* as json fromat, we should do in the end method, such as convert_with_link(). And why are you just load the *controlpath_id[\u0027cpid_info\u0027]*, rather than *controlpath_id*, the all data?","commit_id":"6e9e12d92fcba1391091af17c242e76b37b170bb"},{"author":{"_account_id":30759,"name":"Shogo Saito","email":"shogo.saito.ac@hco.ntt.co.jp","username":"s.shogo"},"change_message_id":"aa1416e028fa91e33b348b9cc7e101ffa03fdda4","unresolved":false,"context_lines":[{"line_number":153,"context_line":"        driver_name \u003d obj_dep.driver_name"},{"line_number":154,"context_line":"        cpid_list \u003d obj_dep.get_cpid_list(pecan.request.context)"},{"line_number":155,"context_line":"        controlpath_id \u003d cpid_list[0]"},{"line_number":156,"context_line":"        controlpath_id[\u0027cpid_info\u0027] \u003d jsonutils.loads("},{"line_number":157,"context_line":"            controlpath_id[\u0027cpid_info\u0027])"},{"line_number":158,"context_line":"        self.agent_rpcapi \u003d AgentAPI()"},{"line_number":159,"context_line":"        ret \u003d self.agent_rpcapi.fpga_program("},{"line_number":160,"context_line":"            pecan.request.context,"}],"source_content_type":"text/x-python","patch_set":6,"id":"9f560f44_a0e2699e","line":157,"range":{"start_line":156,"start_character":8,"end_line":157,"end_character":40},"in_reply_to":"9f560f44_0a0b7423","updated":"2020-08-26 08:18:05.000000000","message":"Done","commit_id":"6e9e12d92fcba1391091af17c242e76b37b170bb"},{"author":{"_account_id":30759,"name":"Shogo Saito","email":"shogo.saito.ac@hco.ntt.co.jp","username":"s.shogo"},"change_message_id":"8c69b2d98bb90926131efe295d8b0c6a87efccd6","unresolved":false,"context_lines":[{"line_number":153,"context_line":"        driver_name \u003d obj_dep.driver_name"},{"line_number":154,"context_line":"        cpid_list \u003d obj_dep.get_cpid_list(pecan.request.context)"},{"line_number":155,"context_line":"        controlpath_id \u003d cpid_list[0]"},{"line_number":156,"context_line":"        controlpath_id[\u0027cpid_info\u0027] \u003d jsonutils.loads("},{"line_number":157,"context_line":"            controlpath_id[\u0027cpid_info\u0027])"},{"line_number":158,"context_line":"        self.agent_rpcapi \u003d AgentAPI()"},{"line_number":159,"context_line":"        ret \u003d self.agent_rpcapi.fpga_program("},{"line_number":160,"context_line":"            pecan.request.context,"}],"source_content_type":"text/x-python","patch_set":6,"id":"9f560f44_b0c91c27","line":157,"range":{"start_line":156,"start_character":8,"end_line":157,"end_character":40},"in_reply_to":"9f560f44_52225aba","updated":"2020-08-07 02:41:39.000000000","message":"Sorry, I might misunderstand your comments here.\nLet me confirm, \n\u003e Wenping\n Let me confirm, you mean, jsonutils.loads(cpid_list[0][\u0027cpid_info\u0027]) is more simple, right?\nIf so, that\u0027s right.\n\n\u003e Brin\nAdditional info to the comment:\nthe fpga_program uses all data(controlpath_id) in /controllers/v2/deployables.py, line 162.","commit_id":"6e9e12d92fcba1391091af17c242e76b37b170bb"},{"author":{"_account_id":31412,"name":"Wenping Song","email":"songwenping@inspur.com","username":"songwenping"},"change_message_id":"7a64424e89aedc7a13a14af4447b5677f733931d","unresolved":false,"context_lines":[{"line_number":153,"context_line":"        driver_name \u003d obj_dep.driver_name"},{"line_number":154,"context_line":"        cpid_list \u003d obj_dep.get_cpid_list(pecan.request.context)"},{"line_number":155,"context_line":"        controlpath_id \u003d cpid_list[0]"},{"line_number":156,"context_line":"        controlpath_id[\u0027cpid_info\u0027] \u003d jsonutils.loads("},{"line_number":157,"context_line":"            controlpath_id[\u0027cpid_info\u0027])"},{"line_number":158,"context_line":"        self.agent_rpcapi \u003d AgentAPI()"},{"line_number":159,"context_line":"        ret \u003d self.agent_rpcapi.fpga_program("},{"line_number":160,"context_line":"            pecan.request.context,"}],"source_content_type":"text/x-python","patch_set":6,"id":"9f560f44_0a0b7423","line":157,"range":{"start_line":156,"start_character":8,"end_line":157,"end_character":40},"in_reply_to":"9f560f44_b0c91c27","updated":"2020-08-07 08:31:42.000000000","message":"\u003e Sorry, I might misunderstand your comments here.\n \u003e Let me confirm,\n \u003e \u003e Wenping\n \u003e Let me confirm, you mean, jsonutils.loads(cpid_list[0][\u0027cpid_info\u0027])\n \u003e is more simple, right?\n \u003e If so, that\u0027s right.\n \u003e\u003e\u003e Yeah, maybe this is easy to understand.","commit_id":"6e9e12d92fcba1391091af17c242e76b37b170bb"},{"author":{"_account_id":30759,"name":"Shogo Saito","email":"shogo.saito.ac@hco.ntt.co.jp","username":"s.shogo"},"change_message_id":"cddc48690258d67961fcc17aeb099b9971955aa7","unresolved":false,"context_lines":[{"line_number":153,"context_line":"        driver_name \u003d obj_dep.driver_name"},{"line_number":154,"context_line":"        cpid_list \u003d obj_dep.get_cpid_list(pecan.request.context)"},{"line_number":155,"context_line":"        controlpath_id \u003d cpid_list[0]"},{"line_number":156,"context_line":"        controlpath_id[\u0027cpid_info\u0027] \u003d jsonutils.loads("},{"line_number":157,"context_line":"            controlpath_id[\u0027cpid_info\u0027])"},{"line_number":158,"context_line":"        self.agent_rpcapi \u003d AgentAPI()"},{"line_number":159,"context_line":"        ret \u003d self.agent_rpcapi.fpga_program("},{"line_number":160,"context_line":"            pecan.request.context,"}],"source_content_type":"text/x-python","patch_set":6,"id":"9f560f44_52225aba","line":157,"range":{"start_line":156,"start_character":8,"end_line":157,"end_character":40},"in_reply_to":"bf51134e_5e2c8849","updated":"2020-08-06 08:19:48.000000000","message":"\u003e This looks strange. If we need to change the *cpid_info* as json\n \u003e fromat, we should do in the end method, such as convert_with_link().\n\nOK, I\u0027ll add another variable to substitute the json format.\n\n \u003e And why are you just load the *controlpath_id[\u0027cpid_info\u0027]*, rather\n \u003e than *controlpath_id*, the all data?\n\nThe data format of controlpath_id[\u0027cpid_info\u0027] is plain text and doesn\u0027t be formatted as python data structure.\n(the format depends on the type of bus(mdev or pcie))\nThat is why plain text is loaded as raw.","commit_id":"6e9e12d92fcba1391091af17c242e76b37b170bb"},{"author":{"_account_id":26458,"name":"Brin Zhang","email":"zhangbailin@inspur.com","username":"zhangbailin"},"change_message_id":"3a17d30366fe04a7d0cf57e7d0c4dfb40c4c3ad2","unresolved":false,"context_lines":[{"line_number":124,"context_line":""},{"line_number":125,"context_line":"    _custom_actions \u003d {\u0027program\u0027: [\u0027PATCH\u0027]}"},{"line_number":126,"context_line":""},{"line_number":127,"context_line":"    @authorize_wsgi.authorize_wsgi(\"cyborg:deployable\", \"program\", False)"},{"line_number":128,"context_line":"    @expose.expose(Deployable, types.uuid, body\u003d[DeployablePatchType])"},{"line_number":129,"context_line":"    def program(self, uuid, program_info):"},{"line_number":130,"context_line":"        \"\"\"Program a new deployable(FPGA)."}],"source_content_type":"text/x-python","patch_set":11,"id":"9f560f44_8b9c4f5c","line":127,"range":{"start_line":127,"start_character":4,"end_line":127,"end_character":73},"updated":"2020-09-16 11:15:29.000000000","message":"Hoping Yuemng can check this policy set.","commit_id":"3466f6d8682947e90b50b2482f7c8769a872c96b"},{"author":{"_account_id":24872,"name":"YumengBao","email":"yumeng_bao@yahoo.com","username":"Yumeng_Bao"},"change_message_id":"a9b93b577ce46d390fa1319702e81eb9ab2f32d2","unresolved":false,"context_lines":[{"line_number":124,"context_line":""},{"line_number":125,"context_line":"    _custom_actions \u003d {\u0027program\u0027: [\u0027PATCH\u0027]}"},{"line_number":126,"context_line":""},{"line_number":127,"context_line":"    @authorize_wsgi.authorize_wsgi(\"cyborg:deployable\", \"program\", False)"},{"line_number":128,"context_line":"    @expose.expose(Deployable, types.uuid, body\u003d[DeployablePatchType])"},{"line_number":129,"context_line":"    def program(self, uuid, program_info):"},{"line_number":130,"context_line":"        \"\"\"Program a new deployable(FPGA)."}],"source_content_type":"text/x-python","patch_set":11,"id":"9f560f44_25e9e2e2","line":127,"range":{"start_line":127,"start_character":4,"end_line":127,"end_character":73},"in_reply_to":"9f560f44_8b9c4f5c","updated":"2020-09-17 02:54:47.000000000","message":"In this patch, \"rule: allow\" for \"cyborg:deployable: program\" is acceptable to me, as long as we should make the policy work fine and not harm the whole program system.\n\nBut we should keep in mind that, as what we\u0027ve discussed in previous IRC meeting[0], the new policy rule required for \"deployable: program\" would be project admin.\nSo I would suggest adding a TODO here saying that we will update the policy of deployable APIs together using the new default policy rules(just like what we did in policy-popup patchsets) in the Wallaby. Then in the next release, I will update them together.\n[0]https://wiki.openstack.org/wiki/Cyborg/Policy","commit_id":"3466f6d8682947e90b50b2482f7c8769a872c96b"}],"cyborg/common/exception.py":[{"author":{"_account_id":21672,"name":"Sundar Nadathur","email":"sundar.nadathur@intel.com","username":"nsundar"},"change_message_id":"ad6e1a57606169c9626a57aa46883a2a710761c4","unresolved":false,"context_lines":[{"line_number":415,"context_line":""},{"line_number":416,"context_line":"class FPGAProgramError(CyborgException):"},{"line_number":417,"context_line":"    _msg_fmt \u003d _(\"fpga_program function returned %(ret)s. \""},{"line_number":418,"context_line":"                 \"FPGA programming failed.\")"}],"source_content_type":"text/x-python","patch_set":2,"id":"df33271e_92180676","line":418,"updated":"2020-04-06 08:01:34.000000000","message":"I\u0027d suggest this shorter version:\n   _(\u0027FPGA programming failed with return code %(ret)s.\"\n\nWe should consider returning a meaningful error message from the driver rather than a boolean success/failure.","commit_id":"9f1f39a1955e336d604846a2d3bea14a616330b2"},{"author":{"_account_id":30759,"name":"Shogo Saito","email":"shogo.saito.ac@hco.ntt.co.jp","username":"s.shogo"},"change_message_id":"daad2e4af950a7a63463572ad193cd5562167efe","unresolved":false,"context_lines":[{"line_number":415,"context_line":""},{"line_number":416,"context_line":"class FPGAProgramError(CyborgException):"},{"line_number":417,"context_line":"    _msg_fmt \u003d _(\"fpga_program function returned %(ret)s. \""},{"line_number":418,"context_line":"                 \"FPGA programming failed.\")"}],"source_content_type":"text/x-python","patch_set":2,"id":"3f4c43b2_5213e00d","line":418,"in_reply_to":"3f4c43b2_5c9a32c5","updated":"2020-04-17 07:53:50.000000000","message":"Done","commit_id":"9f1f39a1955e336d604846a2d3bea14a616330b2"},{"author":{"_account_id":30759,"name":"Shogo Saito","email":"shogo.saito.ac@hco.ntt.co.jp","username":"s.shogo"},"change_message_id":"338388262319b1751219890ee96720a742a21b93","unresolved":false,"context_lines":[{"line_number":415,"context_line":""},{"line_number":416,"context_line":"class FPGAProgramError(CyborgException):"},{"line_number":417,"context_line":"    _msg_fmt \u003d _(\"fpga_program function returned %(ret)s. \""},{"line_number":418,"context_line":"                 \"FPGA programming failed.\")"}],"source_content_type":"text/x-python","patch_set":2,"id":"3f4c43b2_5c9a32c5","line":418,"in_reply_to":"df33271e_92180676","updated":"2020-04-13 08:29:55.000000000","message":"I agree to the shorter version, will modify to it.","commit_id":"9f1f39a1955e336d604846a2d3bea14a616330b2"},{"author":{"_account_id":31412,"name":"Wenping Song","email":"songwenping@inspur.com","username":"songwenping"},"change_message_id":"fac2cc60bfeabd2b77bc93594dca0c36ade592f7","unresolved":false,"context_lines":[{"line_number":414,"context_line":""},{"line_number":415,"context_line":""},{"line_number":416,"context_line":"class FPGAProgramError(CyborgException):"},{"line_number":417,"context_line":"    _msg_fmt \u003d _(\"FPGA programming failed with return code %(ret)s.\")"}],"source_content_type":"text/x-python","patch_set":6,"id":"bf51134e_be6cc49d","line":417,"range":{"start_line":417,"start_character":61,"end_line":417,"end_character":64},"updated":"2020-07-23 02:17:26.000000000","message":"Seems the ret is boolean not a code.","commit_id":"6e9e12d92fcba1391091af17c242e76b37b170bb"},{"author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"tag":"autogenerated:zuul:check","change_message_id":"00fbc30c7848347235ed945e750fb6619f5a4b34","unresolved":false,"context_lines":[{"line_number":417,"context_line":"    _msg_fmt \u003d _(\"Request not acceptable.\")"},{"line_number":418,"context_line":"    code \u003d http_client.NOT_ACCEPTABLE"},{"line_number":419,"context_line":""},{"line_number":420,"context_line":"class FPGAProgramError(CyborgException):"},{"line_number":421,"context_line":"    _msg_fmt \u003d _(\"FPGA programming failed with return %(ret)s.\")"}],"source_content_type":"text/x-python","patch_set":9,"id":"9f560f44_646fd891","line":420,"updated":"2020-09-10 05:25:44.000000000","message":"pep8: E302 expected 2 blank lines, found 1","commit_id":"d44fb0b2b4008e20a02590f7830b34aec28a6ebb"}],"cyborg/common/policy.py":[{"author":{"_account_id":26458,"name":"Brin Zhang","email":"zhangbailin@inspur.com","username":"zhangbailin"},"change_message_id":"c92178ef772603b9448587795da052607a1af8e5","unresolved":false,"context_lines":[{"line_number":119,"context_line":"    policy.RuleDefault(\u0027cyborg:deployable:program\u0027,"},{"line_number":120,"context_line":"                       \u0027rule:default\u0027,"},{"line_number":121,"context_line":"                       description\u003d\u0027FPGA programming.\u0027),"},{"line_number":122,"context_line":"]"},{"line_number":123,"context_line":""},{"line_number":124,"context_line":"fpga_policies \u003d ["},{"line_number":125,"context_line":"    policy.RuleDefault(\u0027cyborg:fpga:get_one\u0027,"}],"source_content_type":"text/x-python","patch_set":1,"id":"1fa4df85_d905c87b","line":122,"updated":"2020-03-19 07:14:16.000000000","message":"Where is the \"cyborg:deployable:create\" policy check?","commit_id":"367402bff191a48a19ae45d2bc0fab8147bd3a5d"},{"author":{"_account_id":30759,"name":"Shogo Saito","email":"shogo.saito.ac@hco.ntt.co.jp","username":"s.shogo"},"change_message_id":"aeaa500f7145eed196cc14b6a23cb346e36654fa","unresolved":false,"context_lines":[{"line_number":119,"context_line":"    policy.RuleDefault(\u0027cyborg:deployable:program\u0027,"},{"line_number":120,"context_line":"                       \u0027rule:default\u0027,"},{"line_number":121,"context_line":"                       description\u003d\u0027FPGA programming.\u0027),"},{"line_number":122,"context_line":"]"},{"line_number":123,"context_line":""},{"line_number":124,"context_line":"fpga_policies \u003d ["},{"line_number":125,"context_line":"    policy.RuleDefault(\u0027cyborg:fpga:get_one\u0027,"}],"source_content_type":"text/x-python","patch_set":1,"id":"bf51134e_a1f4b288","line":122,"in_reply_to":"1fa4df85_d905c87b","updated":"2020-06-18 12:09:05.000000000","message":"\"deployable create\" is not used, that is unnecessary.","commit_id":"367402bff191a48a19ae45d2bc0fab8147bd3a5d"}],"cyborg/objects/extarq/fpga_ext_arq.py":[{"author":{"_account_id":21672,"name":"Sundar Nadathur","email":"sundar.nadathur@intel.com","username":"nsundar"},"change_message_id":"ad6e1a57606169c9626a57aa46883a2a710761c4","unresolved":false,"context_lines":[{"line_number":234,"context_line":"        # TODO(Shaohe) do this asynchronously, do this in conductor or agent?"},{"line_number":235,"context_line":"        try:"},{"line_number":236,"context_line":"            agent \u003d AgentAPI()"},{"line_number":237,"context_line":"            agent.fpga_program(context, hostname,"},{"line_number":238,"context_line":"                               controlpath_id, bitstream_id,"},{"line_number":239,"context_line":"                               driver_name)"},{"line_number":240,"context_line":"        except Exception as e:"}],"source_content_type":"text/x-python","patch_set":2,"id":"df33271e_32565a08","line":237,"updated":"2020-04-06 08:01:34.000000000","message":"Please consider checking for the return value here. I know that is outside the scope of this patch. Maybe it could be another patch. But that would complete the story https://storyboard.openstack.org/#!/story/2007466 .","commit_id":"9f1f39a1955e336d604846a2d3bea14a616330b2"},{"author":{"_account_id":30759,"name":"Shogo Saito","email":"shogo.saito.ac@hco.ntt.co.jp","username":"s.shogo"},"change_message_id":"338388262319b1751219890ee96720a742a21b93","unresolved":false,"context_lines":[{"line_number":234,"context_line":"        # TODO(Shaohe) do this asynchronously, do this in conductor or agent?"},{"line_number":235,"context_line":"        try:"},{"line_number":236,"context_line":"            agent \u003d AgentAPI()"},{"line_number":237,"context_line":"            agent.fpga_program(context, hostname,"},{"line_number":238,"context_line":"                               controlpath_id, bitstream_id,"},{"line_number":239,"context_line":"                               driver_name)"},{"line_number":240,"context_line":"        except Exception as e:"}],"source_content_type":"text/x-python","patch_set":2,"id":"3f4c43b2_5c835257","line":237,"in_reply_to":"df33271e_32565a08","updated":"2020-04-13 08:29:55.000000000","message":"Yes, I agree to your opinion, It is better to fix this in future patch.","commit_id":"9f1f39a1955e336d604846a2d3bea14a616330b2"}],"cyborg/tests/unit/accelerator/drivers/fpga/intel/prepare_test_data.py":[{"author":{"_account_id":26458,"name":"Brin Zhang","email":"zhangbailin@inspur.com","username":"zhangbailin"},"change_message_id":"6c94d5e8592f39cc6f0251e75cb9cd4d3efaafc3","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":5,"id":"bf51134e_f15ae64c","updated":"2020-06-19 01:30:02.000000000","message":"What changes in this file?","commit_id":"249aef707dff60f140ba371bb3357ad4c1b3473c"},{"author":{"_account_id":30759,"name":"Shogo Saito","email":"shogo.saito.ac@hco.ntt.co.jp","username":"s.shogo"},"change_message_id":"7f5ec30e12043dafe916ad83b3b9016294a17695","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":5,"id":"bf51134e_45dfdbd5","in_reply_to":"bf51134e_f15ae64c","updated":"2020-07-20 02:00:31.000000000","message":"Sorry, I mistake to change the file\u0027s permission.\nThe last patch fixes that.(that doesn\u0027t change the permission.)","commit_id":"249aef707dff60f140ba371bb3357ad4c1b3473c"}],"cyborg/tests/unit/accelerator/drivers/fpga/intel/test_driver.py":[{"author":{"_account_id":21672,"name":"Sundar Nadathur","email":"sundar.nadathur@intel.com","username":"nsundar"},"change_message_id":"ad6e1a57606169c9626a57aa46883a2a710761c4","unresolved":false,"context_lines":[{"line_number":130,"context_line":"                      \u0027/path/image\u0027]"},{"line_number":131,"context_line":""},{"line_number":132,"context_line":"        intel \u003d IntelFPGADriver()"},{"line_number":133,"context_line":"        cpid_info \u003d {\"domain\": \"0000\", \"bus\": \"5e\","},{"line_number":134,"context_line":"                     \"device\": \"00\", \"function\": \"0\"}"},{"line_number":135,"context_line":"        cpid \u003d {\u0027cpid_type\u0027: \u0027PCI\u0027, \u0027cpid_info\u0027: cpid_info}"},{"line_number":136,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"df33271e_523cbebe","line":133,"updated":"2020-04-06 08:01:34.000000000","message":"The original code passed \"0x5e\", so we didn\u0027t need to add \u00270x\u0027 in the code. Is there a reason to change this?","commit_id":"9f1f39a1955e336d604846a2d3bea14a616330b2"},{"author":{"_account_id":30759,"name":"Shogo Saito","email":"shogo.saito.ac@hco.ntt.co.jp","username":"s.shogo"},"change_message_id":"338388262319b1751219890ee96720a742a21b93","unresolved":false,"context_lines":[{"line_number":130,"context_line":"                      \u0027/path/image\u0027]"},{"line_number":131,"context_line":""},{"line_number":132,"context_line":"        intel \u003d IntelFPGADriver()"},{"line_number":133,"context_line":"        cpid_info \u003d {\"domain\": \"0000\", \"bus\": \"5e\","},{"line_number":134,"context_line":"                     \"device\": \"00\", \"function\": \"0\"}"},{"line_number":135,"context_line":"        cpid \u003d {\u0027cpid_type\u0027: \u0027PCI\u0027, \u0027cpid_info\u0027: cpid_info}"},{"line_number":136,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"3f4c43b2_fc8dfe7b","line":133,"in_reply_to":"df33271e_523cbebe","updated":"2020-04-13 08:29:55.000000000","message":"Let me confirm this, IMHO,  in real environment, real \"controlpath_id\" doesn\u0027t have \"0x\", right?\nIn the original code,both main logic and test code treats that with \"0x\", so that passes in test cases, but that doesn\u0027t work in real env with OPAE.","commit_id":"9f1f39a1955e336d604846a2d3bea14a616330b2"}],"cyborg/tests/unit/agent/test_rpcapi.py":[{"author":{"_account_id":26458,"name":"Brin Zhang","email":"zhangbailin@inspur.com","username":"zhangbailin"},"change_message_id":"6acd3f554899d80012a5b5718102a1d68fb853c7","unresolved":false,"context_lines":[{"line_number":29,"context_line":"class TestRPCAPI(base.TestCase):"},{"line_number":30,"context_line":"    \"\"\"Test agent rpcapi\"\"\""},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"    RPC_API_VERSION \u003d \u00271.1\u0027"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"    def setUp(self, topic\u003dNone):"},{"line_number":35,"context_line":"        super(TestRPCAPI, self).setUp()"}],"source_content_type":"text/x-python","patch_set":6,"id":"bf51134e_7edeac3e","line":32,"updated":"2020-07-23 02:41:55.000000000","message":"We also need to test the unactive scenario with old version(version\u003d1.0), it runs ok if you used 1.0, otherwise it runs failed, because your rpc api version is more than 1.0.","commit_id":"6e9e12d92fcba1391091af17c242e76b37b170bb"},{"author":{"_account_id":30759,"name":"Shogo Saito","email":"shogo.saito.ac@hco.ntt.co.jp","username":"s.shogo"},"change_message_id":"cddc48690258d67961fcc17aeb099b9971955aa7","unresolved":false,"context_lines":[{"line_number":29,"context_line":"class TestRPCAPI(base.TestCase):"},{"line_number":30,"context_line":"    \"\"\"Test agent rpcapi\"\"\""},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"    RPC_API_VERSION \u003d \u00271.1\u0027"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"    def setUp(self, topic\u003dNone):"},{"line_number":35,"context_line":"        super(TestRPCAPI, self).setUp()"}],"source_content_type":"text/x-python","patch_set":6,"id":"9f560f44_1559ec33","line":32,"in_reply_to":"bf51134e_7edeac3e","updated":"2020-08-06 08:19:48.000000000","message":"1.0 is inactive version , thus that is not mandatory one, IMHO.\nBut I have hesitation to this, thus I would like ask other members to this topic.","commit_id":"6e9e12d92fcba1391091af17c242e76b37b170bb"},{"author":{"_account_id":26458,"name":"Brin Zhang","email":"zhangbailin@inspur.com","username":"zhangbailin"},"change_message_id":"6acd3f554899d80012a5b5718102a1d68fb853c7","unresolved":false,"context_lines":[{"line_number":56,"context_line":"            func_obj \u003d getattr(self.agent_rpcapi, method)"},{"line_number":57,"context_line":"            mock_program.return_value \u003d expect_val"},{"line_number":58,"context_line":"            actual_val \u003d func_obj(ctxt, \u0027fake_dep_uuid\u0027)"},{"line_number":59,"context_line":"            print(actual_val)"},{"line_number":60,"context_line":"            print(expect_val)"},{"line_number":61,"context_line":"            self.assertEqual(actual_val, expect_val)"},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"    def test_fpga_program(self):"}],"source_content_type":"text/x-python","patch_set":6,"id":"bf51134e_7eb7ccf6","line":60,"range":{"start_line":59,"start_character":1,"end_line":60,"end_character":29},"updated":"2020-07-23 02:41:55.000000000","message":"you should remove this debug log.","commit_id":"6e9e12d92fcba1391091af17c242e76b37b170bb"},{"author":{"_account_id":30759,"name":"Shogo Saito","email":"shogo.saito.ac@hco.ntt.co.jp","username":"s.shogo"},"change_message_id":"cddc48690258d67961fcc17aeb099b9971955aa7","unresolved":false,"context_lines":[{"line_number":56,"context_line":"            func_obj \u003d getattr(self.agent_rpcapi, method)"},{"line_number":57,"context_line":"            mock_program.return_value \u003d expect_val"},{"line_number":58,"context_line":"            actual_val \u003d func_obj(ctxt, \u0027fake_dep_uuid\u0027)"},{"line_number":59,"context_line":"            print(actual_val)"},{"line_number":60,"context_line":"            print(expect_val)"},{"line_number":61,"context_line":"            self.assertEqual(actual_val, expect_val)"},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"    def test_fpga_program(self):"}],"source_content_type":"text/x-python","patch_set":6,"id":"9f560f44_5539a4d4","line":60,"range":{"start_line":59,"start_character":1,"end_line":60,"end_character":29},"in_reply_to":"bf51134e_7eb7ccf6","updated":"2020-08-06 08:19:48.000000000","message":"Done","commit_id":"6e9e12d92fcba1391091af17c242e76b37b170bb"},{"author":{"_account_id":26458,"name":"Brin Zhang","email":"zhangbailin@inspur.com","username":"zhangbailin"},"change_message_id":"dadb1e1800430677d5cf664f6dc00c9b20676a83","unresolved":false,"context_lines":[{"line_number":26,"context_line":"class TestRPCAPI(base.TestCase):"},{"line_number":27,"context_line":"    \"\"\"Test agent rpcapi\"\"\""},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"    RPC_API_VERSION \u003d \u00271.1\u0027"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"    def setUp(self, topic\u003dNone):"},{"line_number":32,"context_line":"        super(TestRPCAPI, self).setUp()"}],"source_content_type":"text/x-python","patch_set":10,"id":"9f560f44_998fdccb","line":29,"range":{"start_line":29,"start_character":4,"end_line":29,"end_character":27},"updated":"2020-09-11 01:05:54.000000000","message":"About this test, do we need to cover the old rpc api version 1.0?","commit_id":"216faf8bf32b0eaa2e7a59e67c1e59cd14ab80c3"},{"author":{"_account_id":30759,"name":"Shogo Saito","email":"shogo.saito.ac@hco.ntt.co.jp","username":"s.shogo"},"change_message_id":"ab89f17ffcb52933c45fdab1deaece9884c6ad81","unresolved":false,"context_lines":[{"line_number":26,"context_line":"class TestRPCAPI(base.TestCase):"},{"line_number":27,"context_line":"    \"\"\"Test agent rpcapi\"\"\""},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"    RPC_API_VERSION \u003d \u00271.1\u0027"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"    def setUp(self, topic\u003dNone):"},{"line_number":32,"context_line":"        super(TestRPCAPI, self).setUp()"}],"source_content_type":"text/x-python","patch_set":10,"id":"9f560f44_41705d74","line":29,"range":{"start_line":29,"start_character":4,"end_line":29,"end_character":27},"in_reply_to":"9f560f44_998fdccb","updated":"2020-09-16 08:13:34.000000000","message":"I replied this tpic in [1]\n\n[1]https://review.opendev.org/#/c/698190/6/cyborg/tests/unit/agent/test_rpcapi.py@32","commit_id":"216faf8bf32b0eaa2e7a59e67c1e59cd14ab80c3"}],"cyborg/tests/unit/api/controllers/v2/test_fpga_program.py":[{"author":{"_account_id":21672,"name":"Sundar Nadathur","email":"sundar.nadathur@intel.com","username":"nsundar"},"change_message_id":"ad6e1a57606169c9626a57aa46883a2a710761c4","unresolved":false,"context_lines":[{"line_number":42,"context_line":"    @mock.patch(\u0027cyborg.objects.Deployable.get_cpid_list\u0027)"},{"line_number":43,"context_line":"    @mock.patch(\u0027cyborg.objects.Deployable.get\u0027)"},{"line_number":44,"context_line":"    @mock.patch(\u0027cyborg.agent.rpcapi.AgentAPI.fpga_program\u0027)"},{"line_number":45,"context_line":"    def test_program(self, mock_program, mock_get_dep,"},{"line_number":46,"context_line":"                     mock_get_cpid_list, mock_get_by_device_id):"},{"line_number":47,"context_line":"        self.headers[\u0027X-Roles\u0027] \u003d \u0027admin\u0027"},{"line_number":48,"context_line":"        self.headers[\u0027Content-Type\u0027] \u003d \u0027application/json\u0027"}],"source_content_type":"text/x-python","patch_set":2,"id":"df33271e_b2e54a3b","line":45,"updated":"2020-04-06 08:01:34.000000000","message":"What this test does is closer to a functional test that calls the API and verifies the output. But I can accept it because we have the same issue in other UT cases too.","commit_id":"9f1f39a1955e336d604846a2d3bea14a616330b2"},{"author":{"_account_id":30759,"name":"Shogo Saito","email":"shogo.saito.ac@hco.ntt.co.jp","username":"s.shogo"},"change_message_id":"338388262319b1751219890ee96720a742a21b93","unresolved":false,"context_lines":[{"line_number":42,"context_line":"    @mock.patch(\u0027cyborg.objects.Deployable.get_cpid_list\u0027)"},{"line_number":43,"context_line":"    @mock.patch(\u0027cyborg.objects.Deployable.get\u0027)"},{"line_number":44,"context_line":"    @mock.patch(\u0027cyborg.agent.rpcapi.AgentAPI.fpga_program\u0027)"},{"line_number":45,"context_line":"    def test_program(self, mock_program, mock_get_dep,"},{"line_number":46,"context_line":"                     mock_get_cpid_list, mock_get_by_device_id):"},{"line_number":47,"context_line":"        self.headers[\u0027X-Roles\u0027] \u003d \u0027admin\u0027"},{"line_number":48,"context_line":"        self.headers[\u0027Content-Type\u0027] \u003d \u0027application/json\u0027"}],"source_content_type":"text/x-python","patch_set":2,"id":"3f4c43b2_5ce87215","line":45,"in_reply_to":"df33271e_b2e54a3b","updated":"2020-04-13 08:29:55.000000000","message":"OK, I got it. It may be better to refactor with other UT cases in future patch.","commit_id":"9f1f39a1955e336d604846a2d3bea14a616330b2"},{"author":{"_account_id":21672,"name":"Sundar Nadathur","email":"sundar.nadathur@intel.com","username":"nsundar"},"change_message_id":"ad6e1a57606169c9626a57aa46883a2a710761c4","unresolved":false,"context_lines":[{"line_number":54,"context_line":"        body \u003d [{\"image_uuid\": \"9a17439a-85d0-4c53-a3d3-0f68a2eac896\"}]"},{"line_number":55,"context_line":"        response \u003d self.\\"},{"line_number":56,"context_line":"            patch_json(\u0027/deployables/%s/program\u0027 % dep_uuid,"},{"line_number":57,"context_line":"                       [{\u0027path\u0027: \u0027/program\u0027, \u0027value\u0027: body,"},{"line_number":58,"context_line":"                        \u0027op\u0027: \u0027replace\u0027}],"},{"line_number":59,"context_line":"                       headers\u003dself.headers)"},{"line_number":60,"context_line":"        self.assertEqual(http_client.OK, response.status_code)"}],"source_content_type":"text/x-python","patch_set":2,"id":"df33271e_b2b70a3b","line":57,"range":{"start_line":57,"start_character":35,"end_line":57,"end_character":42},"updated":"2020-04-06 08:01:34.000000000","message":"The field in the deployable object that is modified here should be  \u0027bitstream_id\u0027 [1].\n\n[1] https://opendev.org/openstack/cyborg/src/branch/master/cyborg/objects/deployable.py#L51","commit_id":"9f1f39a1955e336d604846a2d3bea14a616330b2"},{"author":{"_account_id":30759,"name":"Shogo Saito","email":"shogo.saito.ac@hco.ntt.co.jp","username":"s.shogo"},"change_message_id":"daad2e4af950a7a63463572ad193cd5562167efe","unresolved":false,"context_lines":[{"line_number":54,"context_line":"        body \u003d [{\"image_uuid\": \"9a17439a-85d0-4c53-a3d3-0f68a2eac896\"}]"},{"line_number":55,"context_line":"        response \u003d self.\\"},{"line_number":56,"context_line":"            patch_json(\u0027/deployables/%s/program\u0027 % dep_uuid,"},{"line_number":57,"context_line":"                       [{\u0027path\u0027: \u0027/program\u0027, \u0027value\u0027: body,"},{"line_number":58,"context_line":"                        \u0027op\u0027: \u0027replace\u0027}],"},{"line_number":59,"context_line":"                       headers\u003dself.headers)"},{"line_number":60,"context_line":"        self.assertEqual(http_client.OK, response.status_code)"}],"source_content_type":"text/x-python","patch_set":2,"id":"3f4c43b2_322f3440","line":57,"range":{"start_line":57,"start_character":35,"end_line":57,"end_character":42},"in_reply_to":"3f4c43b2_9cf2fa05","updated":"2020-04-17 07:53:50.000000000","message":"Done","commit_id":"9f1f39a1955e336d604846a2d3bea14a616330b2"},{"author":{"_account_id":30759,"name":"Shogo Saito","email":"shogo.saito.ac@hco.ntt.co.jp","username":"s.shogo"},"change_message_id":"338388262319b1751219890ee96720a742a21b93","unresolved":false,"context_lines":[{"line_number":54,"context_line":"        body \u003d [{\"image_uuid\": \"9a17439a-85d0-4c53-a3d3-0f68a2eac896\"}]"},{"line_number":55,"context_line":"        response \u003d self.\\"},{"line_number":56,"context_line":"            patch_json(\u0027/deployables/%s/program\u0027 % dep_uuid,"},{"line_number":57,"context_line":"                       [{\u0027path\u0027: \u0027/program\u0027, \u0027value\u0027: body,"},{"line_number":58,"context_line":"                        \u0027op\u0027: \u0027replace\u0027}],"},{"line_number":59,"context_line":"                       headers\u003dself.headers)"},{"line_number":60,"context_line":"        self.assertEqual(http_client.OK, response.status_code)"}],"source_content_type":"text/x-python","patch_set":2,"id":"3f4c43b2_9cf2fa05","line":57,"range":{"start_line":57,"start_character":35,"end_line":57,"end_character":42},"in_reply_to":"df33271e_b2b70a3b","updated":"2020-04-13 08:29:55.000000000","message":"Thanks,I got it. I\u0027ll modify this and check.","commit_id":"9f1f39a1955e336d604846a2d3bea14a616330b2"},{"author":{"_account_id":26458,"name":"Brin Zhang","email":"zhangbailin@inspur.com","username":"zhangbailin"},"change_message_id":"b6909baa4d17f34cec9baaeeb953645544dbf276","unresolved":false,"context_lines":[{"line_number":52,"context_line":"        mock_get_cpid_list.return_value \u003d [self.cpid]"},{"line_number":53,"context_line":"        mock_program.return_value \u003d True"},{"line_number":54,"context_line":"        body \u003d [{\"image_uuid\": \"9a17439a-85d0-4c53-a3d3-0f68a2eac896\"}]"},{"line_number":55,"context_line":"        response \u003d self.\\"},{"line_number":56,"context_line":"            patch_json(\u0027/deployables/%s/program\u0027 % dep_uuid,"},{"line_number":57,"context_line":"                       [{\u0027path\u0027: \u0027/bitstream_id\u0027, \u0027value\u0027: body,"},{"line_number":58,"context_line":"                        \u0027op\u0027: \u0027replace\u0027}],"}],"source_content_type":"text/x-python","patch_set":4,"id":"1f493fa4_fdbb3a0b","line":55,"range":{"start_line":55,"start_character":24,"end_line":55,"end_character":25},"updated":"2020-04-21 03:02:42.000000000","message":"Please avoid use when coding, we should follow i18n standard:\n\n    self.patch_json(\u0027/deployables/%s/program\u0027 % dep_uuid,\n                    [{\u0027path\u0027: \u0027/bitstream_id\u0027, \u0027value\u0027: body,\n                      \u0027op\u0027: \u0027replace\u0027}], headers\u003dself.headers))","commit_id":"26a36395f7d3725070a0573e1eea408441f70082"},{"author":{"_account_id":30759,"name":"Shogo Saito","email":"shogo.saito.ac@hco.ntt.co.jp","username":"s.shogo"},"change_message_id":"aeaa500f7145eed196cc14b6a23cb346e36654fa","unresolved":false,"context_lines":[{"line_number":52,"context_line":"        mock_get_cpid_list.return_value \u003d [self.cpid]"},{"line_number":53,"context_line":"        mock_program.return_value \u003d True"},{"line_number":54,"context_line":"        body \u003d [{\"image_uuid\": \"9a17439a-85d0-4c53-a3d3-0f68a2eac896\"}]"},{"line_number":55,"context_line":"        response \u003d self.\\"},{"line_number":56,"context_line":"            patch_json(\u0027/deployables/%s/program\u0027 % dep_uuid,"},{"line_number":57,"context_line":"                       [{\u0027path\u0027: \u0027/bitstream_id\u0027, \u0027value\u0027: body,"},{"line_number":58,"context_line":"                        \u0027op\u0027: \u0027replace\u0027}],"}],"source_content_type":"text/x-python","patch_set":4,"id":"bf51134e_c1dc4676","line":55,"range":{"start_line":55,"start_character":24,"end_line":55,"end_character":25},"in_reply_to":"1f493fa4_fdbb3a0b","updated":"2020-06-18 12:09:05.000000000","message":"Thanks, Done.","commit_id":"26a36395f7d3725070a0573e1eea408441f70082"},{"author":{"_account_id":26458,"name":"Brin Zhang","email":"zhangbailin@inspur.com","username":"zhangbailin"},"change_message_id":"6acd3f554899d80012a5b5718102a1d68fb853c7","unresolved":false,"context_lines":[{"line_number":77,"context_line":"            self.patch_json(\u0027/deployables/%s/program\u0027 % dep_uuid,"},{"line_number":78,"context_line":"                            [{\u0027path\u0027: \u0027/bitstream_id\u0027, \u0027value\u0027: body,"},{"line_number":79,"context_line":"                              \u0027op\u0027: \u0027replace\u0027}], headers\u003dself.headers)"},{"line_number":80,"context_line":"        except Exception as e:"},{"line_number":81,"context_line":"            exc \u003d e"},{"line_number":82,"context_line":"        self.assertIn("},{"line_number":83,"context_line":"            \"FPGA programming failed with return code False.\", exc.args[0]"}],"source_content_type":"text/x-python","patch_set":6,"id":"bf51134e_5e776809","line":80,"range":{"start_line":80,"start_character":15,"end_line":80,"end_character":24},"updated":"2020-07-23 02:41:55.000000000","message":"IMO, you can sue FPGAProgramError instead of Exception.\n\nor assertEqual(FPGAProgramError,Exception)","commit_id":"6e9e12d92fcba1391091af17c242e76b37b170bb"},{"author":{"_account_id":30759,"name":"Shogo Saito","email":"shogo.saito.ac@hco.ntt.co.jp","username":"s.shogo"},"change_message_id":"cddc48690258d67961fcc17aeb099b9971955aa7","unresolved":false,"context_lines":[{"line_number":77,"context_line":"            self.patch_json(\u0027/deployables/%s/program\u0027 % dep_uuid,"},{"line_number":78,"context_line":"                            [{\u0027path\u0027: \u0027/bitstream_id\u0027, \u0027value\u0027: body,"},{"line_number":79,"context_line":"                              \u0027op\u0027: \u0027replace\u0027}], headers\u003dself.headers)"},{"line_number":80,"context_line":"        except Exception as e:"},{"line_number":81,"context_line":"            exc \u003d e"},{"line_number":82,"context_line":"        self.assertIn("},{"line_number":83,"context_line":"            \"FPGA programming failed with return code False.\", exc.args[0]"}],"source_content_type":"text/x-python","patch_set":6,"id":"9f560f44_95169c48","line":80,"range":{"start_line":80,"start_character":15,"end_line":80,"end_character":24},"in_reply_to":"bf51134e_5e776809","updated":"2020-08-06 08:19:48.000000000","message":"Done","commit_id":"6e9e12d92fcba1391091af17c242e76b37b170bb"},{"author":{"_account_id":26458,"name":"Brin Zhang","email":"zhangbailin@inspur.com","username":"zhangbailin"},"change_message_id":"6acd3f554899d80012a5b5718102a1d68fb853c7","unresolved":false,"context_lines":[{"line_number":103,"context_line":"                              \u0027value\u0027: body,"},{"line_number":104,"context_line":"                              \u0027op\u0027: \u0027replace\u0027}],"},{"line_number":105,"context_line":"                            headers\u003dself.headers)"},{"line_number":106,"context_line":"        except Exception as e:"},{"line_number":107,"context_line":"            exc \u003d e"},{"line_number":108,"context_line":"        self.assertIn(\"Expected a uuid but received\", exc.args[0])"},{"line_number":109,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"bf51134e_3e7a74ef","line":106,"range":{"start_line":106,"start_character":15,"end_line":106,"end_character":24},"updated":"2020-07-23 02:41:55.000000000","message":"ditto","commit_id":"6e9e12d92fcba1391091af17c242e76b37b170bb"},{"author":{"_account_id":30759,"name":"Shogo Saito","email":"shogo.saito.ac@hco.ntt.co.jp","username":"s.shogo"},"change_message_id":"cddc48690258d67961fcc17aeb099b9971955aa7","unresolved":false,"context_lines":[{"line_number":103,"context_line":"                              \u0027value\u0027: body,"},{"line_number":104,"context_line":"                              \u0027op\u0027: \u0027replace\u0027}],"},{"line_number":105,"context_line":"                            headers\u003dself.headers)"},{"line_number":106,"context_line":"        except Exception as e:"},{"line_number":107,"context_line":"            exc \u003d e"},{"line_number":108,"context_line":"        self.assertIn(\"Expected a uuid but received\", exc.args[0])"},{"line_number":109,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"9f560f44_f52a787c","line":106,"range":{"start_line":106,"start_character":15,"end_line":106,"end_character":24},"in_reply_to":"bf51134e_3e7a74ef","updated":"2020-08-06 08:19:48.000000000","message":"Done","commit_id":"6e9e12d92fcba1391091af17c242e76b37b170bb"},{"author":{"_account_id":26458,"name":"Brin Zhang","email":"zhangbailin@inspur.com","username":"zhangbailin"},"change_message_id":"6acd3f554899d80012a5b5718102a1d68fb853c7","unresolved":false,"context_lines":[{"line_number":129,"context_line":"                              \u0027value\u0027: body,"},{"line_number":130,"context_line":"                              \u0027op\u0027: \u0027replace\u0027}],"},{"line_number":131,"context_line":"                            headers\u003dself.headers)"},{"line_number":132,"context_line":"        except Exception as e:"},{"line_number":133,"context_line":"            exc \u003d e"},{"line_number":134,"context_line":"        self.assertIn(\"FPGA programming failed with return code False.\","},{"line_number":135,"context_line":"                      exc.args[0])"}],"source_content_type":"text/x-python","patch_set":6,"id":"bf51134e_9e8100c7","line":132,"range":{"start_line":132,"start_character":15,"end_line":132,"end_character":24},"updated":"2020-07-23 02:41:55.000000000","message":"ditto","commit_id":"6e9e12d92fcba1391091af17c242e76b37b170bb"},{"author":{"_account_id":30759,"name":"Shogo Saito","email":"shogo.saito.ac@hco.ntt.co.jp","username":"s.shogo"},"change_message_id":"cddc48690258d67961fcc17aeb099b9971955aa7","unresolved":false,"context_lines":[{"line_number":129,"context_line":"                              \u0027value\u0027: body,"},{"line_number":130,"context_line":"                              \u0027op\u0027: \u0027replace\u0027}],"},{"line_number":131,"context_line":"                            headers\u003dself.headers)"},{"line_number":132,"context_line":"        except Exception as e:"},{"line_number":133,"context_line":"            exc \u003d e"},{"line_number":134,"context_line":"        self.assertIn(\"FPGA programming failed with return code False.\","},{"line_number":135,"context_line":"                      exc.args[0])"}],"source_content_type":"text/x-python","patch_set":6,"id":"9f560f44_d52db495","line":132,"range":{"start_line":132,"start_character":15,"end_line":132,"end_character":24},"in_reply_to":"bf51134e_9e8100c7","updated":"2020-08-06 08:19:48.000000000","message":"Done","commit_id":"6e9e12d92fcba1391091af17c242e76b37b170bb"},{"author":{"_account_id":26458,"name":"Brin Zhang","email":"zhangbailin@inspur.com","username":"zhangbailin"},"change_message_id":"dadb1e1800430677d5cf664f6dc00c9b20676a83","unresolved":false,"context_lines":[{"line_number":77,"context_line":"        mock_get_cpid_list.return_value \u003d [self.cpid]"},{"line_number":78,"context_line":"        mock_program.return_value \u003d False"},{"line_number":79,"context_line":"        body \u003d [{\"image_uuid\": self.existent_image_uuid}]"},{"line_number":80,"context_line":"        try:"},{"line_number":81,"context_line":"            self.patch_json(\u0027/deployables/%s/program\u0027 % dep_uuid,"},{"line_number":82,"context_line":"                            [{\u0027path\u0027: \u0027/bitstream_id\u0027, \u0027value\u0027: body,"},{"line_number":83,"context_line":"                              \u0027op\u0027: \u0027replace\u0027}], headers\u003dself.headers)"},{"line_number":84,"context_line":"        except Exception as e:"},{"line_number":85,"context_line":"            exc \u003d e"},{"line_number":86,"context_line":"        self.assertIn(exception.FPGAProgramError("},{"line_number":87,"context_line":"                      ret\u003dmock_program.return_value).args[0],"},{"line_number":88,"context_line":"                      exc.args[0]"},{"line_number":89,"context_line":"                      )"},{"line_number":90,"context_line":""},{"line_number":91,"context_line":"    @mock.patch(\u0027cyborg.objects.Device.get_by_device_id\u0027)"},{"line_number":92,"context_line":"    @mock.patch(\u0027cyborg.objects.Deployable.get_cpid_list\u0027)"}],"source_content_type":"text/x-python","patch_set":10,"id":"9f560f44_196aaceb","line":89,"range":{"start_line":80,"start_character":7,"end_line":89,"end_character":23},"updated":"2020-09-11 01:05:54.000000000","message":"Ok, this really needs to be transformed， it\u0027s not very friendly.","commit_id":"216faf8bf32b0eaa2e7a59e67c1e59cd14ab80c3"},{"author":{"_account_id":30759,"name":"Shogo Saito","email":"shogo.saito.ac@hco.ntt.co.jp","username":"s.shogo"},"change_message_id":"ab89f17ffcb52933c45fdab1deaece9884c6ad81","unresolved":false,"context_lines":[{"line_number":77,"context_line":"        mock_get_cpid_list.return_value \u003d [self.cpid]"},{"line_number":78,"context_line":"        mock_program.return_value \u003d False"},{"line_number":79,"context_line":"        body \u003d [{\"image_uuid\": self.existent_image_uuid}]"},{"line_number":80,"context_line":"        try:"},{"line_number":81,"context_line":"            self.patch_json(\u0027/deployables/%s/program\u0027 % dep_uuid,"},{"line_number":82,"context_line":"                            [{\u0027path\u0027: \u0027/bitstream_id\u0027, \u0027value\u0027: body,"},{"line_number":83,"context_line":"                              \u0027op\u0027: \u0027replace\u0027}], headers\u003dself.headers)"},{"line_number":84,"context_line":"        except Exception as e:"},{"line_number":85,"context_line":"            exc \u003d e"},{"line_number":86,"context_line":"        self.assertIn(exception.FPGAProgramError("},{"line_number":87,"context_line":"                      ret\u003dmock_program.return_value).args[0],"},{"line_number":88,"context_line":"                      exc.args[0]"},{"line_number":89,"context_line":"                      )"},{"line_number":90,"context_line":""},{"line_number":91,"context_line":"    @mock.patch(\u0027cyborg.objects.Device.get_by_device_id\u0027)"},{"line_number":92,"context_line":"    @mock.patch(\u0027cyborg.objects.Deployable.get_cpid_list\u0027)"}],"source_content_type":"text/x-python","patch_set":10,"id":"9f560f44_a12fb93c","line":89,"range":{"start_line":80,"start_character":7,"end_line":89,"end_character":23},"in_reply_to":"9f560f44_196aaceb","updated":"2020-09-16 08:13:34.000000000","message":"Done","commit_id":"216faf8bf32b0eaa2e7a59e67c1e59cd14ab80c3"},{"author":{"_account_id":31412,"name":"Wenping Song","email":"songwenping@inspur.com","username":"songwenping"},"change_message_id":"929cb32aa46cce513902c99300634a7c91c8796a","unresolved":false,"context_lines":[{"line_number":101,"context_line":"        mock_get_by_device_id.return_value \u003d self.dev"},{"line_number":102,"context_line":"        mock_get_cpid_list.return_value \u003d [self.cpid]"},{"line_number":103,"context_line":"        mock_program.return_value \u003d False"},{"line_number":104,"context_line":"        image_uuid \u003d \"abcd1234\""},{"line_number":105,"context_line":"        body \u003d [{\"image_uuid\": self.invalid_image_uuid}]"},{"line_number":106,"context_line":"        try:"},{"line_number":107,"context_line":"            self.patch_json(\u0027/deployables/%s/program\u0027 % dep_uuid,"}],"source_content_type":"text/x-python","patch_set":10,"id":"9f560f44_cba2fa3e","line":104,"range":{"start_line":104,"start_character":21,"end_line":104,"end_character":31},"updated":"2020-09-16 02:53:02.000000000","message":"self.invalid_image_uuid","commit_id":"216faf8bf32b0eaa2e7a59e67c1e59cd14ab80c3"},{"author":{"_account_id":30759,"name":"Shogo Saito","email":"shogo.saito.ac@hco.ntt.co.jp","username":"s.shogo"},"change_message_id":"ab89f17ffcb52933c45fdab1deaece9884c6ad81","unresolved":false,"context_lines":[{"line_number":101,"context_line":"        mock_get_by_device_id.return_value \u003d self.dev"},{"line_number":102,"context_line":"        mock_get_cpid_list.return_value \u003d [self.cpid]"},{"line_number":103,"context_line":"        mock_program.return_value \u003d False"},{"line_number":104,"context_line":"        image_uuid \u003d \"abcd1234\""},{"line_number":105,"context_line":"        body \u003d [{\"image_uuid\": self.invalid_image_uuid}]"},{"line_number":106,"context_line":"        try:"},{"line_number":107,"context_line":"            self.patch_json(\u0027/deployables/%s/program\u0027 % dep_uuid,"}],"source_content_type":"text/x-python","patch_set":10,"id":"9f560f44_411e9d0d","line":104,"range":{"start_line":104,"start_character":21,"end_line":104,"end_character":31},"in_reply_to":"9f560f44_cba2fa3e","updated":"2020-09-16 08:13:34.000000000","message":"Thanks,done","commit_id":"216faf8bf32b0eaa2e7a59e67c1e59cd14ab80c3"}]}
