)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"8ce15ad3dd12ca63788ac1c1a9d000ef7272e50f","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Add get_schema_helper_from_stream()"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"In order to support passive connection to IDL, we need to have the stream object to be created by the agent, pass it to idlutils in order to get the schema from teh OVSDB server, than leave it open for the agent to keep using it, without closing the connection as it is done in then current get_schema_helper() function."},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"Change-Id: I011e359b5b4d2abbf9bd749df81b3bad3b800614"},{"line_number":12,"context_line":"Note: The change of the IDL code to support passive mode was submitted to the OVS project. The change to the idlutils compliment the above."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"fa69d971_ca35e3a8","line":9,"updated":"2016-01-07 10:03:57.000000000","message":"line-wrap these at 72 chars","commit_id":"b064cf7c7838ef286c50c3c392421e5e3f075c30"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"8ce15ad3dd12ca63788ac1c1a9d000ef7272e50f","unresolved":false,"context_lines":[{"line_number":9,"context_line":"In order to support passive connection to IDL, we need to have the stream object to be created by the agent, pass it to idlutils in order to get the schema from teh OVSDB server, than leave it open for the agent to keep using it, without closing the connection as it is done in then current get_schema_helper() function."},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"Change-Id: I011e359b5b4d2abbf9bd749df81b3bad3b800614"},{"line_number":12,"context_line":"Note: The change of the IDL code to support passive mode was submitted to the OVS project. The change to the idlutils compliment the above."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"fa69d971_ea3a2798","line":12,"updated":"2016-01-07 10:03:57.000000000","message":"same here","commit_id":"b064cf7c7838ef286c50c3c392421e5e3f075c30"}],"neutron/agent/ovsdb/native/idlutils.py":[{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"8ce15ad3dd12ca63788ac1c1a9d000ef7272e50f","unresolved":false,"context_lines":[{"line_number":112,"context_line":"    return idl.SchemaHelper(None, resp.result)"},{"line_number":113,"context_line":""},{"line_number":114,"context_line":""},{"line_number":115,"context_line":"def get_schema_helper_from_stream(strm, schema_name):"},{"line_number":116,"context_line":"    rpc \u003d jsonrpc.Connection(strm)"},{"line_number":117,"context_line":"    req \u003d jsonrpc.Message.create_request(\u0027get_schema\u0027, [schema_name])"},{"line_number":118,"context_line":"    err, resp \u003d rpc.transact_block(req)"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa69d971_2aba7f0b","line":115,"updated":"2016-01-07 10:03:57.000000000","message":"how is this supposed to be used? Is it possible to add any kind of testing for this? Otherwise how are we supposed to evaluate this for correctness?","commit_id":"b064cf7c7838ef286c50c3c392421e5e3f075c30"},{"author":{"_account_id":16853,"name":"Ofer Ben-Yacov","email":"ofer.benyacov@gmail.com","username":"ofer.benyacov"},"change_message_id":"bbc817179273cee19f8c382bb4e8b56b7fd4357d","unresolved":false,"context_lines":[{"line_number":112,"context_line":"    return idl.SchemaHelper(None, resp.result)"},{"line_number":113,"context_line":""},{"line_number":114,"context_line":""},{"line_number":115,"context_line":"def get_schema_helper_from_stream(strm, schema_name):"},{"line_number":116,"context_line":"    rpc \u003d jsonrpc.Connection(strm)"},{"line_number":117,"context_line":"    req \u003d jsonrpc.Message.create_request(\u0027get_schema\u0027, [schema_name])"},{"line_number":118,"context_line":"    err, resp \u003d rpc.transact_block(req)"}],"source_content_type":"text/x-python","patch_set":1,"id":"7a5de9d1_6954eb20","line":115,"in_reply_to":"fa69d971_2aba7f0b","updated":"2016-02-02 15:33:04.000000000","message":"This is used for passive TCP connection support that is added to IDL.\n\nI can add this text (took it from my patch to openvswitch) that explains the usage:\n\nthis static method is similar to the original neutron method but the rpc.close() command that would result closing the socket.\n\nhelper \u003d idlutils.get_schema_helper_from_stream_no_close(\n session.stream,\u0027hardware_vtep\u0027)\nhelper.register_all()\nself.idl \u003d idl.Idl(self.connection, helper, session)\nidlutils.wait_for_change(self.idl, self.timeout)","commit_id":"b064cf7c7838ef286c50c3c392421e5e3f075c30"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"d0d6d97ea9534d1c52d42635f2f8a11c486e8262","unresolved":false,"context_lines":[{"line_number":112,"context_line":"    return idl.SchemaHelper(None, resp.result)"},{"line_number":113,"context_line":""},{"line_number":114,"context_line":""},{"line_number":115,"context_line":"# This method is similar to get_schema_helper() with without opening and"},{"line_number":116,"context_line":"# closing Stream. It is used for passive TCP connection. The Stream need to be"},{"line_number":117,"context_line":"# created and then pass to this method to get the schema from the database."},{"line_number":118,"context_line":"# When done, the stream will not be close as in get_schema_helper(), so the"}],"source_content_type":"text/x-python","patch_set":3,"id":"5a5ae5dd_17184474","line":115,"updated":"2016-02-07 08:50:42.000000000","message":"The comment of the function is usually inside the function. For example:\ndef get_schema_helper_from_stream():\n    \"\"\" The comment \"\"\"","commit_id":"cdcbcb4ad416d891de39b5cdd09731df0c620fef"},{"author":{"_account_id":16853,"name":"Ofer Ben-Yacov","email":"ofer.benyacov@gmail.com","username":"ofer.benyacov"},"change_message_id":"af882bedf07b8bd94d7e88d5c0a10a7bf2cfe7eb","unresolved":false,"context_lines":[{"line_number":112,"context_line":"    return idl.SchemaHelper(None, resp.result)"},{"line_number":113,"context_line":""},{"line_number":114,"context_line":""},{"line_number":115,"context_line":"# This method is similar to get_schema_helper() with without opening and"},{"line_number":116,"context_line":"# closing Stream. It is used for passive TCP connection. The Stream need to be"},{"line_number":117,"context_line":"# created and then pass to this method to get the schema from the database."},{"line_number":118,"context_line":"# When done, the stream will not be close as in get_schema_helper(), so the"}],"source_content_type":"text/x-python","patch_set":3,"id":"5a5ae5dd_11f846c2","line":115,"in_reply_to":"5a5ae5dd_17184474","updated":"2016-02-08 07:48:42.000000000","message":"Done","commit_id":"cdcbcb4ad416d891de39b5cdd09731df0c620fef"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"6179af8fd27774f968cb854647bb1c478055c674","unresolved":false,"context_lines":[{"line_number":117,"context_line":"# created and then pass to this method to get the schema from the database."},{"line_number":118,"context_line":"# When done, the stream will not be close as in get_schema_helper(), so the"},{"line_number":119,"context_line":"# connection will still be open after using this method."},{"line_number":120,"context_line":"def get_schema_helper_from_stream(strm, schema_name):"},{"line_number":121,"context_line":"    rpc \u003d jsonrpc.Connection(strm)"},{"line_number":122,"context_line":"    req \u003d jsonrpc.Message.create_request(\u0027get_schema\u0027, [schema_name])"},{"line_number":123,"context_line":"    err, resp \u003d rpc.transact_block(req)"}],"source_content_type":"text/x-python","patch_set":3,"id":"5a5ae5dd_a141933b","line":120,"updated":"2016-02-03 13:15:31.000000000","message":"can we please add a unit test for this?","commit_id":"cdcbcb4ad416d891de39b5cdd09731df0c620fef"},{"author":{"_account_id":16853,"name":"Ofer Ben-Yacov","email":"ofer.benyacov@gmail.com","username":"ofer.benyacov"},"change_message_id":"af882bedf07b8bd94d7e88d5c0a10a7bf2cfe7eb","unresolved":false,"context_lines":[{"line_number":117,"context_line":"# created and then pass to this method to get the schema from the database."},{"line_number":118,"context_line":"# When done, the stream will not be close as in get_schema_helper(), so the"},{"line_number":119,"context_line":"# connection will still be open after using this method."},{"line_number":120,"context_line":"def get_schema_helper_from_stream(strm, schema_name):"},{"line_number":121,"context_line":"    rpc \u003d jsonrpc.Connection(strm)"},{"line_number":122,"context_line":"    req \u003d jsonrpc.Message.create_request(\u0027get_schema\u0027, [schema_name])"},{"line_number":123,"context_line":"    err, resp \u003d rpc.transact_block(req)"}],"source_content_type":"text/x-python","patch_set":3,"id":"5a5ae5dd_b1c37237","line":120,"in_reply_to":"5a5ae5dd_9722f4a1","updated":"2016-02-08 07:48:42.000000000","message":"I\u0027m not sure this is the best way. If a stream is provided, the connection param will be None (we need either Connection or Stream to get the schema) so the function will be like that:\n\ndef get_schema_helper(connection\u003dNone, schema_name, strm\u003dNone):\n   ....\n\nthen we will have to do extra checking to make sure we get the right params.\n\n2 functions with different signature seems better.","commit_id":"cdcbcb4ad416d891de39b5cdd09731df0c620fef"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"d0d6d97ea9534d1c52d42635f2f8a11c486e8262","unresolved":false,"context_lines":[{"line_number":117,"context_line":"# created and then pass to this method to get the schema from the database."},{"line_number":118,"context_line":"# When done, the stream will not be close as in get_schema_helper(), so the"},{"line_number":119,"context_line":"# connection will still be open after using this method."},{"line_number":120,"context_line":"def get_schema_helper_from_stream(strm, schema_name):"},{"line_number":121,"context_line":"    rpc \u003d jsonrpc.Connection(strm)"},{"line_number":122,"context_line":"    req \u003d jsonrpc.Message.create_request(\u0027get_schema\u0027, [schema_name])"},{"line_number":123,"context_line":"    err, resp \u003d rpc.transact_block(req)"}],"source_content_type":"text/x-python","patch_set":3,"id":"5a5ae5dd_9722f4a1","line":120,"in_reply_to":"5a5ae5dd_a141933b","updated":"2016-02-07 08:50:42.000000000","message":"I think this function can be replaced by adding a param to the existing  get_schema_helper(). For example:\n\ndef get_schema_helper(connection, schema_name, strm\u003dNone):\n    if not strm:\n        # Create the connection.\n        ...","commit_id":"cdcbcb4ad416d891de39b5cdd09731df0c620fef"}]}
