)]}'
{"cyborg/accelerator/common/handler.py":[{"author":{"_account_id":14131,"name":"shaohef","email":"shaohe.feng@intel.com","username":"shaohefeng"},"change_message_id":"cc210b7e11abd2371721c4bd606230acb446f702","unresolved":false,"context_lines":[{"line_number":47,"context_line":"VENDOR_MAPS \u003d {\"0x8086\": \"intel\"}"},{"line_number":48,"context_line":""},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"def bind(context, arq_obj, valid_fields):"},{"line_number":51,"context_line":"    \"\"\" Given a device rp UUID, get the deployable UUID and"},{"line_number":52,"context_line":"        an attach handle."},{"line_number":53,"context_line":"    \"\"\""}],"source_content_type":"text/x-python","patch_set":1,"id":"5faad753_fa080329","line":50,"updated":"2019-09-09 13:36:06.000000000","message":"This is the entry of async jobs","commit_id":"d1fb5713e55b904e376ba1c29abf9690a3b7cd60"},{"author":{"_account_id":25738,"name":"Xinran WANG","email":"xin-ran.wang@intel.com","username":"Xinran"},"change_message_id":"e966eedde77a414c5f6b005d664435eadf732827","unresolved":false,"context_lines":[{"line_number":101,"context_line":"def get_resources_from_device_profile_group(group):"},{"line_number":102,"context_line":"    \"\"\"parser device profile group.\"\"\""},{"line_number":103,"context_line":"    # example: {\"resources:CUSTOM_ACCELERATOR_FPGA\": \"1\"}"},{"line_number":104,"context_line":"    resources \u003d ["},{"line_number":105,"context_line":"        (k.lstrip(constants.RESOURCES_PREFIX), v) for k, v in group.items()"},{"line_number":106,"context_line":"        if k.startswith(constants.RESOURCES_PREFIX)]"},{"line_number":107,"context_line":"    if not resources:"},{"line_number":108,"context_line":"        raise exception.InvalidParameterValue("},{"line_number":109,"context_line":"            \u0027No resources in device_profile_group: %s\u0027 % group)"}],"source_content_type":"text/x-python","patch_set":6,"id":"5faad753_11a918de","line":106,"range":{"start_line":104,"start_character":0,"end_line":106,"end_character":52},"updated":"2019-09-11 07:37:00.000000000","message":"Now we set \"FPGA\" as rc for fpga device, and traits\u0027 format changed too. please see: https://github.com/openstack/cyborg/blob/master/cyborg/accelerator/drivers/fpga/intel/sysinfo.py#L184\n\nand https://github.com/openstack/cyborg/blob/master/cyborg/accelerator/drivers/fpga/intel/sysinfo.py#L184","commit_id":"d1cb9f031920cad8d0877944ff24b5acec3987b0"},{"author":{"_account_id":21672,"name":"Sundar Nadathur","email":"sundar.nadathur@intel.com","username":"nsundar"},"change_message_id":"7abee02a3ca0bcbd6275e03fb6c88d0ea50fd70a","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright 2019 Beijing Intel Ltd."},{"line_number":2,"context_line":"# All Rights Reserved."},{"line_number":3,"context_line":"#"},{"line_number":4,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"}],"source_content_type":"text/x-python","patch_set":14,"id":"3fa7e38b_5f5e0ce7","line":1,"range":{"start_line":1,"start_character":17,"end_line":1,"end_character":24},"updated":"2019-09-17 06:21:07.000000000","message":"Legal advice says copyright should be to Intel in general.","commit_id":"13f937063f8e7eed605d14a04c4e1fef24ed23e3"},{"author":{"_account_id":21672,"name":"Sundar Nadathur","email":"sundar.nadathur@intel.com","username":"nsundar"},"change_message_id":"7abee02a3ca0bcbd6275e03fb6c88d0ea50fd70a","unresolved":false,"context_lines":[{"line_number":14,"context_line":"#    under the License."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"\"\"\""},{"line_number":17,"context_line":"Different accelerator handlers for conductor/agent/api/object to call."},{"line_number":18,"context_line":"\"\"\""},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"import abc"}],"source_content_type":"text/x-python","patch_set":14,"id":"3fa7e38b_3f34704a","line":17,"updated":"2019-09-17 06:21:07.000000000","message":"I don\u0027t see the need for a separate file. Besides, the basic object here is an ARQ, not an accelerator.","commit_id":"13f937063f8e7eed605d14a04c4e1fef24ed23e3"},{"author":{"_account_id":14131,"name":"shaohef","email":"shaohe.feng@intel.com","username":"shaohefeng"},"change_message_id":"b2c51fa3a250fb26dd9aff0fc8c4f568719db471","unresolved":false,"context_lines":[{"line_number":14,"context_line":"#    under the License."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"\"\"\""},{"line_number":17,"context_line":"Different accelerator handlers for conductor/agent/api/object to call."},{"line_number":18,"context_line":"\"\"\""},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"import abc"}],"source_content_type":"text/x-python","patch_set":14,"id":"3fa7e38b_ab133166","line":17,"in_reply_to":"3fa7e38b_3f34704a","updated":"2019-09-18 05:09:11.000000000","message":"It\u0027s need. \nobject file is used for DB CRUD.\n\nNot for task flow control.","commit_id":"13f937063f8e7eed605d14a04c4e1fef24ed23e3"},{"author":{"_account_id":14131,"name":"shaohef","email":"shaohe.feng@intel.com","username":"shaohefeng"},"change_message_id":"586e96e16be0671a3e276745256f1387fa14949a","unresolved":false,"context_lines":[{"line_number":14,"context_line":"#    under the License."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"\"\"\""},{"line_number":17,"context_line":"Different accelerator handlers for conductor/agent/api/object to call."},{"line_number":18,"context_line":"\"\"\""},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"import abc"}],"source_content_type":"text/x-python","patch_set":14,"id":"3fa7e38b_6ec5478e","line":17,"in_reply_to":"3fa7e38b_3f34704a","updated":"2019-09-18 05:30:54.000000000","message":"Let\u0027s ref other projects to see what\u0027s their object files do:\n\nSe nova instance:\nhttps://github.com/openstack/nova/blob/master/nova/objects/instance.py\nhttps://github.com/openstack/nova/blob/master/nova/objects/instance_action.py\n\nInstance is important for nova. Such as accelerators to Cyborg. \n\nYou can see all the objects files never touch instance or the object action control, for example, create, reboot, claim. \nhttps://github.com/openstack/nova/tree/master/nova/objects\n\nThey just change the object attrs and sync these attrs to DB.\n\nSo cyborg object files should also follow this style. \n\nAll the action control flow out of object files. \nThe files of software is layered.  different layer do different things.","commit_id":"13f937063f8e7eed605d14a04c4e1fef24ed23e3"},{"author":{"_account_id":21672,"name":"Sundar Nadathur","email":"sundar.nadathur@intel.com","username":"nsundar"},"change_message_id":"7abee02a3ca0bcbd6275e03fb6c88d0ea50fd70a","unresolved":false,"context_lines":[{"line_number":46,"context_line":""},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"def bind(context, ext_arq_obj, valid_fields):"},{"line_number":49,"context_line":"    \"\"\"Bind acclerator to an instance.\"\"\""},{"line_number":50,"context_line":"    # Check can ARC be bound."},{"line_number":51,"context_line":"    if (ext_arq_obj.arq.state not in"},{"line_number":52,"context_line":"        ARQ_STATES_TRANSFORM_MATRIX[constants.ARQ_BIND_STARTED]):"}],"source_content_type":"text/x-python","patch_set":14,"id":"3fa7e38b_bff2a099","line":49,"range":{"start_line":49,"start_character":12,"end_line":49,"end_character":22},"updated":"2019-09-17 06:21:07.000000000","message":"No. Binding involves an Accelerator Request (ARQ), not an accelerator. It means associating an ARQ with a host, a resource provider (and hence a deployable), and an instance.","commit_id":"13f937063f8e7eed605d14a04c4e1fef24ed23e3"},{"author":{"_account_id":21672,"name":"Sundar Nadathur","email":"sundar.nadathur@intel.com","username":"nsundar"},"change_message_id":"7abee02a3ca0bcbd6275e03fb6c88d0ea50fd70a","unresolved":false,"context_lines":[{"line_number":145,"context_line":""},{"line_number":146,"context_line":""},{"line_number":147,"context_line":"@six.add_metaclass(abc.ABCMeta)"},{"line_number":148,"context_line":"class Accelerators(object):"},{"line_number":149,"context_line":"    \"\"\"Base class for Accelerators Handler."},{"line_number":150,"context_line":""},{"line_number":151,"context_line":"    This is just a virtual Accelerators Handler interface."}],"source_content_type":"text/x-python","patch_set":14,"id":"3fa7e38b_3fff9068","line":148,"range":{"start_line":148,"start_character":6,"end_line":148,"end_character":18},"updated":"2019-09-17 06:21:07.000000000","message":"No need for this class. For Cyborg, an accelerator is a resource class, which is just a count, not an object.","commit_id":"13f937063f8e7eed605d14a04c4e1fef24ed23e3"},{"author":{"_account_id":14131,"name":"shaohef","email":"shaohe.feng@intel.com","username":"shaohefeng"},"change_message_id":"b2c51fa3a250fb26dd9aff0fc8c4f568719db471","unresolved":false,"context_lines":[{"line_number":145,"context_line":""},{"line_number":146,"context_line":""},{"line_number":147,"context_line":"@six.add_metaclass(abc.ABCMeta)"},{"line_number":148,"context_line":"class Accelerators(object):"},{"line_number":149,"context_line":"    \"\"\"Base class for Accelerators Handler."},{"line_number":150,"context_line":""},{"line_number":151,"context_line":"    This is just a virtual Accelerators Handler interface."}],"source_content_type":"text/x-python","patch_set":14,"id":"3fa7e38b_8e0f632d","line":148,"range":{"start_line":148,"start_character":6,"end_line":148,"end_character":18},"in_reply_to":"3fa7e38b_3fff9068","updated":"2019-09-18 05:09:11.000000000","message":"We need this class. But we can change a name.\nThis is used for ARQ handler flow control. \n\nAnd it is a base class. \n\nDifferent resource ARQ handler will derive from it.\n\nSee my next version patch.","commit_id":"13f937063f8e7eed605d14a04c4e1fef24ed23e3"}],"cyborg/common/constants.py":[{"author":{"_account_id":25738,"name":"Xinran WANG","email":"xin-ran.wang@intel.com","username":"Xinran"},"change_message_id":"e966eedde77a414c5f6b005d664435eadf732827","unresolved":false,"context_lines":[{"line_number":67,"context_line":""},{"line_number":68,"context_line":"SUPPORT_RESOURCES \u003d ("},{"line_number":69,"context_line":"    FPGA) \u003d ("},{"line_number":70,"context_line":"    \"CUSTOM_ACCELERATOR_FPGA\""},{"line_number":71,"context_line":")"},{"line_number":72,"context_line":""},{"line_number":73,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"5faad753_91e2e82e","line":70,"range":{"start_line":70,"start_character":5,"end_line":70,"end_character":28},"updated":"2019-09-11 07:37:00.000000000","message":"s/CUSTOM_ACCELERATOR_FPGA/FPGA","commit_id":"d1cb9f031920cad8d0877944ff24b5acec3987b0"},{"author":{"_account_id":25738,"name":"Xinran WANG","email":"xin-ran.wang@intel.com","username":"Xinran"},"change_message_id":"e966eedde77a414c5f6b005d664435eadf732827","unresolved":false,"context_lines":[{"line_number":71,"context_line":")"},{"line_number":72,"context_line":""},{"line_number":73,"context_line":""},{"line_number":74,"context_line":"FPGA_TRAITS \u003d ("},{"line_number":75,"context_line":"    FPGA_FUNCTION_ID,"},{"line_number":76,"context_line":"    FPGA_FUNCTION_ID_PREFIX) \u003d ("},{"line_number":77,"context_line":"    \"CUSTOM_FUNCTION_ID\","},{"line_number":78,"context_line":"    \"CUSTOM_FUNCTION_ID_\""},{"line_number":79,"context_line":")"},{"line_number":80,"context_line":""},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"RESOURCES_PREFIX \u003d \"resources:\""}],"source_content_type":"text/x-python","patch_set":6,"id":"5faad753_d1462022","line":79,"range":{"start_line":74,"start_character":0,"end_line":79,"end_character":1},"updated":"2019-09-11 07:37:00.000000000","message":"Should be CUSTOM_FPGA_FUNCTION_ID_INTEL and CUSTOM_FPGA_FUNCTION_ID_INTEL_ here, seeing https://github.com/openstack/cyborg/blob/master/cyborg/accelerator/drivers/fpga/intel/sysinfo.py#L198","commit_id":"d1cb9f031920cad8d0877944ff24b5acec3987b0"},{"author":{"_account_id":21672,"name":"Sundar Nadathur","email":"sundar.nadathur@intel.com","username":"nsundar"},"change_message_id":"aec3ce2078be6078c27594848f1f18d049dc92bf","unresolved":false,"context_lines":[{"line_number":89,"context_line":"FPGA_TRAITS \u003d ("},{"line_number":90,"context_line":"    FPGA_FUNCTION_ID,"},{"line_number":91,"context_line":"    FPGA_FUNCTION_ID_PREFIX) \u003d ("},{"line_number":92,"context_line":"    \"CUSTOM_FPGA_FUNCTION_ID_INTE\","},{"line_number":93,"context_line":"    \"CUSTOM_FPGA_FUNCTION_ID_INTEL_\""},{"line_number":94,"context_line":")"},{"line_number":95,"context_line":""}],"source_content_type":"text/x-python","patch_set":20,"id":"3fa7e38b_5766332c","line":92,"range":{"start_line":92,"start_character":29,"end_line":92,"end_character":33},"updated":"2019-09-27 03:25:14.000000000","message":"What is this for?","commit_id":"9207d34f85ff863f6c68fcfcc73cc240f9278c30"},{"author":{"_account_id":14131,"name":"shaohef","email":"shaohe.feng@intel.com","username":"shaohefeng"},"change_message_id":"a7c45ba4532842f3bcbb064b4aa4b75bd8117132","unresolved":false,"context_lines":[{"line_number":89,"context_line":"FPGA_TRAITS \u003d ("},{"line_number":90,"context_line":"    FPGA_FUNCTION_ID,"},{"line_number":91,"context_line":"    FPGA_FUNCTION_ID_PREFIX) \u003d ("},{"line_number":92,"context_line":"    \"CUSTOM_FPGA_FUNCTION_ID_INTE\","},{"line_number":93,"context_line":"    \"CUSTOM_FPGA_FUNCTION_ID_INTEL_\""},{"line_number":94,"context_line":")"},{"line_number":95,"context_line":""}],"source_content_type":"text/x-python","patch_set":20,"id":"3fa7e38b_120e89e4","line":92,"range":{"start_line":92,"start_character":29,"end_line":92,"end_character":33},"in_reply_to":"3fa7e38b_5766332c","updated":"2019-09-27 04:07:39.000000000","message":"Done","commit_id":"9207d34f85ff863f6c68fcfcc73cc240f9278c30"},{"author":{"_account_id":21672,"name":"Sundar Nadathur","email":"sundar.nadathur@intel.com","username":"nsundar"},"change_message_id":"aec3ce2078be6078c27594848f1f18d049dc92bf","unresolved":false,"context_lines":[{"line_number":90,"context_line":"    FPGA_FUNCTION_ID,"},{"line_number":91,"context_line":"    FPGA_FUNCTION_ID_PREFIX) \u003d ("},{"line_number":92,"context_line":"    \"CUSTOM_FPGA_FUNCTION_ID_INTE\","},{"line_number":93,"context_line":"    \"CUSTOM_FPGA_FUNCTION_ID_INTEL_\""},{"line_number":94,"context_line":")"},{"line_number":95,"context_line":""},{"line_number":96,"context_line":""}],"source_content_type":"text/x-python","patch_set":20,"id":"3fa7e38b_7769eff6","line":93,"updated":"2019-09-27 03:25:14.000000000","message":"Major: We should not have vendor names in generic Cyborg code. I have shown a way to do this in ext_arq.py.","commit_id":"9207d34f85ff863f6c68fcfcc73cc240f9278c30"},{"author":{"_account_id":14131,"name":"shaohef","email":"shaohe.feng@intel.com","username":"shaohefeng"},"change_message_id":"a7c45ba4532842f3bcbb064b4aa4b75bd8117132","unresolved":false,"context_lines":[{"line_number":90,"context_line":"    FPGA_FUNCTION_ID,"},{"line_number":91,"context_line":"    FPGA_FUNCTION_ID_PREFIX) \u003d ("},{"line_number":92,"context_line":"    \"CUSTOM_FPGA_FUNCTION_ID_INTE\","},{"line_number":93,"context_line":"    \"CUSTOM_FPGA_FUNCTION_ID_INTEL_\""},{"line_number":94,"context_line":")"},{"line_number":95,"context_line":""},{"line_number":96,"context_line":""}],"source_content_type":"text/x-python","patch_set":20,"id":"3fa7e38b_32114505","line":93,"in_reply_to":"3fa7e38b_7769eff6","updated":"2019-09-27 04:07:39.000000000","message":"Done","commit_id":"9207d34f85ff863f6c68fcfcc73cc240f9278c30"},{"author":{"_account_id":21672,"name":"Sundar Nadathur","email":"sundar.nadathur@intel.com","username":"nsundar"},"change_message_id":"0d879c8dcf345151e1fbae4c3f2c22cc56da724e","unresolved":false,"context_lines":[{"line_number":71,"context_line":"}"},{"line_number":72,"context_line":""},{"line_number":73,"context_line":""},{"line_number":74,"context_line":"ACCEL_SUPPORT_SPECS \u003d ("},{"line_number":75,"context_line":"    ACCEL_BITSTREAM_ID,"},{"line_number":76,"context_line":"    ACCEL_FUNCTION_ID"},{"line_number":77,"context_line":") \u003d ("}],"source_content_type":"text/x-python","patch_set":24,"id":"3fa7e38b_03a156f8","line":74,"updated":"2019-09-27 14:16:44.000000000","message":"Minor: why not just ACCEL_SPECS. Why do we need the word SUPPORT?","commit_id":"8d3ab26d71c8d93a771ff271b5ef83f0476d5ba7"},{"author":{"_account_id":14131,"name":"shaohef","email":"shaohe.feng@intel.com","username":"shaohefeng"},"change_message_id":"af4a36fb0b9c508470251984eb1b21808e231876","unresolved":false,"context_lines":[{"line_number":71,"context_line":"}"},{"line_number":72,"context_line":""},{"line_number":73,"context_line":""},{"line_number":74,"context_line":"ACCEL_SUPPORT_SPECS \u003d ("},{"line_number":75,"context_line":"    ACCEL_BITSTREAM_ID,"},{"line_number":76,"context_line":"    ACCEL_FUNCTION_ID"},{"line_number":77,"context_line":") \u003d ("}],"source_content_type":"text/x-python","patch_set":24,"id":"3fa7e38b_58ef38e8","line":74,"in_reply_to":"3fa7e38b_03a156f8","updated":"2019-09-27 15:10:56.000000000","message":"Done","commit_id":"8d3ab26d71c8d93a771ff271b5ef83f0476d5ba7"},{"author":{"_account_id":21672,"name":"Sundar Nadathur","email":"sundar.nadathur@intel.com","username":"nsundar"},"change_message_id":"0d879c8dcf345151e1fbae4c3f2c22cc56da724e","unresolved":false,"context_lines":[{"line_number":90,"context_line":"    FPGA_FUNCTION_ID,"},{"line_number":91,"context_line":"    FPGA_FUNCTION_ID_PREFIX) \u003d ("},{"line_number":92,"context_line":"    \"CUSTOM_FPGA_FUNCTION_ID\","},{"line_number":93,"context_line":"    \"CUSTOM_FPGA_FUNCTION_ID_\""},{"line_number":94,"context_line":")"},{"line_number":95,"context_line":""},{"line_number":96,"context_line":""}],"source_content_type":"text/x-python","patch_set":24,"id":"3fa7e38b_43e0ae26","line":93,"updated":"2019-09-27 14:16:44.000000000","message":"Do we really need both? Seems redundant.","commit_id":"8d3ab26d71c8d93a771ff271b5ef83f0476d5ba7"},{"author":{"_account_id":14131,"name":"shaohef","email":"shaohe.feng@intel.com","username":"shaohefeng"},"change_message_id":"af4a36fb0b9c508470251984eb1b21808e231876","unresolved":false,"context_lines":[{"line_number":90,"context_line":"    FPGA_FUNCTION_ID,"},{"line_number":91,"context_line":"    FPGA_FUNCTION_ID_PREFIX) \u003d ("},{"line_number":92,"context_line":"    \"CUSTOM_FPGA_FUNCTION_ID\","},{"line_number":93,"context_line":"    \"CUSTOM_FPGA_FUNCTION_ID_\""},{"line_number":94,"context_line":")"},{"line_number":95,"context_line":""},{"line_number":96,"context_line":""}],"source_content_type":"text/x-python","patch_set":24,"id":"3fa7e38b_18bf80d1","line":93,"in_reply_to":"3fa7e38b_43e0ae26","updated":"2019-09-27 15:10:56.000000000","message":"Done","commit_id":"8d3ab26d71c8d93a771ff271b5ef83f0476d5ba7"}],"cyborg/common/utils.py":[{"author":{"_account_id":17813,"name":"wangzhh","email":"wzh_1993@126.com","username":"wangzhh"},"change_message_id":"067c5cab3585620c34a1b8b455d6567e044bf501","unresolved":false,"context_lines":[{"line_number":15,"context_line":""},{"line_number":16,"context_line":"\"\"\"Utilities and helper functions.\"\"\""},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"from concurrent.futures import ThreadPoolExecutor"},{"line_number":19,"context_line":"import six"},{"line_number":20,"context_line":"import traceback"},{"line_number":21,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"5faad753_da47471d","line":18,"updated":"2019-09-09 13:47:38.000000000","message":"Why don\u0027t you use eventlet instead of thread? I think the thread will be monkey_patched in cyborg\u0027s service.","commit_id":"d1fb5713e55b904e376ba1c29abf9690a3b7cd60"},{"author":{"_account_id":14131,"name":"shaohef","email":"shaohe.feng@intel.com","username":"shaohefeng"},"change_message_id":"ebdb99430ad99d8e2f00edad8486a87a6c7518e6","unresolved":false,"context_lines":[{"line_number":15,"context_line":""},{"line_number":16,"context_line":"\"\"\"Utilities and helper functions.\"\"\""},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"from concurrent.futures import ThreadPoolExecutor"},{"line_number":19,"context_line":"import six"},{"line_number":20,"context_line":"import traceback"},{"line_number":21,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"5faad753_da7ae722","line":18,"in_reply_to":"5faad753_da47471d","updated":"2019-09-09 13:55:17.000000000","message":"We have discussed used eventlet, even AIO.  \n\nThe spec use ThreadPoolExecutor. So I follow the spec, look into ThreadPoolExecutor first .\n\n\nlet\u0027s work it firstly.\n\nI have no time look into eventlet well. \n\n\nBut I think we can replace ThreadPoolExecutor by eventlet if need. \n\nLet\u0027s we focus on the whole flow of async jobs.\nWelcome RFC.","commit_id":"d1fb5713e55b904e376ba1c29abf9690a3b7cd60"},{"author":{"_account_id":21672,"name":"Sundar Nadathur","email":"sundar.nadathur@intel.com","username":"nsundar"},"change_message_id":"0d879c8dcf345151e1fbae4c3f2c22cc56da724e","unresolved":false,"context_lines":[{"line_number":224,"context_line":"        # NOTE(Shaohe) shutdown should be after job submit"},{"line_number":225,"context_line":"        executor.shutdown(wait\u003dFalse)"},{"line_number":226,"context_line":"        # TODO(Shaohe) we need to consider resouce collection?"},{"line_number":227,"context_line":"        # master \u003d {tag: {"},{"line_number":228,"context_line":"        #     \"executor\": executor,"},{"line_number":229,"context_line":"        #     \"job\": f,"},{"line_number":230,"context_line":"        #     \"timestemp\": time.time(),"}],"source_content_type":"text/x-python","patch_set":24,"id":"3fa7e38b_e330baa1","line":227,"updated":"2019-09-27 14:16:44.000000000","message":"Is the commented section part of the TODO? If so, can you indicate how they are related?","commit_id":"8d3ab26d71c8d93a771ff271b5ef83f0476d5ba7"},{"author":{"_account_id":14131,"name":"shaohef","email":"shaohe.feng@intel.com","username":"shaohefeng"},"change_message_id":"af4a36fb0b9c508470251984eb1b21808e231876","unresolved":false,"context_lines":[{"line_number":224,"context_line":"        # NOTE(Shaohe) shutdown should be after job submit"},{"line_number":225,"context_line":"        executor.shutdown(wait\u003dFalse)"},{"line_number":226,"context_line":"        # TODO(Shaohe) we need to consider resouce collection?"},{"line_number":227,"context_line":"        # master \u003d {tag: {"},{"line_number":228,"context_line":"        #     \"executor\": executor,"},{"line_number":229,"context_line":"        #     \"job\": f,"},{"line_number":230,"context_line":"        #     \"timestemp\": time.time(),"}],"source_content_type":"text/x-python","patch_set":24,"id":"3fa7e38b_f8b704f4","line":227,"in_reply_to":"3fa7e38b_e330baa1","updated":"2019-09-27 15:10:56.000000000","message":"Done","commit_id":"8d3ab26d71c8d93a771ff271b5ef83f0476d5ba7"},{"author":{"_account_id":21672,"name":"Sundar Nadathur","email":"sundar.nadathur@intel.com","username":"nsundar"},"change_message_id":"0d879c8dcf345151e1fbae4c3f2c22cc56da724e","unresolved":false,"context_lines":[{"line_number":299,"context_line":""},{"line_number":300,"context_line":"    @classmethod"},{"line_number":301,"context_line":"    def check_workers_exception(cls, fs\u003d(), **kwargs):"},{"line_number":302,"context_line":"        \"\"\"check wether a jobs worker raise exception."},{"line_number":303,"context_line":""},{"line_number":304,"context_line":"        Waits workers util it finish or raise any Exception."},{"line_number":305,"context_line":"        It will not cancel the rest if one job worker fails. As we discussed,"}],"source_content_type":"text/x-python","patch_set":24,"id":"3fa7e38b_837b0626","line":302,"range":{"start_line":302,"start_character":17,"end_line":302,"end_character":23},"updated":"2019-09-27 14:16:44.000000000","message":"Minor: whether","commit_id":"8d3ab26d71c8d93a771ff271b5ef83f0476d5ba7"},{"author":{"_account_id":14131,"name":"shaohef","email":"shaohe.feng@intel.com","username":"shaohefeng"},"change_message_id":"af4a36fb0b9c508470251984eb1b21808e231876","unresolved":false,"context_lines":[{"line_number":299,"context_line":""},{"line_number":300,"context_line":"    @classmethod"},{"line_number":301,"context_line":"    def check_workers_exception(cls, fs\u003d(), **kwargs):"},{"line_number":302,"context_line":"        \"\"\"check wether a jobs worker raise exception."},{"line_number":303,"context_line":""},{"line_number":304,"context_line":"        Waits workers util it finish or raise any Exception."},{"line_number":305,"context_line":"        It will not cancel the rest if one job worker fails. As we discussed,"}],"source_content_type":"text/x-python","patch_set":24,"id":"3fa7e38b_b8cd0c86","line":302,"range":{"start_line":302,"start_character":17,"end_line":302,"end_character":23},"in_reply_to":"3fa7e38b_837b0626","updated":"2019-09-27 15:10:56.000000000","message":"Done","commit_id":"8d3ab26d71c8d93a771ff271b5ef83f0476d5ba7"},{"author":{"_account_id":21672,"name":"Sundar Nadathur","email":"sundar.nadathur@intel.com","username":"nsundar"},"change_message_id":"0d879c8dcf345151e1fbae4c3f2c22cc56da724e","unresolved":false,"context_lines":[{"line_number":394,"context_line":"    return _wrap_job_tb"},{"line_number":395,"context_line":""},{"line_number":396,"context_line":""},{"line_number":397,"context_line":"def factory_register_to(SuperClass, ClassName):"},{"line_number":398,"context_line":"    \"\"\"Register an concrete class to a factory Class.\"\"\""},{"line_number":399,"context_line":"    def decorator(Class):"},{"line_number":400,"context_line":"        # return Class"}],"source_content_type":"text/x-python","patch_set":24,"id":"3fa7e38b_03907649","line":397,"range":{"start_line":397,"start_character":4,"end_line":397,"end_character":23},"updated":"2019-09-27 14:16:44.000000000","message":"Minor: \u0027factory_register\u0027 is clearer IMO. No need for \u0027_to\u0027.","commit_id":"8d3ab26d71c8d93a771ff271b5ef83f0476d5ba7"},{"author":{"_account_id":14131,"name":"shaohef","email":"shaohe.feng@intel.com","username":"shaohefeng"},"change_message_id":"af4a36fb0b9c508470251984eb1b21808e231876","unresolved":false,"context_lines":[{"line_number":394,"context_line":"    return _wrap_job_tb"},{"line_number":395,"context_line":""},{"line_number":396,"context_line":""},{"line_number":397,"context_line":"def factory_register_to(SuperClass, ClassName):"},{"line_number":398,"context_line":"    \"\"\"Register an concrete class to a factory Class.\"\"\""},{"line_number":399,"context_line":"    def decorator(Class):"},{"line_number":400,"context_line":"        # return Class"}],"source_content_type":"text/x-python","patch_set":24,"id":"3fa7e38b_38903c4a","line":397,"range":{"start_line":397,"start_character":4,"end_line":397,"end_character":23},"in_reply_to":"3fa7e38b_03907649","updated":"2019-09-27 15:10:56.000000000","message":"Done","commit_id":"8d3ab26d71c8d93a771ff271b5ef83f0476d5ba7"}],"cyborg/conf/default.py":[{"author":{"_account_id":21672,"name":"Sundar Nadathur","email":"sundar.nadathur@intel.com","username":"nsundar"},"change_message_id":"0d879c8dcf345151e1fbae4c3f2c22cc56da724e","unresolved":false,"context_lines":[{"line_number":50,"context_line":"                      \u0027tasks.\u0027)),"},{"line_number":51,"context_line":"    cfg.IntOpt("},{"line_number":52,"context_line":"        \u0027thread_pool_size\u0027,"},{"line_number":53,"context_line":"        default\u003d1000,"},{"line_number":54,"context_line":"        help\u003d_(\"\"\""},{"line_number":55,"context_line":"            This option specifies the size of the pool of threads used by API"},{"line_number":56,"context_line":"            to do async jobs.It is possible to limit the number of concurrent"}],"source_content_type":"text/x-python","patch_set":24,"id":"3fa7e38b_c3e81eb4","line":53,"range":{"start_line":53,"start_character":16,"end_line":53,"end_character":20},"updated":"2019-09-27 14:16:44.000000000","message":"What are the memory/resource implications of setting a huge value here? For a given VM, I think many hypervisors the number of PCI devices to a small number, like 10. So, we should only need small #ARQs per VM, so small #threads, right?","commit_id":"8d3ab26d71c8d93a771ff271b5ef83f0476d5ba7"},{"author":{"_account_id":14131,"name":"shaohef","email":"shaohe.feng@intel.com","username":"shaohefeng"},"change_message_id":"af4a36fb0b9c508470251984eb1b21808e231876","unresolved":false,"context_lines":[{"line_number":50,"context_line":"                      \u0027tasks.\u0027)),"},{"line_number":51,"context_line":"    cfg.IntOpt("},{"line_number":52,"context_line":"        \u0027thread_pool_size\u0027,"},{"line_number":53,"context_line":"        default\u003d1000,"},{"line_number":54,"context_line":"        help\u003d_(\"\"\""},{"line_number":55,"context_line":"            This option specifies the size of the pool of threads used by API"},{"line_number":56,"context_line":"            to do async jobs.It is possible to limit the number of concurrent"}],"source_content_type":"text/x-python","patch_set":24,"id":"3fa7e38b_f885c407","line":53,"range":{"start_line":53,"start_character":16,"end_line":53,"end_character":20},"in_reply_to":"3fa7e38b_c3e81eb4","updated":"2019-09-27 15:10:56.000000000","message":"Done","commit_id":"8d3ab26d71c8d93a771ff271b5ef83f0476d5ba7"}],"cyborg/db/sqlalchemy/api.py":[{"author":{"_account_id":21672,"name":"Sundar Nadathur","email":"sundar.nadathur@intel.com","username":"nsundar"},"change_message_id":"7abee02a3ca0bcbd6275e03fb6c88d0ea50fd70a","unresolved":false,"context_lines":[{"line_number":602,"context_line":"            models.Deployable).filter_by(rp_uuid\u003drp_uuid)"},{"line_number":603,"context_line":"        if num:"},{"line_number":604,"context_line":"            query \u003d query.limit(num)"},{"line_number":605,"context_line":"        return query.all()"},{"line_number":606,"context_line":""},{"line_number":607,"context_line":"    def deployable_list(self, context):"},{"line_number":608,"context_line":"        query \u003d model_query(context, models.Deployable)"}],"source_content_type":"text/x-python","patch_set":14,"id":"3fa7e38b_fac4a694","line":605,"range":{"start_line":605,"start_character":15,"end_line":605,"end_character":24},"updated":"2019-09-17 06:21:07.000000000","message":"? One dpeloyable corresponds to exactly one resource provider. We don\u0027t need this function.","commit_id":"13f937063f8e7eed605d14a04c4e1fef24ed23e3"},{"author":{"_account_id":21672,"name":"Sundar Nadathur","email":"sundar.nadathur@intel.com","username":"nsundar"},"change_message_id":"0d879c8dcf345151e1fbae4c3f2c22cc56da724e","unresolved":false,"context_lines":[{"line_number":897,"context_line":"            ref \u003d query.first()"},{"line_number":898,"context_line":"        return ref"},{"line_number":899,"context_line":""},{"line_number":900,"context_line":"    def extarq_list(self, context, uuid_range\u003dNone):"},{"line_number":901,"context_line":"        query \u003d model_query(context, models.ExtArq)"},{"line_number":902,"context_line":"        if type(uuid_range) is list:"},{"line_number":903,"context_line":"            query \u003d query.filter("}],"source_content_type":"text/x-python","patch_set":24,"id":"3fa7e38b_83af8628","line":900,"updated":"2019-09-27 14:16:44.000000000","message":"Needs same change in db/api.py","commit_id":"8d3ab26d71c8d93a771ff271b5ef83f0476d5ba7"},{"author":{"_account_id":14131,"name":"shaohef","email":"shaohe.feng@intel.com","username":"shaohefeng"},"change_message_id":"af4a36fb0b9c508470251984eb1b21808e231876","unresolved":false,"context_lines":[{"line_number":897,"context_line":"            ref \u003d query.first()"},{"line_number":898,"context_line":"        return ref"},{"line_number":899,"context_line":""},{"line_number":900,"context_line":"    def extarq_list(self, context, uuid_range\u003dNone):"},{"line_number":901,"context_line":"        query \u003d model_query(context, models.ExtArq)"},{"line_number":902,"context_line":"        if type(uuid_range) is list:"},{"line_number":903,"context_line":"            query \u003d query.filter("}],"source_content_type":"text/x-python","patch_set":24,"id":"3fa7e38b_988050f7","line":900,"in_reply_to":"3fa7e38b_83af8628","updated":"2019-09-27 15:10:56.000000000","message":"Done","commit_id":"8d3ab26d71c8d93a771ff271b5ef83f0476d5ba7"}],"cyborg/objects/deployable.py":[{"author":{"_account_id":21672,"name":"Sundar Nadathur","email":"sundar.nadathur@intel.com","username":"nsundar"},"change_message_id":"7abee02a3ca0bcbd6275e03fb6c88d0ea50fd70a","unresolved":false,"context_lines":[{"line_number":207,"context_line":"        return obj_dpl_list"},{"line_number":208,"context_line":""},{"line_number":209,"context_line":"    @classmethod"},{"line_number":210,"context_line":"    def get_by_rp_uuid(cls, context, rp_uuid, num\u003dNone):"},{"line_number":211,"context_line":"        obj_dpl_list \u003d []"},{"line_number":212,"context_line":"        db_dpl_list \u003d cls.dbapi.deployable_limit_get_by_rp_uuid("},{"line_number":213,"context_line":"            context, rp_uuid, num)"}],"source_content_type":"text/x-python","patch_set":14,"id":"3fa7e38b_7a3676b7","line":210,"updated":"2019-09-17 06:21:07.000000000","message":"We don\u0027t need all this. One deployable corresponds to one RP, so num is unnecessayr and we already have [1].\n\n[1] https://opendev.org/openstack/cyborg/src/branch/master/cyborg/objects/deployable.py#L97","commit_id":"13f937063f8e7eed605d14a04c4e1fef24ed23e3"},{"author":{"_account_id":14131,"name":"shaohef","email":"shaohe.feng@intel.com","username":"shaohefeng"},"change_message_id":"b2c51fa3a250fb26dd9aff0fc8c4f568719db471","unresolved":false,"context_lines":[{"line_number":207,"context_line":"        return obj_dpl_list"},{"line_number":208,"context_line":""},{"line_number":209,"context_line":"    @classmethod"},{"line_number":210,"context_line":"    def get_by_rp_uuid(cls, context, rp_uuid, num\u003dNone):"},{"line_number":211,"context_line":"        obj_dpl_list \u003d []"},{"line_number":212,"context_line":"        db_dpl_list \u003d cls.dbapi.deployable_limit_get_by_rp_uuid("},{"line_number":213,"context_line":"            context, rp_uuid, num)"}],"source_content_type":"text/x-python","patch_set":14,"id":"3fa7e38b_ee27f7b5","line":210,"in_reply_to":"3fa7e38b_7a3676b7","updated":"2019-09-18 05:09:11.000000000","message":"Yes. I have notice this, so I make a change for it. \nSee the new version.","commit_id":"13f937063f8e7eed605d14a04c4e1fef24ed23e3"},{"author":{"_account_id":21672,"name":"Sundar Nadathur","email":"sundar.nadathur@intel.com","username":"nsundar"},"change_message_id":"0d879c8dcf345151e1fbae4c3f2c22cc56da724e","unresolved":false,"context_lines":[{"line_number":243,"context_line":"        else:"},{"line_number":244,"context_line":"            return None"},{"line_number":245,"context_line":""},{"line_number":246,"context_line":"    def get_contorl_list_of_a_deployable(self, context):"},{"line_number":247,"context_line":"        query_filter \u003d {\"device_id\": self.device_id}"},{"line_number":248,"context_line":"        # TODO(Sundar) We should probably get cpid from objects layer,"},{"line_number":249,"context_line":"        # not db layer"}],"source_content_type":"text/x-python","patch_set":24,"id":"3fa7e38b_e3651a1f","line":246,"updated":"2019-09-27 14:16:44.000000000","message":"Better name: get_cpid_list. The object itself is a deployable, so \u0027of_a...\u0027 not needed.","commit_id":"8d3ab26d71c8d93a771ff271b5ef83f0476d5ba7"},{"author":{"_account_id":14131,"name":"shaohef","email":"shaohe.feng@intel.com","username":"shaohefeng"},"change_message_id":"af4a36fb0b9c508470251984eb1b21808e231876","unresolved":false,"context_lines":[{"line_number":243,"context_line":"        else:"},{"line_number":244,"context_line":"            return None"},{"line_number":245,"context_line":""},{"line_number":246,"context_line":"    def get_contorl_list_of_a_deployable(self, context):"},{"line_number":247,"context_line":"        query_filter \u003d {\"device_id\": self.device_id}"},{"line_number":248,"context_line":"        # TODO(Sundar) We should probably get cpid from objects layer,"},{"line_number":249,"context_line":"        # not db layer"}],"source_content_type":"text/x-python","patch_set":24,"id":"3fa7e38b_58765840","line":246,"in_reply_to":"3fa7e38b_e3651a1f","updated":"2019-09-27 15:10:56.000000000","message":"Done","commit_id":"8d3ab26d71c8d93a771ff271b5ef83f0476d5ba7"}],"cyborg/objects/ext_arq.py":[{"author":{"_account_id":21672,"name":"Sundar Nadathur","email":"sundar.nadathur@intel.com","username":"nsundar"},"change_message_id":"aec3ce2078be6078c27594848f1f18d049dc92bf","unresolved":false,"context_lines":[{"line_number":179,"context_line":"            auth_user \u003d default_user"},{"line_number":180,"context_line":"        return connection.Connection(cloud\u003dauth_user)"},{"line_number":181,"context_line":""},{"line_number":182,"context_line":"    # TODO(Shaohe) should remove it."},{"line_number":183,"context_line":"    def _get_bitstream_md_from_function_id(self, function_id):"},{"line_number":184,"context_line":"        \"\"\"Get bitstream metadata given a function id.\"\"\""},{"line_number":185,"context_line":"        conn \u003d self._get_glance_connection()"}],"source_content_type":"text/x-python","patch_set":20,"id":"3fa7e38b_d779c3c7","line":182,"updated":"2019-09-27 03:25:14.000000000","message":"These are duplicated in fpga_ext_arq.py also. Please remove the duplication.","commit_id":"9207d34f85ff863f6c68fcfcc73cc240f9278c30"},{"author":{"_account_id":14131,"name":"shaohef","email":"shaohe.feng@intel.com","username":"shaohefeng"},"change_message_id":"a7c45ba4532842f3bcbb064b4aa4b75bd8117132","unresolved":false,"context_lines":[{"line_number":179,"context_line":"            auth_user \u003d default_user"},{"line_number":180,"context_line":"        return connection.Connection(cloud\u003dauth_user)"},{"line_number":181,"context_line":""},{"line_number":182,"context_line":"    # TODO(Shaohe) should remove it."},{"line_number":183,"context_line":"    def _get_bitstream_md_from_function_id(self, function_id):"},{"line_number":184,"context_line":"        \"\"\"Get bitstream metadata given a function id.\"\"\""},{"line_number":185,"context_line":"        conn \u003d self._get_glance_connection()"}],"source_content_type":"text/x-python","patch_set":20,"id":"3fa7e38b_d2fb11be","line":182,"in_reply_to":"3fa7e38b_d779c3c7","updated":"2019-09-27 04:07:39.000000000","message":"Done","commit_id":"9207d34f85ff863f6c68fcfcc73cc240f9278c30"},{"author":{"_account_id":21672,"name":"Sundar Nadathur","email":"sundar.nadathur@intel.com","username":"nsundar"},"change_message_id":"aec3ce2078be6078c27594848f1f18d049dc92bf","unresolved":false,"context_lines":[{"line_number":203,"context_line":"                        function_id)"},{"line_number":204,"context_line":"            return None"},{"line_number":205,"context_line":""},{"line_number":206,"context_line":"    def _get_bitstream_md_from_bitstream_id(self, bitstream_id):"},{"line_number":207,"context_line":"        \"\"\"Get bitstream metadata given a bitstream id.\"\"\""},{"line_number":208,"context_line":"        conn \u003d self._get_glance_connection()"},{"line_number":209,"context_line":"        resp \u003d conn.image.get(\u0027/images/\u0027 + bitstream_id)"}],"source_content_type":"text/x-python","patch_set":20,"id":"3fa7e38b_f774ffd0","line":206,"updated":"2019-09-27 03:25:14.000000000","message":"ditto","commit_id":"9207d34f85ff863f6c68fcfcc73cc240f9278c30"},{"author":{"_account_id":14131,"name":"shaohef","email":"shaohe.feng@intel.com","username":"shaohefeng"},"change_message_id":"a7c45ba4532842f3bcbb064b4aa4b75bd8117132","unresolved":false,"context_lines":[{"line_number":203,"context_line":"                        function_id)"},{"line_number":204,"context_line":"            return None"},{"line_number":205,"context_line":""},{"line_number":206,"context_line":"    def _get_bitstream_md_from_bitstream_id(self, bitstream_id):"},{"line_number":207,"context_line":"        \"\"\"Get bitstream metadata given a bitstream id.\"\"\""},{"line_number":208,"context_line":"        conn \u003d self._get_glance_connection()"},{"line_number":209,"context_line":"        resp \u003d conn.image.get(\u0027/images/\u0027 + bitstream_id)"}],"source_content_type":"text/x-python","patch_set":20,"id":"3fa7e38b_f2f64dd7","line":206,"in_reply_to":"3fa7e38b_f774ffd0","updated":"2019-09-27 04:07:39.000000000","message":"Done","commit_id":"9207d34f85ff863f6c68fcfcc73cc240f9278c30"},{"author":{"_account_id":21672,"name":"Sundar Nadathur","email":"sundar.nadathur@intel.com","username":"nsundar"},"change_message_id":"aec3ce2078be6078c27594848f1f18d049dc92bf","unresolved":false,"context_lines":[{"line_number":245,"context_line":"        # TODO() propagate agent errors to caller"},{"line_number":246,"context_line":"        return True"},{"line_number":247,"context_line":""},{"line_number":248,"context_line":"    def _update_placement(self, devrp_uuid, function_id,"},{"line_number":249,"context_line":"                          bitstream_md, driver_name):"},{"line_number":250,"context_line":"        \"\"\"update resources provider if attribution of deployable change.\"\"\""},{"line_number":251,"context_line":"        placement \u003d placement_client.PlacementClient()"}],"source_content_type":"text/x-python","patch_set":20,"id":"3fa7e38b_977fcba9","line":248,"updated":"2019-09-27 03:25:14.000000000","message":"ditto","commit_id":"9207d34f85ff863f6c68fcfcc73cc240f9278c30"},{"author":{"_account_id":14131,"name":"shaohef","email":"shaohe.feng@intel.com","username":"shaohefeng"},"change_message_id":"a7c45ba4532842f3bcbb064b4aa4b75bd8117132","unresolved":false,"context_lines":[{"line_number":245,"context_line":"        # TODO() propagate agent errors to caller"},{"line_number":246,"context_line":"        return True"},{"line_number":247,"context_line":""},{"line_number":248,"context_line":"    def _update_placement(self, devrp_uuid, function_id,"},{"line_number":249,"context_line":"                          bitstream_md, driver_name):"},{"line_number":250,"context_line":"        \"\"\"update resources provider if attribution of deployable change.\"\"\""},{"line_number":251,"context_line":"        placement \u003d placement_client.PlacementClient()"}],"source_content_type":"text/x-python","patch_set":20,"id":"3fa7e38b_920119b2","line":248,"in_reply_to":"3fa7e38b_977fcba9","updated":"2019-09-27 04:07:39.000000000","message":"Done","commit_id":"9207d34f85ff863f6c68fcfcc73cc240f9278c30"},{"author":{"_account_id":14131,"name":"shaohef","email":"shaohe.feng@intel.com","username":"shaohefeng"},"change_message_id":"f6ad1de14121a72860e4b69c9668282ebc2059b3","unresolved":false,"context_lines":[{"line_number":259,"context_line":"            # TODO(Sundar) Validate this is a valid trait name"},{"line_number":260,"context_line":"            # Assume driver name \u003d\u003d vendor name for FPGA driver."},{"line_number":261,"context_line":"            vendor \u003d driver_name.upper()"},{"line_number":262,"context_line":"            trait_names \u003d [\u0027CUSTOM_FPGA_FUNCTION_ID_\u0027 + vendor + function_id]"},{"line_number":263,"context_line":"            placement.add_traits_to_rp(devrp_uuid, trait_names)"},{"line_number":264,"context_line":""},{"line_number":265,"context_line":"    def _attachhandle(self, context, deployable):"}],"source_content_type":"text/x-python","patch_set":20,"id":"3fa7e38b_1240c906","line":262,"range":{"start_line":262,"start_character":56,"end_line":262,"end_character":62},"updated":"2019-09-27 04:02:56.000000000","message":"should be:\nCUSTOM_FPGA_FUNCTION_ID_INTEL_ID\nor\nCUSTOM_FPGA_FUNCTION_ID_INTELID？","commit_id":"9207d34f85ff863f6c68fcfcc73cc240f9278c30"},{"author":{"_account_id":21672,"name":"Sundar Nadathur","email":"sundar.nadathur@intel.com","username":"nsundar"},"change_message_id":"bace3b54dd4e386b2da199f1722be7cfa35be530","unresolved":false,"context_lines":[{"line_number":259,"context_line":"            # TODO(Sundar) Validate this is a valid trait name"},{"line_number":260,"context_line":"            # Assume driver name \u003d\u003d vendor name for FPGA driver."},{"line_number":261,"context_line":"            vendor \u003d driver_name.upper()"},{"line_number":262,"context_line":"            trait_names \u003d [\u0027CUSTOM_FPGA_FUNCTION_ID_\u0027 + vendor + function_id]"},{"line_number":263,"context_line":"            placement.add_traits_to_rp(devrp_uuid, trait_names)"},{"line_number":264,"context_line":""},{"line_number":265,"context_line":"    def _attachhandle(self, context, deployable):"}],"source_content_type":"text/x-python","patch_set":20,"id":"3fa7e38b_12dc4944","line":262,"range":{"start_line":262,"start_character":56,"end_line":262,"end_character":62},"in_reply_to":"3fa7e38b_1240c906","updated":"2019-09-27 04:08:29.000000000","message":"CUSTOM_FPGA_FUNCTION_ID_\u003cid\u003e. Please see:\nhttps://opendev.org/openstack/cyborg/src/branch/master/cyborg/accelerator/drivers/fpga/intel/sysinfo.py#L202","commit_id":"9207d34f85ff863f6c68fcfcc73cc240f9278c30"},{"author":{"_account_id":21672,"name":"Sundar Nadathur","email":"sundar.nadathur@intel.com","username":"nsundar"},"change_message_id":"a52f3d571101b47b812949f792dd7085c6b71094","unresolved":false,"context_lines":[{"line_number":259,"context_line":"            # TODO(Sundar) Validate this is a valid trait name"},{"line_number":260,"context_line":"            # Assume driver name \u003d\u003d vendor name for FPGA driver."},{"line_number":261,"context_line":"            vendor \u003d driver_name.upper()"},{"line_number":262,"context_line":"            trait_names \u003d [\u0027CUSTOM_FPGA_FUNCTION_ID_\u0027 + vendor + function_id]"},{"line_number":263,"context_line":"            placement.add_traits_to_rp(devrp_uuid, trait_names)"},{"line_number":264,"context_line":""},{"line_number":265,"context_line":"    def _attachhandle(self, context, deployable):"}],"source_content_type":"text/x-python","patch_set":20,"id":"3fa7e38b_b2ea15d5","line":262,"range":{"start_line":262,"start_character":56,"end_line":262,"end_character":62},"in_reply_to":"3fa7e38b_12dc4944","updated":"2019-09-27 04:10:10.000000000","message":"Ah I mean .. CUSTOM_FPGA_FUNCTION_ID_INTEL_\u003cid\u003e","commit_id":"9207d34f85ff863f6c68fcfcc73cc240f9278c30"},{"author":{"_account_id":21672,"name":"Sundar Nadathur","email":"sundar.nadathur@intel.com","username":"nsundar"},"change_message_id":"aec3ce2078be6078c27594848f1f18d049dc92bf","unresolved":false,"context_lines":[{"line_number":262,"context_line":"            trait_names \u003d [\u0027CUSTOM_FPGA_FUNCTION_ID_\u0027 + vendor + function_id]"},{"line_number":263,"context_line":"            placement.add_traits_to_rp(devrp_uuid, trait_names)"},{"line_number":264,"context_line":""},{"line_number":265,"context_line":"    def _attachhandle(self, context, deployable):"},{"line_number":266,"context_line":"        try:"},{"line_number":267,"context_line":"            ah \u003d AttachHandle.allocate(context, deployable.id)"},{"line_number":268,"context_line":"            self.attach_handle_id \u003d ah.id"}],"source_content_type":"text/x-python","patch_set":20,"id":"3fa7e38b_b77a07b7","line":265,"updated":"2019-09-27 03:25:14.000000000","message":"Please call it _allocate_attach_handle.","commit_id":"9207d34f85ff863f6c68fcfcc73cc240f9278c30"},{"author":{"_account_id":14131,"name":"shaohef","email":"shaohe.feng@intel.com","username":"shaohefeng"},"change_message_id":"a7c45ba4532842f3bcbb064b4aa4b75bd8117132","unresolved":false,"context_lines":[{"line_number":262,"context_line":"            trait_names \u003d [\u0027CUSTOM_FPGA_FUNCTION_ID_\u0027 + vendor + function_id]"},{"line_number":263,"context_line":"            placement.add_traits_to_rp(devrp_uuid, trait_names)"},{"line_number":264,"context_line":""},{"line_number":265,"context_line":"    def _attachhandle(self, context, deployable):"},{"line_number":266,"context_line":"        try:"},{"line_number":267,"context_line":"            ah \u003d AttachHandle.allocate(context, deployable.id)"},{"line_number":268,"context_line":"            self.attach_handle_id \u003d ah.id"}],"source_content_type":"text/x-python","patch_set":20,"id":"3fa7e38b_b2fc55b5","line":265,"in_reply_to":"3fa7e38b_b77a07b7","updated":"2019-09-27 04:07:39.000000000","message":"Done","commit_id":"9207d34f85ff863f6c68fcfcc73cc240f9278c30"},{"author":{"_account_id":21672,"name":"Sundar Nadathur","email":"sundar.nadathur@intel.com","username":"nsundar"},"change_message_id":"0d879c8dcf345151e1fbae4c3f2c22cc56da724e","unresolved":false,"context_lines":[{"line_number":100,"context_line":"        return obj_extarq"},{"line_number":101,"context_line":""},{"line_number":102,"context_line":"    @classmethod"},{"line_number":103,"context_line":"    def list(cls, context, uuid_range\u003dNone):"},{"line_number":104,"context_line":"        \"\"\"Return a list of ExtARQ objects.\"\"\""},{"line_number":105,"context_line":"        db_extarqs \u003d cls.dbapi.extarq_list(context, uuid_range)"},{"line_number":106,"context_line":"        obj_extarq_list \u003d cls._from_db_object_list("}],"source_content_type":"text/x-python","patch_set":24,"id":"3fa7e38b_4328ae95","line":103,"updated":"2019-09-27 14:16:44.000000000","message":"Why is this change needed? This has triggered corresponding changes in db layer.","commit_id":"8d3ab26d71c8d93a771ff271b5ef83f0476d5ba7"},{"author":{"_account_id":14131,"name":"shaohef","email":"shaohe.feng@intel.com","username":"shaohefeng"},"change_message_id":"af4a36fb0b9c508470251984eb1b21808e231876","unresolved":false,"context_lines":[{"line_number":100,"context_line":"        return obj_extarq"},{"line_number":101,"context_line":""},{"line_number":102,"context_line":"    @classmethod"},{"line_number":103,"context_line":"    def list(cls, context, uuid_range\u003dNone):"},{"line_number":104,"context_line":"        \"\"\"Return a list of ExtARQ objects.\"\"\""},{"line_number":105,"context_line":"        db_extarqs \u003d cls.dbapi.extarq_list(context, uuid_range)"},{"line_number":106,"context_line":"        obj_extarq_list \u003d cls._from_db_object_list("}],"source_content_type":"text/x-python","patch_set":24,"id":"3fa7e38b_1892204d","line":103,"in_reply_to":"3fa7e38b_4328ae95","updated":"2019-09-27 15:10:56.000000000","message":"Done","commit_id":"8d3ab26d71c8d93a771ff271b5ef83f0476d5ba7"}],"cyborg/objects/extarq/ext_arq_job.py":[{"author":{"_account_id":21672,"name":"Sundar Nadathur","email":"sundar.nadathur@intel.com","username":"nsundar"},"change_message_id":"0d879c8dcf345151e1fbae4c3f2c22cc56da724e","unresolved":false,"context_lines":[{"line_number":48,"context_line":"    @classmethod"},{"line_number":49,"context_line":"    def get_suitable_ext_arq(cls, context, uuid):"},{"line_number":50,"context_line":"        \"\"\"From the inherit subclass find the suitable ExtARQ.\"\"\""},{"line_number":51,"context_line":"        obj \u003d cls.get(context, uuid)"},{"line_number":52,"context_line":"        typ, _ \u003d obj.get_resources_from_device_profile_group()"},{"line_number":53,"context_line":"        factory \u003d cls.factory(typ)"},{"line_number":54,"context_line":"        if factory !\u003d cls:"}],"source_content_type":"text/x-python","patch_set":24,"id":"3fa7e38b_352e0592","line":51,"updated":"2019-09-27 14:16:44.000000000","message":"Minor: Names like \u0027obj\u0027 are very generic. A better name is \u0027obj_extarq\u0027 (if there are db_extarq also involved) or just extarq.","commit_id":"8d3ab26d71c8d93a771ff271b5ef83f0476d5ba7"},{"author":{"_account_id":14131,"name":"shaohef","email":"shaohe.feng@intel.com","username":"shaohefeng"},"change_message_id":"af4a36fb0b9c508470251984eb1b21808e231876","unresolved":false,"context_lines":[{"line_number":48,"context_line":"    @classmethod"},{"line_number":49,"context_line":"    def get_suitable_ext_arq(cls, context, uuid):"},{"line_number":50,"context_line":"        \"\"\"From the inherit subclass find the suitable ExtARQ.\"\"\""},{"line_number":51,"context_line":"        obj \u003d cls.get(context, uuid)"},{"line_number":52,"context_line":"        typ, _ \u003d obj.get_resources_from_device_profile_group()"},{"line_number":53,"context_line":"        factory \u003d cls.factory(typ)"},{"line_number":54,"context_line":"        if factory !\u003d cls:"}],"source_content_type":"text/x-python","patch_set":24,"id":"3fa7e38b_38959c33","line":51,"in_reply_to":"3fa7e38b_352e0592","updated":"2019-09-27 15:10:56.000000000","message":"Done","commit_id":"8d3ab26d71c8d93a771ff271b5ef83f0476d5ba7"},{"author":{"_account_id":21672,"name":"Sundar Nadathur","email":"sundar.nadathur@intel.com","username":"nsundar"},"change_message_id":"0d879c8dcf345151e1fbae4c3f2c22cc56da724e","unresolved":false,"context_lines":[{"line_number":100,"context_line":"            cls.job_monitor, context, works_generator, arq_binds.keys())"},{"line_number":101,"context_line":""},{"line_number":102,"context_line":"    @classmethod"},{"line_number":103,"context_line":"    def check_binds_result(cls, context, extarqs):"},{"line_number":104,"context_line":"        \"\"\"Check the ARQ bind status result.\"\"\""},{"line_number":105,"context_line":"        # Batch get or get one by one? Maybe delete a ARQ"},{"line_number":106,"context_line":"        arq_uuids \u003d [ea.arq.uuid for ea in extarqs]"}],"source_content_type":"text/x-python","patch_set":24,"id":"3fa7e38b_f57f0d63","line":103,"updated":"2019-09-27 14:16:44.000000000","message":"Nit: Instead of \u0027binds\u0027, I\u0027d say \u0027bindings\u0027. But that\u0027s up to you.","commit_id":"8d3ab26d71c8d93a771ff271b5ef83f0476d5ba7"},{"author":{"_account_id":14131,"name":"shaohef","email":"shaohe.feng@intel.com","username":"shaohefeng"},"change_message_id":"af4a36fb0b9c508470251984eb1b21808e231876","unresolved":false,"context_lines":[{"line_number":100,"context_line":"            cls.job_monitor, context, works_generator, arq_binds.keys())"},{"line_number":101,"context_line":""},{"line_number":102,"context_line":"    @classmethod"},{"line_number":103,"context_line":"    def check_binds_result(cls, context, extarqs):"},{"line_number":104,"context_line":"        \"\"\"Check the ARQ bind status result.\"\"\""},{"line_number":105,"context_line":"        # Batch get or get one by one? Maybe delete a ARQ"},{"line_number":106,"context_line":"        arq_uuids \u003d [ea.arq.uuid for ea in extarqs]"}],"source_content_type":"text/x-python","patch_set":24,"id":"3fa7e38b_78a6b4ad","line":103,"in_reply_to":"3fa7e38b_f57f0d63","updated":"2019-09-27 15:10:56.000000000","message":"Done","commit_id":"8d3ab26d71c8d93a771ff271b5ef83f0476d5ba7"}],"cyborg/objects/extarq/fpga_ext_arq.py":[{"author":{"_account_id":14131,"name":"shaohef","email":"shaohe.feng@intel.com","username":"shaohefeng"},"change_message_id":"bd90890505d262d672aa781f8f49e0982ed6963f","unresolved":false,"context_lines":[{"line_number":145,"context_line":"        bs_md \u003d self.get_bitstream_md(context, deployable, fun_id, bs_id)"},{"line_number":146,"context_line":"        ok \u003d False"},{"line_number":147,"context_line":"        if bs_md:"},{"line_number":148,"context_line":"            ok \u003d self.do_programming(context, deployable, bs_id)"},{"line_number":149,"context_line":"        if ok:"},{"line_number":150,"context_line":"            fun_id \u003d fun_id or bs_md[constants.ACCEL_FUNCTION_ID]"},{"line_number":151,"context_line":"            self._update_placement(context, fun_id)"}],"source_content_type":"text/x-python","patch_set":19,"id":"3fa7e38b_7659ff32","line":148,"range":{"start_line":148,"start_character":58,"end_line":148,"end_character":63},"updated":"2019-09-26 13:15:50.000000000","message":"should be bs_md[\u0027id\u0027]","commit_id":"55c8c74257420cfaab5192999e62fb412dcf7039"},{"author":{"_account_id":21672,"name":"Sundar Nadathur","email":"sundar.nadathur@intel.com","username":"nsundar"},"change_message_id":"aec3ce2078be6078c27594848f1f18d049dc92bf","unresolved":false,"context_lines":[{"line_number":86,"context_line":"                        function_id)"},{"line_number":87,"context_line":"            return None"},{"line_number":88,"context_line":""},{"line_number":89,"context_line":"    def _is_need_program(self, context, deployable):"},{"line_number":90,"context_line":"        bs_id \u003d self._get_bitstream_id()"},{"line_number":91,"context_line":"        fun_id \u003d self._get_function_id()"},{"line_number":92,"context_line":"        if all([bs_id, fun_id]):"}],"source_content_type":"text/x-python","patch_set":20,"id":"3fa7e38b_97582b56","line":89,"updated":"2019-09-27 03:25:14.000000000","message":"Minor. Better name: _needs_programming.","commit_id":"9207d34f85ff863f6c68fcfcc73cc240f9278c30"},{"author":{"_account_id":14131,"name":"shaohef","email":"shaohe.feng@intel.com","username":"shaohefeng"},"change_message_id":"a7c45ba4532842f3bcbb064b4aa4b75bd8117132","unresolved":false,"context_lines":[{"line_number":86,"context_line":"                        function_id)"},{"line_number":87,"context_line":"            return None"},{"line_number":88,"context_line":""},{"line_number":89,"context_line":"    def _is_need_program(self, context, deployable):"},{"line_number":90,"context_line":"        bs_id \u003d self._get_bitstream_id()"},{"line_number":91,"context_line":"        fun_id \u003d self._get_function_id()"},{"line_number":92,"context_line":"        if all([bs_id, fun_id]):"}],"source_content_type":"text/x-python","patch_set":20,"id":"3fa7e38b_72349d93","line":89,"in_reply_to":"3fa7e38b_97582b56","updated":"2019-09-27 04:07:39.000000000","message":"Done","commit_id":"9207d34f85ff863f6c68fcfcc73cc240f9278c30"},{"author":{"_account_id":21672,"name":"Sundar Nadathur","email":"sundar.nadathur@intel.com","username":"nsundar"},"change_message_id":"aec3ce2078be6078c27594848f1f18d049dc92bf","unresolved":false,"context_lines":[{"line_number":185,"context_line":""},{"line_number":186,"context_line":"        function_id \u003d function_id.upper().replace(\u0027-\u0027, \u0027_-\u0027)"},{"line_number":187,"context_line":"        # TODO(Sundar) Validate this is a valid trait name"},{"line_number":188,"context_line":"        # TODO(Sundar) Add vendor name to trait to match spec"},{"line_number":189,"context_line":"        trait_names \u003d [\"_\".join((constants.FPGA_FUNCTION_ID, function_id))]"},{"line_number":190,"context_line":"        try:"},{"line_number":191,"context_line":"            placement.add_traits_to_rp("}],"source_content_type":"text/x-python","patch_set":20,"id":"3fa7e38b_972d8ba9","line":188,"updated":"2019-09-27 03:25:14.000000000","message":"I missed adding the vendor name to trait here; I did it only in ../ext_arq.py.","commit_id":"9207d34f85ff863f6c68fcfcc73cc240f9278c30"},{"author":{"_account_id":14131,"name":"shaohef","email":"shaohe.feng@intel.com","username":"shaohefeng"},"change_message_id":"a7c45ba4532842f3bcbb064b4aa4b75bd8117132","unresolved":false,"context_lines":[{"line_number":185,"context_line":""},{"line_number":186,"context_line":"        function_id \u003d function_id.upper().replace(\u0027-\u0027, \u0027_-\u0027)"},{"line_number":187,"context_line":"        # TODO(Sundar) Validate this is a valid trait name"},{"line_number":188,"context_line":"        # TODO(Sundar) Add vendor name to trait to match spec"},{"line_number":189,"context_line":"        trait_names \u003d [\"_\".join((constants.FPGA_FUNCTION_ID, function_id))]"},{"line_number":190,"context_line":"        try:"},{"line_number":191,"context_line":"            placement.add_traits_to_rp("}],"source_content_type":"text/x-python","patch_set":20,"id":"3fa7e38b_322aa52b","line":188,"in_reply_to":"3fa7e38b_972d8ba9","updated":"2019-09-27 04:07:39.000000000","message":"Done","commit_id":"9207d34f85ff863f6c68fcfcc73cc240f9278c30"},{"author":{"_account_id":21672,"name":"Sundar Nadathur","email":"sundar.nadathur@intel.com","username":"nsundar"},"change_message_id":"aec3ce2078be6078c27594848f1f18d049dc92bf","unresolved":false,"context_lines":[{"line_number":203,"context_line":"                 trait_names, self.arq.device_rp_uuid)"},{"line_number":204,"context_line":""},{"line_number":205,"context_line":"    # FIXME(Shaohe) hostname, db_deployable,"},{"line_number":206,"context_line":"    def do_programming(self, context, deployable, bitstream_id):"},{"line_number":207,"context_line":"        \"\"\"FPGA program.\"\"\""},{"line_number":208,"context_line":"        return self._do_programming(context, deployable, bitstream_id)"},{"line_number":209,"context_line":""}],"source_content_type":"text/x-python","patch_set":20,"id":"3fa7e38b_5734f3fb","line":206,"updated":"2019-09-27 03:25:14.000000000","message":"Why do we this and _do_programming below? Can be unified.","commit_id":"9207d34f85ff863f6c68fcfcc73cc240f9278c30"},{"author":{"_account_id":14131,"name":"shaohef","email":"shaohe.feng@intel.com","username":"shaohefeng"},"change_message_id":"a7c45ba4532842f3bcbb064b4aa4b75bd8117132","unresolved":false,"context_lines":[{"line_number":203,"context_line":"                 trait_names, self.arq.device_rp_uuid)"},{"line_number":204,"context_line":""},{"line_number":205,"context_line":"    # FIXME(Shaohe) hostname, db_deployable,"},{"line_number":206,"context_line":"    def do_programming(self, context, deployable, bitstream_id):"},{"line_number":207,"context_line":"        \"\"\"FPGA program.\"\"\""},{"line_number":208,"context_line":"        return self._do_programming(context, deployable, bitstream_id)"},{"line_number":209,"context_line":""}],"source_content_type":"text/x-python","patch_set":20,"id":"3fa7e38b_f21f2d05","line":206,"in_reply_to":"3fa7e38b_5734f3fb","updated":"2019-09-27 04:07:39.000000000","message":"Done","commit_id":"9207d34f85ff863f6c68fcfcc73cc240f9278c30"}],"cyborg/tests/unit/fake_extarq.py":[{"author":{"_account_id":21672,"name":"Sundar Nadathur","email":"sundar.nadathur@intel.com","username":"nsundar"},"change_message_id":"0d879c8dcf345151e1fbae4c3f2c22cc56da724e","unresolved":false,"context_lines":[{"line_number":34,"context_line":"        \"device_profile_group\": {"},{"line_number":35,"context_line":"            \"trait:CUSTOM_FPGA_INTEL\": \"required\","},{"line_number":36,"context_line":"            \"resources:FPGA\": \"1\","},{"line_number":37,"context_line":"            \"trait:CUSTOM_FPGA_FUNCTION_ID_INTEL_\""},{"line_number":38,"context_line":"            \"F7DF405CBD7ACF7222F144B0B93ACD18\": \"required\","},{"line_number":39,"context_line":"            \"accel:bitstream_id\": \"b069d97a-010a-4057-b70d-eca2b337fc9c\"}"},{"line_number":40,"context_line":"    }"}],"source_content_type":"text/x-python","patch_set":24,"id":"3fa7e38b_35d84579","line":37,"updated":"2019-09-27 14:16:44.000000000","message":"This is not in key-value form. More importantly, we should not have \u0027accel:bitstream_id\u0027 and \u0027trait:..FUNCTION_ID_...\" in same device profile group -- former is for FPGA aaS and latter for AFaaS.","commit_id":"8d3ab26d71c8d93a771ff271b5ef83f0476d5ba7"},{"author":{"_account_id":14131,"name":"shaohef","email":"shaohe.feng@intel.com","username":"shaohefeng"},"change_message_id":"af4a36fb0b9c508470251984eb1b21808e231876","unresolved":false,"context_lines":[{"line_number":34,"context_line":"        \"device_profile_group\": {"},{"line_number":35,"context_line":"            \"trait:CUSTOM_FPGA_INTEL\": \"required\","},{"line_number":36,"context_line":"            \"resources:FPGA\": \"1\","},{"line_number":37,"context_line":"            \"trait:CUSTOM_FPGA_FUNCTION_ID_INTEL_\""},{"line_number":38,"context_line":"            \"F7DF405CBD7ACF7222F144B0B93ACD18\": \"required\","},{"line_number":39,"context_line":"            \"accel:bitstream_id\": \"b069d97a-010a-4057-b70d-eca2b337fc9c\"}"},{"line_number":40,"context_line":"    }"}],"source_content_type":"text/x-python","patch_set":24,"id":"3fa7e38b_38befcb3","line":37,"in_reply_to":"3fa7e38b_35d84579","updated":"2019-09-27 15:10:56.000000000","message":"Done","commit_id":"8d3ab26d71c8d93a771ff271b5ef83f0476d5ba7"}]}
