)]}'
{"cyborg/accelerator/drivers/hpts/__init__.py":[{"author":{"_account_id":17813,"name":"wangzhh","email":"wzh_1993@126.com","username":"wangzhh"},"change_message_id":"793bc2ffd593c3c17b79cc21b1cc6d934aa441fb","unresolved":false,"context_lines":[{"line_number":26,"context_line":"\r"},{"line_number":27,"context_line":"\r"},{"line_number":28,"context_line":"def load_hpts_vendor_driver():\r"},{"line_number":29,"context_line":"    files \u003d glob.glob(os.path.join(os.path.dirname(__file__), \"*/driver*\"))\r"},{"line_number":30,"context_line":"    modules \u003d set(map(lambda s: \".\".join(s.rsplit(\".\")[0].rsplit(\"/\", 2)[-2:]),\r"},{"line_number":31,"context_line":"                      files))\r"},{"line_number":32,"context_line":"    for m in modules:\r"}],"source_content_type":"text/x-python","patch_set":4,"id":"5f7c97a3_491de3bd","line":29,"updated":"2018-08-03 02:20:00.000000000","message":"I noticed that this load method is the same as fpga. Does HPTS have specific sign? I mean that if we have fpga on host, agent will load hpts driver, It\u0027s not reasonable.","commit_id":"97de221141c063d529a9aa19c8ddd77f0e520e10"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"91946aa91321a8d6a164d586e6ce7525f5e8b378","unresolved":false,"context_lines":[{"line_number":25,"context_line":"LOG \u003d logging.getLogger(__name__)\r"},{"line_number":26,"context_line":"\r"},{"line_number":27,"context_line":"\r"},{"line_number":28,"context_line":"def load_hpts_vendor_driver():\r"},{"line_number":29,"context_line":"    files \u003d glob.glob(os.path.join(os.path.dirname(__file__), \"*/driver*\"))\r"},{"line_number":30,"context_line":"    modules \u003d set(map(lambda s: \".\".join(s.rsplit(\".\")[0].rsplit(\"/\", 2)[-2:]),\r"},{"line_number":31,"context_line":"                      files))\r"},{"line_number":32,"context_line":"    for m in modules:\r"},{"line_number":33,"context_line":"        try:\r"},{"line_number":34,"context_line":"            __import__(\".\".join([__package__, m]))\r"},{"line_number":35,"context_line":"            LOG.debug(\"Successfully loaded HPTS vendor driver: %s.\" % m)\r"},{"line_number":36,"context_line":"        except ImportError as e:\r"},{"line_number":37,"context_line":"            LOG.error(\"Failed to load HPTS vendor driver: %s. Details: %s\"\r"},{"line_number":38,"context_line":"                      % (m, e))\r"},{"line_number":39,"context_line":"\r"},{"line_number":40,"context_line":"\r"},{"line_number":41,"context_line":"load_hpts_vendor_driver()\r"}],"source_content_type":"text/x-python","patch_set":9,"id":"3f79a3b5_997b29bd","line":41,"range":{"start_line":28,"start_character":1,"end_line":41,"end_character":25},"updated":"2018-08-30 09:26:59.000000000","message":"this should likely be converted to setvador before merging","commit_id":"be8b19bc13aa056529a902ea490c96d484946c20"}],"cyborg/accelerator/drivers/hpts/base.py":[{"author":{"_account_id":21672,"name":"Sundar Nadathur","email":"sundar.nadathur@intel.com","username":"nsundar"},"change_message_id":"522c2aae1a228a78ee0dcbb6db0f8599acb5772e","unresolved":false,"context_lines":[{"line_number":28,"context_line":"HPTS_VENDOR_LIST \u003d [\u0027ZTE\u0027]"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"class HPTSDriver(object):"},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"    \"\"\"Base class for HPTS drivers."},{"line_number":34,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"7faddb67_b95c4019","line":31,"updated":"2019-08-09 07:30:25.000000000","message":"This should inherit from the GenericDriver [1].\n\n[1] https://opendev.org/openstack/cyborg/src/branch/master/cyborg/accelerator/drivers/driver.py","commit_id":"4cb7ee640af3bc43400f85dd190f6a7b8da701e2"}],"cyborg/accelerator/drivers/hpts/rpcapi.py":[{"author":{"_account_id":17813,"name":"wangzhh","email":"wzh_1993@126.com","username":"wangzhh"},"change_message_id":"793bc2ffd593c3c17b79cc21b1cc6d934aa441fb","unresolved":false,"context_lines":[{"line_number":20,"context_line":"\r"},{"line_number":21,"context_line":"from oslo_config import cfg\r"},{"line_number":22,"context_line":"import oslo_messaging as messaging\r"},{"line_number":23,"context_line":"from cyborg.common import rpc\r"},{"line_number":24,"context_line":"from cyborg.common import constants\r"},{"line_number":25,"context_line":"\r"},{"line_number":26,"context_line":"\r"}],"source_content_type":"text/x-python","patch_set":4,"id":"5f7c97a3_c981f34e","line":23,"updated":"2018-08-03 02:20:00.000000000","message":"Plz remove unused import.","commit_id":"97de221141c063d529a9aa19c8ddd77f0e520e10"},{"author":{"_account_id":17813,"name":"wangzhh","email":"wzh_1993@126.com","username":"wangzhh"},"change_message_id":"793bc2ffd593c3c17b79cc21b1cc6d934aa441fb","unresolved":false,"context_lines":[{"line_number":42,"context_line":"\r"},{"line_number":43,"context_line":"    def __init__(self, topic\u003dNone):\r"},{"line_number":44,"context_line":"        super(HPTSAPI, self).__init__()\r"},{"line_number":45,"context_line":"        self.topic \u003d topic or constants.HPTS_TOPIC\r"},{"line_number":46,"context_line":"        messaging.set_transport_defaults(control_exchange\u003d\u0027cyborg\u0027)\r"},{"line_number":47,"context_line":"\r"},{"line_number":48,"context_line":"        transport \u003d messaging.get_transport(cfg.CONF)\r"}],"source_content_type":"text/x-python","patch_set":4,"id":"5f7c97a3_29a7470d","line":45,"updated":"2018-08-03 02:20:00.000000000","message":"constants.HPTS_TOPIC does not exist.","commit_id":"97de221141c063d529a9aa19c8ddd77f0e520e10"},{"author":{"_account_id":17813,"name":"wangzhh","email":"wzh_1993@126.com","username":"wangzhh"},"change_message_id":"793bc2ffd593c3c17b79cc21b1cc6d934aa441fb","unresolved":false,"context_lines":[{"line_number":43,"context_line":"    def __init__(self, topic\u003dNone):\r"},{"line_number":44,"context_line":"        super(HPTSAPI, self).__init__()\r"},{"line_number":45,"context_line":"        self.topic \u003d topic or constants.HPTS_TOPIC\r"},{"line_number":46,"context_line":"        messaging.set_transport_defaults(control_exchange\u003d\u0027cyborg\u0027)\r"},{"line_number":47,"context_line":"\r"},{"line_number":48,"context_line":"        transport \u003d messaging.get_transport(cfg.CONF)\r"},{"line_number":49,"context_line":"        target \u003d messaging.Target(topic\u003dself.topic)\r"}],"source_content_type":"text/x-python","patch_set":4,"id":"5f7c97a3_e9faafb9","line":46,"updated":"2018-08-03 02:20:00.000000000","message":"`control_exchange ` loads from the CONF. It\u0027s global. You needn\u0027t set it here.","commit_id":"97de221141c063d529a9aa19c8ddd77f0e520e10"},{"author":{"_account_id":17813,"name":"wangzhh","email":"wzh_1993@126.com","username":"wangzhh"},"change_message_id":"793bc2ffd593c3c17b79cc21b1cc6d934aa441fb","unresolved":false,"context_lines":[{"line_number":47,"context_line":"\r"},{"line_number":48,"context_line":"        transport \u003d messaging.get_transport(cfg.CONF)\r"},{"line_number":49,"context_line":"        target \u003d messaging.Target(topic\u003dself.topic)\r"},{"line_number":50,"context_line":"        self.client \u003d messaging.RPCClient(transport, target)\r"},{"line_number":51,"context_line":"\r"},{"line_number":52,"context_line":"    def rpc_cmd(self, cmd, obj_hpts):\r"},{"line_number":53,"context_line":"        \"\"\"\r"}],"source_content_type":"text/x-python","patch_set":4,"id":"5f7c97a3_a9fef76a","line":50,"updated":"2018-08-03 02:20:00.000000000","message":"It\u0027s better to set a `timeout`(like 10s or less) here, for the default timeout for rpc_response_timeout\u003d60(s), It will block periodic task(update_usage) for a long time if HPTS RPC Server is not ready.","commit_id":"97de221141c063d529a9aa19c8ddd77f0e520e10"},{"author":{"_account_id":17813,"name":"wangzhh","email":"wzh_1993@126.com","username":"wangzhh"},"change_message_id":"793bc2ffd593c3c17b79cc21b1cc6d934aa441fb","unresolved":false,"context_lines":[{"line_number":60,"context_line":"        cctxt \u003d self.client.prepare()\r"},{"line_number":61,"context_line":"        try:\r"},{"line_number":62,"context_line":"            obj \u003d cctxt.call({}, cmd, arg\u003dobj_hpts)\r"},{"line_number":63,"context_line":"        except Exception as exc:\r"},{"line_number":64,"context_line":"            print \"HPTS RPC Server not ready.\"\r"},{"line_number":65,"context_line":"            return []\r"},{"line_number":66,"context_line":"\r"}],"source_content_type":"text/x-python","patch_set":4,"id":"5f7c97a3_a9e11734","line":63,"updated":"2018-08-03 02:20:00.000000000","message":"Plz use oslo_log, like LOG.error(\"Something\")","commit_id":"97de221141c063d529a9aa19c8ddd77f0e520e10"}],"cyborg/accelerator/drivers/hpts/zte/driver.py":[{"author":{"_account_id":14131,"name":"shaohef","email":"shaohe.feng@intel.com","username":"shaohefeng"},"change_message_id":"00994feb72601ab7ec621ae47b36602210a861ce","unresolved":false,"context_lines":[{"line_number":36,"context_line":"        \"\"\""},{"line_number":37,"context_line":"        Discover HPTS devices interface."},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"        Send discover request to ZTE HPTS driver model\u0027s RPC server."},{"line_number":40,"context_line":"        That return all HPTS devices."},{"line_number":41,"context_line":"        \"\"\""},{"line_number":42,"context_line":"        devices \u003d self.rpc.rpc_cmd(\u0027hpts_discover\u0027, \u0027\u0027)"}],"source_content_type":"text/x-python","patch_set":10,"id":"7faddb67_5a77050a","line":39,"range":{"start_line":39,"start_character":32,"end_line":39,"end_character":68},"updated":"2019-07-22 07:04:07.000000000","message":"Does this means this driver depends on a RPC server out of band ?","commit_id":"b868d156d860abc3435765cf270b409de5006b10"},{"author":{"_account_id":24872,"name":"YumengBao","email":"yumeng_bao@yahoo.com","username":"Yumeng_Bao"},"change_message_id":"5e494f2bedf0f68d2f2d4b20092e92749a7d2cba","unresolved":false,"context_lines":[{"line_number":36,"context_line":"        \"\"\""},{"line_number":37,"context_line":"        Discover HPTS devices interface."},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"        Send discover request to ZTE HPTS driver model\u0027s RPC server."},{"line_number":40,"context_line":"        That return all HPTS devices."},{"line_number":41,"context_line":"        \"\"\""},{"line_number":42,"context_line":"        devices \u003d self.rpc.rpc_cmd(\u0027hpts_discover\u0027, \u0027\u0027)"}],"source_content_type":"text/x-python","patch_set":10,"id":"7faddb67_d44f3390","line":39,"range":{"start_line":39,"start_character":32,"end_line":39,"end_character":68},"in_reply_to":"7faddb67_5a77050a","updated":"2019-07-23 11:13:49.000000000","message":"No, not really. This RPC server can be interpreted as the hardware\u0027s driver(not the driver in cyborg) in the real env, where it will interact with the driver in Cyborg to report device data.","commit_id":"b868d156d860abc3435765cf270b409de5006b10"}],"cyborg/tests/unit/accelerator/drivers/hpts/hptsrpc/hptsrpc/\u0027":[{"author":{"_account_id":17813,"name":"wangzhh","email":"wzh_1993@126.com","username":"wangzhh"},"change_message_id":"793bc2ffd593c3c17b79cc21b1cc6d934aa441fb","unresolved":false,"context_lines":[{"line_number":1,"context_line":"[\r"},{"line_number":2,"context_line":"    {\r"},{"line_number":3,"context_line":"        \"assignable\": false,\r"},{"line_number":4,"context_line":"        \"devices\": \"0000:5e:00.0\",\r"}],"source_content_type":"application/octet-stream","patch_set":4,"id":"5f7c97a3_a95a7782","line":1,"updated":"2018-08-03 02:20:00.000000000","message":"Could u rename this file? I\u0027m confused about it. :(","commit_id":"97de221141c063d529a9aa19c8ddd77f0e520e10"}],"cyborg/tests/unit/accelerator/drivers/hpts/rpcapi.py":[{"author":{"_account_id":17813,"name":"wangzhh","email":"wzh_1993@126.com","username":"wangzhh"},"change_message_id":"4719ec2e764241b29b8e989e36cfccdf3aaca100","unresolved":false,"context_lines":[{"line_number":29,"context_line":"    def tearDown(self):\r"},{"line_number":30,"context_line":"        super(TestHPTSAPI, self).tearDown()\r"},{"line_number":31,"context_line":"\r"},{"line_number":32,"context_line":"    def test_rpc_cmd(self):\r"},{"line_number":33,"context_line":"        rpc \u003d HPTSAPI()\r"},{"line_number":34,"context_line":"        expect \u003d []\r"},{"line_number":35,"context_line":"        devices \u003d rpc.rpc_cmd(\u0027hpts_discover\u0027, \u0027\u0027)\r"}],"source_content_type":"text/x-python","patch_set":7,"id":"3f79a3b5_7560b033","line":32,"updated":"2018-08-06 08:35:09.000000000","message":"Plz use mock for unit test here.","commit_id":"bd4c0450afdb91720188032dfe4a845b83006dc4"}],"cyborg/tests/unit/accelerator/drivers/hpts/simulation/devices/driver.py":[{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"91946aa91321a8d6a164d586e6ce7525f5e8b378","unresolved":false,"context_lines":[{"line_number":33,"context_line":"    def hpts_discover(self, ctx, arg):\r"},{"line_number":34,"context_line":"        devs \u003d []\r"},{"line_number":35,"context_line":"        # Simulation hardware data.\r"},{"line_number":36,"context_line":"        if os.path.exists(TEST_DATA_FILE):\r"},{"line_number":37,"context_line":"            with open(TEST_DATA_FILE, \"r\") as f:\r"},{"line_number":38,"context_line":"                devs \u003d json.load(f)\r"},{"line_number":39,"context_line":"        print \"devs\u003d\", devs\r"},{"line_number":40,"context_line":"        return devs\r"}],"source_content_type":"text/x-python","patch_set":9,"id":"3f79a3b5_841ae06c","line":37,"range":{"start_line":36,"start_character":4,"end_line":37,"end_character":48},"updated":"2018-08-30 09:26:59.000000000","message":"rather then doing this i would just embed the json as a string.  you are not really using any of the input argumetns to the fuction so there is no reason to not embed the data directly.","commit_id":"be8b19bc13aa056529a902ea490c96d484946c20"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"91946aa91321a8d6a164d586e6ce7525f5e8b378","unresolved":false,"context_lines":[{"line_number":36,"context_line":"        if os.path.exists(TEST_DATA_FILE):\r"},{"line_number":37,"context_line":"            with open(TEST_DATA_FILE, \"r\") as f:\r"},{"line_number":38,"context_line":"                devs \u003d json.load(f)\r"},{"line_number":39,"context_line":"        print \"devs\u003d\", devs\r"},{"line_number":40,"context_line":"        return devs\r"}],"source_content_type":"text/x-python","patch_set":9,"id":"3f79a3b5_591d9171","line":39,"range":{"start_line":39,"start_character":8,"end_line":39,"end_character":13},"updated":"2018-08-30 09:26:59.000000000","message":"you should really be loging hear instead of pringitn also you used the python2 only operator print not the python3 compatible print() fuction so this will not work in python3","commit_id":"be8b19bc13aa056529a902ea490c96d484946c20"}],"cyborg/tests/unit/accelerator/drivers/hpts/simulation/service.py":[{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"91946aa91321a8d6a164d586e6ce7525f5e8b378","unresolved":false,"context_lines":[{"line_number":67,"context_line":"    init(cfg.CONF)\r"},{"line_number":68,"context_line":"\r"},{"line_number":69,"context_line":"\r"},{"line_number":70,"context_line":"def main():\r"},{"line_number":71,"context_line":"    parse_args(sys.argv)\r"},{"line_number":72,"context_line":"    transport \u003d messaging.get_transport(cfg.CONF)\r"},{"line_number":73,"context_line":"\r"},{"line_number":74,"context_line":"    target \u003d messaging.Target(topic\u003dHPTS_TOPIC, server\u003dHOST)\r"},{"line_number":75,"context_line":"\r"},{"line_number":76,"context_line":"    endpoints \u003d [\r"},{"line_number":77,"context_line":"        driver.ZTEHPTSEndpoint()\r"},{"line_number":78,"context_line":"    ]\r"},{"line_number":79,"context_line":"\r"},{"line_number":80,"context_line":"    access_policy \u003d dispatcher.DefaultRPCAccessPolicy\r"},{"line_number":81,"context_line":"    server \u003d messaging.get_rpc_server(transport,\r"},{"line_number":82,"context_line":"                                      target, endpoints, executor\u003d\u0027threading\u0027)\r"},{"line_number":83,"context_line":"\r"},{"line_number":84,"context_line":"    print \"HPTS RPCR Server Start\"\r"},{"line_number":85,"context_line":"\r"},{"line_number":86,"context_line":"    try:\r"},{"line_number":87,"context_line":"        server.start()\r"},{"line_number":88,"context_line":"        while True:\r"},{"line_number":89,"context_line":"            time.sleep(1)\r"},{"line_number":90,"context_line":"\r"},{"line_number":91,"context_line":"    except KeyboardInterrupt:\r"},{"line_number":92,"context_line":"        print(\"Stopping server\")\r"},{"line_number":93,"context_line":"        server.stop()\r"},{"line_number":94,"context_line":"\r"},{"line_number":95,"context_line":"    server.wait()\r"},{"line_number":96,"context_line":"\r"},{"line_number":97,"context_line":"\r"},{"line_number":98,"context_line":"if __name__ \u003d\u003d \"__main__\":\r"},{"line_number":99,"context_line":"    sys.exit(main())\r"}],"source_content_type":"text/x-python","patch_set":9,"id":"3f79a3b5_046ed0c8","line":99,"range":{"start_line":70,"start_character":0,"end_line":99,"end_character":20},"updated":"2018-08-30 09:26:59.000000000","message":"this is not a unit test it is a fuctional test.\nyou are also not using any of the normal test runner code that is used in other opestack proejcts. this should be rewritten.","commit_id":"be8b19bc13aa056529a902ea490c96d484946c20"}]}
