)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"32150fd11fc33aaf83b0469bf4bfc6892404b973","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Description:"},{"line_number":10,"context_line":"Stale GRE and VXLAN tunnel endpoints persists in neutron db this should be"},{"line_number":11,"context_line":"deleted from the database. Also, if local_ip of CN or NN changes the"},{"line_number":12,"context_line":"stale tunnel ports and flows persists on br-tun on other CN\u0027s and NN\u0027s"},{"line_number":13,"context_line":"for that remote ip this should also be removed."},{"line_number":14,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":17,"id":"5a890539_0d01e805","line":11,"updated":"2014-11-14 19:21:04.000000000","message":"please explain what CN and NN are or use the extended words instead of the acronyms.","commit_id":"3a67ead24e0af6498d532d85c838445d0bf7ee20"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"854df8676f2465831513ded13e4897436b833679","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Description:"},{"line_number":10,"context_line":"Stale GRE and VXLAN tunnel endpoints persists in neutron db this should be"},{"line_number":11,"context_line":"deleted from the database. Also, if local_ip of CN or NN changes the"},{"line_number":12,"context_line":"stale tunnel ports and flows persists on br-tun on other CN\u0027s and NN\u0027s"},{"line_number":13,"context_line":"for that remote ip this should also be removed."},{"line_number":14,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":17,"id":"5a890539_5e06381e","line":11,"in_reply_to":"5a890539_0d01e805","updated":"2014-11-14 19:44:39.000000000","message":"CN --\u003e Compute Node\n NN --\u003e Network Node","commit_id":"3a67ead24e0af6498d532d85c838445d0bf7ee20"},{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"32150fd11fc33aaf83b0469bf4bfc6892404b973","unresolved":false,"context_lines":[{"line_number":13,"context_line":"for that remote ip this should also be removed."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Implementation:"},{"line_number":16,"context_line":"Added host column in \u0027ml2_vxlan_endpoints\u0027 and \u0027ml2_gre_endpoints\u0027 table."},{"line_number":17,"context_line":"Added delete_endpoint method for deleting the stale endpoints from db."},{"line_number":18,"context_line":"Added tunnel_delete rpc for removing stale ports and flows from br-tun."},{"line_number":19,"context_line":"tunnel_sync rpc signature upgrade to obtain \u0027host\u0027."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":17,"id":"5a890539_80011f6c","line":16,"updated":"2014-11-14 19:21:04.000000000","message":"The changes you list here could have been divided in several patch instead of having one big patch with all of them. My suggestion is to divide them, this would make the patch easier to review and it would get merged faster","commit_id":"3a67ead24e0af6498d532d85c838445d0bf7ee20"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"59e93883d30dccc71732fa007c731267f299f64f","unresolved":false,"context_lines":[{"line_number":13,"context_line":"for that remote ip this should also be removed."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Implementation:"},{"line_number":16,"context_line":"Added host column in \u0027ml2_vxlan_endpoints\u0027 and \u0027ml2_gre_endpoints\u0027 table."},{"line_number":17,"context_line":"Added delete_endpoint method for deleting the stale endpoints from db."},{"line_number":18,"context_line":"Added tunnel_delete rpc for removing stale ports and flows from br-tun."},{"line_number":19,"context_line":"tunnel_sync rpc signature upgrade to obtain \u0027host\u0027."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":17,"id":"5a890539_b9cf367e","line":16,"in_reply_to":"5a890539_431f416c","updated":"2014-11-14 20:32:22.000000000","message":"Typically, the move from type_vxlan to type_tunnel should be done in a parent change as it\u0027s not directly related to the change.\n\nMoreover, currently, it\u0027s really difficult to differentiate the code moved from type_vxlan to type_tunnel and the code added/updated in type_tunnel/vxlan.","commit_id":"3a67ead24e0af6498d532d85c838445d0bf7ee20"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"854df8676f2465831513ded13e4897436b833679","unresolved":false,"context_lines":[{"line_number":13,"context_line":"for that remote ip this should also be removed."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Implementation:"},{"line_number":16,"context_line":"Added host column in \u0027ml2_vxlan_endpoints\u0027 and \u0027ml2_gre_endpoints\u0027 table."},{"line_number":17,"context_line":"Added delete_endpoint method for deleting the stale endpoints from db."},{"line_number":18,"context_line":"Added tunnel_delete rpc for removing stale ports and flows from br-tun."},{"line_number":19,"context_line":"tunnel_sync rpc signature upgrade to obtain \u0027host\u0027."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":17,"id":"5a890539_431f416c","line":16,"in_reply_to":"5a890539_80011f6c","updated":"2014-11-14 19:44:39.000000000","message":"Nice suggestion. I initially thought the same but didn\u0027t find the way.\n\nKindly, suggest some options !!!\n\nWe have to ensure that each dependent patch-set should pass Jenkins.\n\nIf you look at neutron/tests/unit/ml2/test_type_tunnel.py most of the code is moved from test_type_vxlan.py that increased the LOC.","commit_id":"3a67ead24e0af6498d532d85c838445d0bf7ee20"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"00a92bf60c4fc0e961fd99d832149fbbc5b0de99","unresolved":false,"context_lines":[{"line_number":13,"context_line":"for that remote ip this should also be removed."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Implementation:"},{"line_number":16,"context_line":"Added host column in \u0027ml2_vxlan_endpoints\u0027 and \u0027ml2_gre_endpoints\u0027 table."},{"line_number":17,"context_line":"Added delete_endpoint method for deleting the stale endpoints from db."},{"line_number":18,"context_line":"Added tunnel_delete rpc for removing stale ports and flows from br-tun."},{"line_number":19,"context_line":"tunnel_sync rpc signature upgrade to obtain \u0027host\u0027."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":17,"id":"5a890539_e3e024fc","line":16,"in_reply_to":"5a890539_b9cf367e","updated":"2014-11-15 07:16:57.000000000","message":"Done","commit_id":"3a67ead24e0af6498d532d85c838445d0bf7ee20"},{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"32150fd11fc33aaf83b0469bf4bfc6892404b973","unresolved":false,"context_lines":[{"line_number":21,"context_line":"added testcases for TunnelRpcCallbackMixin() into it."},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"Closes-Bug: #1179223"},{"line_number":24,"context_line":"Closes-Bug: #1381071"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"Co-Authored-By: phanipawan \u003cppawan@hp.com\u003e"},{"line_number":27,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":17,"id":"5a890539_6097d33a","line":24,"updated":"2014-11-14 19:21:04.000000000","message":"DocImpact flag is needed for this change","commit_id":"3a67ead24e0af6498d532d85c838445d0bf7ee20"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"854df8676f2465831513ded13e4897436b833679","unresolved":false,"context_lines":[{"line_number":21,"context_line":"added testcases for TunnelRpcCallbackMixin() into it."},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"Closes-Bug: #1179223"},{"line_number":24,"context_line":"Closes-Bug: #1381071"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"Co-Authored-By: phanipawan \u003cppawan@hp.com\u003e"},{"line_number":27,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":17,"id":"5a890539_2365d51d","line":24,"in_reply_to":"5a890539_6097d33a","updated":"2014-11-14 19:44:39.000000000","message":"I am not sure.Please let me know what could be the DocImpact?","commit_id":"3a67ead24e0af6498d532d85c838445d0bf7ee20"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"fee60089abbdac1d5f1e4acf6ac86a66b533a9e5","unresolved":false,"context_lines":[{"line_number":3,"context_line":"AuthorDate: 2014-09-11 23:26:57 -0700"},{"line_number":4,"context_line":"Commit:     Romil Gupta \u003cromilg@hp.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2014-11-16 10:34:02 -0800"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Stale VXLAN and GRE tunnel port/flow deletion"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Description:"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":18,"id":"5a890539_87d6f525","line":6,"updated":"2014-11-20 12:46:29.000000000","message":"Could you please suggest some ways to split the patch-set into multiple dependent patch-sets, \nI find it quite difficult. We need to consider UT\u0027s also.\n\nOne way I could propose is given below:\n\n A. Plugin specific changes:\n     1. 38495dc99731_ml2_tunnel_endpoints_table.py\n     2. type_tunnel\n     3. type_gre\n     4. type_vxlan\n     5. corresponding UT\u0027s\n     Total LOC \u003d 500+ approx.\n\n B. Agent specific changes:\n     1. ovs agent\n     2. ofagent etc..\n     3. rpc changes\n     4. corresponding UT\u0027s\n     Total LOC \u003d 100+ approx.\n\nDo you think its worth to do above mentioned way?","commit_id":"87fd4f6ea9a091ef5447ef9026f43c5d00428d48"},{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"a7d27c92063040ab694b460aa52ac0ec218ca260","unresolved":false,"context_lines":[{"line_number":3,"context_line":"AuthorDate: 2014-09-11 23:26:57 -0700"},{"line_number":4,"context_line":"Commit:     Romil Gupta \u003cromilg@hp.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2014-11-16 10:34:02 -0800"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Stale VXLAN and GRE tunnel port/flow deletion"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Description:"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":18,"id":"5a890539_f6fda8b2","line":6,"in_reply_to":"5a890539_87d6f525","updated":"2014-11-20 15:09:57.000000000","message":"How about:\n\n1) table modifications and migration scripts\n2) tunnel_delete rpc\n3) tunnel_sync rpc modification\n\nYou can add the unit tests where they better fit","commit_id":"87fd4f6ea9a091ef5447ef9026f43c5d00428d48"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"a2e13e89d093c23633728efaf875e6cc3a489037","unresolved":false,"context_lines":[{"line_number":3,"context_line":"AuthorDate: 2014-09-11 23:26:57 -0700"},{"line_number":4,"context_line":"Commit:     Romil Gupta \u003cromilg@hp.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2014-11-16 10:34:02 -0800"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Stale VXLAN and GRE tunnel port/flow deletion"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Description:"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":18,"id":"5a890539_877b4c28","line":6,"in_reply_to":"5a890539_f6fda8b2","updated":"2014-11-20 15:56:43.000000000","message":"Fine, I will post a dependent patch-set which just deals with RPC related changes.","commit_id":"87fd4f6ea9a091ef5447ef9026f43c5d00428d48"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"b74e1aba4fe79bd4b09c98b28090a3e59ef9bcd2","unresolved":false,"context_lines":[{"line_number":22,"context_line":"Modified testcases in test_type_gre.py"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"Agent changes:"},{"line_number":25,"context_line":"Added tunnel_delete rpc for removing stale ports and flows from br-tun."},{"line_number":26,"context_line":"tunnel_sync rpc signature upgrade to obtain \u0027host\u0027."},{"line_number":27,"context_line":"Added testcases for TunnelRpcCallbackMixin()."},{"line_number":28,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":27,"id":"5a890539_00478bbd","line":25,"updated":"2014-11-27 00:33:47.000000000","message":"these changes are not here.","commit_id":"9862d81db5aae9f1234a163938873705bb104269"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"c231022d03ad8ed3eab303eaff07b39101b7ef68","unresolved":false,"context_lines":[{"line_number":22,"context_line":"Modified testcases in test_type_gre.py"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"Agent changes:"},{"line_number":25,"context_line":"Added tunnel_delete rpc for removing stale ports and flows from br-tun."},{"line_number":26,"context_line":"tunnel_sync rpc signature upgrade to obtain \u0027host\u0027."},{"line_number":27,"context_line":"Added testcases for TunnelRpcCallbackMixin()."},{"line_number":28,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":27,"id":"5a890539_24b7363c","line":25,"in_reply_to":"5a890539_00478bbd","updated":"2014-11-27 08:55:43.000000000","message":"Yes, these changes are part of the dependent patch-set. I have clearly mentioned below this patch-set basically deals with plugin side changes.","commit_id":"9862d81db5aae9f1234a163938873705bb104269"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"b74e1aba4fe79bd4b09c98b28090a3e59ef9bcd2","unresolved":false,"context_lines":[{"line_number":30,"context_line":""},{"line_number":31,"context_line":"Partial-Bug: #1179223"},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"DocImpact"},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"Change-Id: I75c6581fcc9f47a68bde29cbefcaa1a2a082344e"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":27,"id":"5a890539_6015af9a","line":33,"updated":"2014-11-27 00:33:47.000000000","message":"DocImpact why? I couldn\u0027t trace the reason in the patch history.","commit_id":"9862d81db5aae9f1234a163938873705bb104269"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"c231022d03ad8ed3eab303eaff07b39101b7ef68","unresolved":false,"context_lines":[{"line_number":30,"context_line":""},{"line_number":31,"context_line":"Partial-Bug: #1179223"},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"DocImpact"},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"Change-Id: I75c6581fcc9f47a68bde29cbefcaa1a2a082344e"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":27,"id":"5a890539_c4a832de","line":33,"in_reply_to":"5a890539_6015af9a","updated":"2014-11-27 08:55:43.000000000","message":"I am also not sure. Some reviewer told me to add it.\nIf you think its not required I will remove it.","commit_id":"9862d81db5aae9f1234a163938873705bb104269"}],"neutron/agent/rpc.py":[{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"e4a4d54bca2a178b481f77175d140d4ad4e4cce7","unresolved":false,"context_lines":[{"line_number":71,"context_line":"        else:"},{"line_number":72,"context_line":"            return self.cast(context, msg)"},{"line_number":73,"context_line":""},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"class PluginApi(n_rpc.RpcProxy):"},{"line_number":76,"context_line":"    \u0027\u0027\u0027Agent side of the rpc API."},{"line_number":77,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"da9df570_04a9e8de","line":74,"updated":"2014-09-25 09:23:29.000000000","message":"This class is not only for ML2 plugin, and it is used by several plugins/agents. This patch changes the method signature, so we need to investigate the affect to plugins than ML2 super carefully at the moment of the release cycle. At a quick look, tunnel_sync is only used by ovs and ofa agent, so the change seems safe.","commit_id":"25d745021b343ef8194bfb2f9e6d149618323d5b"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"1f80c755e4aa85db38cc090c5803c55b8adaed82","unresolved":false,"context_lines":[{"line_number":71,"context_line":"        else:"},{"line_number":72,"context_line":"            return self.cast(context, msg)"},{"line_number":73,"context_line":""},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"class PluginApi(n_rpc.RpcProxy):"},{"line_number":76,"context_line":"    \u0027\u0027\u0027Agent side of the rpc API."},{"line_number":77,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"da9df570_fb339f5f","line":74,"in_reply_to":"da9df570_04a9e8de","updated":"2014-09-25 14:27:01.000000000","message":"Done","commit_id":"25d745021b343ef8194bfb2f9e6d149618323d5b"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"e4a4d54bca2a178b481f77175d140d4ad4e4cce7","unresolved":false,"context_lines":[{"line_number":129,"context_line":"    def tunnel_sync(self, context, tunnel_ip, tunnel_types\u003dNone, host\u003dNone):"},{"line_number":130,"context_line":"        return self.call(context,"},{"line_number":131,"context_line":"                         self.make_msg(\u0027tunnel_sync\u0027, tunnel_ip\u003dtunnel_ip,"},{"line_number":132,"context_line":"                                       tunnel_types\u003dtunnel_types, host\u003dhost))"}],"source_content_type":"text/x-python","patch_set":6,"id":"da9df570_e1ae9680","line":132,"updated":"2014-09-25 09:23:29.000000000","message":"Changing tunnel_type to tunnel_types is a backward-incompatible change, You need to ensure the old and new version of RPC work at the same time to allow rolling-upgrade.\n\nIn addition, RPC version must be specified.\n\n  self.make_msg(.....\n                version\u003d\u00271.4\u0027)","commit_id":"25d745021b343ef8194bfb2f9e6d149618323d5b"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"1f80c755e4aa85db38cc090c5803c55b8adaed82","unresolved":false,"context_lines":[{"line_number":129,"context_line":"    def tunnel_sync(self, context, tunnel_ip, tunnel_types\u003dNone, host\u003dNone):"},{"line_number":130,"context_line":"        return self.call(context,"},{"line_number":131,"context_line":"                         self.make_msg(\u0027tunnel_sync\u0027, tunnel_ip\u003dtunnel_ip,"},{"line_number":132,"context_line":"                                       tunnel_types\u003dtunnel_types, host\u003dhost))"}],"source_content_type":"text/x-python","patch_set":6,"id":"da9df570_3b41a7a9","line":132,"in_reply_to":"da9df570_e1ae9680","updated":"2014-09-25 14:27:01.000000000","message":"Done","commit_id":"25d745021b343ef8194bfb2f9e6d149618323d5b"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"4f195b718b2e1bf30c9d76919367a5dc2b156b94","unresolved":false,"context_lines":[{"line_number":132,"context_line":"        return self.call(context,"},{"line_number":133,"context_line":"                         self.make_msg(\u0027tunnel_sync\u0027, tunnel_ip\u003dtunnel_ip,"},{"line_number":134,"context_line":"                                       tunnel_types\u003dtunnel_types, host\u003dhost),"},{"line_number":135,"context_line":"                         version\u003d\u00271.4\u0027)"}],"source_content_type":"text/x-python","patch_set":7,"id":"da9df570_60c360ed","line":135,"updated":"2014-09-26 08:30:01.000000000","message":"Do we need to change it like this:\n\n        res \u003d []\n        try:\n            res \u003d self.call(context,\n                         self.make_msg(\u0027tunnel_sync\u0027, tunnel_ip\u003dtunnel_ip,\n                                       tunnel_types\u003dtunnel_types, host\u003dhost),\n                         version\u003d\u00271.4\u0027)\n        except messaging.UnsupportedVersion:\n            LOG.warn(_(\u0027 tunnel sync requires a server upgrade.\u0027))\n            res \u003d [\n                self.call(context,\n                         self.make_msg(\u0027tunnel_sync\u0027, tunnel_ip\u003dtunnel_ip,\n                                       tunnel_type\u003dtunnel_type))\n                for tunnel_type in tunnel_types\n            ]\n        return res\n\nPlease suggest?","commit_id":"2204802effe1b4470e5ac985e473595124fd6085"},{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"32150fd11fc33aaf83b0469bf4bfc6892404b973","unresolved":false,"context_lines":[{"line_number":131,"context_line":"        return self.call(context,"},{"line_number":132,"context_line":"                         self.make_msg(\u0027tunnel_sync\u0027, tunnel_ip\u003dtunnel_ip,"},{"line_number":133,"context_line":"                                       tunnel_type\u003dtunnel_type, host\u003dhost),"},{"line_number":134,"context_line":"                         version\u003d\u00271.4\u0027)"}],"source_content_type":"text/x-python","patch_set":17,"id":"5a890539_40ce572f","line":134,"updated":"2014-11-14 19:21:04.000000000","message":"I think here you might want to do something similar to what\u0027s done for get_devices_details_list that is catching the messaging.UnsupportedVersion and use the older version of the method. Would that make sense?\n\ntry:\n    res \u003d self.call(context,\n                          self.make_msg(\u0027tunnel_sync\u0027, tunnel_ip\u003dtunnel_ip,\n                          tunnel_type\u003dtunnel_type, host\u003dhost),\n                          version\u003d\u00271.4\u0027)\nexcept messaging.UnsupportedVersion:\n        res \u003d self.call(context,\n                              self.make_msg(\u0027tunnel_sync\u0027, tunnel_ip\u003dtunnel_ip,\n                              tunnel_type\u003dtunnel_type))\n\nreturn res","commit_id":"3a67ead24e0af6498d532d85c838445d0bf7ee20"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"854df8676f2465831513ded13e4897436b833679","unresolved":false,"context_lines":[{"line_number":131,"context_line":"        return self.call(context,"},{"line_number":132,"context_line":"                         self.make_msg(\u0027tunnel_sync\u0027, tunnel_ip\u003dtunnel_ip,"},{"line_number":133,"context_line":"                                       tunnel_type\u003dtunnel_type, host\u003dhost),"},{"line_number":134,"context_line":"                         version\u003d\u00271.4\u0027)"}],"source_content_type":"text/x-python","patch_set":17,"id":"5a890539_7ea3f4ff","line":134,"in_reply_to":"5a890539_40ce572f","updated":"2014-11-14 19:44:39.000000000","message":"Not required. \n\nSee the tunnel_sync() in type_tunnel.py.\n\nIf a host is not passed its legacy mode.","commit_id":"3a67ead24e0af6498d532d85c838445d0bf7ee20"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"59e93883d30dccc71732fa007c731267f299f64f","unresolved":false,"context_lines":[{"line_number":131,"context_line":"        return self.call(context,"},{"line_number":132,"context_line":"                         self.make_msg(\u0027tunnel_sync\u0027, tunnel_ip\u003dtunnel_ip,"},{"line_number":133,"context_line":"                                       tunnel_type\u003dtunnel_type, host\u003dhost),"},{"line_number":134,"context_line":"                         version\u003d\u00271.4\u0027)"}],"source_content_type":"text/x-python","patch_set":17,"id":"5a890539_d9708274","line":134,"in_reply_to":"5a890539_7ea3f4ff","updated":"2014-11-14 20:32:22.000000000","message":"it\u0027s working because of **kwargs in setup_sync ! ?","commit_id":"3a67ead24e0af6498d532d85c838445d0bf7ee20"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"00a92bf60c4fc0e961fd99d832149fbbc5b0de99","unresolved":false,"context_lines":[{"line_number":131,"context_line":"        return self.call(context,"},{"line_number":132,"context_line":"                         self.make_msg(\u0027tunnel_sync\u0027, tunnel_ip\u003dtunnel_ip,"},{"line_number":133,"context_line":"                                       tunnel_type\u003dtunnel_type, host\u003dhost),"},{"line_number":134,"context_line":"                         version\u003d\u00271.4\u0027)"}],"source_content_type":"text/x-python","patch_set":17,"id":"5a890539_e37f4464","line":134,"in_reply_to":"5a890539_d9708274","updated":"2014-11-15 07:16:57.000000000","message":"What is setup_sync??\n\nI was mentioning for def tunnel_sync(self, rpc_context, **kwargs): in type_tunnel.py\n\n  host \u003d kwargs.get(\u0027host\u0027)\n  if host:\n      conditional statements\n\n   # If the host is not passed from an agent, it is a legacy mode.","commit_id":"3a67ead24e0af6498d532d85c838445d0bf7ee20"},{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"6846c06061f5438bd446bae67ac534647b642526","unresolved":false,"context_lines":[{"line_number":131,"context_line":"        return self.call(context,"},{"line_number":132,"context_line":"                         self.make_msg(\u0027tunnel_sync\u0027, tunnel_ip\u003dtunnel_ip,"},{"line_number":133,"context_line":"                                       tunnel_type\u003dtunnel_type, host\u003dhost),"},{"line_number":134,"context_line":"                         version\u003d\u00271.4\u0027)"}],"source_content_type":"text/x-python","patch_set":18,"id":"5a890539_13f43986","line":134,"updated":"2014-11-19 14:35:18.000000000","message":"Quoting your comment in your previous patch\n\n\u003e\u003eNot required.\n\n\u003e\u003eSee the tunnel_sync() in type_tunnel.py.\n\n\u003e\u003eIf a host is not passed its legacy mode.\n\nThis doesn\u0027t apply here. My understanding is that If you set version\u003d\u00271.4\u0027 then if the server only supports version 1.3 an UnsupportedVersion will be thrown. It doesn\u0027t have anything to do with the actual implementation of the rpc method in the server.","commit_id":"87fd4f6ea9a091ef5447ef9026f43c5d00428d48"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"fee60089abbdac1d5f1e4acf6ac86a66b533a9e5","unresolved":false,"context_lines":[{"line_number":131,"context_line":"        return self.call(context,"},{"line_number":132,"context_line":"                         self.make_msg(\u0027tunnel_sync\u0027, tunnel_ip\u003dtunnel_ip,"},{"line_number":133,"context_line":"                                       tunnel_type\u003dtunnel_type, host\u003dhost),"},{"line_number":134,"context_line":"                         version\u003d\u00271.4\u0027)"}],"source_content_type":"text/x-python","patch_set":18,"id":"5a890539_e4717778","line":134,"in_reply_to":"5a890539_13f43986","updated":"2014-11-20 12:46:29.000000000","message":"Sure, I will handle it. \nThe way \"def get_devices_details_list\" is handled.","commit_id":"87fd4f6ea9a091ef5447ef9026f43c5d00428d48"}],"neutron/db/agents_db.py":[{"author":{"_account_id":2711,"name":"Zhang Hua","display_name":"Zhang Hua","email":"joshua.zhang@canonical.com","username":"zhhuabj"},"change_message_id":"2b609e516f44ba4be3b93b85726d8d0d3f80f83f","unresolved":false,"context_lines":[{"line_number":184,"context_line":"                    if tunneling_ip:"},{"line_number":185,"context_line":"                        configurations \u003d jsonutils.loads("},{"line_number":186,"context_line":"                                agent_db.configurations)"},{"line_number":187,"context_line":"                        self.old_tunneling_ip \u003d configurations[\u0027tunneling_ip\u0027]"},{"line_number":188,"context_line":"                        tunnel_types \u003d configurations[\u0027tunnel_types\u0027]"},{"line_number":189,"context_line":"                        if tunneling_ip !\u003d self.old_tunneling_ip:"},{"line_number":190,"context_line":"                            type_manager \u003d managers.TypeManager()"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa98f980_9532340e","line":187,"updated":"2014-09-12 12:21:07.000000000","message":"I think this piece of code logic just can deal with this situation:\none l2-agent dead, it\u0027s host doesn\u0027t change, and both it\u0027s ip and local_ip configuration item change as well, then this l2-agent start again.\n\nso it can\u0027t deal with following two situations:\n1, one l2-agent dead, but this l2-agent will not start again.\n2, one l2-agent dead, it\u0027s host doesn\u0027t change, ip change, but local_ip configuration item doesn\u0027t change, then this l2-agent start again","commit_id":"3872cb623f01a4d4248bf6f959897fbc16adc3a1"},{"author":{"_account_id":9361,"name":"Vivekanandan Narasimhan","email":"n.vivekanandan@ericsson.com","username":"viveknarasimhan"},"change_message_id":"c4de0c402452d5031eefea6654c296edd782a9fc","unresolved":false,"context_lines":[{"line_number":192,"context_line":"                                driver \u003d type_manager.drivers.get(tunnel_type)"},{"line_number":193,"context_line":"                                if driver:"},{"line_number":194,"context_line":"                                    driver.obj.delete_endpoint("},{"line_number":195,"context_line":"                                                self.old_tunneling_ip)"},{"line_number":196,"context_line":"                greenthread.sleep(0)"},{"line_number":197,"context_line":"                agent_db.update(res)"},{"line_number":198,"context_line":"            except ext_agent.AgentNotFoundByTypeHost:"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa98f980_0ccba153","line":195,"updated":"2014-09-12 09:59:16.000000000","message":"AgentDbMixin is a common mixin class and does not represent a single agent.  The Agent object represents a single instance of agent.\r\n\r\nThe old_tunneling_ip will be overwritten on subsequent calls to _create_or_update_agent() by a different agent, since its maintained in the mixin.\r\nIt would be required to preserve context here.","commit_id":"3872cb623f01a4d4248bf6f959897fbc16adc3a1"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"263866feeb9efe1ea9fa0e12029fd18485713ba6","unresolved":false,"context_lines":[{"line_number":192,"context_line":"                                driver \u003d type_manager.drivers.get(tunnel_type)"},{"line_number":193,"context_line":"                                if driver:"},{"line_number":194,"context_line":"                                    driver.obj.delete_endpoint("},{"line_number":195,"context_line":"                                                self.old_tunneling_ip)"},{"line_number":196,"context_line":"                greenthread.sleep(0)"},{"line_number":197,"context_line":"                agent_db.update(res)"},{"line_number":198,"context_line":"            except ext_agent.AgentNotFoundByTypeHost:"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa98f980_4f8d9b7b","line":195,"in_reply_to":"fa98f980_0ccba153","updated":"2014-09-12 10:23:36.000000000","message":"Thanks Vivek, I already discussed this with Sudhakar. I will fix this in next patch set.\n\nAre you fine with the overall approach taken to fix the problem? \nAny improvement suggestions...","commit_id":"3872cb623f01a4d4248bf6f959897fbc16adc3a1"},{"author":{"_account_id":9361,"name":"Vivekanandan Narasimhan","email":"n.vivekanandan@ericsson.com","username":"viveknarasimhan"},"change_message_id":"d051ae8e8073bbb98dd58e820f34369cf5403c2c","unresolved":false,"context_lines":[{"line_number":192,"context_line":"                                driver \u003d type_manager.drivers.get(tunnel_type)"},{"line_number":193,"context_line":"                                if driver:"},{"line_number":194,"context_line":"                                    driver.obj.delete_endpoint("},{"line_number":195,"context_line":"                                                self.old_tunneling_ip)"},{"line_number":196,"context_line":"                greenthread.sleep(0)"},{"line_number":197,"context_line":"                agent_db.update(res)"},{"line_number":198,"context_line":"            except ext_agent.AgentNotFoundByTypeHost:"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa98f980_6fbedfaf","line":195,"in_reply_to":"fa98f980_4f8d9b7b","updated":"2014-09-12 10:35:33.000000000","message":"I see intercoupling, in that we have mixed into Agents-DB the decision to delete the TEP.  \r\n\r\nIn general report state is present to sink information from the agent.  Making decision on changes to agent content need to be managed elsewhere and not in agents_db.","commit_id":"3872cb623f01a4d4248bf6f959897fbc16adc3a1"}],"neutron/db/migration/alembic_migrations/versions/38495dc99731_ml2_tunnel_endpoints_table.py":[{"author":{"_account_id":7249,"name":"Ann Taraday","email":"akamyshnikova@mirantis.com","username":"AKamyshnikova"},"change_message_id":"19a444161bd83851606ac1c2be769d8ac041a2da","unresolved":false,"context_lines":[{"line_number":39,"context_line":""},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"def downgrade():"},{"line_number":42,"context_line":"    op.drop_constraint(None, \u0027ml2_vxlan_endpoints\u0027)"},{"line_number":43,"context_line":"    op.drop_column(\u0027ml2_vxlan_endpoints\u0027, \u0027host\u0027)"},{"line_number":44,"context_line":"    op.drop_constraint(None, \u0027ml2_gre_endpoints\u0027)"},{"line_number":45,"context_line":"    op.drop_column(\u0027ml2_gre_endpoints\u0027, \u0027host\u0027)"}],"source_content_type":"text/x-python","patch_set":9,"id":"baa201ad_08913f99","line":42,"updated":"2014-10-01 07:31:30.000000000","message":"downgrade does not work in this migration postgres - http://paste.openstack.org/show/117374/, mysql - http://paste.openstack.org/show/117375/\nProblem is here because there is no mentioned name of constaraint, and mysql requires constraint type.","commit_id":"e68d86b2d51b2fa386e19ee2b5c42b8a50fc44b2"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"a05652d1a6bbdbbc6dfa942f937210eefbe3d28a","unresolved":false,"context_lines":[{"line_number":39,"context_line":""},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"def downgrade():"},{"line_number":42,"context_line":"    op.drop_constraint(None, \u0027ml2_vxlan_endpoints\u0027)"},{"line_number":43,"context_line":"    op.drop_column(\u0027ml2_vxlan_endpoints\u0027, \u0027host\u0027)"},{"line_number":44,"context_line":"    op.drop_constraint(None, \u0027ml2_gre_endpoints\u0027)"},{"line_number":45,"context_line":"    op.drop_column(\u0027ml2_gre_endpoints\u0027, \u0027host\u0027)"}],"source_content_type":"text/x-python","patch_set":9,"id":"baa201ad_ee3a4333","line":42,"in_reply_to":"baa201ad_08913f99","updated":"2014-10-01 09:38:07.000000000","message":"Could you please provide me some pointers to address this issue?\nActually, this file got generated by \u0027neutron-db-manage --config-file /etc/neutron/neutron.conf --config-file \u003cplugin.ini\u003e revision -m \"Description\" --autogenerate\u0027.\n\nPlease share some existing migration file for the reference which have constraint type defined.\n\nThanks :)","commit_id":"e68d86b2d51b2fa386e19ee2b5c42b8a50fc44b2"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"deb9cf8dba060aa36f5aff50f02d811c38748e9f","unresolved":false,"context_lines":[{"line_number":39,"context_line":""},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"def downgrade():"},{"line_number":42,"context_line":"    op.drop_constraint(None, \u0027ml2_vxlan_endpoints\u0027)"},{"line_number":43,"context_line":"    op.drop_column(\u0027ml2_vxlan_endpoints\u0027, \u0027host\u0027)"},{"line_number":44,"context_line":"    op.drop_constraint(None, \u0027ml2_gre_endpoints\u0027)"},{"line_number":45,"context_line":"    op.drop_column(\u0027ml2_gre_endpoints\u0027, \u0027host\u0027)"}],"source_content_type":"text/x-python","patch_set":9,"id":"baa201ad_fd467320","line":42,"in_reply_to":"baa201ad_82cb461d","updated":"2014-10-01 13:06:45.000000000","message":"Is this looks fine?\n\nCONSTRAINT_NAME_1 \u003d \u0027unique_ml2_gre_endpoints0host\u0027\nCONSTRAINT_NAME_2 \u003d \u0027unique_ml2_vxlan_endpoints0host\u0027\n\nPlease suggest....","commit_id":"e68d86b2d51b2fa386e19ee2b5c42b8a50fc44b2"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"f9d1eab21fb587b2e0821e491f3c78f1e2bf0648","unresolved":false,"context_lines":[{"line_number":39,"context_line":""},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"def downgrade():"},{"line_number":42,"context_line":"    op.drop_constraint(None, \u0027ml2_vxlan_endpoints\u0027)"},{"line_number":43,"context_line":"    op.drop_column(\u0027ml2_vxlan_endpoints\u0027, \u0027host\u0027)"},{"line_number":44,"context_line":"    op.drop_constraint(None, \u0027ml2_gre_endpoints\u0027)"},{"line_number":45,"context_line":"    op.drop_column(\u0027ml2_gre_endpoints\u0027, \u0027host\u0027)"}],"source_content_type":"text/x-python","patch_set":9,"id":"baa201ad_e220924b","line":42,"in_reply_to":"baa201ad_b15b3a2d","updated":"2014-10-01 12:21:36.000000000","message":"Thanks Ann :)\n\nPlease find the updated code and share your comments... \n\nfrom alembic import op\nimport sqlalchemy as sa\n\nUK_NAME \u003d \u0027uk_host\u0027\n\n\ndef upgrade():\n\n    op.add_column(\u0027ml2_gre_endpoints\u0027,\n                  sa.Column(\u0027host\u0027, sa.String(length\u003d255), nullable\u003dTrue))\n    op.create_unique_constraint(\n        name\u003dUK_NAME,\n        table_name\u003d\u0027ml2_gre_endpoints\u0027,\n        cols\u003d[\u0027host\u0027]\n    )\n\n    op.add_column(\u0027ml2_vxlan_endpoints\u0027,\n                  sa.Column(\u0027host\u0027, sa.String(length\u003d255), nullable\u003dTrue))\n    op.create_unique_constraint(\n        name\u003dUK_NAME,\n        table_name\u003d\u0027ml2_vxlan_endpoints\u0027,\n        cols\u003d[\u0027host\u0027]\n    )\n\n\ndef downgrade():\n\n    op.drop_constraint(\n        name\u003dUK_NAME,\n        table_name\u003d\u0027ml2_vxlan_endpoints\u0027,\n        type_\u003d\u0027unique\u0027\n    )\n    op.drop_column(\u0027ml2_vxlan_endpoints\u0027, \u0027host\u0027)\n\n    op.drop_constraint(\n        name\u003dUK_NAME,\n        table_name\u003d\u0027ml2_gre_endpoints\u0027,\n        type_\u003d\u0027unique\u0027\n    )\n    op.drop_column(\u0027ml2_gre_endpoints\u0027, \u0027host\u0027)\n\nPlease suggest....if it is fine, I will post new patch set.","commit_id":"e68d86b2d51b2fa386e19ee2b5c42b8a50fc44b2"},{"author":{"_account_id":7249,"name":"Ann Taraday","email":"akamyshnikova@mirantis.com","username":"AKamyshnikova"},"change_message_id":"91ced44e8a70525dc1343d7b8674aad13aee3cc4","unresolved":false,"context_lines":[{"line_number":39,"context_line":""},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"def downgrade():"},{"line_number":42,"context_line":"    op.drop_constraint(None, \u0027ml2_vxlan_endpoints\u0027)"},{"line_number":43,"context_line":"    op.drop_column(\u0027ml2_vxlan_endpoints\u0027, \u0027host\u0027)"},{"line_number":44,"context_line":"    op.drop_constraint(None, \u0027ml2_gre_endpoints\u0027)"},{"line_number":45,"context_line":"    op.drop_column(\u0027ml2_gre_endpoints\u0027, \u0027host\u0027)"}],"source_content_type":"text/x-python","patch_set":9,"id":"baa201ad_dd0c4f45","line":42,"in_reply_to":"baa201ad_dddb6feb","updated":"2014-10-01 13:22:30.000000000","message":"All variants acceptable, but the last variant seems to be better than others.","commit_id":"e68d86b2d51b2fa386e19ee2b5c42b8a50fc44b2"},{"author":{"_account_id":7249,"name":"Ann Taraday","email":"akamyshnikova@mirantis.com","username":"AKamyshnikova"},"change_message_id":"27ddf9d13e86426aa31c806e542a83b01f019543","unresolved":false,"context_lines":[{"line_number":39,"context_line":""},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"def downgrade():"},{"line_number":42,"context_line":"    op.drop_constraint(None, \u0027ml2_vxlan_endpoints\u0027)"},{"line_number":43,"context_line":"    op.drop_column(\u0027ml2_vxlan_endpoints\u0027, \u0027host\u0027)"},{"line_number":44,"context_line":"    op.drop_constraint(None, \u0027ml2_gre_endpoints\u0027)"},{"line_number":45,"context_line":"    op.drop_column(\u0027ml2_gre_endpoints\u0027, \u0027host\u0027)"}],"source_content_type":"text/x-python","patch_set":9,"id":"baa201ad_82cb461d","line":42,"in_reply_to":"baa201ad_e220924b","updated":"2014-10-01 12:33:07.000000000","message":"Looks ok, unique constaint name should be created as unique_(table_name)0(columns) like this is done here https://github.com/openstack/neutron/blob/master/neutron/db/migration/alembic_migrations/versions/e197124d4b9_add_unique_constrain.py#L33. Also don\u0027t forget to add this name to model.","commit_id":"e68d86b2d51b2fa386e19ee2b5c42b8a50fc44b2"},{"author":{"_account_id":7249,"name":"Ann Taraday","email":"akamyshnikova@mirantis.com","username":"AKamyshnikova"},"change_message_id":"02978d2bfad6e5f7c291d1d7c2fc9032de359ffb","unresolved":false,"context_lines":[{"line_number":39,"context_line":""},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"def downgrade():"},{"line_number":42,"context_line":"    op.drop_constraint(None, \u0027ml2_vxlan_endpoints\u0027)"},{"line_number":43,"context_line":"    op.drop_column(\u0027ml2_vxlan_endpoints\u0027, \u0027host\u0027)"},{"line_number":44,"context_line":"    op.drop_constraint(None, \u0027ml2_gre_endpoints\u0027)"},{"line_number":45,"context_line":"    op.drop_column(\u0027ml2_gre_endpoints\u0027, \u0027host\u0027)"}],"source_content_type":"text/x-python","patch_set":9,"id":"baa201ad_b15b3a2d","line":42,"in_reply_to":"baa201ad_ee3a4333","updated":"2014-10-01 10:00:09.000000000","message":"Take a look at this migration https://github.com/openstack/neutron/blob/master/neutron/db/migration/alembic_migrations/versions/31d7f831a591_add_constraint_for_routerid.py#L82\n\nAbout usage constraint type http://alembic.readthedocs.org/en/latest/ops.html#alembic.operations.Operations.drop_constraint.params.type_\n\nAlthough it was autogenerated, if you run neutron-db-manage --config-file /etc/neutron/neutron.conf --config-file \u003cplugin.ini\u003e upgrade head, then neutron-db-manage --config-file /etc/neutron/neutron.conf --config-file \u003cplugin.ini\u003e downgrade -1 you see the same errors as I added in pastes above.","commit_id":"e68d86b2d51b2fa386e19ee2b5c42b8a50fc44b2"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"c98062bc8e51238446c9da26aab05865723904ae","unresolved":false,"context_lines":[{"line_number":39,"context_line":""},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"def downgrade():"},{"line_number":42,"context_line":"    op.drop_constraint(None, \u0027ml2_vxlan_endpoints\u0027)"},{"line_number":43,"context_line":"    op.drop_column(\u0027ml2_vxlan_endpoints\u0027, \u0027host\u0027)"},{"line_number":44,"context_line":"    op.drop_constraint(None, \u0027ml2_gre_endpoints\u0027)"},{"line_number":45,"context_line":"    op.drop_column(\u0027ml2_gre_endpoints\u0027, \u0027host\u0027)"}],"source_content_type":"text/x-python","patch_set":9,"id":"baa201ad_dddb6feb","line":42,"in_reply_to":"baa201ad_fd467320","updated":"2014-10-01 13:11:19.000000000","message":"It could be like this also,\n\nCONSTRAINT_NAME_ONE \u003d \u0027unique_ml2_gre_endpoints0host\u0027 CONSTRAINT_NAME_TWO \u003d \u0027unique_ml2_vxlan_endpoints0host\u0027\n\nCONSTRAINT_NAME_GRE \u003d \u0027unique_ml2_gre_endpoints0host\u0027 CONSTRAINT_NAME_VXLAN \u003d \u0027unique_ml2_vxlan_endpoints0host\u0027","commit_id":"e68d86b2d51b2fa386e19ee2b5c42b8a50fc44b2"},{"author":{"_account_id":7249,"name":"Ann Taraday","email":"akamyshnikova@mirantis.com","username":"AKamyshnikova"},"change_message_id":"fecd049d035ab66a31ee0a26cd1b1bae584cc4a0","unresolved":false,"context_lines":[{"line_number":39,"context_line":"    op.create_unique_constraint("},{"line_number":40,"context_line":"        name\u003dCONSTRAINT_NAME_GRE,"},{"line_number":41,"context_line":"        table_name\u003d\u0027ml2_gre_endpoints\u0027,"},{"line_number":42,"context_line":"        cols\u003d[\u0027host\u0027]"},{"line_number":43,"context_line":"    )"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"    op.add_column(\u0027ml2_vxlan_endpoints\u0027,"}],"source_content_type":"text/x-python","patch_set":10,"id":"baa201ad_8809a4df","line":42,"updated":"2014-10-01 15:04:56.000000000","message":"In fact this are positional arguments, so it could be used as it was earlier. If you want to use names, please use names that alembic expects: name, source, local_cols - http://alembic.readthedocs.org/en/latest/ops.html#alembic.operations.Operations.create_unique_constraint","commit_id":"8be08f043abc389d49c5e3adfcf014d354e0fec2"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"c1f7a894ed0373b069b48707d50461f6fb67bb78","unresolved":false,"context_lines":[{"line_number":39,"context_line":"    op.create_unique_constraint("},{"line_number":40,"context_line":"        name\u003dCONSTRAINT_NAME_GRE,"},{"line_number":41,"context_line":"        table_name\u003d\u0027ml2_gre_endpoints\u0027,"},{"line_number":42,"context_line":"        cols\u003d[\u0027host\u0027]"},{"line_number":43,"context_line":"    )"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"    op.add_column(\u0027ml2_vxlan_endpoints\u0027,"}],"source_content_type":"text/x-python","patch_set":10,"id":"baa201ad_68900044","line":42,"in_reply_to":"baa201ad_8809a4df","updated":"2014-10-01 15:10:07.000000000","message":"Done","commit_id":"8be08f043abc389d49c5e3adfcf014d354e0fec2"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"b74e1aba4fe79bd4b09c98b28090a3e59ef9bcd2","unresolved":false,"context_lines":[{"line_number":35,"context_line":"def upgrade():"},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"    op.add_column(\u0027ml2_gre_endpoints\u0027,"},{"line_number":38,"context_line":"                  sa.Column(\u0027host\u0027, sa.String(length\u003d255), nullable\u003dTrue))"},{"line_number":39,"context_line":"    op.create_unique_constraint("},{"line_number":40,"context_line":"        name\u003dCONSTRAINT_NAME_GRE,"},{"line_number":41,"context_line":"        source\u003d\u0027ml2_gre_endpoints\u0027,"}],"source_content_type":"text/x-python","patch_set":27,"id":"5a890539_20fe47af","line":38,"updated":"2014-11-27 00:33:47.000000000","message":"just thinking out loud, but are we sure that other DB backends besides MySQL and Postgres support nullable columns with a unique constraint on it?","commit_id":"9862d81db5aae9f1234a163938873705bb104269"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"a5f56b2935893940b1d00a84c9f8431967b622fc","unresolved":false,"context_lines":[{"line_number":35,"context_line":"def upgrade():"},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"    op.add_column(\u0027ml2_gre_endpoints\u0027,"},{"line_number":38,"context_line":"                  sa.Column(\u0027host\u0027, sa.String(length\u003d255), nullable\u003dTrue))"},{"line_number":39,"context_line":"    op.create_unique_constraint("},{"line_number":40,"context_line":"        name\u003dCONSTRAINT_NAME_GRE,"},{"line_number":41,"context_line":"        source\u003d\u0027ml2_gre_endpoints\u0027,"}],"source_content_type":"text/x-python","patch_set":27,"id":"5a890539_447d39e6","line":38,"in_reply_to":"5a890539_0484faaf","updated":"2014-12-05 00:31:45.000000000","message":"I am talking about other DB\u0027s, not the ones we test against.","commit_id":"9862d81db5aae9f1234a163938873705bb104269"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"c231022d03ad8ed3eab303eaff07b39101b7ef68","unresolved":false,"context_lines":[{"line_number":35,"context_line":"def upgrade():"},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"    op.add_column(\u0027ml2_gre_endpoints\u0027,"},{"line_number":38,"context_line":"                  sa.Column(\u0027host\u0027, sa.String(length\u003d255), nullable\u003dTrue))"},{"line_number":39,"context_line":"    op.create_unique_constraint("},{"line_number":40,"context_line":"        name\u003dCONSTRAINT_NAME_GRE,"},{"line_number":41,"context_line":"        source\u003d\u0027ml2_gre_endpoints\u0027,"}],"source_content_type":"text/x-python","patch_set":27,"id":"5a890539_0484faaf","line":38,"in_reply_to":"5a890539_20fe47af","updated":"2014-11-27 08:55:43.000000000","message":"Yes.\n\nReferences:\n\nhttp://www.w3resource.com/PostgreSQL/unique.php\n\nhttps://www.pgrs.net/2008/01/11/postgresql-allows-duplicate-nulls-in-unique-columns/","commit_id":"9862d81db5aae9f1234a163938873705bb104269"}],"neutron/db/migration/alembic_migrations/versions/43784f6642dd_ml2_tunnel_mappings.py":[{"author":{"_account_id":7249,"name":"Ann Taraday","email":"akamyshnikova@mirantis.com","username":"AKamyshnikova"},"change_message_id":"e4356e0556be565762bf57c2463de850a43de307","unresolved":false,"context_lines":[{"line_number":29,"context_line":"import sqlalchemy as sa"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"def upgrade(active_plugins\u003dNone, options\u003dNone):"},{"line_number":33,"context_line":"    op.create_table(\u0027ml2_tunnel_mappings\u0027,"},{"line_number":34,"context_line":"        sa.Column(\u0027host\u0027, sa.String(length\u003d64), nullable\u003dFalse),"},{"line_number":35,"context_line":"        sa.Column(\u0027ip_address\u0027, sa.String(length\u003d64), nullable\u003dTrue),"}],"source_content_type":"text/x-python","patch_set":2,"id":"da9df570_ce6cc939","line":32,"updated":"2014-09-22 07:48:15.000000000","message":"Since this change get merged https://review.openstack.org/117913 active_plugins and options are not needed anymore. Remove this.","commit_id":"c011517167d4e767991aaff26afff7b25ee3bb9c"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"dbdfddd3475c1b5d53beafd98dc5251b83fbdcb8","unresolved":false,"context_lines":[{"line_number":29,"context_line":"import sqlalchemy as sa"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"def upgrade(active_plugins\u003dNone, options\u003dNone):"},{"line_number":33,"context_line":"    op.create_table(\u0027ml2_tunnel_mappings\u0027,"},{"line_number":34,"context_line":"        sa.Column(\u0027host\u0027, sa.String(length\u003d64), nullable\u003dFalse),"},{"line_number":35,"context_line":"        sa.Column(\u0027ip_address\u0027, sa.String(length\u003d64), nullable\u003dTrue),"}],"source_content_type":"text/x-python","patch_set":2,"id":"da9df570_e8b980ea","line":32,"in_reply_to":"da9df570_ce6cc939","updated":"2014-09-22 08:51:48.000000000","message":"Done","commit_id":"c011517167d4e767991aaff26afff7b25ee3bb9c"},{"author":{"_account_id":7249,"name":"Ann Taraday","email":"akamyshnikova@mirantis.com","username":"AKamyshnikova"},"change_message_id":"e4356e0556be565762bf57c2463de850a43de307","unresolved":false,"context_lines":[{"line_number":36,"context_line":"        sa.PrimaryKeyConstraint(\u0027host\u0027))"},{"line_number":37,"context_line":""},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"def downgrade(active_plugins\u003dNone, options\u003dNone):"},{"line_number":40,"context_line":"    op.drop_table(\u0027ml2_tunnel_mappings\u0027)"}],"source_content_type":"text/x-python","patch_set":2,"id":"da9df570_4e60d935","line":39,"updated":"2014-09-22 07:48:15.000000000","message":"The same","commit_id":"c011517167d4e767991aaff26afff7b25ee3bb9c"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"dbdfddd3475c1b5d53beafd98dc5251b83fbdcb8","unresolved":false,"context_lines":[{"line_number":36,"context_line":"        sa.PrimaryKeyConstraint(\u0027host\u0027))"},{"line_number":37,"context_line":""},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"def downgrade(active_plugins\u003dNone, options\u003dNone):"},{"line_number":40,"context_line":"    op.drop_table(\u0027ml2_tunnel_mappings\u0027)"}],"source_content_type":"text/x-python","patch_set":2,"id":"da9df570_08cec483","line":39,"in_reply_to":"da9df570_4e60d935","updated":"2014-09-22 08:51:48.000000000","message":"Done","commit_id":"c011517167d4e767991aaff26afff7b25ee3bb9c"},{"author":{"_account_id":9361,"name":"Vivekanandan Narasimhan","email":"n.vivekanandan@ericsson.com","username":"viveknarasimhan"},"change_message_id":"5ea74abb1f26560838a5c67ba1447e081b816309","unresolved":false,"context_lines":[{"line_number":31,"context_line":""},{"line_number":32,"context_line":"def upgrade():"},{"line_number":33,"context_line":"    op.create_table(\u0027ml2_tunnel_mappings\u0027,"},{"line_number":34,"context_line":"        sa.Column(\u0027host\u0027, sa.String(length\u003d64), nullable\u003dFalse),"},{"line_number":35,"context_line":"        sa.Column(\u0027ip_address\u0027, sa.String(length\u003d64), nullable\u003dTrue),"},{"line_number":36,"context_line":"        sa.PrimaryKeyConstraint(\u0027host\u0027))"},{"line_number":37,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"da9df570_6ae8e0b4","line":34,"updated":"2014-09-24 09:23:25.000000000","message":"Please use 255 for host names.","commit_id":"c539a7b39ad8ea1bc9a447bc44668e6d6bdbcdbf"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"006b61ae0a455b11028a751522c8888463a3a0f2","unresolved":false,"context_lines":[{"line_number":31,"context_line":""},{"line_number":32,"context_line":"def upgrade():"},{"line_number":33,"context_line":"    op.create_table(\u0027ml2_tunnel_mappings\u0027,"},{"line_number":34,"context_line":"        sa.Column(\u0027host\u0027, sa.String(length\u003d64), nullable\u003dFalse),"},{"line_number":35,"context_line":"        sa.Column(\u0027ip_address\u0027, sa.String(length\u003d64), nullable\u003dTrue),"},{"line_number":36,"context_line":"        sa.PrimaryKeyConstraint(\u0027host\u0027))"},{"line_number":37,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"da9df570_655bb387","line":34,"in_reply_to":"da9df570_6ae8e0b4","updated":"2014-09-24 10:29:59.000000000","message":"Done","commit_id":"c539a7b39ad8ea1bc9a447bc44668e6d6bdbcdbf"},{"author":{"_account_id":8449,"name":"Marios Andreou","email":"marios.andreou@gmail.com","username":"marios"},"change_message_id":"a32549866a7e80904d3ce94c6ef27e68055194e9","unresolved":false,"context_lines":[{"line_number":32,"context_line":"def upgrade():"},{"line_number":33,"context_line":"    op.create_table(\u0027ml2_tunnel_mappings\u0027,"},{"line_number":34,"context_line":"        sa.Column(\u0027host\u0027, sa.String(length\u003d255), nullable\u003dFalse),"},{"line_number":35,"context_line":"        sa.Column(\u0027ip_address\u0027, sa.String(length\u003d64), nullable\u003dTrue),"},{"line_number":36,"context_line":"        sa.PrimaryKeyConstraint(\u0027host\u0027))"},{"line_number":37,"context_line":""},{"line_number":38,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"da9df570_bfe55e0a","line":35,"updated":"2014-09-26 14:39:18.000000000","message":"what about v6 addresses, should be bigger string imo","commit_id":"2204802effe1b4470e5ac985e473595124fd6085"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"7908e4d8a73bae0f1c9e4f682287bdac163988dc","unresolved":false,"context_lines":[{"line_number":32,"context_line":"def upgrade():"},{"line_number":33,"context_line":"    op.create_table(\u0027ml2_tunnel_mappings\u0027,"},{"line_number":34,"context_line":"        sa.Column(\u0027host\u0027, sa.String(length\u003d255), nullable\u003dFalse),"},{"line_number":35,"context_line":"        sa.Column(\u0027ip_address\u0027, sa.String(length\u003d64), nullable\u003dTrue),"},{"line_number":36,"context_line":"        sa.PrimaryKeyConstraint(\u0027host\u0027))"},{"line_number":37,"context_line":""},{"line_number":38,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"da9df570_efdaf04a","line":35,"updated":"2014-09-25 18:16:49.000000000","message":"why nullable\u003dTrue?","commit_id":"2204802effe1b4470e5ac985e473595124fd6085"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"a98cf223df87c7adc2c33cf41336f32cb0510d4a","unresolved":false,"context_lines":[{"line_number":32,"context_line":"def upgrade():"},{"line_number":33,"context_line":"    op.create_table(\u0027ml2_tunnel_mappings\u0027,"},{"line_number":34,"context_line":"        sa.Column(\u0027host\u0027, sa.String(length\u003d255), nullable\u003dFalse),"},{"line_number":35,"context_line":"        sa.Column(\u0027ip_address\u0027, sa.String(length\u003d64), nullable\u003dTrue),"},{"line_number":36,"context_line":"        sa.PrimaryKeyConstraint(\u0027host\u0027))"},{"line_number":37,"context_line":""},{"line_number":38,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"da9df570_b132ee5c","line":35,"in_reply_to":"da9df570_bfe55e0a","updated":"2014-09-26 19:57:35.000000000","message":"Why? String representation of IPv6 address can be accommodate in 64 char length column. IPv6 address is 128 bit long \u003d 16 bytes and it means 32 chars are required. \":\" is inserted every 2 bytes, so 7 colons can appear at most. It results in 39 chars at most.","commit_id":"2204802effe1b4470e5ac985e473595124fd6085"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"158f1692f2acfeb01ca901690de4ff3e75ebb83f","unresolved":false,"context_lines":[{"line_number":32,"context_line":"def upgrade():"},{"line_number":33,"context_line":"    op.create_table(\u0027ml2_tunnel_mappings\u0027,"},{"line_number":34,"context_line":"        sa.Column(\u0027host\u0027, sa.String(length\u003d255), nullable\u003dFalse),"},{"line_number":35,"context_line":"        sa.Column(\u0027ip_address\u0027, sa.String(length\u003d64), nullable\u003dTrue),"},{"line_number":36,"context_line":"        sa.PrimaryKeyConstraint(\u0027host\u0027))"},{"line_number":37,"context_line":""},{"line_number":38,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"da9df570_32c9c0ac","line":35,"in_reply_to":"da9df570_efdaf04a","updated":"2014-09-25 19:18:07.000000000","message":"Done","commit_id":"2204802effe1b4470e5ac985e473595124fd6085"}],"neutron/plugins/ml2/drivers/tunnel_mappings.py":[{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"e4a4d54bca2a178b481f77175d140d4ad4e4cce7","unresolved":false,"context_lines":[{"line_number":33,"context_line":""},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"def get_tunnel_mapping(host):"},{"line_number":36,"context_line":"    LOG.debug(\"get_tunnel_mapping() called for host %s\", host)"},{"line_number":37,"context_line":"    session \u003d db_api.get_session()"},{"line_number":38,"context_line":"    with session.begin(subtransactions\u003dTrue):"},{"line_number":39,"context_line":"        tunnel_mapping \u003d (session.query(Ml2TunnelMappings)."}],"source_content_type":"text/x-python","patch_set":6,"id":"da9df570_41f7628b","line":36,"updated":"2014-09-25 09:23:29.000000000","message":"Consider using neutron.common.log.log instead of LOG.debug.\n\n  from neutron.common import log\n\n  @log.log\n  def get_tunnel_mapping(host):","commit_id":"25d745021b343ef8194bfb2f9e6d149618323d5b"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"1f80c755e4aa85db38cc090c5803c55b8adaed82","unresolved":false,"context_lines":[{"line_number":33,"context_line":""},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"def get_tunnel_mapping(host):"},{"line_number":36,"context_line":"    LOG.debug(\"get_tunnel_mapping() called for host %s\", host)"},{"line_number":37,"context_line":"    session \u003d db_api.get_session()"},{"line_number":38,"context_line":"    with session.begin(subtransactions\u003dTrue):"},{"line_number":39,"context_line":"        tunnel_mapping \u003d (session.query(Ml2TunnelMappings)."}],"source_content_type":"text/x-python","patch_set":6,"id":"da9df570_1b13030e","line":36,"in_reply_to":"da9df570_41f7628b","updated":"2014-09-25 14:27:01.000000000","message":"Done","commit_id":"25d745021b343ef8194bfb2f9e6d149618323d5b"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"38ecf84212412b31c926dcfd65960e5d8944377b","unresolved":false,"context_lines":[{"line_number":40,"context_line":"                          filter_by(host\u003dhost).one())"},{"line_number":41,"context_line":"        return tunnel_mapping.ip_address"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"def add_tunnel_mapping(host, ip):"},{"line_number":45,"context_line":"    LOG.debug(\"add_tunnel_mapping() called for host %s\", host)"},{"line_number":46,"context_line":"    session \u003d db_api.get_session()"}],"source_content_type":"text/x-python","patch_set":6,"id":"da9df570_ea24ab61","line":43,"updated":"2014-09-25 10:57:20.000000000","message":"we can merge add_tunnel_mapping and update_tunnel_mapping into a single method.\nI think the following works. subtransaction may be required though.\n\n  try:\n      tunnel_mapping \u003d Ml2TunnelMappings(host\u003dhost, ip_address\u003dip)\n      tunnel_mapping.save(session)\n      old_ip \u003d None\n  except db_exc.DBDuplicateEntry:\n      tunnel_mapping \u003d session.query(Ml2TunnelMappings).filter_by(host\u003dhost).one())\n      old_ip \u003d tunnel_mapping.ip_address\n      tunnel_mapping.update({\u0027ip_address\u0027: ip})\n  return ip, old_ip","commit_id":"25d745021b343ef8194bfb2f9e6d149618323d5b"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"1f80c755e4aa85db38cc090c5803c55b8adaed82","unresolved":false,"context_lines":[{"line_number":40,"context_line":"                          filter_by(host\u003dhost).one())"},{"line_number":41,"context_line":"        return tunnel_mapping.ip_address"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"def add_tunnel_mapping(host, ip):"},{"line_number":45,"context_line":"    LOG.debug(\"add_tunnel_mapping() called for host %s\", host)"},{"line_number":46,"context_line":"    session \u003d db_api.get_session()"}],"source_content_type":"text/x-python","patch_set":6,"id":"da9df570_db0c1bf0","line":43,"in_reply_to":"da9df570_ea24ab61","updated":"2014-09-25 14:27:01.000000000","message":"Done","commit_id":"25d745021b343ef8194bfb2f9e6d149618323d5b"},{"author":{"_account_id":9093,"name":"Chuck Carlino","email":"chuckjcarlino@gmail.com","username":"ChuckC"},"change_message_id":"0e3f67c0eb97bdd488cac1d8a054b8ae37da571a","unresolved":false,"context_lines":[{"line_number":50,"context_line":"    except db_exc.DBDuplicateEntry:"},{"line_number":51,"context_line":"        tunnel_mapping \u003d (session.query(Ml2TunnelMappings)."},{"line_number":52,"context_line":"                          filter_by(host\u003dhost).one())"},{"line_number":53,"context_line":"        LOG.warning(_LW(\"Tunnel Mapping with host %s already exists\"), host)"},{"line_number":54,"context_line":"    return tunnel_mapping"},{"line_number":55,"context_line":""},{"line_number":56,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"da9df570_4d9f9f50","line":53,"updated":"2014-09-24 23:05:12.000000000","message":"Given that an ovs restart can get us here, can we consider lowering this to info?  What would an operator/admin do with this warning?","commit_id":"25d745021b343ef8194bfb2f9e6d149618323d5b"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"949c9b9191c326226817671ad570b77917454959","unresolved":false,"context_lines":[{"line_number":50,"context_line":"    except db_exc.DBDuplicateEntry:"},{"line_number":51,"context_line":"        tunnel_mapping \u003d (session.query(Ml2TunnelMappings)."},{"line_number":52,"context_line":"                          filter_by(host\u003dhost).one())"},{"line_number":53,"context_line":"        LOG.warning(_LW(\"Tunnel Mapping with host %s already exists\"), host)"},{"line_number":54,"context_line":"    return tunnel_mapping"},{"line_number":55,"context_line":""},{"line_number":56,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"da9df570_cb5b7285","line":53,"in_reply_to":"da9df570_4d9f9f50","updated":"2014-09-25 06:25:41.000000000","message":"Done","commit_id":"25d745021b343ef8194bfb2f9e6d149618323d5b"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"1f80c755e4aa85db38cc090c5803c55b8adaed82","unresolved":false,"context_lines":[{"line_number":50,"context_line":"    except db_exc.DBDuplicateEntry:"},{"line_number":51,"context_line":"        tunnel_mapping \u003d (session.query(Ml2TunnelMappings)."},{"line_number":52,"context_line":"                          filter_by(host\u003dhost).one())"},{"line_number":53,"context_line":"        LOG.warning(_LW(\"Tunnel Mapping with host %s already exists\"), host)"},{"line_number":54,"context_line":"    return tunnel_mapping"},{"line_number":55,"context_line":""},{"line_number":56,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"da9df570_7b6a4f82","line":53,"in_reply_to":"da9df570_8a15dfe6","updated":"2014-09-25 14:27:01.000000000","message":"Done","commit_id":"25d745021b343ef8194bfb2f9e6d149618323d5b"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"38ecf84212412b31c926dcfd65960e5d8944377b","unresolved":false,"context_lines":[{"line_number":50,"context_line":"    except db_exc.DBDuplicateEntry:"},{"line_number":51,"context_line":"        tunnel_mapping \u003d (session.query(Ml2TunnelMappings)."},{"line_number":52,"context_line":"                          filter_by(host\u003dhost).one())"},{"line_number":53,"context_line":"        LOG.warning(_LW(\"Tunnel Mapping with host %s already exists\"), host)"},{"line_number":54,"context_line":"    return tunnel_mapping"},{"line_number":55,"context_line":""},{"line_number":56,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"da9df570_8a15dfe6","line":53,"in_reply_to":"da9df570_cb5b7285","updated":"2014-09-25 10:57:20.000000000","message":"Please consider logging a warning message only if the IP address is changed.","commit_id":"25d745021b343ef8194bfb2f9e6d149618323d5b"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"7908e4d8a73bae0f1c9e4f682287bdac163988dc","unresolved":false,"context_lines":[{"line_number":26,"context_line":"    __tablename__ \u003d \u0027ml2_tunnel_mappings\u0027"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"    host \u003d sa.Column(sa.String(255), primary_key\u003dTrue)"},{"line_number":29,"context_line":"    ip_address \u003d sa.Column(sa.String(64))"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"@log.log"}],"source_content_type":"text/x-python","patch_set":7,"id":"da9df570_8f25e30a","line":29,"updated":"2014-09-25 18:16:49.000000000","message":"I start to think why this new table is required. Why can\u0027t we add a column \u0027host\u0027 to GRE/VXLAN endpoints tables here rather than adding a new table? I don\u0027t see any reasonable reason (including the previous comments).","commit_id":"2204802effe1b4470e5ac985e473595124fd6085"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"a98cf223df87c7adc2c33cf41336f32cb0510d4a","unresolved":false,"context_lines":[{"line_number":26,"context_line":"    __tablename__ \u003d \u0027ml2_tunnel_mappings\u0027"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"    host \u003d sa.Column(sa.String(255), primary_key\u003dTrue)"},{"line_number":29,"context_line":"    ip_address \u003d sa.Column(sa.String(64))"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"@log.log"}],"source_content_type":"text/x-python","patch_set":7,"id":"da9df570_b1bd8eb9","line":29,"in_reply_to":"da9df570_3dc984ac","updated":"2014-09-26 19:57:35.000000000","message":"We need the unique constraint for IP address and host respectively, even when ml2_tunnel_mappings table is used. If we add ‘host’ column to endpoints table, we need unique constraint for “host” column.\n\nWe first need to define what it should behave.\nunknown means there is no entry in the table.\n\nAssumption:\n- host and ip_address columns are both nullable\u003dFalse.\n- host must be unique.\n- ip_address must be unique.\n\nCase study:\n(1) host is unknown and IP address is unknown:\n  It is a new host. Let’s add it.\n(2) host is known and IP address is unknown:\n  IP address is changed on the host.\n  IP address is unique so we can replace the IP address for the host.\n  Delete the existing IP address and Add a new address.\n(3) host is unknown and IP address is known:\n  It seems a new host appears, but there is a host with the same IP address already.\n  It is an error case. We should not update the entry.\n(4) Host is known and IP address is known\n  There are two cases:\n  (4a) a pair of (host, ip address) exists in the table.\n     No information is changed. Perhaps a source agent is restarted.\n  (4b) a pair of (host, ip address) does not exist in the table.\n     IP address of the host is changed but the IP address is duplicated.\n     It is an error case. We should not update the entry.\n\nIf there is unique constraint both for host and ip_address,\nthe following logic works:\n\n- Look up by “host”\n- If “host” is not found, add (host, ip) to the table.\n  If case (3), unique constraint detects an error.\n- If “host” is found and ip address is not changed, just skip. (4a)\n- If “host” is found and ip address is changed (2 or 4b),\n  try to update (host, ip). If (4b), unique constraint will detect an error.\n\n——\n\nNow let’s study the upgrade scenario.\nIn this case we need to consider a case where “host” is not found (or null) for known IP address is valid.\n\nThe only difference is case (3) above.\nIn this case, we don’t know “host” information for an IP address\njust after the upgrade, so we need to trust “host” info on RPC message.\nLet’s update “host” information for the IP address.\n\nNow let’s update the above logic.\n- If a separate table as you proposed is used, there is no need to change.\n  (note that this does not save the processing as we need to lookup endpoints table too)\n- If “host” columns is added to endpoints table, we need to modify the logic.\n  If “host” is not found and IP address is found, update “host” for the IP address.\n  If “host” is not found and IP address is not found either, add (host, ip).","commit_id":"2204802effe1b4470e5ac985e473595124fd6085"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"783c275dde0714f1134b5fe944422d539709c875","unresolved":false,"context_lines":[{"line_number":26,"context_line":"    __tablename__ \u003d \u0027ml2_tunnel_mappings\u0027"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"    host \u003d sa.Column(sa.String(255), primary_key\u003dTrue)"},{"line_number":29,"context_line":"    ip_address \u003d sa.Column(sa.String(64))"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"@log.log"}],"source_content_type":"text/x-python","patch_set":7,"id":"da9df570_3dc984ac","line":29,"in_reply_to":"da9df570_5e048b49","updated":"2014-09-26 06:16:14.000000000","message":"Thanks Akihiro,\n\nNow lets assume with given approach a gre_endpoint tables with following entries:\n\nIP                                         Host\n\n10.10.10.10     CN1\n\n10.10.10.20     CN2\n\nNow , the tunnel_sync comes for a new Host CN3 with existing IP address(10.10.10.10) then we first look for host since host doesn\u0027t exist in the table we will look for IP since IP exists we will update the host name and  table will look like this \n\nIP                                   Host\n\n10.10.10.10     CN3\n\n10.10.10.20     CN2\n\nIn that case we will miss the CN1 host. \n\nNow to solve this we could add a new check if IP exists(10.10.10.10) for different host(CN1)  we will not allow CN3 but how we will ensure which one is a genuine host whoever comes first will make an entry and will not allow other host to have an entry in table even though it is genuine.","commit_id":"2204802effe1b4470e5ac985e473595124fd6085"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"65cd293830e6888bfb9743b9d629b3514f3da337","unresolved":false,"context_lines":[{"line_number":26,"context_line":"    __tablename__ \u003d \u0027ml2_tunnel_mappings\u0027"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"    host \u003d sa.Column(sa.String(255), primary_key\u003dTrue)"},{"line_number":29,"context_line":"    ip_address \u003d sa.Column(sa.String(64))"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"@log.log"}],"source_content_type":"text/x-python","patch_set":7,"id":"da9df570_5e048b49","line":29,"in_reply_to":"da9df570_75d33204","updated":"2014-09-25 21:09:32.000000000","message":"Let me continue the discussion here.\n\nAssume gre endpoints table has ip and host columns.\nI don\u0027t think we need to make a pair of (ip, host) a primary key.\nIP address still can be a primary key. What we need to ensure is that ip address is unique and host is unique. We don\u0027t need a uniqueness of a pair of (ip address, host).\n\nThus I think it is not so complicated. We can add \"host\" column to gre endpoints table and add unique contraint on \"host\".\nWe can handle the table as follows:\n- If a passed host is found, update IP address if different.\n- If a passed host is not found and a passed IP address is found, set the passed host to \"host\" column.\n- If both are not found, it is a new endpoint.\n- If host is not passed from an agent, it is a legacy mode.\n\nAs long as a host has only one address as endpoint and endpoint address is shared by GRE and VXLAN, both approach do same.\n\nIn theory GRE endpoint and VXLAN endpoint do not necessarily have a same IP address, but we don\u0027t support it now.\n\nThought?\n\nI don\u0027t object your approach necessarily. I just would like to clarify and asses the approach and others.","commit_id":"2204802effe1b4470e5ac985e473595124fd6085"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"158f1692f2acfeb01ca901690de4ff3e75ebb83f","unresolved":false,"context_lines":[{"line_number":26,"context_line":"    __tablename__ \u003d \u0027ml2_tunnel_mappings\u0027"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"    host \u003d sa.Column(sa.String(255), primary_key\u003dTrue)"},{"line_number":29,"context_line":"    ip_address \u003d sa.Column(sa.String(64))"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"@log.log"}],"source_content_type":"text/x-python","patch_set":7,"id":"da9df570_75d33204","line":29,"in_reply_to":"da9df570_8f25e30a","updated":"2014-09-25 19:18:07.000000000","message":"Good point , initially we also thought the same to  add host column in existing \u0027ml2_vxlan_endpoints\u0027 and \u0027ml2_gre_endpoints\u0027 tables.\n\nConsider (host+ip) as Primary key, and we look for a host and get a IP address then in this case this will fail\n\n\" IP remains the same but host_name changes.\"\n\nWe will end up having stale endpoint again because we will be having duplicate entries for same IP with different hosts in the db which is not correct. VXLAN/GRE endpoints should be unique.\n\nSo better to have a separate table to accommodate this. And later with VXLAN endpoint table UDP port may also changes. Currently it is hard coded and we need to fix it.\n\nhttps://bugs.launchpad.net/neutron/+bug/1373359","commit_id":"2204802effe1b4470e5ac985e473595124fd6085"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"7fcc54ab6441ce8d1368171f78ad3ccfa556de12","unresolved":false,"context_lines":[{"line_number":26,"context_line":"    __tablename__ \u003d \u0027ml2_tunnel_mappings\u0027"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"    host \u003d sa.Column(sa.String(255), primary_key\u003dTrue)"},{"line_number":29,"context_line":"    ip_address \u003d sa.Column(sa.String(64))"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"@log.log"}],"source_content_type":"text/x-python","patch_set":7,"id":"da9df570_f911b052","line":29,"in_reply_to":"da9df570_b1bd8eb9","updated":"2014-09-28 05:49:35.000000000","message":"Since investigation I was also in favor to add host column in  ‘ml2_vxlan_endpoints’ and ‘ml2_gre_endpoints’  table but I could see this is the worst case where our logic will fail:\n\n(3) host is unknown and IP address is known:\n  It seems a new host appears, but there is a host with the same IP address already.\n  It is an error case. We should not update the entry.\n\nHow I should ensure that the new host is not a valid host and existing one is valid ???\n\nBut , after lot of thinking l feel we should use the existing endpoint tables and add a host as a new field. \n\nLater we can add a new CLI in neutron  [ https://blueprints.launchpad.net/python-neutronclient/+spec/neutron-cli-to-list-tunnel-endpoints]\nwhich will list the tunnel endpoints with hosts and let an admin/user decide the following whether he wants to add already used tunnel IP by other host or not? \n\nIn the future, admin/user would first see the neutron tunnel-endpoints-list and assign unique IP to the new host. \n\nPlease share your thoughts ?","commit_id":"2204802effe1b4470e5ac985e473595124fd6085"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"7908e4d8a73bae0f1c9e4f682287bdac163988dc","unresolved":false,"context_lines":[{"line_number":31,"context_line":""},{"line_number":32,"context_line":"@log.log"},{"line_number":33,"context_line":"def add_tunnel_mapping(host, ip):"},{"line_number":34,"context_line":"    session \u003d db_api.get_session()"},{"line_number":35,"context_line":"    try:"},{"line_number":36,"context_line":"        tunnel_mapping \u003d Ml2TunnelMappings(host\u003dhost, ip_address\u003dip)"},{"line_number":37,"context_line":"        tunnel_mapping.save(session)"}],"source_content_type":"text/x-python","patch_set":7,"id":"da9df570_afc38855","line":34,"updated":"2014-09-25 18:16:49.000000000","message":"Don\u0027t we need transaction here? Please check.","commit_id":"2204802effe1b4470e5ac985e473595124fd6085"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"158f1692f2acfeb01ca901690de4ff3e75ebb83f","unresolved":false,"context_lines":[{"line_number":31,"context_line":""},{"line_number":32,"context_line":"@log.log"},{"line_number":33,"context_line":"def add_tunnel_mapping(host, ip):"},{"line_number":34,"context_line":"    session \u003d db_api.get_session()"},{"line_number":35,"context_line":"    try:"},{"line_number":36,"context_line":"        tunnel_mapping \u003d Ml2TunnelMappings(host\u003dhost, ip_address\u003dip)"},{"line_number":37,"context_line":"        tunnel_mapping.save(session)"}],"source_content_type":"text/x-python","patch_set":7,"id":"da9df570_3240e006","line":34,"in_reply_to":"da9df570_afc38855","updated":"2014-09-25 19:18:07.000000000","message":"Ok I will check once.","commit_id":"2204802effe1b4470e5ac985e473595124fd6085"}],"neutron/plugins/ml2/drivers/type_gre.py":[{"author":{"_account_id":11614,"name":"Koteswara Rao Kelam","email":"koteswara.kelam@hp.com","username":"koteswar"},"change_message_id":"2d742531a2050c10b3459657ec35da4e104975a5","unresolved":false,"context_lines":[{"line_number":133,"context_line":"        return gre_endpoint"},{"line_number":134,"context_line":""},{"line_number":135,"context_line":"    def delete_endpoint(self, ip):"},{"line_number":136,"context_line":"        LOG.debug(\"delete_gre_endpoint() called for ip %s\", ip)"},{"line_number":137,"context_line":"        session \u003d db_api.get_session()"},{"line_number":138,"context_line":"        with session.begin(subtransactions\u003dTrue):"},{"line_number":139,"context_line":"            gre_endpoint \u003d (session.query(GreEndpoints)."}],"source_content_type":"text/x-python","patch_set":4,"id":"da9df570_74de0b41","line":136,"updated":"2014-09-24 06:33:38.000000000","message":"log message should start with _ (under score)","commit_id":"c539a7b39ad8ea1bc9a447bc44668e6d6bdbcdbf"},{"author":{"_account_id":12737,"name":"Jacek Swiderski","email":"jacek.swiderski@codilime.com","username":"Altran"},"change_message_id":"716ff1f7910a9c216bf8fa3f94a5a5a191b71828","unresolved":false,"context_lines":[{"line_number":133,"context_line":"        return gre_endpoint"},{"line_number":134,"context_line":""},{"line_number":135,"context_line":"    def delete_endpoint(self, ip):"},{"line_number":136,"context_line":"        LOG.debug(\"delete_gre_endpoint() called for ip %s\", ip)"},{"line_number":137,"context_line":"        session \u003d db_api.get_session()"},{"line_number":138,"context_line":"        with session.begin(subtransactions\u003dTrue):"},{"line_number":139,"context_line":"            gre_endpoint \u003d (session.query(GreEndpoints)."}],"source_content_type":"text/x-python","patch_set":4,"id":"da9df570_45114eab","line":136,"in_reply_to":"da9df570_74de0b41","updated":"2014-09-24 09:58:49.000000000","message":"debug messages are no longer translated http://docs.openstack.org/developer/oslo.i18n/guidelines.html","commit_id":"c539a7b39ad8ea1bc9a447bc44668e6d6bdbcdbf"},{"author":{"_account_id":9361,"name":"Vivekanandan Narasimhan","email":"n.vivekanandan@ericsson.com","username":"viveknarasimhan"},"change_message_id":"5ea74abb1f26560838a5c67ba1447e081b816309","unresolved":false,"context_lines":[{"line_number":138,"context_line":"        with session.begin(subtransactions\u003dTrue):"},{"line_number":139,"context_line":"            gre_endpoint \u003d (session.query(GreEndpoints)."},{"line_number":140,"context_line":"                            filter_by(ip_address\u003dip).one())"},{"line_number":141,"context_line":"            session.delete(gre_endpoint)"}],"source_content_type":"text/x-python","patch_set":4,"id":"da9df570_4a16bca8","line":141,"updated":"2014-09-24 09:23:25.000000000","message":"A try ... catch to handle unavailability of the endpoint with input IP required here.","commit_id":"c539a7b39ad8ea1bc9a447bc44668e6d6bdbcdbf"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"006b61ae0a455b11028a751522c8888463a3a0f2","unresolved":false,"context_lines":[{"line_number":138,"context_line":"        with session.begin(subtransactions\u003dTrue):"},{"line_number":139,"context_line":"            gre_endpoint \u003d (session.query(GreEndpoints)."},{"line_number":140,"context_line":"                            filter_by(ip_address\u003dip).one())"},{"line_number":141,"context_line":"            session.delete(gre_endpoint)"}],"source_content_type":"text/x-python","patch_set":4,"id":"da9df570_68e8e7e2","line":141,"in_reply_to":"da9df570_4a16bca8","updated":"2014-09-24 10:29:59.000000000","message":"I think delete_endpoint will never be called with unavailable IP because of following condition in type_tunnel.py\n\nif tunnel_ip !\u003d ip_address:\n    driver.obj.delete_endpoint(ip_address)","commit_id":"c539a7b39ad8ea1bc9a447bc44668e6d6bdbcdbf"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"e4a4d54bca2a178b481f77175d140d4ad4e4cce7","unresolved":false,"context_lines":[{"line_number":114,"context_line":""},{"line_number":115,"context_line":"        LOG.debug(\"get_gre_endpoints() called\")"},{"line_number":116,"context_line":"        session \u003d db_api.get_session()"},{"line_number":117,"context_line":""},{"line_number":118,"context_line":"        with session.begin(subtransactions\u003dTrue):"},{"line_number":119,"context_line":"            gre_endpoints \u003d session.query(GreEndpoints)"},{"line_number":120,"context_line":"            return [{\u0027ip_address\u0027: gre_endpoint.ip_address}"}],"source_content_type":"text/x-python","patch_set":6,"id":"da9df570_64e55437","side":"PARENT","line":117,"updated":"2014-09-25 09:23:29.000000000","message":"Unrelated change. Please keep it.","commit_id":"694f2db6188bf4ee3e55d6445a5daf94c3c7cbab"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"1f80c755e4aa85db38cc090c5803c55b8adaed82","unresolved":false,"context_lines":[{"line_number":114,"context_line":""},{"line_number":115,"context_line":"        LOG.debug(\"get_gre_endpoints() called\")"},{"line_number":116,"context_line":"        session \u003d db_api.get_session()"},{"line_number":117,"context_line":""},{"line_number":118,"context_line":"        with session.begin(subtransactions\u003dTrue):"},{"line_number":119,"context_line":"            gre_endpoints \u003d session.query(GreEndpoints)"},{"line_number":120,"context_line":"            return [{\u0027ip_address\u0027: gre_endpoint.ip_address}"}],"source_content_type":"text/x-python","patch_set":6,"id":"da9df570_36437e43","side":"PARENT","line":117,"in_reply_to":"da9df570_64e55437","updated":"2014-09-25 14:27:01.000000000","message":"Done","commit_id":"694f2db6188bf4ee3e55d6445a5daf94c3c7cbab"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"7908e4d8a73bae0f1c9e4f682287bdac163988dc","unresolved":false,"context_lines":[{"line_number":53,"context_line":"class GreEndpoints(model_base.BASEV2):"},{"line_number":54,"context_line":"    \"\"\"Represents tunnel endpoint in RPC mode.\"\"\""},{"line_number":55,"context_line":"    __tablename__ \u003d \u0027ml2_gre_endpoints\u0027"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"    ip_address \u003d sa.Column(sa.String(64), primary_key\u003dTrue)"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"    def __repr__(self):"}],"source_content_type":"text/x-python","patch_set":7,"id":"da9df570_4f021b70","line":56,"updated":"2014-09-25 18:16:49.000000000","message":"Why can\u0027t we add a column \u0027host\u0027 here rather than adding a new table?","commit_id":"2204802effe1b4470e5ac985e473595124fd6085"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"158f1692f2acfeb01ca901690de4ff3e75ebb83f","unresolved":false,"context_lines":[{"line_number":53,"context_line":"class GreEndpoints(model_base.BASEV2):"},{"line_number":54,"context_line":"    \"\"\"Represents tunnel endpoint in RPC mode.\"\"\""},{"line_number":55,"context_line":"    __tablename__ \u003d \u0027ml2_gre_endpoints\u0027"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"    ip_address \u003d sa.Column(sa.String(64), primary_key\u003dTrue)"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"    def __repr__(self):"}],"source_content_type":"text/x-python","patch_set":7,"id":"da9df570_b5f03a92","line":56,"in_reply_to":"da9df570_4f021b70","updated":"2014-09-25 19:18:07.000000000","message":"Pls find the reason in tunnel_mappings.py","commit_id":"2204802effe1b4470e5ac985e473595124fd6085"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"deb9cf8dba060aa36f5aff50f02d811c38748e9f","unresolved":false,"context_lines":[{"line_number":53,"context_line":"class GreEndpoints(model_base.BASEV2):"},{"line_number":54,"context_line":"    \"\"\"Represents tunnel endpoint in RPC mode.\"\"\""},{"line_number":55,"context_line":"    __tablename__ \u003d \u0027ml2_gre_endpoints\u0027"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"    ip_address \u003d sa.Column(sa.String(64), primary_key\u003dTrue)"},{"line_number":58,"context_line":"    host \u003d sa.Column(sa.String(255), nullable\u003dTrue, unique\u003dTrue)"},{"line_number":59,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"baa201ad_3dd71bef","line":56,"updated":"2014-10-01 13:06:45.000000000","message":"is this looks fine?\n\n    __table_args__ \u003d (\n        sa.schema.UniqueConstraint(\u0027host\u0027,\n                                   name\u003d\u0027unique_ml2_gre_endpoints0host\u0027))","commit_id":"e68d86b2d51b2fa386e19ee2b5c42b8a50fc44b2"},{"author":{"_account_id":7249,"name":"Ann Taraday","email":"akamyshnikova@mirantis.com","username":"AKamyshnikova"},"change_message_id":"91ced44e8a70525dc1343d7b8674aad13aee3cc4","unresolved":false,"context_lines":[{"line_number":53,"context_line":"class GreEndpoints(model_base.BASEV2):"},{"line_number":54,"context_line":"    \"\"\"Represents tunnel endpoint in RPC mode.\"\"\""},{"line_number":55,"context_line":"    __tablename__ \u003d \u0027ml2_gre_endpoints\u0027"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"    ip_address \u003d sa.Column(sa.String(64), primary_key\u003dTrue)"},{"line_number":58,"context_line":"    host \u003d sa.Column(sa.String(255), nullable\u003dTrue, unique\u003dTrue)"},{"line_number":59,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"baa201ad_3d7d5bb2","line":56,"in_reply_to":"baa201ad_3dd71bef","updated":"2014-10-01 13:22:30.000000000","message":"Yes, this is ok. Could be used just sa.UniqueConstraint, but both variants is fine.","commit_id":"e68d86b2d51b2fa386e19ee2b5c42b8a50fc44b2"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"d12ef78be53282a582dde3c4aea013c014878545","unresolved":false,"context_lines":[{"line_number":17,"context_line":"from oslo.db import exception as db_exc"},{"line_number":18,"context_line":"from six import moves"},{"line_number":19,"context_line":"import sqlalchemy as sa"},{"line_number":20,"context_line":"from sqlalchemy.orm import exc"},{"line_number":21,"context_line":"from sqlalchemy import sql"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"from neutron.common import exceptions"}],"source_content_type":"text/x-python","patch_set":14,"id":"9aa7fdbe_8c238d04","line":20,"updated":"2014-10-21 17:30:42.000000000","message":"(nit) I prefer to \"sa_exc\" over \"exc\" as it is clearer.","commit_id":"62befde020aebf9b173422a4613c219584b235bf"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"ec4606d47bd74195ea55611f7cca89e5a6afc6d3","unresolved":false,"context_lines":[{"line_number":17,"context_line":"from oslo.db import exception as db_exc"},{"line_number":18,"context_line":"from six import moves"},{"line_number":19,"context_line":"import sqlalchemy as sa"},{"line_number":20,"context_line":"from sqlalchemy.orm import exc"},{"line_number":21,"context_line":"from sqlalchemy import sql"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"from neutron.common import exceptions"}],"source_content_type":"text/x-python","patch_set":14,"id":"9aa7fdbe_10731de8","line":20,"in_reply_to":"9aa7fdbe_8c238d04","updated":"2014-10-21 18:33:49.000000000","message":"Done","commit_id":"62befde020aebf9b173422a4613c219584b235bf"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"d12ef78be53282a582dde3c4aea013c014878545","unresolved":false,"context_lines":[{"line_number":20,"context_line":"from sqlalchemy.orm import exc"},{"line_number":21,"context_line":"from sqlalchemy import sql"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"from neutron.common import exceptions"},{"line_number":24,"context_line":"from neutron.db import api as db_api"},{"line_number":25,"context_line":"from neutron.db import model_base"},{"line_number":26,"context_line":"from neutron.openstack.common.gettextutils import _LE"}],"source_content_type":"text/x-python","patch_set":14,"id":"9aa7fdbe_ec7979fd","line":23,"updated":"2014-10-21 17:30:42.000000000","message":"We can change it to \"as n_exc\".","commit_id":"62befde020aebf9b173422a4613c219584b235bf"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"ec4606d47bd74195ea55611f7cca89e5a6afc6d3","unresolved":false,"context_lines":[{"line_number":20,"context_line":"from sqlalchemy.orm import exc"},{"line_number":21,"context_line":"from sqlalchemy import sql"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"from neutron.common import exceptions"},{"line_number":24,"context_line":"from neutron.db import api as db_api"},{"line_number":25,"context_line":"from neutron.db import model_base"},{"line_number":26,"context_line":"from neutron.openstack.common.gettextutils import _LE"}],"source_content_type":"text/x-python","patch_set":14,"id":"9aa7fdbe_3082e194","line":23,"in_reply_to":"9aa7fdbe_ec7979fd","updated":"2014-10-21 18:33:49.000000000","message":"Done","commit_id":"62befde020aebf9b173422a4613c219584b235bf"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"d12ef78be53282a582dde3c4aea013c014878545","unresolved":false,"context_lines":[{"line_number":131,"context_line":"                                     filter_by(host\u003dhost).one())"},{"line_number":132,"context_line":"                except exc.NoResultFound:"},{"line_number":133,"context_line":"                    LOG.warning(_LW(\"Gre endpoint with host %s doesn\u0027t\""},{"line_number":134,"context_line":"                                \" exists\"), host)"},{"line_number":135,"context_line":"                try:"},{"line_number":136,"context_line":"                    ip_elements \u003d (session.query(GreEndpoints)."},{"line_number":137,"context_line":"                                   filter_by(ip_address\u003dip).one())"}],"source_content_type":"text/x-python","patch_set":14,"id":"9aa7fdbe_0653f917","line":134,"updated":"2014-10-21 17:30:42.000000000","message":"The indent should match \"Gre ...\".","commit_id":"62befde020aebf9b173422a4613c219584b235bf"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"ec4606d47bd74195ea55611f7cca89e5a6afc6d3","unresolved":false,"context_lines":[{"line_number":131,"context_line":"                                     filter_by(host\u003dhost).one())"},{"line_number":132,"context_line":"                except exc.NoResultFound:"},{"line_number":133,"context_line":"                    LOG.warning(_LW(\"Gre endpoint with host %s doesn\u0027t\""},{"line_number":134,"context_line":"                                \" exists\"), host)"},{"line_number":135,"context_line":"                try:"},{"line_number":136,"context_line":"                    ip_elements \u003d (session.query(GreEndpoints)."},{"line_number":137,"context_line":"                                   filter_by(ip_address\u003dip).one())"}],"source_content_type":"text/x-python","patch_set":14,"id":"9aa7fdbe_d07195e1","line":134,"in_reply_to":"9aa7fdbe_0653f917","updated":"2014-10-21 18:33:49.000000000","message":"Done","commit_id":"62befde020aebf9b173422a4613c219584b235bf"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"d12ef78be53282a582dde3c4aea013c014878545","unresolved":false,"context_lines":[{"line_number":137,"context_line":"                                   filter_by(ip_address\u003dip).one())"},{"line_number":138,"context_line":"                except exc.NoResultFound:"},{"line_number":139,"context_line":"                    LOG.warning(_LW(\"Gre endpoint with ip %s doesn\u0027t\""},{"line_number":140,"context_line":"                                \" exists\"), ip)"},{"line_number":141,"context_line":"                return host_elements, ip_elements"},{"line_number":142,"context_line":"            else:"},{"line_number":143,"context_line":"                gre_endpoints \u003d session.query(GreEndpoints)"}],"source_content_type":"text/x-python","patch_set":14,"id":"9aa7fdbe_465d0121","line":140,"updated":"2014-10-21 17:30:42.000000000","message":"Ditto","commit_id":"62befde020aebf9b173422a4613c219584b235bf"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"d12ef78be53282a582dde3c4aea013c014878545","unresolved":false,"context_lines":[{"line_number":138,"context_line":"                except exc.NoResultFound:"},{"line_number":139,"context_line":"                    LOG.warning(_LW(\"Gre endpoint with ip %s doesn\u0027t\""},{"line_number":140,"context_line":"                                \" exists\"), ip)"},{"line_number":141,"context_line":"                return host_elements, ip_elements"},{"line_number":142,"context_line":"            else:"},{"line_number":143,"context_line":"                gre_endpoints \u003d session.query(GreEndpoints)"},{"line_number":144,"context_line":"                return [{\u0027ip_address\u0027: gre_endpoint.ip_address,"}],"source_content_type":"text/x-python","patch_set":14,"id":"9aa7fdbe_a634edde","line":141,"updated":"2014-10-21 17:30:42.000000000","message":"The type of the return value is different for a case where \"host\" is non-none and none. The type of the return value should be consistent.\n\nIn addition, this format (L.141) is different from the docustring in type_tunnel.","commit_id":"62befde020aebf9b173422a4613c219584b235bf"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"ec4606d47bd74195ea55611f7cca89e5a6afc6d3","unresolved":false,"context_lines":[{"line_number":138,"context_line":"                except exc.NoResultFound:"},{"line_number":139,"context_line":"                    LOG.warning(_LW(\"Gre endpoint with ip %s doesn\u0027t\""},{"line_number":140,"context_line":"                                \" exists\"), ip)"},{"line_number":141,"context_line":"                return host_elements, ip_elements"},{"line_number":142,"context_line":"            else:"},{"line_number":143,"context_line":"                gre_endpoints \u003d session.query(GreEndpoints)"},{"line_number":144,"context_line":"                return [{\u0027ip_address\u0027: gre_endpoint.ip_address,"}],"source_content_type":"text/x-python","patch_set":14,"id":"9aa7fdbe_5054c520","line":141,"in_reply_to":"9aa7fdbe_a634edde","updated":"2014-10-21 18:33:49.000000000","message":"Ok got the point.","commit_id":"62befde020aebf9b173422a4613c219584b235bf"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"977640519a4decde02392d60a65e03dd3200ab29","unresolved":false,"context_lines":[{"line_number":140,"context_line":"                LOG.warning(_LW(\"Gre endpoint with host %s doesn\u0027t \""},{"line_number":141,"context_line":"                                \"exists\"), host)"},{"line_number":142,"context_line":"            return host_elements"},{"line_number":143,"context_line":""},{"line_number":144,"context_line":"    def get_endpoint_by_ip(self, ip):"},{"line_number":145,"context_line":"        LOG.debug(\"get_endpoint_by_ip() called for ip %s\", ip)"},{"line_number":146,"context_line":"        session \u003d db_api.get_session()"}],"source_content_type":"text/x-python","patch_set":15,"id":"9aa7fdbe_fb1d43bf","line":143,"updated":"2014-10-24 10:03:13.000000000","message":"It could be optimized this way also:\n\nwith session.begin(subtransactions\u003dTrue):\ntry:\n     host_elements \u003d (session.query(GreEndpoints).\n                      filter_by(host\u003dhost).one())\n     return host_elements\nexcept sql_exc.NoResultFound:\n    LOG.warning(_LW(\"Gre endpoint with host %s doesn\u0027t \"\n                    \"exists\"), host)\n    return None","commit_id":"21009db5ed77dde23eeff9ec924ebf4655d8e064"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"977640519a4decde02392d60a65e03dd3200ab29","unresolved":false,"context_lines":[{"line_number":153,"context_line":"            except sql_exc.NoResultFound:"},{"line_number":154,"context_line":"                LOG.warning(_LW(\"Gre endpoint with ip %s doesn\u0027t \""},{"line_number":155,"context_line":"                                \"exists\"), ip)"},{"line_number":156,"context_line":"            return ip_elements"},{"line_number":157,"context_line":""},{"line_number":158,"context_line":"    def add_endpoint(self, ip, host):"},{"line_number":159,"context_line":"        LOG.debug(\"add_gre_endpoint() called for ip %s\", ip)"}],"source_content_type":"text/x-python","patch_set":15,"id":"9aa7fdbe_5bce4f2f","line":156,"updated":"2014-10-24 10:03:13.000000000","message":"ditto","commit_id":"21009db5ed77dde23eeff9ec924ebf4655d8e064"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"e7bf67e2677cc4ce905218589222810c0197ff69","unresolved":false,"context_lines":[{"line_number":56,"context_line":""},{"line_number":57,"context_line":"    __tablename__ \u003d \u0027ml2_gre_endpoints\u0027"},{"line_number":58,"context_line":"    __table_args__ \u003d ("},{"line_number":59,"context_line":"        sa.UniqueConstraint(\u0027host\u0027,"},{"line_number":60,"context_line":"                            name\u003d\u0027unique_ml2_gre_endpoints0host\u0027),"},{"line_number":61,"context_line":"    )"},{"line_number":62,"context_line":"    ip_address \u003d sa.Column(sa.String(64), primary_key\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":16,"id":"5a890539_3c90ea42","line":59,"updated":"2014-11-12 17:27:39.000000000","message":"the UniqueConstraint seems redundant with host definition","commit_id":"f653ac2fa7a9a75f31da5ab514a329672a98a965"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"99a2137531bdec0f9b3948afacaf29d575393483","unresolved":false,"context_lines":[{"line_number":56,"context_line":""},{"line_number":57,"context_line":"    __tablename__ \u003d \u0027ml2_gre_endpoints\u0027"},{"line_number":58,"context_line":"    __table_args__ \u003d ("},{"line_number":59,"context_line":"        sa.UniqueConstraint(\u0027host\u0027,"},{"line_number":60,"context_line":"                            name\u003d\u0027unique_ml2_gre_endpoints0host\u0027),"},{"line_number":61,"context_line":"    )"},{"line_number":62,"context_line":"    ip_address \u003d sa.Column(sa.String(64), primary_key\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":16,"id":"5a890539_b2a3239d","line":59,"in_reply_to":"5a890539_3c90ea42","updated":"2014-11-12 18:32:12.000000000","message":"Done","commit_id":"f653ac2fa7a9a75f31da5ab514a329672a98a965"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"99a2137531bdec0f9b3948afacaf29d575393483","unresolved":false,"context_lines":[{"line_number":60,"context_line":"                            name\u003d\u0027unique_ml2_gre_endpoints0host\u0027),"},{"line_number":61,"context_line":"    )"},{"line_number":62,"context_line":"    ip_address \u003d sa.Column(sa.String(64), primary_key\u003dTrue)"},{"line_number":63,"context_line":"    host \u003d sa.Column(sa.String(255), nullable\u003dTrue, unique\u003dTrue)"},{"line_number":64,"context_line":""},{"line_number":65,"context_line":"    def __repr__(self):"},{"line_number":66,"context_line":"        return \"\u003cGreTunnelEndpoint(%s)\u003e\" % self.ip_address"}],"source_content_type":"text/x-python","patch_set":16,"id":"5a890539_d29eef53","line":63,"updated":"2014-11-12 18:32:12.000000000","message":"host \u003d sa.Column(sa.String(255), nullable\u003dTrue)","commit_id":"f653ac2fa7a9a75f31da5ab514a329672a98a965"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"ee6d3264cf01d6c1799d361f0ce92956e8d32cdc","unresolved":false,"context_lines":[{"line_number":126,"context_line":"            return [{\u0027ip_address\u0027: gre_endpoint.ip_address,"},{"line_number":127,"context_line":"                     \u0027host\u0027: gre_endpoint.host}"},{"line_number":128,"context_line":"                    for gre_endpoint in gre_endpoints]"},{"line_number":129,"context_line":""},{"line_number":130,"context_line":"    def get_endpoint_by_host(self, host):"},{"line_number":131,"context_line":"        LOG.debug(\"get_endpoint_by_host() called for host %s\", host)"},{"line_number":132,"context_line":"        session \u003d db_api.get_session()"}],"source_content_type":"text/x-python","patch_set":16,"id":"7a8c0949_1177d803","line":129,"updated":"2014-10-30 16:49:20.000000000","message":"You can reduce code duplication by creating a private method:\n\n_get_endpoint_by_attribute(self, host\u003dNone, ip\u003dNone):\nget session.query(GreEndpoints) result, then filter_by host or ip, whichever is not None. At the start of the function, raise a ValueError if both are not None, or both are None.","commit_id":"f653ac2fa7a9a75f31da5ab514a329672a98a965"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"df3bee28b6dddb26b0648d8fc8cca414d671f5fc","unresolved":false,"context_lines":[{"line_number":126,"context_line":"            return [{\u0027ip_address\u0027: gre_endpoint.ip_address,"},{"line_number":127,"context_line":"                     \u0027host\u0027: gre_endpoint.host}"},{"line_number":128,"context_line":"                    for gre_endpoint in gre_endpoints]"},{"line_number":129,"context_line":""},{"line_number":130,"context_line":"    def get_endpoint_by_host(self, host):"},{"line_number":131,"context_line":"        LOG.debug(\"get_endpoint_by_host() called for host %s\", host)"},{"line_number":132,"context_line":"        session \u003d db_api.get_session()"}],"source_content_type":"text/x-python","patch_set":16,"id":"7a8c0949_7b6c6f9d","line":129,"in_reply_to":"7a8c0949_1177d803","updated":"2014-10-31 06:17:27.000000000","message":"You may need to look L188 at patch set 14:\nhttps://review.openstack.org/#/c/121000/14/neutron/plugins/ml2/drivers/type_tunnel.py\n \nAlso,\nhttps://review.openstack.org/#/c/121000/14/neutron/plugins/ml2/drivers/type_vxlan.py \ndef get_endpoints(self, host\u003dNone, ip\u003dNone): L136\n\nhttps://review.openstack.org/#/c/121000/14/neutron/plugins/ml2/drivers/type_gre.py L119\n\nI was doing almost same what you suggested :)","commit_id":"f653ac2fa7a9a75f31da5ab514a329672a98a965"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"e7bf67e2677cc4ce905218589222810c0197ff69","unresolved":false,"context_lines":[{"line_number":127,"context_line":"                     \u0027host\u0027: gre_endpoint.host}"},{"line_number":128,"context_line":"                    for gre_endpoint in gre_endpoints]"},{"line_number":129,"context_line":""},{"line_number":130,"context_line":"    def get_endpoint_by_host(self, host):"},{"line_number":131,"context_line":"        LOG.debug(\"get_endpoint_by_host() called for host %s\", host)"},{"line_number":132,"context_line":"        session \u003d db_api.get_session()"},{"line_number":133,"context_line":""}],"source_content_type":"text/x-python","patch_set":16,"id":"5a890539_fc6ca29e","line":130,"updated":"2014-11-12 17:27:39.000000000","message":"it seems strange and risky that get_endpoint_* return a db object where get_endpoints returns non-db objects","commit_id":"f653ac2fa7a9a75f31da5ab514a329672a98a965"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"6f7176c9ea7f71b4b90e8bedec2f225241be0681","unresolved":false,"context_lines":[{"line_number":127,"context_line":"                     \u0027host\u0027: gre_endpoint.host}"},{"line_number":128,"context_line":"                    for gre_endpoint in gre_endpoints]"},{"line_number":129,"context_line":""},{"line_number":130,"context_line":"    def get_endpoint_by_host(self, host):"},{"line_number":131,"context_line":"        LOG.debug(\"get_endpoint_by_host() called for host %s\", host)"},{"line_number":132,"context_line":"        session \u003d db_api.get_session()"},{"line_number":133,"context_line":""}],"source_content_type":"text/x-python","patch_set":16,"id":"5a890539_9513710c","line":130,"in_reply_to":"5a890539_12c07729","updated":"2014-11-12 19:06:10.000000000","message":"get_endpoints returns non-db objects (db objects are transformed in dicts) where get_endpoint_by_* returns db objects. It would clearer if they both returns the same type of objects as their signature are similar.","commit_id":"f653ac2fa7a9a75f31da5ab514a329672a98a965"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"fb654684d3bdea208fcdd90cf667a8387381e03c","unresolved":false,"context_lines":[{"line_number":127,"context_line":"                     \u0027host\u0027: gre_endpoint.host}"},{"line_number":128,"context_line":"                    for gre_endpoint in gre_endpoints]"},{"line_number":129,"context_line":""},{"line_number":130,"context_line":"    def get_endpoint_by_host(self, host):"},{"line_number":131,"context_line":"        LOG.debug(\"get_endpoint_by_host() called for host %s\", host)"},{"line_number":132,"context_line":"        session \u003d db_api.get_session()"},{"line_number":133,"context_line":""}],"source_content_type":"text/x-python","patch_set":16,"id":"5a890539_de2b4d92","line":130,"in_reply_to":"5a890539_9513710c","updated":"2014-11-13 07:36:25.000000000","message":"Yes, but both get_endpoints and get_endpoint_by_* are playing different roles. So to check the complex conditions in type_tunnel.py L228-236 and to simply those we need to return db_object.","commit_id":"f653ac2fa7a9a75f31da5ab514a329672a98a965"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"99a2137531bdec0f9b3948afacaf29d575393483","unresolved":false,"context_lines":[{"line_number":127,"context_line":"                     \u0027host\u0027: gre_endpoint.host}"},{"line_number":128,"context_line":"                    for gre_endpoint in gre_endpoints]"},{"line_number":129,"context_line":""},{"line_number":130,"context_line":"    def get_endpoint_by_host(self, host):"},{"line_number":131,"context_line":"        LOG.debug(\"get_endpoint_by_host() called for host %s\", host)"},{"line_number":132,"context_line":"        session \u003d db_api.get_session()"},{"line_number":133,"context_line":""}],"source_content_type":"text/x-python","patch_set":16,"id":"5a890539_12c07729","line":130,"in_reply_to":"5a890539_fc6ca29e","updated":"2014-11-12 18:32:12.000000000","message":"Sorry, I didn\u0027t get you.","commit_id":"f653ac2fa7a9a75f31da5ab514a329672a98a965"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"e7bf67e2677cc4ce905218589222810c0197ff69","unresolved":false,"context_lines":[{"line_number":134,"context_line":"        with session.begin(subtransactions\u003dTrue):"},{"line_number":135,"context_line":"            try:"},{"line_number":136,"context_line":"                host_elements \u003d (session.query(GreEndpoints)."},{"line_number":137,"context_line":"                                 filter_by(host\u003dhost).one())"},{"line_number":138,"context_line":"                return host_elements"},{"line_number":139,"context_line":"            except sql_exc.NoResultFound:"},{"line_number":140,"context_line":"                LOG.warning(_LW(\"Gre endpoint with host %s doesn\u0027t \""}],"source_content_type":"text/x-python","patch_set":16,"id":"5a890539_e8721d10","line":137,"updated":"2014-11-12 17:27:39.000000000","message":"using first instead of one avoid the try/except","commit_id":"f653ac2fa7a9a75f31da5ab514a329672a98a965"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"99a2137531bdec0f9b3948afacaf29d575393483","unresolved":false,"context_lines":[{"line_number":134,"context_line":"        with session.begin(subtransactions\u003dTrue):"},{"line_number":135,"context_line":"            try:"},{"line_number":136,"context_line":"                host_elements \u003d (session.query(GreEndpoints)."},{"line_number":137,"context_line":"                                 filter_by(host\u003dhost).one())"},{"line_number":138,"context_line":"                return host_elements"},{"line_number":139,"context_line":"            except sql_exc.NoResultFound:"},{"line_number":140,"context_line":"                LOG.warning(_LW(\"Gre endpoint with host %s doesn\u0027t \""}],"source_content_type":"text/x-python","patch_set":16,"id":"5a890539_f26ccb9e","line":137,"in_reply_to":"5a890539_e8721d10","updated":"2014-11-12 18:32:12.000000000","message":"Done. Thanks :)","commit_id":"f653ac2fa7a9a75f31da5ab514a329672a98a965"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"e7bf67e2677cc4ce905218589222810c0197ff69","unresolved":false,"context_lines":[{"line_number":148,"context_line":"        with session.begin(subtransactions\u003dTrue):"},{"line_number":149,"context_line":"            try:"},{"line_number":150,"context_line":"                ip_elements \u003d (session.query(GreEndpoints)."},{"line_number":151,"context_line":"                               filter_by(ip_address\u003dip).one())"},{"line_number":152,"context_line":"                return ip_elements"},{"line_number":153,"context_line":"            except sql_exc.NoResultFound:"},{"line_number":154,"context_line":"                LOG.warning(_LW(\"Gre endpoint with ip %s doesn\u0027t \""}],"source_content_type":"text/x-python","patch_set":16,"id":"5a890539_685e2d78","line":151,"updated":"2014-11-12 17:27:39.000000000","message":"itto","commit_id":"f653ac2fa7a9a75f31da5ab514a329672a98a965"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"99a2137531bdec0f9b3948afacaf29d575393483","unresolved":false,"context_lines":[{"line_number":148,"context_line":"        with session.begin(subtransactions\u003dTrue):"},{"line_number":149,"context_line":"            try:"},{"line_number":150,"context_line":"                ip_elements \u003d (session.query(GreEndpoints)."},{"line_number":151,"context_line":"                               filter_by(ip_address\u003dip).one())"},{"line_number":152,"context_line":"                return ip_elements"},{"line_number":153,"context_line":"            except sql_exc.NoResultFound:"},{"line_number":154,"context_line":"                LOG.warning(_LW(\"Gre endpoint with ip %s doesn\u0027t \""}],"source_content_type":"text/x-python","patch_set":16,"id":"5a890539_52091fdc","line":151,"in_reply_to":"5a890539_685e2d78","updated":"2014-11-12 18:32:12.000000000","message":"Done","commit_id":"f653ac2fa7a9a75f31da5ab514a329672a98a965"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"ee6d3264cf01d6c1799d361f0ce92956e8d32cdc","unresolved":false,"context_lines":[{"line_number":161,"context_line":"        try:"},{"line_number":162,"context_line":"            gre_endpoint \u003d GreEndpoints(ip_address\u003dip, host\u003dhost)"},{"line_number":163,"context_line":"            gre_endpoint.save(session)"},{"line_number":164,"context_line":"        except db_exc.DBDuplicateEntry:"},{"line_number":165,"context_line":"            gre_endpoint \u003d (session.query(GreEndpoints)."},{"line_number":166,"context_line":"                            filter_by(ip_address\u003dip).one())"},{"line_number":167,"context_line":"            LOG.warning(_LW(\"Gre endpoint with ip %s already exists\"), ip)"}],"source_content_type":"text/x-python","patch_set":16,"id":"7a8c0949_b15fe471","line":164,"updated":"2014-10-30 16:49:20.000000000","message":"You can get a duplicate entry if the host already exists now too because of the unique constraint.","commit_id":"f653ac2fa7a9a75f31da5ab514a329672a98a965"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"6f7176c9ea7f71b4b90e8bedec2f225241be0681","unresolved":false,"context_lines":[{"line_number":161,"context_line":"        try:"},{"line_number":162,"context_line":"            gre_endpoint \u003d GreEndpoints(ip_address\u003dip, host\u003dhost)"},{"line_number":163,"context_line":"            gre_endpoint.save(session)"},{"line_number":164,"context_line":"        except db_exc.DBDuplicateEntry:"},{"line_number":165,"context_line":"            gre_endpoint \u003d (session.query(GreEndpoints)."},{"line_number":166,"context_line":"                            filter_by(ip_address\u003dip).one())"},{"line_number":167,"context_line":"            LOG.warning(_LW(\"Gre endpoint with ip %s already exists\"), ip)"}],"source_content_type":"text/x-python","patch_set":16,"id":"5a890539_352c7d02","line":164,"in_reply_to":"5a890539_125157d8","updated":"2014-11-12 19:06:10.000000000","message":"indeed","commit_id":"f653ac2fa7a9a75f31da5ab514a329672a98a965"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"99a2137531bdec0f9b3948afacaf29d575393483","unresolved":false,"context_lines":[{"line_number":161,"context_line":"        try:"},{"line_number":162,"context_line":"            gre_endpoint \u003d GreEndpoints(ip_address\u003dip, host\u003dhost)"},{"line_number":163,"context_line":"            gre_endpoint.save(session)"},{"line_number":164,"context_line":"        except db_exc.DBDuplicateEntry:"},{"line_number":165,"context_line":"            gre_endpoint \u003d (session.query(GreEndpoints)."},{"line_number":166,"context_line":"                            filter_by(ip_address\u003dip).one())"},{"line_number":167,"context_line":"            LOG.warning(_LW(\"Gre endpoint with ip %s already exists\"), ip)"}],"source_content_type":"text/x-python","patch_set":16,"id":"5a890539_125157d8","line":164,"in_reply_to":"5a890539_a807351c","updated":"2014-11-12 18:32:12.000000000","message":"I am not sure whether the neutron supports this as of now.\n\n\u0027local_ip\u0027  flag at agent side accepts a single value.\n\nSo, I don\u0027t see any case where a same host is associated with 2 different ips for tunnelling.","commit_id":"f653ac2fa7a9a75f31da5ab514a329672a98a965"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"df3bee28b6dddb26b0648d8fc8cca414d671f5fc","unresolved":false,"context_lines":[{"line_number":161,"context_line":"        try:"},{"line_number":162,"context_line":"            gre_endpoint \u003d GreEndpoints(ip_address\u003dip, host\u003dhost)"},{"line_number":163,"context_line":"            gre_endpoint.save(session)"},{"line_number":164,"context_line":"        except db_exc.DBDuplicateEntry:"},{"line_number":165,"context_line":"            gre_endpoint \u003d (session.query(GreEndpoints)."},{"line_number":166,"context_line":"                            filter_by(ip_address\u003dip).one())"},{"line_number":167,"context_line":"            LOG.warning(_LW(\"Gre endpoint with ip %s already exists\"), ip)"}],"source_content_type":"text/x-python","patch_set":16,"id":"7a8c0949_bb05f7c3","line":164,"in_reply_to":"7a8c0949_b15fe471","updated":"2014-10-31 06:17:27.000000000","message":"Please share some example in which case this will happen.","commit_id":"f653ac2fa7a9a75f31da5ab514a329672a98a965"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"e7bf67e2677cc4ce905218589222810c0197ff69","unresolved":false,"context_lines":[{"line_number":161,"context_line":"        try:"},{"line_number":162,"context_line":"            gre_endpoint \u003d GreEndpoints(ip_address\u003dip, host\u003dhost)"},{"line_number":163,"context_line":"            gre_endpoint.save(session)"},{"line_number":164,"context_line":"        except db_exc.DBDuplicateEntry:"},{"line_number":165,"context_line":"            gre_endpoint \u003d (session.query(GreEndpoints)."},{"line_number":166,"context_line":"                            filter_by(ip_address\u003dip).one())"},{"line_number":167,"context_line":"            LOG.warning(_LW(\"Gre endpoint with ip %s already exists\"), ip)"}],"source_content_type":"text/x-python","patch_set":16,"id":"5a890539_a807351c","line":164,"in_reply_to":"7a8c0949_bb05f7c3","updated":"2014-11-12 17:27:39.000000000","message":"the trouble is in line L167 ... this warning can be logged if you try to associate 2 different ips to the same host!","commit_id":"f653ac2fa7a9a75f31da5ab514a329672a98a965"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"e7bf67e2677cc4ce905218589222810c0197ff69","unresolved":false,"context_lines":[{"line_number":175,"context_line":"            try:"},{"line_number":176,"context_line":"                gre_endpoint \u003d (session.query(GreEndpoints)."},{"line_number":177,"context_line":"                                filter_by(ip_address\u003dip).one())"},{"line_number":178,"context_line":"                session.delete(gre_endpoint)"},{"line_number":179,"context_line":"            except sql_exc.NoResultFound:"},{"line_number":180,"context_line":"                LOG.warning(_LW(\"Gre endpoint with ip %s doesn\u0027t \""},{"line_number":181,"context_line":"                                \"exists\"), ip)"}],"source_content_type":"text/x-python","patch_set":16,"id":"5a890539_e88e9dcf","line":178,"updated":"2014-11-12 17:27:39.000000000","message":"It\u0027s not thread safe!\n\nthe endpoint can be deleted between the select and the delete.\n\n count \u003d session.query(GreEndpoints).filter_by(ip_address\u003dip).delete()\n if count:\n   LOG.warning(...)\n\nis thread-safe and avoid an extra query.","commit_id":"f653ac2fa7a9a75f31da5ab514a329672a98a965"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"99a2137531bdec0f9b3948afacaf29d575393483","unresolved":false,"context_lines":[{"line_number":175,"context_line":"            try:"},{"line_number":176,"context_line":"                gre_endpoint \u003d (session.query(GreEndpoints)."},{"line_number":177,"context_line":"                                filter_by(ip_address\u003dip).one())"},{"line_number":178,"context_line":"                session.delete(gre_endpoint)"},{"line_number":179,"context_line":"            except sql_exc.NoResultFound:"},{"line_number":180,"context_line":"                LOG.warning(_LW(\"Gre endpoint with ip %s doesn\u0027t \""},{"line_number":181,"context_line":"                                \"exists\"), ip)"}],"source_content_type":"text/x-python","patch_set":16,"id":"5a890539_b296c392","line":178,"in_reply_to":"5a890539_e88e9dcf","updated":"2014-11-12 18:32:12.000000000","message":"Sure, I will do the same.\nThanks :)","commit_id":"f653ac2fa7a9a75f31da5ab514a329672a98a965"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"c79e904cdd731742cb0a2dabbcfacda4e2bd1452","unresolved":false,"context_lines":[{"line_number":126,"context_line":"                     \u0027host\u0027: gre_endpoint.host}"},{"line_number":127,"context_line":"                    for gre_endpoint in gre_endpoints]"},{"line_number":128,"context_line":""},{"line_number":129,"context_line":"    def get_endpoint_by_host(self, host):"},{"line_number":130,"context_line":"        LOG.debug(\"get_endpoint_by_host() called for host %s\", host)"},{"line_number":131,"context_line":"        session \u003d db_api.get_session()"},{"line_number":132,"context_line":""}],"source_content_type":"text/x-python","patch_set":17,"id":"5a890539_60335362","line":129,"updated":"2014-11-14 18:36:05.000000000","message":"gre/vxlan implementations for get_endpoint_by_host/ip and delete_endpoint only differ by the db model ... they should be abstracted and moved to type_tunnel.","commit_id":"3a67ead24e0af6498d532d85c838445d0bf7ee20"},{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"32150fd11fc33aaf83b0469bf4bfc6892404b973","unresolved":false,"context_lines":[{"line_number":126,"context_line":"                     \u0027host\u0027: gre_endpoint.host}"},{"line_number":127,"context_line":"                    for gre_endpoint in gre_endpoints]"},{"line_number":128,"context_line":""},{"line_number":129,"context_line":"    def get_endpoint_by_host(self, host):"},{"line_number":130,"context_line":"        LOG.debug(\"get_endpoint_by_host() called for host %s\", host)"},{"line_number":131,"context_line":"        session \u003d db_api.get_session()"},{"line_number":132,"context_line":""}],"source_content_type":"text/x-python","patch_set":17,"id":"5a890539_606b53f1","line":129,"in_reply_to":"5a890539_60335362","updated":"2014-11-14 19:21:04.000000000","message":"+1","commit_id":"3a67ead24e0af6498d532d85c838445d0bf7ee20"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"3403347bee0c8af983a3df72a63bb401d90eda3a","unresolved":false,"context_lines":[{"line_number":126,"context_line":"                     \u0027host\u0027: gre_endpoint.host}"},{"line_number":127,"context_line":"                    for gre_endpoint in gre_endpoints]"},{"line_number":128,"context_line":""},{"line_number":129,"context_line":"    def get_endpoint_by_host(self, host):"},{"line_number":130,"context_line":"        LOG.debug(\"get_endpoint_by_host() called for host %s\", host)"},{"line_number":131,"context_line":"        session \u003d db_api.get_session()"},{"line_number":132,"context_line":""}],"source_content_type":"text/x-python","patch_set":17,"id":"5a890539_80703fdd","line":129,"in_reply_to":"5a890539_60335362","updated":"2014-11-14 19:06:22.000000000","message":"Please don\u0027t mind I just wanted to avoid rework.\n\nIf more people are in favour of this. I don\u0027t have any problem moving those methods to type_tunnel.py.\n\nKindly give vote :)","commit_id":"3a67ead24e0af6498d532d85c838445d0bf7ee20"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"38e361480f0a1f2666ae3ee6be625e001c67d44c","unresolved":false,"context_lines":[{"line_number":126,"context_line":"                     \u0027host\u0027: gre_endpoint.host}"},{"line_number":127,"context_line":"                    for gre_endpoint in gre_endpoints]"},{"line_number":128,"context_line":""},{"line_number":129,"context_line":"    def get_endpoint_by_host(self, host):"},{"line_number":130,"context_line":"        LOG.debug(\"get_endpoint_by_host() called for host %s\", host)"},{"line_number":131,"context_line":"        session \u003d db_api.get_session()"},{"line_number":132,"context_line":""}],"source_content_type":"text/x-python","patch_set":17,"id":"5a890539_89013f07","line":129,"in_reply_to":"5a890539_606b53f1","updated":"2014-11-15 11:36:27.000000000","message":"Why only get_endpoint_by_host/ip and delete_endpoint ?\n\n    def get_endpoints(self) should also be moved to type_tunnel.\n\nBecause it also only differs by the db model.\n\nSimilarly, def add_endpoint(self, ip, host).","commit_id":"3a67ead24e0af6498d532d85c838445d0bf7ee20"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"c79e904cdd731742cb0a2dabbcfacda4e2bd1452","unresolved":false,"context_lines":[{"line_number":130,"context_line":"        LOG.debug(\"get_endpoint_by_host() called for host %s\", host)"},{"line_number":131,"context_line":"        session \u003d db_api.get_session()"},{"line_number":132,"context_line":""},{"line_number":133,"context_line":"        with session.begin(subtransactions\u003dTrue):"},{"line_number":134,"context_line":"            host_elements \u003d (session.query(GreEndpoints)."},{"line_number":135,"context_line":"                             filter_by(host\u003dhost).first())"},{"line_number":136,"context_line":"            return host_elements"}],"source_content_type":"text/x-python","patch_set":17,"id":"5a890539_40bd77b6","line":133,"updated":"2014-11-14 18:36:05.000000000","message":"not fully sure, but the subtransaction is not required","commit_id":"3a67ead24e0af6498d532d85c838445d0bf7ee20"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"3403347bee0c8af983a3df72a63bb401d90eda3a","unresolved":false,"context_lines":[{"line_number":130,"context_line":"        LOG.debug(\"get_endpoint_by_host() called for host %s\", host)"},{"line_number":131,"context_line":"        session \u003d db_api.get_session()"},{"line_number":132,"context_line":""},{"line_number":133,"context_line":"        with session.begin(subtransactions\u003dTrue):"},{"line_number":134,"context_line":"            host_elements \u003d (session.query(GreEndpoints)."},{"line_number":135,"context_line":"                             filter_by(host\u003dhost).first())"},{"line_number":136,"context_line":"            return host_elements"}],"source_content_type":"text/x-python","patch_set":17,"id":"5a890539_2384f55c","line":133,"in_reply_to":"5a890539_40bd77b6","updated":"2014-11-14 19:06:22.000000000","message":"Actually, I am also not very sure about it :) \n\nCan anyone confirm this?","commit_id":"3a67ead24e0af6498d532d85c838445d0bf7ee20"},{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"32150fd11fc33aaf83b0469bf4bfc6892404b973","unresolved":false,"context_lines":[{"line_number":130,"context_line":"        LOG.debug(\"get_endpoint_by_host() called for host %s\", host)"},{"line_number":131,"context_line":"        session \u003d db_api.get_session()"},{"line_number":132,"context_line":""},{"line_number":133,"context_line":"        with session.begin(subtransactions\u003dTrue):"},{"line_number":134,"context_line":"            host_elements \u003d (session.query(GreEndpoints)."},{"line_number":135,"context_line":"                             filter_by(host\u003dhost).first())"},{"line_number":136,"context_line":"            return host_elements"}],"source_content_type":"text/x-python","patch_set":17,"id":"5a890539_a078dbc4","line":133,"in_reply_to":"5a890539_40bd77b6","updated":"2014-11-14 19:21:04.000000000","message":"it\u0027s a get operation, it\u0027s not required","commit_id":"3a67ead24e0af6498d532d85c838445d0bf7ee20"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"854df8676f2465831513ded13e4897436b833679","unresolved":false,"context_lines":[{"line_number":130,"context_line":"        LOG.debug(\"get_endpoint_by_host() called for host %s\", host)"},{"line_number":131,"context_line":"        session \u003d db_api.get_session()"},{"line_number":132,"context_line":""},{"line_number":133,"context_line":"        with session.begin(subtransactions\u003dTrue):"},{"line_number":134,"context_line":"            host_elements \u003d (session.query(GreEndpoints)."},{"line_number":135,"context_line":"                             filter_by(host\u003dhost).first())"},{"line_number":136,"context_line":"            return host_elements"}],"source_content_type":"text/x-python","patch_set":17,"id":"5a890539_3e840c5d","line":133,"in_reply_to":"5a890539_a078dbc4","updated":"2014-11-14 19:44:39.000000000","message":"Thanks :)\n\nI will remove with session.begin(subtransactions\u003dTrue):","commit_id":"3a67ead24e0af6498d532d85c838445d0bf7ee20"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"c79e904cdd731742cb0a2dabbcfacda4e2bd1452","unresolved":false,"context_lines":[{"line_number":139,"context_line":"        LOG.debug(\"get_endpoint_by_ip() called for ip %s\", ip)"},{"line_number":140,"context_line":"        session \u003d db_api.get_session()"},{"line_number":141,"context_line":""},{"line_number":142,"context_line":"        with session.begin(subtransactions\u003dTrue):"},{"line_number":143,"context_line":"            ip_elements \u003d (session.query(GreEndpoints)."},{"line_number":144,"context_line":"                           filter_by(ip_address\u003dip).first())"},{"line_number":145,"context_line":"            return ip_elements"}],"source_content_type":"text/x-python","patch_set":17,"id":"5a890539_80b3dfe7","line":142,"updated":"2014-11-14 18:36:05.000000000","message":"itto","commit_id":"3a67ead24e0af6498d532d85c838445d0bf7ee20"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"57b3ff71c8c3e59fadac0ab622627c615227cc4b","unresolved":false,"context_lines":[{"line_number":126,"context_line":"                for gre_endpoint in gre_endpoints]"},{"line_number":127,"context_line":""},{"line_number":128,"context_line":"    def get_endpoint_by_host(self, host):"},{"line_number":129,"context_line":"        LOG.debug(\"get_endpoint_by_host() called for host %s\", host)"},{"line_number":130,"context_line":"        session \u003d db_api.get_session()"},{"line_number":131,"context_line":""},{"line_number":132,"context_line":"        host_elements \u003d (session.query(GreEndpoints)."}],"source_content_type":"text/x-python","patch_set":18,"id":"5a890539_7863681a","line":129,"updated":"2014-11-20 14:17:14.000000000","message":"nit: not sure this method worth logging, even debug-level","commit_id":"87fd4f6ea9a091ef5447ef9026f43c5d00428d48"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"a2e13e89d093c23633728efaf875e6cc3a489037","unresolved":false,"context_lines":[{"line_number":126,"context_line":"                for gre_endpoint in gre_endpoints]"},{"line_number":127,"context_line":""},{"line_number":128,"context_line":"    def get_endpoint_by_host(self, host):"},{"line_number":129,"context_line":"        LOG.debug(\"get_endpoint_by_host() called for host %s\", host)"},{"line_number":130,"context_line":"        session \u003d db_api.get_session()"},{"line_number":131,"context_line":""},{"line_number":132,"context_line":"        host_elements \u003d (session.query(GreEndpoints)."}],"source_content_type":"text/x-python","patch_set":18,"id":"5a890539_9ca2c398","line":129,"in_reply_to":"5a890539_7863681a","updated":"2014-11-20 15:56:43.000000000","message":"It helps in debugging. I feel lets keep it :)","commit_id":"87fd4f6ea9a091ef5447ef9026f43c5d00428d48"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"57b3ff71c8c3e59fadac0ab622627c615227cc4b","unresolved":false,"context_lines":[{"line_number":129,"context_line":"        LOG.debug(\"get_endpoint_by_host() called for host %s\", host)"},{"line_number":130,"context_line":"        session \u003d db_api.get_session()"},{"line_number":131,"context_line":""},{"line_number":132,"context_line":"        host_elements \u003d (session.query(GreEndpoints)."},{"line_number":133,"context_line":"                         filter_by(host\u003dhost).first())"},{"line_number":134,"context_line":"        return host_elements"},{"line_number":135,"context_line":""}],"source_content_type":"text/x-python","patch_set":18,"id":"5a890539_587cecb5","line":132,"updated":"2014-11-20 14:17:14.000000000","message":"nit: why \u0027host_elements\u0027 and not \u0027host_endpoint\u0027?","commit_id":"87fd4f6ea9a091ef5447ef9026f43c5d00428d48"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"a2e13e89d093c23633728efaf875e6cc3a489037","unresolved":false,"context_lines":[{"line_number":129,"context_line":"        LOG.debug(\"get_endpoint_by_host() called for host %s\", host)"},{"line_number":130,"context_line":"        session \u003d db_api.get_session()"},{"line_number":131,"context_line":""},{"line_number":132,"context_line":"        host_elements \u003d (session.query(GreEndpoints)."},{"line_number":133,"context_line":"                         filter_by(host\u003dhost).first())"},{"line_number":134,"context_line":"        return host_elements"},{"line_number":135,"context_line":""}],"source_content_type":"text/x-python","patch_set":18,"id":"5a890539_3c662f2a","line":132,"in_reply_to":"5a890539_587cecb5","updated":"2014-11-20 15:56:43.000000000","message":"Good question.\n\nFrankly, speaking it takes a lot of time to think for the variable name rather than writing a code.\n\nHere, we are returning a db_obj which have all data elements belonging to that row. so I gave host_elements,\n\nSimilarly, for ip_elements.\n\nI hope now we should n\u0027t start a debate for the variable name.\n\nJust kidding :)","commit_id":"87fd4f6ea9a091ef5447ef9026f43c5d00428d48"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"57b3ff71c8c3e59fadac0ab622627c615227cc4b","unresolved":false,"context_lines":[{"line_number":134,"context_line":"        return host_elements"},{"line_number":135,"context_line":""},{"line_number":136,"context_line":"    def get_endpoint_by_ip(self, ip):"},{"line_number":137,"context_line":"        LOG.debug(\"get_endpoint_by_ip() called for ip %s\", ip)"},{"line_number":138,"context_line":"        session \u003d db_api.get_session()"},{"line_number":139,"context_line":""},{"line_number":140,"context_line":"        ip_elements \u003d (session.query(GreEndpoints)."}],"source_content_type":"text/x-python","patch_set":18,"id":"5a890539_d847fc75","line":137,"updated":"2014-11-20 14:17:14.000000000","message":"same on logging","commit_id":"87fd4f6ea9a091ef5447ef9026f43c5d00428d48"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"a2e13e89d093c23633728efaf875e6cc3a489037","unresolved":false,"context_lines":[{"line_number":134,"context_line":"        return host_elements"},{"line_number":135,"context_line":""},{"line_number":136,"context_line":"    def get_endpoint_by_ip(self, ip):"},{"line_number":137,"context_line":"        LOG.debug(\"get_endpoint_by_ip() called for ip %s\", ip)"},{"line_number":138,"context_line":"        session \u003d db_api.get_session()"},{"line_number":139,"context_line":""},{"line_number":140,"context_line":"        ip_elements \u003d (session.query(GreEndpoints)."}],"source_content_type":"text/x-python","patch_set":18,"id":"5a890539_675ae02b","line":137,"in_reply_to":"5a890539_d847fc75","updated":"2014-11-20 15:56:43.000000000","message":"ditto","commit_id":"87fd4f6ea9a091ef5447ef9026f43c5d00428d48"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"57b3ff71c8c3e59fadac0ab622627c615227cc4b","unresolved":false,"context_lines":[{"line_number":154,"context_line":"        return gre_endpoint"},{"line_number":155,"context_line":""},{"line_number":156,"context_line":"    def delete_endpoint(self, ip):"},{"line_number":157,"context_line":"        LOG.debug(\"delete_gre_endpoint() called for ip %s\", ip)"},{"line_number":158,"context_line":"        session \u003d db_api.get_session()"},{"line_number":159,"context_line":""},{"line_number":160,"context_line":"        with session.begin(subtransactions\u003dTrue):"}],"source_content_type":"text/x-python","patch_set":18,"id":"5a890539_130ec732","line":157,"updated":"2014-11-20 14:17:14.000000000","message":"method name is usually present in logs anyway","commit_id":"87fd4f6ea9a091ef5447ef9026f43c5d00428d48"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"a2e13e89d093c23633728efaf875e6cc3a489037","unresolved":false,"context_lines":[{"line_number":154,"context_line":"        return gre_endpoint"},{"line_number":155,"context_line":""},{"line_number":156,"context_line":"    def delete_endpoint(self, ip):"},{"line_number":157,"context_line":"        LOG.debug(\"delete_gre_endpoint() called for ip %s\", ip)"},{"line_number":158,"context_line":"        session \u003d db_api.get_session()"},{"line_number":159,"context_line":""},{"line_number":160,"context_line":"        with session.begin(subtransactions\u003dTrue):"}],"source_content_type":"text/x-python","patch_set":18,"id":"5a890539_87126c56","line":157,"in_reply_to":"5a890539_130ec732","updated":"2014-11-20 15:56:43.000000000","message":"Yeah, but this method is called for GRE. so I mentioned it.\nOtherwise, it will be confusing whether it is called for vxlan or gre? \n\nReference:\n     def add_endpoint(self, ip, host):\n     LOG.debug(\"add_gre_endpoint() called for ip %s\", ip)","commit_id":"87fd4f6ea9a091ef5447ef9026f43c5d00428d48"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"b74e1aba4fe79bd4b09c98b28090a3e59ef9bcd2","unresolved":false,"context_lines":[{"line_number":129,"context_line":"        LOG.debug(\"get_endpoint_by_host() called for host %s\", host)"},{"line_number":130,"context_line":"        session \u003d db_api.get_session()"},{"line_number":131,"context_line":""},{"line_number":132,"context_line":"        host_elements \u003d (session.query(GreEndpoints)."},{"line_number":133,"context_line":"                         filter_by(host\u003dhost).first())"},{"line_number":134,"context_line":"        return host_elements"},{"line_number":135,"context_line":""}],"source_content_type":"text/x-python","patch_set":27,"id":"5a890539_00186b1d","line":132,"updated":"2014-11-27 00:33:47.000000000","message":"just return here; btw this should really be \u0027endpoint\u0027, why plural?","commit_id":"9862d81db5aae9f1234a163938873705bb104269"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"c231022d03ad8ed3eab303eaff07b39101b7ef68","unresolved":false,"context_lines":[{"line_number":129,"context_line":"        LOG.debug(\"get_endpoint_by_host() called for host %s\", host)"},{"line_number":130,"context_line":"        session \u003d db_api.get_session()"},{"line_number":131,"context_line":""},{"line_number":132,"context_line":"        host_elements \u003d (session.query(GreEndpoints)."},{"line_number":133,"context_line":"                         filter_by(host\u003dhost).first())"},{"line_number":134,"context_line":"        return host_elements"},{"line_number":135,"context_line":""}],"source_content_type":"text/x-python","patch_set":27,"id":"5a890539_af0cdf3c","line":132,"in_reply_to":"5a890539_00186b1d","updated":"2014-11-27 08:55:43.000000000","message":"Ok, let me explain.\n\nHere, we are passing a host and making a query to look for that host and returning the entire row ( as db_obj). And that row will be having data elements like (ip_address, host) that we called as host_elements.\n\nAnd we used those host_elements in conditional statements in type_tunnel.py","commit_id":"9862d81db5aae9f1234a163938873705bb104269"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"717799eb1ca97f44218bc3889fcd6e125ddf1a51","unresolved":false,"context_lines":[{"line_number":129,"context_line":"        LOG.debug(\"get_endpoint_by_host() called for host %s\", host)"},{"line_number":130,"context_line":"        session \u003d db_api.get_session()"},{"line_number":131,"context_line":""},{"line_number":132,"context_line":"        host_elements \u003d (session.query(GreEndpoints)."},{"line_number":133,"context_line":"                         filter_by(host\u003dhost).first())"},{"line_number":134,"context_line":"        return host_elements"},{"line_number":135,"context_line":""}],"source_content_type":"text/x-python","patch_set":27,"id":"5a890539_2043a7b0","line":132,"in_reply_to":"5a890539_648075bf","updated":"2014-12-05 11:48:02.000000000","message":"ok..fine :)\n\nShall I rename it host_endpoint?\n Similarly, ip_endpoint?\n\nAnd, let get_endpoint_by_host() and get_endpoint_by_ip() returns host_endpoint and ip_endpoint respectively as db_objj.","commit_id":"9862d81db5aae9f1234a163938873705bb104269"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"a5f56b2935893940b1d00a84c9f8431967b622fc","unresolved":false,"context_lines":[{"line_number":129,"context_line":"        LOG.debug(\"get_endpoint_by_host() called for host %s\", host)"},{"line_number":130,"context_line":"        session \u003d db_api.get_session()"},{"line_number":131,"context_line":""},{"line_number":132,"context_line":"        host_elements \u003d (session.query(GreEndpoints)."},{"line_number":133,"context_line":"                         filter_by(host\u003dhost).first())"},{"line_number":134,"context_line":"        return host_elements"},{"line_number":135,"context_line":""}],"source_content_type":"text/x-python","patch_set":27,"id":"5a890539_648075bf","line":132,"in_reply_to":"5a890539_af0cdf3c","updated":"2014-12-05 00:31:45.000000000","message":"I get that, that\u0027s confusing and the named variable is useless.","commit_id":"9862d81db5aae9f1234a163938873705bb104269"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"b74e1aba4fe79bd4b09c98b28090a3e59ef9bcd2","unresolved":false,"context_lines":[{"line_number":137,"context_line":"        LOG.debug(\"get_endpoint_by_ip() called for ip %s\", ip)"},{"line_number":138,"context_line":"        session \u003d db_api.get_session()"},{"line_number":139,"context_line":""},{"line_number":140,"context_line":"        ip_elements \u003d (session.query(GreEndpoints)."},{"line_number":141,"context_line":"                       filter_by(ip_address\u003dip).first())"},{"line_number":142,"context_line":"        return ip_elements"},{"line_number":143,"context_line":""}],"source_content_type":"text/x-python","patch_set":27,"id":"5a890539_e01a7f17","line":140,"updated":"2014-11-27 00:33:47.000000000","message":"why plural? just return here","commit_id":"9862d81db5aae9f1234a163938873705bb104269"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"c231022d03ad8ed3eab303eaff07b39101b7ef68","unresolved":false,"context_lines":[{"line_number":137,"context_line":"        LOG.debug(\"get_endpoint_by_ip() called for ip %s\", ip)"},{"line_number":138,"context_line":"        session \u003d db_api.get_session()"},{"line_number":139,"context_line":""},{"line_number":140,"context_line":"        ip_elements \u003d (session.query(GreEndpoints)."},{"line_number":141,"context_line":"                       filter_by(ip_address\u003dip).first())"},{"line_number":142,"context_line":"        return ip_elements"},{"line_number":143,"context_line":""}],"source_content_type":"text/x-python","patch_set":27,"id":"5a890539_6f291789","line":140,"in_reply_to":"5a890539_e01a7f17","updated":"2014-11-27 08:55:43.000000000","message":"Here, we are passing an ip and making a query to look for that ip_address and returning the entire row ( as db_obj). And that row will be having data elements like (ip_address, host) that we called as ip_elements.\nAnd we used those ip_elements in conditional statements in type_tunnel.py","commit_id":"9862d81db5aae9f1234a163938873705bb104269"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"b74e1aba4fe79bd4b09c98b28090a3e59ef9bcd2","unresolved":false,"context_lines":[{"line_number":141,"context_line":"                       filter_by(ip_address\u003dip).first())"},{"line_number":142,"context_line":"        return ip_elements"},{"line_number":143,"context_line":""},{"line_number":144,"context_line":"    def add_endpoint(self, ip, host):"},{"line_number":145,"context_line":"        LOG.debug(\"add_gre_endpoint() called for ip %s\", ip)"},{"line_number":146,"context_line":"        session \u003d db_api.get_session()"},{"line_number":147,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":27,"id":"5a890539_2071e744","line":144,"updated":"2014-11-27 00:33:47.000000000","message":"make it default to None?","commit_id":"9862d81db5aae9f1234a163938873705bb104269"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"c231022d03ad8ed3eab303eaff07b39101b7ef68","unresolved":false,"context_lines":[{"line_number":141,"context_line":"                       filter_by(ip_address\u003dip).first())"},{"line_number":142,"context_line":"        return ip_elements"},{"line_number":143,"context_line":""},{"line_number":144,"context_line":"    def add_endpoint(self, ip, host):"},{"line_number":145,"context_line":"        LOG.debug(\"add_gre_endpoint() called for ip %s\", ip)"},{"line_number":146,"context_line":"        session \u003d db_api.get_session()"},{"line_number":147,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":27,"id":"5a890539_af23ffa5","line":144,"in_reply_to":"5a890539_2071e744","updated":"2014-11-27 08:55:43.000000000","message":"I think we can handle this in type_tunnel.py","commit_id":"9862d81db5aae9f1234a163938873705bb104269"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"1e1fcce9e45bfa713ea95ad5b281bf626a032cd1","unresolved":false,"context_lines":[{"line_number":131,"context_line":""},{"line_number":132,"context_line":"        host_endpoint \u003d (session.query(GreEndpoints)."},{"line_number":133,"context_line":"                         filter_by(host\u003dhost).first())"},{"line_number":134,"context_line":"        return host_endpoint"},{"line_number":135,"context_line":""},{"line_number":136,"context_line":"    def get_endpoint_by_ip(self, ip):"},{"line_number":137,"context_line":"        LOG.debug(\"get_endpoint_by_ip() called for ip %s\", ip)"}],"source_content_type":"text/x-python","patch_set":32,"id":"3a961159_76a9807b","line":134,"updated":"2015-01-05 21:47:41.000000000","message":"I still don\u0027t understand why you don\u0027t just do:\n\n  return session.query(GreEndpoints).filter_by(host\u003dhost).first()\n\nBut I won\u0027t hold it against you.","commit_id":"3db0e619c83892a7aab61807969205253833ff8d"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"caf1e477be4b3f31cb9d3c710a8e0f3e018de3cb","unresolved":false,"context_lines":[{"line_number":131,"context_line":""},{"line_number":132,"context_line":"        host_endpoint \u003d (session.query(GreEndpoints)."},{"line_number":133,"context_line":"                         filter_by(host\u003dhost).first())"},{"line_number":134,"context_line":"        return host_endpoint"},{"line_number":135,"context_line":""},{"line_number":136,"context_line":"    def get_endpoint_by_ip(self, ip):"},{"line_number":137,"context_line":"        LOG.debug(\"get_endpoint_by_ip() called for ip %s\", ip)"}],"source_content_type":"text/x-python","patch_set":32,"id":"3a961159_110be624","line":134,"in_reply_to":"3a961159_76a9807b","updated":"2015-01-05 22:00:47.000000000","message":"I don\u0027t understand why get_endpoint_by_ip/host are duplicated between gre/vxlan type drivers","commit_id":"3db0e619c83892a7aab61807969205253833ff8d"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"1e1fcce9e45bfa713ea95ad5b281bf626a032cd1","unresolved":false,"context_lines":[{"line_number":139,"context_line":""},{"line_number":140,"context_line":"        ip_endpoint \u003d (session.query(GreEndpoints)."},{"line_number":141,"context_line":"                       filter_by(ip_address\u003dip).first())"},{"line_number":142,"context_line":"        return ip_endpoint"},{"line_number":143,"context_line":""},{"line_number":144,"context_line":"    def add_endpoint(self, ip, host):"},{"line_number":145,"context_line":"        LOG.debug(\"add_gre_endpoint() called for ip %s\", ip)"}],"source_content_type":"text/x-python","patch_set":32,"id":"3a961159_b6b688da","line":142,"updated":"2015-01-05 21:47:41.000000000","message":"here too.","commit_id":"3db0e619c83892a7aab61807969205253833ff8d"}],"neutron/plugins/ml2/drivers/type_tunnel.py":[{"author":{"_account_id":2711,"name":"Zhang Hua","display_name":"Zhang Hua","email":"joshua.zhang@canonical.com","username":"zhhuabj"},"change_message_id":"2b609e516f44ba4be3b93b85726d8d0d3f80f83f","unresolved":false,"context_lines":[{"line_number":184,"context_line":"                                         tunnel_type)"},{"line_number":185,"context_line":"            self.plugin \u003d manager.NeutronManager.get_plugin()"},{"line_number":186,"context_line":"            old_tunneling_ip \u003d self.plugin.get_tunneling_ip()"},{"line_number":187,"context_line":"            if tunnel_ip !\u003d old_tunneling_ip:"},{"line_number":188,"context_line":"                #Notify all other listening agents to delete stale tunnels"},{"line_number":189,"context_line":"                self._notifier.tunnel_delete(rpc_context, old_tunneling_ip,"},{"line_number":190,"context_line":"                                            tunnel_type)"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa98f980_957a34ef","line":187,"updated":"2014-09-12 12:21:07.000000000","message":"if old_tunneling_ip and tunnel_ip !\u003d old_tunneling_ip: ?","commit_id":"3872cb623f01a4d4248bf6f959897fbc16adc3a1"},{"author":{"_account_id":12711,"name":"Phani Pawan","email":"ppawan@hp.com","username":"phanipawanp"},"change_message_id":"2147ce1d417144e23b7c8cda1b4ab4d8fda0dbe9","unresolved":false,"context_lines":[{"line_number":184,"context_line":"                                         tunnel_type)"},{"line_number":185,"context_line":"            self.plugin \u003d manager.NeutronManager.get_plugin()"},{"line_number":186,"context_line":"            old_tunneling_ip \u003d self.plugin.get_tunneling_ip()"},{"line_number":187,"context_line":"            if tunnel_ip !\u003d old_tunneling_ip:"},{"line_number":188,"context_line":"                #Notify all other listening agents to delete stale tunnels"},{"line_number":189,"context_line":"                self._notifier.tunnel_delete(rpc_context, old_tunneling_ip,"},{"line_number":190,"context_line":"                                            tunnel_type)"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa98f980_a547dfa1","line":187,"in_reply_to":"fa98f980_957a34ef","updated":"2014-09-15 09:15:45.000000000","message":"Done","commit_id":"3872cb623f01a4d4248bf6f959897fbc16adc3a1"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"08d85e9067edc6a510015b979114eab4604a9526","unresolved":false,"context_lines":[{"line_number":19,"context_line":"from neutron.common import topics"},{"line_number":20,"context_line":"from neutron.db import api as db_api"},{"line_number":21,"context_line":"from neutron.db import model_base"},{"line_number":22,"context_line":"from neutron import manager"},{"line_number":23,"context_line":"from neutron.openstack.common.gettextutils import _LI"},{"line_number":24,"context_line":"from neutron.openstack.common.gettextutils import _LW"},{"line_number":25,"context_line":"from neutron.openstack.common import log"}],"source_content_type":"text/x-python","patch_set":2,"id":"da9df570_b28283fe","line":22,"updated":"2014-09-22 13:13:07.000000000","message":"Not required!","commit_id":"c011517167d4e767991aaff26afff7b25ee3bb9c"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"08d85e9067edc6a510015b979114eab4604a9526","unresolved":false,"context_lines":[{"line_number":197,"context_line":"            # Notify all other listening agents"},{"line_number":198,"context_line":"            self._notifier.tunnel_update(rpc_context, tunnel.ip_address,"},{"line_number":199,"context_line":"                                         tunnel_type)"},{"line_number":200,"context_line":"            self.plugin \u003d manager.NeutronManager.get_plugin()"},{"line_number":201,"context_line":"            if tunnel_ip !\u003d ip_address:"},{"line_number":202,"context_line":"                #Notify all other listening agents to delete stale tunnels"},{"line_number":203,"context_line":"                self._notifier.tunnel_delete(rpc_context, ip_address,"}],"source_content_type":"text/x-python","patch_set":2,"id":"da9df570_928d7f34","line":200,"updated":"2014-09-22 13:13:07.000000000","message":"Not required !","commit_id":"c011517167d4e767991aaff26afff7b25ee3bb9c"},{"author":{"_account_id":9361,"name":"Vivekanandan Narasimhan","email":"n.vivekanandan@ericsson.com","username":"viveknarasimhan"},"change_message_id":"6a8a936dc0fe48f04df5d78ae6f0acaa858c7c95","unresolved":false,"context_lines":[{"line_number":203,"context_line":"                self._notifier.tunnel_delete(rpc_context, ip_address,"},{"line_number":204,"context_line":"                                            tunnel_type)"},{"line_number":205,"context_line":"                self._update_tunnel_mapping(host, tunnel_ip)"},{"line_number":206,"context_line":"                driver.obj.delete_endpoint(ip_address)"},{"line_number":207,"context_line":"            # Return the list of tunnels IP\u0027s to the agent"},{"line_number":208,"context_line":"            return entry"},{"line_number":209,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":2,"id":"da9df570_c1265768","line":206,"updated":"2014-09-22 11:15:51.000000000","message":"Since you may need to manage multiple tunnel types (both vxlan,gre) for a single compute server,  you need to ensure that for both these types the stale entries are cleared.\r\n\r\nWith above logic, only first tunnel type tunnel_sync() call will clear off stale entries.  For next tunnel_type used by the same L2 Agent, the stale entries will continue to remain.","commit_id":"c011517167d4e767991aaff26afff7b25ee3bb9c"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"4231664ea1cd8733d52c6c1a48696a656709ebce","unresolved":false,"context_lines":[{"line_number":203,"context_line":"                self._notifier.tunnel_delete(rpc_context, ip_address,"},{"line_number":204,"context_line":"                                            tunnel_type)"},{"line_number":205,"context_line":"                self._update_tunnel_mapping(host, tunnel_ip)"},{"line_number":206,"context_line":"                driver.obj.delete_endpoint(ip_address)"},{"line_number":207,"context_line":"            # Return the list of tunnels IP\u0027s to the agent"},{"line_number":208,"context_line":"            return entry"},{"line_number":209,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":2,"id":"da9df570_890372b7","line":206,"in_reply_to":"da9df570_c1265768","updated":"2014-09-23 10:55:54.000000000","message":"Thanks Vivek, \n\nIt will be fixed in next patch set.","commit_id":"c011517167d4e767991aaff26afff7b25ee3bb9c"},{"author":{"_account_id":9361,"name":"Vivekanandan Narasimhan","email":"n.vivekanandan@ericsson.com","username":"viveknarasimhan"},"change_message_id":"5ea74abb1f26560838a5c67ba1447e081b816309","unresolved":false,"context_lines":[{"line_number":36,"context_line":"    \"\"\"Represents the host tunnel mappings.\"\"\""},{"line_number":37,"context_line":"    __tablename__ \u003d \u0027ml2_tunnel_mappings\u0027"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"    host \u003d sa.Column(sa.String(64), primary_key\u003dTrue)"},{"line_number":40,"context_line":"    ip_address \u003d sa.Column(sa.String(64))"},{"line_number":41,"context_line":""},{"line_number":42,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"da9df570_2a7a58f1","line":39,"updated":"2014-09-24 09:23:25.000000000","message":"here again please make host length 255","commit_id":"c539a7b39ad8ea1bc9a447bc44668e6d6bdbcdbf"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"006b61ae0a455b11028a751522c8888463a3a0f2","unresolved":false,"context_lines":[{"line_number":36,"context_line":"    \"\"\"Represents the host tunnel mappings.\"\"\""},{"line_number":37,"context_line":"    __tablename__ \u003d \u0027ml2_tunnel_mappings\u0027"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"    host \u003d sa.Column(sa.String(64), primary_key\u003dTrue)"},{"line_number":40,"context_line":"    ip_address \u003d sa.Column(sa.String(64))"},{"line_number":41,"context_line":""},{"line_number":42,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"da9df570_85d5f7ba","line":39,"in_reply_to":"da9df570_2a7a58f1","updated":"2014-09-24 10:29:59.000000000","message":"Done","commit_id":"c539a7b39ad8ea1bc9a447bc44668e6d6bdbcdbf"},{"author":{"_account_id":9361,"name":"Vivekanandan Narasimhan","email":"n.vivekanandan@ericsson.com","username":"viveknarasimhan"},"change_message_id":"5ea74abb1f26560838a5c67ba1447e081b816309","unresolved":false,"context_lines":[{"line_number":73,"context_line":""},{"line_number":74,"context_line":"    @abc.abstractmethod"},{"line_number":75,"context_line":"    def delete_endpoint(self, ip):"},{"line_number":76,"context_line":"        \"\"\"Delete the stale endpoint in the type_driver database."},{"line_number":77,"context_line":""},{"line_number":78,"context_line":"        param ip: the ip of the endpoint"},{"line_number":79,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":4,"id":"da9df570_eae5b0a8","line":76,"updated":"2014-09-24 09:23:25.000000000","message":"remove the word \u0027stale\u0027 in the comment.","commit_id":"c539a7b39ad8ea1bc9a447bc44668e6d6bdbcdbf"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"006b61ae0a455b11028a751522c8888463a3a0f2","unresolved":false,"context_lines":[{"line_number":73,"context_line":""},{"line_number":74,"context_line":"    @abc.abstractmethod"},{"line_number":75,"context_line":"    def delete_endpoint(self, ip):"},{"line_number":76,"context_line":"        \"\"\"Delete the stale endpoint in the type_driver database."},{"line_number":77,"context_line":""},{"line_number":78,"context_line":"        param ip: the ip of the endpoint"},{"line_number":79,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":4,"id":"da9df570_c5d61fc3","line":76,"in_reply_to":"da9df570_eae5b0a8","updated":"2014-09-24 10:29:59.000000000","message":"Done","commit_id":"c539a7b39ad8ea1bc9a447bc44668e6d6bdbcdbf"},{"author":{"_account_id":9361,"name":"Vivekanandan Narasimhan","email":"n.vivekanandan@ericsson.com","username":"viveknarasimhan"},"change_message_id":"5ea74abb1f26560838a5c67ba1447e081b816309","unresolved":false,"context_lines":[{"line_number":196,"context_line":"                    #Notify all other listening agents to delete stale tunnels"},{"line_number":197,"context_line":"                    self._notifier.tunnel_delete(rpc_context, ip_address,"},{"line_number":198,"context_line":"                                                tunnel_type)"},{"line_number":199,"context_line":"                    driver.obj.delete_endpoint(ip_address)"},{"line_number":200,"context_line":"                tunnel \u003d driver.obj.add_endpoint(tunnel_ip)"},{"line_number":201,"context_line":"                tunnels \u003d driver.obj.get_endpoints()"},{"line_number":202,"context_line":"                entry \u003d {\u0027tunnels\u0027: tunnels, \u0027tunnel_type\u0027: tunnel_type}"}],"source_content_type":"text/x-python","patch_set":4,"id":"da9df570_6559f3fd","line":199,"updated":"2014-09-24 09:23:25.000000000","message":"This looks to be not handling case wherein we get a host name change (same IP) coupled with UDP port change for VXLAN tunnel type, as add_endpoint will fail not updating the udp_port also.","commit_id":"c539a7b39ad8ea1bc9a447bc44668e6d6bdbcdbf"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"006b61ae0a455b11028a751522c8888463a3a0f2","unresolved":false,"context_lines":[{"line_number":196,"context_line":"                    #Notify all other listening agents to delete stale tunnels"},{"line_number":197,"context_line":"                    self._notifier.tunnel_delete(rpc_context, ip_address,"},{"line_number":198,"context_line":"                                                tunnel_type)"},{"line_number":199,"context_line":"                    driver.obj.delete_endpoint(ip_address)"},{"line_number":200,"context_line":"                tunnel \u003d driver.obj.add_endpoint(tunnel_ip)"},{"line_number":201,"context_line":"                tunnels \u003d driver.obj.get_endpoints()"},{"line_number":202,"context_line":"                entry \u003d {\u0027tunnels\u0027: tunnels, \u0027tunnel_type\u0027: tunnel_type}"}],"source_content_type":"text/x-python","patch_set":4,"id":"da9df570_c8d713ec","line":199,"in_reply_to":"da9df570_6559f3fd","updated":"2014-09-24 10:29:59.000000000","message":"Not required , it will be handled in a separate bug. Since VXLAN_UDP_PORT \u003d 4789 is hard coded in type_vxlan.py","commit_id":"c539a7b39ad8ea1bc9a447bc44668e6d6bdbcdbf"},{"author":{"_account_id":9361,"name":"Vivekanandan Narasimhan","email":"n.vivekanandan@ericsson.com","username":"viveknarasimhan"},"change_message_id":"5ea74abb1f26560838a5c67ba1447e081b816309","unresolved":false,"context_lines":[{"line_number":207,"context_line":"            else:"},{"line_number":208,"context_line":"                msg \u003d _(\"network_type value \u0027%s\u0027 not supported\") % tunnel_type"},{"line_number":209,"context_line":"                raise exc.InvalidInput(error_message\u003dmsg)"},{"line_number":210,"context_line":"        self._update_tunnel_mapping(host, tunnel_ip)"},{"line_number":211,"context_line":"        # Return the list of tunnels IP\u0027s to the agent"},{"line_number":212,"context_line":"        return details"},{"line_number":213,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"da9df570_c51b7f1a","line":210,"updated":"2014-09-24 09:23:25.000000000","message":"We have to also see if it might be possible to have two different Data Network landing in servers each serving one tunnel type.  In such a case, holding a single common tunnel_mapping might not be sufficient.","commit_id":"c539a7b39ad8ea1bc9a447bc44668e6d6bdbcdbf"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"006b61ae0a455b11028a751522c8888463a3a0f2","unresolved":false,"context_lines":[{"line_number":207,"context_line":"            else:"},{"line_number":208,"context_line":"                msg \u003d _(\"network_type value \u0027%s\u0027 not supported\") % tunnel_type"},{"line_number":209,"context_line":"                raise exc.InvalidInput(error_message\u003dmsg)"},{"line_number":210,"context_line":"        self._update_tunnel_mapping(host, tunnel_ip)"},{"line_number":211,"context_line":"        # Return the list of tunnels IP\u0027s to the agent"},{"line_number":212,"context_line":"        return details"},{"line_number":213,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"da9df570_454eaf97","line":210,"in_reply_to":"da9df570_c51b7f1a","updated":"2014-09-24 10:29:59.000000000","message":"Not possible.","commit_id":"c539a7b39ad8ea1bc9a447bc44668e6d6bdbcdbf"},{"author":{"_account_id":9361,"name":"Vivekanandan Narasimhan","email":"n.vivekanandan@ericsson.com","username":"viveknarasimhan"},"change_message_id":"5ea74abb1f26560838a5c67ba1447e081b816309","unresolved":false,"context_lines":[{"line_number":209,"context_line":"                raise exc.InvalidInput(error_message\u003dmsg)"},{"line_number":210,"context_line":"        self._update_tunnel_mapping(host, tunnel_ip)"},{"line_number":211,"context_line":"        # Return the list of tunnels IP\u0027s to the agent"},{"line_number":212,"context_line":"        return details"},{"line_number":213,"context_line":""},{"line_number":214,"context_line":"    def _get_tunnel_mapping(self, host):"},{"line_number":215,"context_line":"        LOG.debug(_(\"get_tunnel_mapping() called for host %s\"), host)"}],"source_content_type":"text/x-python","patch_set":4,"id":"da9df570_2527ebb7","line":212,"updated":"2014-09-24 09:23:25.000000000","message":"Since the return type is changed here, please ensure that all other vendor callers of tunnel_sync are fixed appropriately.","commit_id":"c539a7b39ad8ea1bc9a447bc44668e6d6bdbcdbf"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"006b61ae0a455b11028a751522c8888463a3a0f2","unresolved":false,"context_lines":[{"line_number":209,"context_line":"                raise exc.InvalidInput(error_message\u003dmsg)"},{"line_number":210,"context_line":"        self._update_tunnel_mapping(host, tunnel_ip)"},{"line_number":211,"context_line":"        # Return the list of tunnels IP\u0027s to the agent"},{"line_number":212,"context_line":"        return details"},{"line_number":213,"context_line":""},{"line_number":214,"context_line":"    def _get_tunnel_mapping(self, host):"},{"line_number":215,"context_line":"        LOG.debug(_(\"get_tunnel_mapping() called for host %s\"), host)"}],"source_content_type":"text/x-python","patch_set":4,"id":"da9df570_254b6b88","line":212,"in_reply_to":"da9df570_2527ebb7","updated":"2014-09-24 10:29:59.000000000","message":"Done","commit_id":"c539a7b39ad8ea1bc9a447bc44668e6d6bdbcdbf"},{"author":{"_account_id":9361,"name":"Vivekanandan Narasimhan","email":"n.vivekanandan@ericsson.com","username":"viveknarasimhan"},"change_message_id":"5ea74abb1f26560838a5c67ba1447e081b816309","unresolved":false,"context_lines":[{"line_number":221,"context_line":"            return tunnel_mapping.ip_address"},{"line_number":222,"context_line":""},{"line_number":223,"context_line":"    def _add_tunnel_mapping(self, host, ip):"},{"line_number":224,"context_line":"        LOG.debug(_(\"add_tunnel_mapping() called for host %s\"), host)"},{"line_number":225,"context_line":"        session \u003d db_api.get_session()"},{"line_number":226,"context_line":"        try:"},{"line_number":227,"context_line":"            tunnel_mapping \u003d Ml2TunnelMappings(host \u003d host, ip_address\u003dip)"}],"source_content_type":"text/x-python","patch_set":4,"id":"da9df570_ea93f0f7","line":224,"updated":"2014-09-24 09:23:25.000000000","message":"Please no _ for debug.  Apply everywhere.","commit_id":"c539a7b39ad8ea1bc9a447bc44668e6d6bdbcdbf"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"006b61ae0a455b11028a751522c8888463a3a0f2","unresolved":false,"context_lines":[{"line_number":221,"context_line":"            return tunnel_mapping.ip_address"},{"line_number":222,"context_line":""},{"line_number":223,"context_line":"    def _add_tunnel_mapping(self, host, ip):"},{"line_number":224,"context_line":"        LOG.debug(_(\"add_tunnel_mapping() called for host %s\"), host)"},{"line_number":225,"context_line":"        session \u003d db_api.get_session()"},{"line_number":226,"context_line":"        try:"},{"line_number":227,"context_line":"            tunnel_mapping \u003d Ml2TunnelMappings(host \u003d host, ip_address\u003dip)"}],"source_content_type":"text/x-python","patch_set":4,"id":"da9df570_25644b21","line":224,"in_reply_to":"da9df570_ea93f0f7","updated":"2014-09-24 10:29:59.000000000","message":"Done","commit_id":"c539a7b39ad8ea1bc9a447bc44668e6d6bdbcdbf"},{"author":{"_account_id":9361,"name":"Vivekanandan Narasimhan","email":"n.vivekanandan@ericsson.com","username":"viveknarasimhan"},"change_message_id":"5ea74abb1f26560838a5c67ba1447e081b816309","unresolved":false,"context_lines":[{"line_number":228,"context_line":"            tunnel_mapping.save(session)"},{"line_number":229,"context_line":"        except db_exc.DBDuplicateEntry:"},{"line_number":230,"context_line":"            tunnel_mapping \u003d (session.query(Ml2TunnelMappings)."},{"line_number":231,"context_line":"                              filter_by(host\u003dhost).one())"},{"line_number":232,"context_line":"            LOG.warning(_(\"Tunnel Mapping with host %s already exists\"), host)"},{"line_number":233,"context_line":"        return tunnel_mapping"},{"line_number":234,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"da9df570_4a35dcf5","line":231,"updated":"2014-09-24 09:23:25.000000000","message":"It looks like this warning will be thrown every time tunnel_sync is called.  We need to put only genuine warnings.","commit_id":"c539a7b39ad8ea1bc9a447bc44668e6d6bdbcdbf"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"006b61ae0a455b11028a751522c8888463a3a0f2","unresolved":false,"context_lines":[{"line_number":228,"context_line":"            tunnel_mapping.save(session)"},{"line_number":229,"context_line":"        except db_exc.DBDuplicateEntry:"},{"line_number":230,"context_line":"            tunnel_mapping \u003d (session.query(Ml2TunnelMappings)."},{"line_number":231,"context_line":"                              filter_by(host\u003dhost).one())"},{"line_number":232,"context_line":"            LOG.warning(_(\"Tunnel Mapping with host %s already exists\"), host)"},{"line_number":233,"context_line":"        return tunnel_mapping"},{"line_number":234,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"da9df570_e5816390","line":231,"in_reply_to":"da9df570_4a35dcf5","updated":"2014-09-24 10:29:59.000000000","message":"Done","commit_id":"c539a7b39ad8ea1bc9a447bc44668e6d6bdbcdbf"},{"author":{"_account_id":9361,"name":"Vivekanandan Narasimhan","email":"n.vivekanandan@ericsson.com","username":"viveknarasimhan"},"change_message_id":"5ea74abb1f26560838a5c67ba1447e081b816309","unresolved":false,"context_lines":[{"line_number":238,"context_line":"        with session.begin(subtransactions\u003dTrue):"},{"line_number":239,"context_line":"            tunnel_mapping \u003d (session.query(Ml2TunnelMappings)."},{"line_number":240,"context_line":"                              filter_by(host\u003dhost).one())"},{"line_number":241,"context_line":"            tunnel_mapping.update({\u0027ip_address\u0027: ip})"},{"line_number":242,"context_line":""},{"line_number":243,"context_line":""},{"line_number":244,"context_line":"class TunnelAgentRpcApiMixin(object):"}],"source_content_type":"text/x-python","patch_set":4,"id":"da9df570_25752b98","line":241,"updated":"2014-09-24 09:23:25.000000000","message":"Better to move all tunnel_mapping methods and the respective class in a separate file tunnel_mapping.py in same ml2 folder.  Can import here and use.\r\n\r\nAlso please add unit test cases for all the tunnel_mapping support methods.","commit_id":"c539a7b39ad8ea1bc9a447bc44668e6d6bdbcdbf"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"006b61ae0a455b11028a751522c8888463a3a0f2","unresolved":false,"context_lines":[{"line_number":238,"context_line":"        with session.begin(subtransactions\u003dTrue):"},{"line_number":239,"context_line":"            tunnel_mapping \u003d (session.query(Ml2TunnelMappings)."},{"line_number":240,"context_line":"                              filter_by(host\u003dhost).one())"},{"line_number":241,"context_line":"            tunnel_mapping.update({\u0027ip_address\u0027: ip})"},{"line_number":242,"context_line":""},{"line_number":243,"context_line":""},{"line_number":244,"context_line":"class TunnelAgentRpcApiMixin(object):"}],"source_content_type":"text/x-python","patch_set":4,"id":"da9df570_057d87b1","line":241,"in_reply_to":"da9df570_25752b98","updated":"2014-09-24 10:29:59.000000000","message":"Done","commit_id":"c539a7b39ad8ea1bc9a447bc44668e6d6bdbcdbf"},{"author":{"_account_id":11614,"name":"Koteswara Rao Kelam","email":"koteswara.kelam@hp.com","username":"koteswar"},"change_message_id":"2d742531a2050c10b3459657ec35da4e104975a5","unresolved":false,"context_lines":[{"line_number":258,"context_line":"    def _get_tunnel_delete_topic(self):"},{"line_number":259,"context_line":"        return topics.get_topic_name(self.topic,"},{"line_number":260,"context_line":"                                     TUNNEL,"},{"line_number":261,"context_line":"                                     topics.DELETE)"},{"line_number":262,"context_line":""},{"line_number":263,"context_line":"    def tunnel_delete(self, context, tunnel_ip, tunnel_type):"},{"line_number":264,"context_line":"        self.fanout_cast(context,"}],"source_content_type":"text/x-python","patch_set":4,"id":"da9df570_14c4df5d","line":261,"updated":"2014-09-24 06:33:38.000000000","message":"can we do it in one line?","commit_id":"c539a7b39ad8ea1bc9a447bc44668e6d6bdbcdbf"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"e4a4d54bca2a178b481f77175d140d4ad4e4cce7","unresolved":false,"context_lines":[{"line_number":64,"context_line":"    def delete_endpoint(self, ip):"},{"line_number":65,"context_line":"        \"\"\"Delete the endpoint in the type_driver database."},{"line_number":66,"context_line":""},{"line_number":67,"context_line":"        param ip: the ip of the endpoint"},{"line_number":68,"context_line":"        \"\"\""},{"line_number":69,"context_line":"        pass"},{"line_number":70,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"da9df570_a439fca5","line":67,"updated":"2014-09-25 09:23:29.000000000","message":"the ip of -\u003e the IP address of","commit_id":"25d745021b343ef8194bfb2f9e6d149618323d5b"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"1f80c755e4aa85db38cc090c5803c55b8adaed82","unresolved":false,"context_lines":[{"line_number":64,"context_line":"    def delete_endpoint(self, ip):"},{"line_number":65,"context_line":"        \"\"\"Delete the endpoint in the type_driver database."},{"line_number":66,"context_line":""},{"line_number":67,"context_line":"        param ip: the ip of the endpoint"},{"line_number":68,"context_line":"        \"\"\""},{"line_number":69,"context_line":"        pass"},{"line_number":70,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"da9df570_bbb837c9","line":67,"in_reply_to":"da9df570_a439fca5","updated":"2014-09-25 14:27:01.000000000","message":"Done","commit_id":"25d745021b343ef8194bfb2f9e6d149618323d5b"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"e4a4d54bca2a178b481f77175d140d4ad4e4cce7","unresolved":false,"context_lines":[{"line_number":156,"context_line":"                filter_by(**{self.segmentation_key: tunnel_id})."},{"line_number":157,"context_line":"                first())"},{"line_number":158,"context_line":""},{"line_number":159,"context_line":""},{"line_number":160,"context_line":"class TunnelRpcCallbackMixin(object):"},{"line_number":161,"context_line":""},{"line_number":162,"context_line":"    def setup_tunnel_callback_mixin(self, notifier, type_manager):"}],"source_content_type":"text/x-python","patch_set":6,"id":"da9df570_41f842c3","line":159,"updated":"2014-09-25 09:23:29.000000000","message":"This changes tunnel_sync RPC callback, so we need to increment RPC version to 1.4 (in plugins/ml2/rpc RpcCallbacks).","commit_id":"25d745021b343ef8194bfb2f9e6d149618323d5b"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"1f80c755e4aa85db38cc090c5803c55b8adaed82","unresolved":false,"context_lines":[{"line_number":156,"context_line":"                filter_by(**{self.segmentation_key: tunnel_id})."},{"line_number":157,"context_line":"                first())"},{"line_number":158,"context_line":""},{"line_number":159,"context_line":""},{"line_number":160,"context_line":"class TunnelRpcCallbackMixin(object):"},{"line_number":161,"context_line":""},{"line_number":162,"context_line":"    def setup_tunnel_callback_mixin(self, notifier, type_manager):"}],"source_content_type":"text/x-python","patch_set":6,"id":"da9df570_dbc17b55","line":159,"in_reply_to":"da9df570_41f842c3","updated":"2014-09-25 14:27:01.000000000","message":"Done","commit_id":"25d745021b343ef8194bfb2f9e6d149618323d5b"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"e4a4d54bca2a178b481f77175d140d4ad4e4cce7","unresolved":false,"context_lines":[{"line_number":171,"context_line":"        \"\"\""},{"line_number":172,"context_line":"        details \u003d []"},{"line_number":173,"context_line":"        tunnel_ip \u003d kwargs.get(\u0027tunnel_ip\u0027)"},{"line_number":174,"context_line":"        tunnel_types \u003d kwargs.get(\u0027tunnel_types\u0027)"},{"line_number":175,"context_line":"        host \u003d kwargs.get(\u0027host\u0027)"},{"line_number":176,"context_line":"        if not tunnel_types:"},{"line_number":177,"context_line":"            msg \u003d _(\"Network_type value needed by the ML2 plugin\")"}],"source_content_type":"text/x-python","patch_set":6,"id":"da9df570_a1a3aeb0","line":174,"updated":"2014-09-25 09:23:29.000000000","message":"This is backward incompatible change. \"tunnel_type\" still must be supported.\n\nOtherwise we cannot upgrade neutron-server and agents in a different timing and it prevents us from upgrade Neutron step-by-step.","commit_id":"25d745021b343ef8194bfb2f9e6d149618323d5b"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"1f80c755e4aa85db38cc090c5803c55b8adaed82","unresolved":false,"context_lines":[{"line_number":171,"context_line":"        \"\"\""},{"line_number":172,"context_line":"        details \u003d []"},{"line_number":173,"context_line":"        tunnel_ip \u003d kwargs.get(\u0027tunnel_ip\u0027)"},{"line_number":174,"context_line":"        tunnel_types \u003d kwargs.get(\u0027tunnel_types\u0027)"},{"line_number":175,"context_line":"        host \u003d kwargs.get(\u0027host\u0027)"},{"line_number":176,"context_line":"        if not tunnel_types:"},{"line_number":177,"context_line":"            msg \u003d _(\"Network_type value needed by the ML2 plugin\")"}],"source_content_type":"text/x-python","patch_set":6,"id":"da9df570_bbbcb7dd","line":174,"in_reply_to":"da9df570_a1a3aeb0","updated":"2014-09-25 14:27:01.000000000","message":"Done","commit_id":"25d745021b343ef8194bfb2f9e6d149618323d5b"},{"author":{"_account_id":9093,"name":"Chuck Carlino","email":"chuckjcarlino@gmail.com","username":"ChuckC"},"change_message_id":"0e3f67c0eb97bdd488cac1d8a054b8ae37da571a","unresolved":false,"context_lines":[{"line_number":182,"context_line":"            driver \u003d self._type_manager.drivers.get(tunnel_type)"},{"line_number":183,"context_line":"            if driver:"},{"line_number":184,"context_line":"                if tunnel_ip !\u003d ip_address:"},{"line_number":185,"context_line":"                    #Notify all other listening agents to delete stale tunnels"},{"line_number":186,"context_line":"                    self._notifier.tunnel_delete(rpc_context, ip_address,"},{"line_number":187,"context_line":"                                                tunnel_type)"},{"line_number":188,"context_line":"                    driver.obj.delete_endpoint(ip_address)"}],"source_content_type":"text/x-python","patch_set":6,"id":"da9df570_c21c3e7a","line":185,"updated":"2014-09-24 23:05:12.000000000","message":"nit # Notify","commit_id":"25d745021b343ef8194bfb2f9e6d149618323d5b"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"949c9b9191c326226817671ad570b77917454959","unresolved":false,"context_lines":[{"line_number":182,"context_line":"            driver \u003d self._type_manager.drivers.get(tunnel_type)"},{"line_number":183,"context_line":"            if driver:"},{"line_number":184,"context_line":"                if tunnel_ip !\u003d ip_address:"},{"line_number":185,"context_line":"                    #Notify all other listening agents to delete stale tunnels"},{"line_number":186,"context_line":"                    self._notifier.tunnel_delete(rpc_context, ip_address,"},{"line_number":187,"context_line":"                                                tunnel_type)"},{"line_number":188,"context_line":"                    driver.obj.delete_endpoint(ip_address)"}],"source_content_type":"text/x-python","patch_set":6,"id":"da9df570_eb5e7675","line":185,"in_reply_to":"da9df570_c21c3e7a","updated":"2014-09-25 06:25:41.000000000","message":"Done","commit_id":"25d745021b343ef8194bfb2f9e6d149618323d5b"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"38ecf84212412b31c926dcfd65960e5d8944377b","unresolved":false,"context_lines":[{"line_number":186,"context_line":"                    self._notifier.tunnel_delete(rpc_context, ip_address,"},{"line_number":187,"context_line":"                                                tunnel_type)"},{"line_number":188,"context_line":"                    driver.obj.delete_endpoint(ip_address)"},{"line_number":189,"context_line":"                tunnel \u003d driver.obj.add_endpoint(tunnel_ip)"},{"line_number":190,"context_line":"                tunnels \u003d driver.obj.get_endpoints()"},{"line_number":191,"context_line":"                entry \u003d {\u0027tunnels\u0027: tunnels, \u0027tunnel_type\u0027: tunnel_type}"},{"line_number":192,"context_line":"                details.append(entry)"}],"source_content_type":"text/x-python","patch_set":6,"id":"da9df570_eaa90b91","line":189,"updated":"2014-09-25 10:57:20.000000000","message":"\"tunnel\" seems not used below.","commit_id":"25d745021b343ef8194bfb2f9e6d149618323d5b"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"1f80c755e4aa85db38cc090c5803c55b8adaed82","unresolved":false,"context_lines":[{"line_number":186,"context_line":"                    self._notifier.tunnel_delete(rpc_context, ip_address,"},{"line_number":187,"context_line":"                                                tunnel_type)"},{"line_number":188,"context_line":"                    driver.obj.delete_endpoint(ip_address)"},{"line_number":189,"context_line":"                tunnel \u003d driver.obj.add_endpoint(tunnel_ip)"},{"line_number":190,"context_line":"                tunnels \u003d driver.obj.get_endpoints()"},{"line_number":191,"context_line":"                entry \u003d {\u0027tunnels\u0027: tunnels, \u0027tunnel_type\u0027: tunnel_type}"},{"line_number":192,"context_line":"                details.append(entry)"}],"source_content_type":"text/x-python","patch_set":6,"id":"da9df570_1b2a232c","line":189,"in_reply_to":"da9df570_eaa90b91","updated":"2014-09-25 14:27:01.000000000","message":"It is used in tunnel_update(rpc_context, tunnel.ip_address, tunnel_type)","commit_id":"25d745021b343ef8194bfb2f9e6d149618323d5b"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"38ecf84212412b31c926dcfd65960e5d8944377b","unresolved":false,"context_lines":[{"line_number":196,"context_line":"            else:"},{"line_number":197,"context_line":"                msg \u003d _(\"network_type value \u0027%s\u0027 not supported\") % tunnel_type"},{"line_number":198,"context_line":"                raise exc.InvalidInput(error_message\u003dmsg)"},{"line_number":199,"context_line":"        tun_map.update_tunnel_mapping(host, tunnel_ip)"},{"line_number":200,"context_line":"        # Return the list of tunnels IP\u0027s to the agent"},{"line_number":201,"context_line":"        return details"},{"line_number":202,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"da9df570_ea074b16","line":199,"updated":"2014-09-25 10:57:20.000000000","message":"Why is update_tunnel_mapping needed here?\nadd_tunnel_mapping at L.179 does the same for a new agent.\nFor existing agent, if add_tunnel_mapping/update_tunnel_mapping returns a tuple of new and old IP addresses, this (L.199) and L.179-180 can be merged into a single call.","commit_id":"25d745021b343ef8194bfb2f9e6d149618323d5b"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"1f80c755e4aa85db38cc090c5803c55b8adaed82","unresolved":false,"context_lines":[{"line_number":196,"context_line":"            else:"},{"line_number":197,"context_line":"                msg \u003d _(\"network_type value \u0027%s\u0027 not supported\") % tunnel_type"},{"line_number":198,"context_line":"                raise exc.InvalidInput(error_message\u003dmsg)"},{"line_number":199,"context_line":"        tun_map.update_tunnel_mapping(host, tunnel_ip)"},{"line_number":200,"context_line":"        # Return the list of tunnels IP\u0027s to the agent"},{"line_number":201,"context_line":"        return details"},{"line_number":202,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"da9df570_7befafe9","line":199,"in_reply_to":"da9df570_ea074b16","updated":"2014-09-25 14:27:01.000000000","message":"That\u0027s the awesome idea , thanks a lot :)","commit_id":"25d745021b343ef8194bfb2f9e6d149618323d5b"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"e4a4d54bca2a178b481f77175d140d4ad4e4cce7","unresolved":false,"context_lines":[{"line_number":225,"context_line":"                         self.make_msg(\u0027tunnel_delete\u0027,"},{"line_number":226,"context_line":"                                       tunnel_ip\u003dtunnel_ip,"},{"line_number":227,"context_line":"                                       tunnel_type\u003dtunnel_type),"},{"line_number":228,"context_line":"                         topic\u003dself._get_tunnel_delete_topic())"}],"source_content_type":"text/x-python","patch_set":6,"id":"da9df570_611e26bd","line":228,"updated":"2014-09-25 09:23:29.000000000","message":"This adds a new method to RPC API  from the server to the agent, so RPC version from server to agent needs to be incremented, and add \"version\u003dxxxxx\" argument to make_msg.","commit_id":"25d745021b343ef8194bfb2f9e6d149618323d5b"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"1f80c755e4aa85db38cc090c5803c55b8adaed82","unresolved":false,"context_lines":[{"line_number":225,"context_line":"                         self.make_msg(\u0027tunnel_delete\u0027,"},{"line_number":226,"context_line":"                                       tunnel_ip\u003dtunnel_ip,"},{"line_number":227,"context_line":"                                       tunnel_type\u003dtunnel_type),"},{"line_number":228,"context_line":"                         topic\u003dself._get_tunnel_delete_topic())"}],"source_content_type":"text/x-python","patch_set":6,"id":"da9df570_9bec53f5","line":228,"in_reply_to":"da9df570_611e26bd","updated":"2014-09-25 14:27:01.000000000","message":"Done","commit_id":"25d745021b343ef8194bfb2f9e6d149618323d5b"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"7908e4d8a73bae0f1c9e4f682287bdac163988dc","unresolved":false,"context_lines":[{"line_number":170,"context_line":"        be notified about the new tunnel IP."},{"line_number":171,"context_line":"        \"\"\""},{"line_number":172,"context_line":"        details \u003d []"},{"line_number":173,"context_line":"        tunnel_ip \u003d kwargs.get(\u0027tunnel_ip\u0027)"},{"line_number":174,"context_line":"        tunnel_types \u003d kwargs.get(\u0027tunnel_types\u0027)"},{"line_number":175,"context_line":"        host \u003d kwargs.get(\u0027host\u0027)"},{"line_number":176,"context_line":"        if not tunnel_types:"}],"source_content_type":"text/x-python","patch_set":7,"id":"da9df570_4f6f7c2b","line":173,"updated":"2014-09-25 18:16:49.000000000","message":"it is better to check if tunnel_ip is not None like L.176.","commit_id":"2204802effe1b4470e5ac985e473595124fd6085"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"158f1692f2acfeb01ca901690de4ff3e75ebb83f","unresolved":false,"context_lines":[{"line_number":170,"context_line":"        be notified about the new tunnel IP."},{"line_number":171,"context_line":"        \"\"\""},{"line_number":172,"context_line":"        details \u003d []"},{"line_number":173,"context_line":"        tunnel_ip \u003d kwargs.get(\u0027tunnel_ip\u0027)"},{"line_number":174,"context_line":"        tunnel_types \u003d kwargs.get(\u0027tunnel_types\u0027)"},{"line_number":175,"context_line":"        host \u003d kwargs.get(\u0027host\u0027)"},{"line_number":176,"context_line":"        if not tunnel_types:"}],"source_content_type":"text/x-python","patch_set":7,"id":"da9df570_f22e5842","line":173,"in_reply_to":"da9df570_4f6f7c2b","updated":"2014-09-25 19:18:07.000000000","message":"I think the agent will never send local_ip as None :)","commit_id":"2204802effe1b4470e5ac985e473595124fd6085"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"a98cf223df87c7adc2c33cf41336f32cb0510d4a","unresolved":false,"context_lines":[{"line_number":170,"context_line":"        be notified about the new tunnel IP."},{"line_number":171,"context_line":"        \"\"\""},{"line_number":172,"context_line":"        details \u003d []"},{"line_number":173,"context_line":"        tunnel_ip \u003d kwargs.get(\u0027tunnel_ip\u0027)"},{"line_number":174,"context_line":"        tunnel_types \u003d kwargs.get(\u0027tunnel_types\u0027)"},{"line_number":175,"context_line":"        host \u003d kwargs.get(\u0027host\u0027)"},{"line_number":176,"context_line":"        if not tunnel_types:"}],"source_content_type":"text/x-python","patch_set":7,"id":"da9df570_313efe28","line":173,"in_reply_to":"da9df570_f22e5842","updated":"2014-09-26 19:57:35.000000000","message":"Yes. it is just for fail-safe.","commit_id":"2204802effe1b4470e5ac985e473595124fd6085"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"7908e4d8a73bae0f1c9e4f682287bdac163988dc","unresolved":false,"context_lines":[{"line_number":172,"context_line":"        details \u003d []"},{"line_number":173,"context_line":"        tunnel_ip \u003d kwargs.get(\u0027tunnel_ip\u0027)"},{"line_number":174,"context_line":"        tunnel_types \u003d kwargs.get(\u0027tunnel_types\u0027)"},{"line_number":175,"context_line":"        host \u003d kwargs.get(\u0027host\u0027)"},{"line_number":176,"context_line":"        if not tunnel_types:"},{"line_number":177,"context_line":"            msg \u003d _(\"Network_type value needed by the ML2 plugin\")"},{"line_number":178,"context_line":"            raise exc.InvalidInput(error_message\u003dmsg)"}],"source_content_type":"text/x-python","patch_set":7,"id":"da9df570_cf8b6b66","line":175,"updated":"2014-09-25 18:16:49.000000000","message":"To keep the backward compatibility, we still need to consider a case where the old version of ovs agent sends tunnel_type (not tunnel_types). To handle this, I think the following code works:\n\n  # For backward compatibility, we need to take into account\n  # a case where an agent sends a message in the old argument.\n  tunnel_type \u003d kwargs.get(\u0027tunnel_types\u0027)\n  if tunnel_type:\n      tunnel_types \u003d [tunnel_type]\n\nand change L.179 to:\n\n  if host:\n      old_ip_address \u003d tun_map.add_tunnel_mapping(.....)\n  else:\n      # Don\u0027t care an old IP address when a message is the old vesion\n      old_ip_address \u003d None","commit_id":"2204802effe1b4470e5ac985e473595124fd6085"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"158f1692f2acfeb01ca901690de4ff3e75ebb83f","unresolved":false,"context_lines":[{"line_number":172,"context_line":"        details \u003d []"},{"line_number":173,"context_line":"        tunnel_ip \u003d kwargs.get(\u0027tunnel_ip\u0027)"},{"line_number":174,"context_line":"        tunnel_types \u003d kwargs.get(\u0027tunnel_types\u0027)"},{"line_number":175,"context_line":"        host \u003d kwargs.get(\u0027host\u0027)"},{"line_number":176,"context_line":"        if not tunnel_types:"},{"line_number":177,"context_line":"            msg \u003d _(\"Network_type value needed by the ML2 plugin\")"},{"line_number":178,"context_line":"            raise exc.InvalidInput(error_message\u003dmsg)"}],"source_content_type":"text/x-python","patch_set":7,"id":"da9df570_d2feb4ad","line":175,"in_reply_to":"da9df570_cf8b6b66","updated":"2014-09-25 19:18:07.000000000","message":"Thanks a ton :)","commit_id":"2204802effe1b4470e5ac985e473595124fd6085"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"7908e4d8a73bae0f1c9e4f682287bdac163988dc","unresolved":false,"context_lines":[{"line_number":176,"context_line":"        if not tunnel_types:"},{"line_number":177,"context_line":"            msg \u003d _(\"Network_type value needed by the ML2 plugin\")"},{"line_number":178,"context_line":"            raise exc.InvalidInput(error_message\u003dmsg)"},{"line_number":179,"context_line":"        ip_address \u003d tun_map.add_tunnel_mapping(host, tunnel_ip)"},{"line_number":180,"context_line":"        for tunnel_type in tunnel_types:"},{"line_number":181,"context_line":"            driver \u003d self._type_manager.drivers.get(tunnel_type)"},{"line_number":182,"context_line":"            if driver:"}],"source_content_type":"text/x-python","patch_set":7,"id":"da9df570_2f1078a7","line":179,"updated":"2014-09-25 18:16:49.000000000","message":"\"ip_address\" is a previous one. \"old_ip_address\" is a better name.","commit_id":"2204802effe1b4470e5ac985e473595124fd6085"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"158f1692f2acfeb01ca901690de4ff3e75ebb83f","unresolved":false,"context_lines":[{"line_number":176,"context_line":"        if not tunnel_types:"},{"line_number":177,"context_line":"            msg \u003d _(\"Network_type value needed by the ML2 plugin\")"},{"line_number":178,"context_line":"            raise exc.InvalidInput(error_message\u003dmsg)"},{"line_number":179,"context_line":"        ip_address \u003d tun_map.add_tunnel_mapping(host, tunnel_ip)"},{"line_number":180,"context_line":"        for tunnel_type in tunnel_types:"},{"line_number":181,"context_line":"            driver \u003d self._type_manager.drivers.get(tunnel_type)"},{"line_number":182,"context_line":"            if driver:"}],"source_content_type":"text/x-python","patch_set":7,"id":"da9df570_b20130b1","line":179,"in_reply_to":"da9df570_2f1078a7","updated":"2014-09-25 19:18:07.000000000","message":"Done","commit_id":"2204802effe1b4470e5ac985e473595124fd6085"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"7908e4d8a73bae0f1c9e4f682287bdac163988dc","unresolved":false,"context_lines":[{"line_number":196,"context_line":"                msg \u003d _(\"network_type value \u0027%s\u0027 not supported\") % tunnel_type"},{"line_number":197,"context_line":"                raise exc.InvalidInput(error_message\u003dmsg)"},{"line_number":198,"context_line":"        # Return the list of tunnels IP\u0027s to the agent"},{"line_number":199,"context_line":"        return details"},{"line_number":200,"context_line":""},{"line_number":201,"context_line":""},{"line_number":202,"context_line":"class TunnelAgentRpcApiMixin(object):"}],"source_content_type":"text/x-python","patch_set":7,"id":"da9df570_2f25d75b","line":199,"updated":"2014-09-25 18:16:49.000000000","message":"For backward compat, the retun value also needs to be taken care of.\n\n  if tunnel_type:\n      return details[0]\n  else:\n      return details","commit_id":"2204802effe1b4470e5ac985e473595124fd6085"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"158f1692f2acfeb01ca901690de4ff3e75ebb83f","unresolved":false,"context_lines":[{"line_number":196,"context_line":"                msg \u003d _(\"network_type value \u0027%s\u0027 not supported\") % tunnel_type"},{"line_number":197,"context_line":"                raise exc.InvalidInput(error_message\u003dmsg)"},{"line_number":198,"context_line":"        # Return the list of tunnels IP\u0027s to the agent"},{"line_number":199,"context_line":"        return details"},{"line_number":200,"context_line":""},{"line_number":201,"context_line":""},{"line_number":202,"context_line":"class TunnelAgentRpcApiMixin(object):"}],"source_content_type":"text/x-python","patch_set":7,"id":"da9df570_9525f60a","line":199,"in_reply_to":"da9df570_2f25d75b","updated":"2014-09-25 19:18:07.000000000","message":"Done","commit_id":"2204802effe1b4470e5ac985e473595124fd6085"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"7908e4d8a73bae0f1c9e4f682287bdac163988dc","unresolved":false,"context_lines":[{"line_number":223,"context_line":"                         self.make_msg(\u0027tunnel_delete\u0027,"},{"line_number":224,"context_line":"                                       tunnel_ip\u003dtunnel_ip,"},{"line_number":225,"context_line":"                                       tunnel_type\u003dtunnel_type),"},{"line_number":226,"context_line":"                         topic\u003dself._get_tunnel_delete_topic())"}],"source_content_type":"text/x-python","patch_set":7,"id":"da9df570_0f2e5392","line":226,"updated":"2014-09-25 18:16:49.000000000","message":"Please set version to this method too, and increment the agent side RPC API VERSION. After looking at ovs-agent side, version 1.3 is needed.\n\n  self.make_msg(...., version\u003d\"1.3\")\n\nand add the version history to ml2/rpc.py","commit_id":"2204802effe1b4470e5ac985e473595124fd6085"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"158f1692f2acfeb01ca901690de4ff3e75ebb83f","unresolved":false,"context_lines":[{"line_number":223,"context_line":"                         self.make_msg(\u0027tunnel_delete\u0027,"},{"line_number":224,"context_line":"                                       tunnel_ip\u003dtunnel_ip,"},{"line_number":225,"context_line":"                                       tunnel_type\u003dtunnel_type),"},{"line_number":226,"context_line":"                         topic\u003dself._get_tunnel_delete_topic())"}],"source_content_type":"text/x-python","patch_set":7,"id":"da9df570_35828ac8","line":226,"in_reply_to":"da9df570_0f2e5392","updated":"2014-09-25 19:18:07.000000000","message":"Done","commit_id":"2204802effe1b4470e5ac985e473595124fd6085"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"4f195b718b2e1bf30c9d76919367a5dc2b156b94","unresolved":false,"context_lines":[{"line_number":223,"context_line":"                         self.make_msg(\u0027tunnel_delete\u0027,"},{"line_number":224,"context_line":"                                       tunnel_ip\u003dtunnel_ip,"},{"line_number":225,"context_line":"                                       tunnel_type\u003dtunnel_type),"},{"line_number":226,"context_line":"                         topic\u003dself._get_tunnel_delete_topic())"}],"source_content_type":"text/x-python","patch_set":7,"id":"da9df570_606a80ef","line":226,"in_reply_to":"da9df570_35828ac8","updated":"2014-09-26 08:30:01.000000000","message":"Is this looks fine ?\n\n    def tunnel_delete(self, context, tunnel_ip, tunnel_type):\n        self.fanout_cast(context,\n                         self.make_msg(\u0027tunnel_delete\u0027,\n                                       tunnel_ip\u003dtunnel_ip,\n                                       tunnel_type\u003dtunnel_type,\n                                       version\u003d\u00271.3\u0027),\n                         topic\u003dself._get_tunnel_delete_topic())","commit_id":"2204802effe1b4470e5ac985e473595124fd6085"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"a98cf223df87c7adc2c33cf41336f32cb0510d4a","unresolved":false,"context_lines":[{"line_number":223,"context_line":"                         self.make_msg(\u0027tunnel_delete\u0027,"},{"line_number":224,"context_line":"                                       tunnel_ip\u003dtunnel_ip,"},{"line_number":225,"context_line":"                                       tunnel_type\u003dtunnel_type),"},{"line_number":226,"context_line":"                         topic\u003dself._get_tunnel_delete_topic())"}],"source_content_type":"text/x-python","patch_set":7,"id":"da9df570_711b26ca","line":226,"in_reply_to":"da9df570_606a80ef","updated":"2014-09-26 19:57:35.000000000","message":"Sorry I made a wrong comment. We need to add \"version\" to fanout_cast.\n\n  def tunnel_update(self, .....):\n      self.fanout_cast(context,\n                       self.make_msg(....),\n                       topic\u003dself._get_tunnel_delete_topic()),\n                       version\u003d\u00271.3\u0027)","commit_id":"2204802effe1b4470e5ac985e473595124fd6085"},{"author":{"_account_id":12737,"name":"Jacek Swiderski","email":"jacek.swiderski@codilime.com","username":"Altran"},"change_message_id":"e9ebd41d4440d0683b7e8d46ef7066c299ce4c27","unresolved":false,"context_lines":[{"line_number":181,"context_line":"        if driver:"},{"line_number":182,"context_line":"            if host:"},{"line_number":183,"context_line":"                endpoints \u003d driver.obj.get_endpoints()"},{"line_number":184,"context_line":"                host_elements, tunnel_ip_elements \u003d \\"},{"line_number":185,"context_line":"                    self._get_endpoint_for_host_and_tunnel_ip("},{"line_number":186,"context_line":"                                        endpoints, host, tunnel_ip)"},{"line_number":187,"context_line":"                if (tunnel_ip_elements and"}],"source_content_type":"text/x-python","patch_set":9,"id":"baa201ad_2a4a7a80","line":184,"updated":"2014-10-01 07:29:29.000000000","message":"use of () is preferred over \\","commit_id":"e68d86b2d51b2fa386e19ee2b5c42b8a50fc44b2"},{"author":{"_account_id":12711,"name":"Phani Pawan","email":"ppawan@hp.com","username":"phanipawanp"},"change_message_id":"bfe8497d5f283d4d5afe39d5a5858dff466392b2","unresolved":false,"context_lines":[{"line_number":181,"context_line":"        if driver:"},{"line_number":182,"context_line":"            if host:"},{"line_number":183,"context_line":"                endpoints \u003d driver.obj.get_endpoints()"},{"line_number":184,"context_line":"                host_elements, tunnel_ip_elements \u003d \\"},{"line_number":185,"context_line":"                    self._get_endpoint_for_host_and_tunnel_ip("},{"line_number":186,"context_line":"                                        endpoints, host, tunnel_ip)"},{"line_number":187,"context_line":"                if (tunnel_ip_elements and"}],"source_content_type":"text/x-python","patch_set":9,"id":"baa201ad_6862cbae","line":184,"in_reply_to":"baa201ad_2a4a7a80","updated":"2014-10-01 07:35:05.000000000","message":"Done","commit_id":"e68d86b2d51b2fa386e19ee2b5c42b8a50fc44b2"},{"author":{"_account_id":12737,"name":"Jacek Swiderski","email":"jacek.swiderski@codilime.com","username":"Altran"},"change_message_id":"e9ebd41d4440d0683b7e8d46ef7066c299ce4c27","unresolved":false,"context_lines":[{"line_number":221,"context_line":"                host_elements \u003d endpoint"},{"line_number":222,"context_line":"            if endpoint.get(\u0027ip_address\u0027) \u003d\u003d tunnel_ip:"},{"line_number":223,"context_line":"                tunnel_ip_elements \u003d endpoint"},{"line_number":224,"context_line":"        return host_elements, tunnel_ip_elements"},{"line_number":225,"context_line":""},{"line_number":226,"context_line":""},{"line_number":227,"context_line":"class TunnelAgentRpcApiMixin(object):"}],"source_content_type":"text/x-python","patch_set":9,"id":"baa201ad_28b52331","line":224,"updated":"2014-10-01 07:29:29.000000000","message":"Just a question - can there be multiple endpoints that fulfil conditions inside for loop ? if yes why do we only return last we encounter ?","commit_id":"e68d86b2d51b2fa386e19ee2b5c42b8a50fc44b2"},{"author":{"_account_id":12711,"name":"Phani Pawan","email":"ppawan@hp.com","username":"phanipawanp"},"change_message_id":"bfe8497d5f283d4d5afe39d5a5858dff466392b2","unresolved":false,"context_lines":[{"line_number":221,"context_line":"                host_elements \u003d endpoint"},{"line_number":222,"context_line":"            if endpoint.get(\u0027ip_address\u0027) \u003d\u003d tunnel_ip:"},{"line_number":223,"context_line":"                tunnel_ip_elements \u003d endpoint"},{"line_number":224,"context_line":"        return host_elements, tunnel_ip_elements"},{"line_number":225,"context_line":""},{"line_number":226,"context_line":""},{"line_number":227,"context_line":"class TunnelAgentRpcApiMixin(object):"}],"source_content_type":"text/x-python","patch_set":9,"id":"baa201ad_e8f4fbd0","line":224,"in_reply_to":"baa201ad_28b52331","updated":"2014-10-01 07:35:05.000000000","message":"There cannot be multiple endpoints for the same host or IP. Hence we are returning only 1 value for each host and IP.","commit_id":"e68d86b2d51b2fa386e19ee2b5c42b8a50fc44b2"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"f9c3dfc92511a74c6f5aabd287e7790013f17099","unresolved":false,"context_lines":[{"line_number":185,"context_line":"                    self._get_endpoint_for_host_and_tunnel_ip("},{"line_number":186,"context_line":"                                        endpoints, host, tunnel_ip))"},{"line_number":187,"context_line":"                if (tunnel_ip_elements and"},{"line_number":188,"context_line":"                    tunnel_ip_elements.get(\u0027host\u0027) !\u003d host):"},{"line_number":189,"context_line":"                    msg \u003d (_(\"Tunnel IP %(ip)s in use with host %(host)s\"),"},{"line_number":190,"context_line":"                           {\u0027ip\u0027: tunnel_ip_elements.get(\u0027ip_address\u0027),"},{"line_number":191,"context_line":"                            \u0027host\u0027: tunnel_ip_elements.get(\u0027host\u0027)})"}],"source_content_type":"text/x-python","patch_set":11,"id":"baa201ad_d4a3414d","line":188,"updated":"2014-10-01 17:38:08.000000000","message":"This logic prevents from updating an endpoint information from the upgrade version of ovs-agent. In the upgrade scenario, we already have an endpoint entry, so after ugprade of ovs-agent this logic fails to update the entry.\n\nPlease consider to change the logic to update \"host\" if \"host\" of the existing entry is None. I think this is a valid normal operation.\n\nWhen I ran devstack before your patch, then download your patch and did db migration to head revision, I got the following error continuously....\n\n  014-10-02 02:16:38.374 ERROR oslo.messaging.rpc.dispatcher [req-740d4325-4a25-4915-a672-8d92cf0616b4 None None] Exception during message handling: Invalid input for operation: (u\u0027Tunnel IP %(ip)s in use with\n host %(host)s\u0027, {\u0027ip\u0027: u\u0027172.16.18.35\u0027, \u0027host\u0027: None}).\n2014-10-02 02:16:38.374 TRACE oslo.messaging.rpc.dispatcher Traceback (most recent call last):\n2014-10-02 02:16:38.374 TRACE oslo.messaging.rpc.dispatcher   File \"/usr/local/lib/python2.7/dist-packages/oslo/messaging/rpc/dispatcher.py\", line 134, in _dispatch_and_reply\n2014-10-02 02:16:38.374 TRACE oslo.messaging.rpc.dispatcher     incoming.message))\n2014-10-02 02:16:38.374 TRACE oslo.messaging.rpc.dispatcher   File \"/usr/local/lib/python2.7/dist-packages/oslo/messaging/rpc/dispatcher.py\", line 177, in _dispatch\n2014-10-02 02:16:38.374 TRACE oslo.messaging.rpc.dispatcher     return self._do_dispatch(endpoint, method, ctxt, args)\n2014-10-02 02:16:38.374 TRACE oslo.messaging.rpc.dispatcher   File \"/usr/local/lib/python2.7/dist-packages/oslo/messaging/rpc/dispatcher.py\", line 123, in _do_dispatch\n2014-10-02 02:16:38.374 TRACE oslo.messaging.rpc.dispatcher     result \u003d getattr(endpoint, method)(ctxt, **new_args)\n2014-10-02 02:16:38.374 TRACE oslo.messaging.rpc.dispatcher   File \"/opt/stack/neutron/neutron/plugins/ml2/drivers/type_tunnel.py\", line 192, in tunnel_sync\n2014-10-02 02:16:38.374 TRACE oslo.messaging.rpc.dispatcher     raise exc.InvalidInput(error_message\u003dmsg)\n2014-10-02 02:16:38.374 TRACE oslo.messaging.rpc.dispatcher InvalidInput: Invalid input for operation: (u\u0027Tunnel IP %(ip)s in use with host %(host)s\u0027, {\u0027ip\u0027: u\u0027172.16.18.35\u0027, \u0027host\u0027: None}).\n2014-10-02 02:16:38.374 TRACE oslo.messaging.rpc.dispatcher \n2014-10-02 02:16:38.375 ERROR oslo.messaging._drivers.common [req-740d4325-4a25-4915-a672-8d92cf0616b4 None None] Returning exception Invalid input for operation: (u\u0027Tunnel IP %(ip)s in use with host %(host)s\n\u0027, {\u0027ip\u0027: u\u0027172.16.18.35\u0027, \u0027host\u0027: None}). to caller\n2014-10-02 02:16:38.375 ERROR oslo.messaging._drivers.common [req-740d4325-4a25-4915-a672-8d92cf0616b4 None None] [\u0027Traceback (most recent call last):\\n\u0027, \u0027  File \"/usr/local/lib/python2.7/dist-packages/oslo/\nmessaging/rpc/dispatcher.py\", line 134, in _dispatch_and_reply\\n    incoming.message))\\n\u0027, \u0027  File \"/usr/local/lib/python2.7/dist-packages/oslo/messaging/rpc/dispatcher.py\", line 177, in _dispatch\\n    return\n self._do_dispatch(endpoint, method, ctxt, args)\\n\u0027, \u0027  File \"/usr/local/lib/python2.7/dist-packages/oslo/messaging/rpc/dispatcher.py\", line 123, in _do_dispatch\\n    result \u003d getattr(endpoint, method)(ctxt, \n**new_args)\\n\u0027, \u0027  File \"/opt/stack/neutron/neutron/plugins/ml2/drivers/type_tunnel.py\", line 192, in tunnel_sync\\n    raise exc.InvalidInput(error_message\u003dmsg)\\n\u0027, \"InvalidInput: Invalid input for operation:\n (u\u0027Tunnel IP %(ip)s in use with host %(host)s\u0027, {\u0027ip\u0027: u\u0027172.16.18.35\u0027, \u0027host\u0027: None}).\\n\"]","commit_id":"9651ce85b9ec6e537c81df04341ae01aff056ee0"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"9de4b2918600b7beba15a8ac0c0de128fc573d64","unresolved":false,"context_lines":[{"line_number":185,"context_line":"                    self._get_endpoint_for_host_and_tunnel_ip("},{"line_number":186,"context_line":"                                        endpoints, host, tunnel_ip))"},{"line_number":187,"context_line":"                if (tunnel_ip_elements and"},{"line_number":188,"context_line":"                    tunnel_ip_elements.get(\u0027host\u0027) !\u003d host):"},{"line_number":189,"context_line":"                    msg \u003d (_(\"Tunnel IP %(ip)s in use with host %(host)s\"),"},{"line_number":190,"context_line":"                           {\u0027ip\u0027: tunnel_ip_elements.get(\u0027ip_address\u0027),"},{"line_number":191,"context_line":"                            \u0027host\u0027: tunnel_ip_elements.get(\u0027host\u0027)})"}],"source_content_type":"text/x-python","patch_set":11,"id":"baa201ad_9dcabd4d","line":188,"in_reply_to":"baa201ad_d4a3414d","updated":"2014-10-01 18:25:58.000000000","message":"I will think over it and update the logic accordingly.","commit_id":"9651ce85b9ec6e537c81df04341ae01aff056ee0"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"f9c3dfc92511a74c6f5aabd287e7790013f17099","unresolved":false,"context_lines":[{"line_number":216,"context_line":"        host_elements \u003d None"},{"line_number":217,"context_line":"        tunnel_ip_elements \u003d None"},{"line_number":218,"context_line":""},{"line_number":219,"context_line":"        for endpoint in endpoints:"},{"line_number":220,"context_line":"            if endpoint.get(\u0027host\u0027) \u003d\u003d host:"},{"line_number":221,"context_line":"                host_elements \u003d endpoint"},{"line_number":222,"context_line":"            if endpoint.get(\u0027ip_address\u0027) \u003d\u003d tunnel_ip:"}],"source_content_type":"text/x-python","patch_set":11,"id":"baa201ad_7a243faf","line":219,"updated":"2014-10-01 17:38:08.000000000","message":"This operation is expensive. Consider a case where there are thousands of endpoints. Please consider looking up endpoints tables by host and by ip_address separately, and then determine what operation is required in tunnel_sync().","commit_id":"9651ce85b9ec6e537c81df04341ae01aff056ee0"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"9de4b2918600b7beba15a8ac0c0de128fc573d64","unresolved":false,"context_lines":[{"line_number":216,"context_line":"        host_elements \u003d None"},{"line_number":217,"context_line":"        tunnel_ip_elements \u003d None"},{"line_number":218,"context_line":""},{"line_number":219,"context_line":"        for endpoint in endpoints:"},{"line_number":220,"context_line":"            if endpoint.get(\u0027host\u0027) \u003d\u003d host:"},{"line_number":221,"context_line":"                host_elements \u003d endpoint"},{"line_number":222,"context_line":"            if endpoint.get(\u0027ip_address\u0027) \u003d\u003d tunnel_ip:"}],"source_content_type":"text/x-python","patch_set":11,"id":"baa201ad_3dbab1c0","line":219,"in_reply_to":"baa201ad_7a243faf","updated":"2014-10-01 18:25:58.000000000","message":"Agreed !","commit_id":"9651ce85b9ec6e537c81df04341ae01aff056ee0"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"d12ef78be53282a582dde3c4aea013c014878545","unresolved":false,"context_lines":[{"line_number":185,"context_line":"        if driver:"},{"line_number":186,"context_line":"            if host:"},{"line_number":187,"context_line":"                host_elements, tunnel_ip_elements \u003d ("},{"line_number":188,"context_line":"                    driver.obj.get_endpoints(host, tunnel_ip))"},{"line_number":189,"context_line":""},{"line_number":190,"context_line":"                if (tunnel_ip_elements and tunnel_ip_elements.host is None"},{"line_number":191,"context_line":"                    and host_elements is None):"}],"source_content_type":"text/x-python","patch_set":14,"id":"9aa7fdbe_d22c4cae","line":188,"updated":"2014-10-21 17:30:42.000000000","message":"According to the docstring above, get_endpoints returns a list of a dict of {\u0027ip\u0027: xxxx, \u0027host\u0027: xxxx}, so it seems wrong to receive the return value by \"host_elements, tunnel_ip_elements\". I don\u0027t think it works.\n\nIMO the method should have one role. It seems this method does two things: retrieve endpoints by host and retrieve endpoints by tunnel_ip. I would suggest new methods like get_endpoint_by_host and get_endpoint_by_ip.","commit_id":"62befde020aebf9b173422a4613c219584b235bf"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"ec4606d47bd74195ea55611f7cca89e5a6afc6d3","unresolved":false,"context_lines":[{"line_number":185,"context_line":"        if driver:"},{"line_number":186,"context_line":"            if host:"},{"line_number":187,"context_line":"                host_elements, tunnel_ip_elements \u003d ("},{"line_number":188,"context_line":"                    driver.obj.get_endpoints(host, tunnel_ip))"},{"line_number":189,"context_line":""},{"line_number":190,"context_line":"                if (tunnel_ip_elements and tunnel_ip_elements.host is None"},{"line_number":191,"context_line":"                    and host_elements is None):"}],"source_content_type":"text/x-python","patch_set":14,"id":"9aa7fdbe_9099cd21","line":188,"in_reply_to":"9aa7fdbe_d22c4cae","updated":"2014-10-21 18:33:49.000000000","message":"Please don\u0027t go just with doc string. I have not updated the doc string properly. I have already tested the get_endpoints method and it works fine.\n\nI have done it in a get_endpoints method instead of writing separate methods for get_endpoint_by_host and get_endpoint_by_ip because I think this will unnecessarily increase the code knowing that we could do it using get_endpoints itself.\n\nBut as you mentioned \"The type of the return value is different for a case where \"host\" is non-none and none. The type of the return value should be consistent.\"\n\nI don\u0027t mind writing new methods for get_endpoint_by_host and get_endpoint_by_ip  :)","commit_id":"62befde020aebf9b173422a4613c219584b235bf"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"d12ef78be53282a582dde3c4aea013c014878545","unresolved":false,"context_lines":[{"line_number":186,"context_line":"            if host:"},{"line_number":187,"context_line":"                host_elements, tunnel_ip_elements \u003d ("},{"line_number":188,"context_line":"                    driver.obj.get_endpoints(host, tunnel_ip))"},{"line_number":189,"context_line":""},{"line_number":190,"context_line":"                if (tunnel_ip_elements and tunnel_ip_elements.host is None"},{"line_number":191,"context_line":"                    and host_elements is None):"},{"line_number":192,"context_line":"                    driver.obj.delete_endpoint(tunnel_ip_elements.ip_address)"}],"source_content_type":"text/x-python","patch_set":14,"id":"9aa7fdbe_bc714de2","line":189,"updated":"2014-10-21 17:30:42.000000000","message":"I think it is better to have a comment what L.190-202 wants to do, i.e., the general strategy.","commit_id":"62befde020aebf9b173422a4613c219584b235bf"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"ec4606d47bd74195ea55611f7cca89e5a6afc6d3","unresolved":false,"context_lines":[{"line_number":186,"context_line":"            if host:"},{"line_number":187,"context_line":"                host_elements, tunnel_ip_elements \u003d ("},{"line_number":188,"context_line":"                    driver.obj.get_endpoints(host, tunnel_ip))"},{"line_number":189,"context_line":""},{"line_number":190,"context_line":"                if (tunnel_ip_elements and tunnel_ip_elements.host is None"},{"line_number":191,"context_line":"                    and host_elements is None):"},{"line_number":192,"context_line":"                    driver.obj.delete_endpoint(tunnel_ip_elements.ip_address)"}],"source_content_type":"text/x-python","patch_set":14,"id":"9aa7fdbe_70bb89e5","line":189,"in_reply_to":"9aa7fdbe_bc714de2","updated":"2014-10-21 18:33:49.000000000","message":"Exactly I thought of writing the same.  I will do it.","commit_id":"62befde020aebf9b173422a4613c219584b235bf"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"d12ef78be53282a582dde3c4aea013c014878545","unresolved":false,"context_lines":[{"line_number":189,"context_line":""},{"line_number":190,"context_line":"                if (tunnel_ip_elements and tunnel_ip_elements.host is None"},{"line_number":191,"context_line":"                    and host_elements is None):"},{"line_number":192,"context_line":"                    driver.obj.delete_endpoint(tunnel_ip_elements.ip_address)"},{"line_number":193,"context_line":"                elif (tunnel_ip_elements and tunnel_ip_elements.host !\u003d host):"},{"line_number":194,"context_line":"                    msg \u003d (_(\"Tunnel IP %(ip)s in use with host %(host)s\"),"},{"line_number":195,"context_line":"                           {\u0027ip\u0027: tunnel_ip_elements.ip_address,"}],"source_content_type":"text/x-python","patch_set":14,"id":"9aa7fdbe_7cc0c5e0","line":192,"updated":"2014-10-21 17:30:42.000000000","message":"I think it is better to update the entry rather than deleting and adding the entry.","commit_id":"62befde020aebf9b173422a4613c219584b235bf"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"ec4606d47bd74195ea55611f7cca89e5a6afc6d3","unresolved":false,"context_lines":[{"line_number":189,"context_line":""},{"line_number":190,"context_line":"                if (tunnel_ip_elements and tunnel_ip_elements.host is None"},{"line_number":191,"context_line":"                    and host_elements is None):"},{"line_number":192,"context_line":"                    driver.obj.delete_endpoint(tunnel_ip_elements.ip_address)"},{"line_number":193,"context_line":"                elif (tunnel_ip_elements and tunnel_ip_elements.host !\u003d host):"},{"line_number":194,"context_line":"                    msg \u003d (_(\"Tunnel IP %(ip)s in use with host %(host)s\"),"},{"line_number":195,"context_line":"                           {\u0027ip\u0027: tunnel_ip_elements.ip_address,"}],"source_content_type":"text/x-python","patch_set":14,"id":"9aa7fdbe_b036d150","line":192,"in_reply_to":"9aa7fdbe_7cc0c5e0","updated":"2014-10-21 18:33:49.000000000","message":"Then we will end up writing two methods: \n\n1. update_endpoint_host(self, host, ip) which have to update the host for       given tunnel IP usually in upgrade case.\n\n2. update_endpoint_ip(self, host, ip) which have to update the IP address  for given host usually if local_ip of host changes.\n\nSo I thought delete will be the best thing to do simply delete the entry. \n\nSince in the end we are always calling  \ntunnel \u003d driver.obj.add_endpoint(tunnel_ip, host) which will add the entry.\n\nDo you still think we should update the entry knowing we  are already adding in the end?\n \nPlease suggest :)","commit_id":"62befde020aebf9b173422a4613c219584b235bf"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"ee6d3264cf01d6c1799d361f0ce92956e8d32cdc","unresolved":false,"context_lines":[{"line_number":62,"context_line":"        pass"},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"    @abc.abstractmethod"},{"line_number":65,"context_line":"    def get_endpoint_by_host(self):"},{"line_number":66,"context_line":"        \"\"\"Get endpoint for a given host managed by the type_driver"},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"        param host: the Host name of the endpoint"}],"source_content_type":"text/x-python","patch_set":16,"id":"7a8c0949_d188f0c8","line":65,"updated":"2014-10-30 16:49:20.000000000","message":"I think you can reduce code duplication by implementing these 3 methods here. GRE and VXLAN endpoints classes will hold their table classes that will be used internally by these methods (That\u0027s the only difference between the VXLAN and GRE implementation I saw).","commit_id":"f653ac2fa7a9a75f31da5ab514a329672a98a965"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"99a2137531bdec0f9b3948afacaf29d575393483","unresolved":false,"context_lines":[{"line_number":62,"context_line":"        pass"},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"    @abc.abstractmethod"},{"line_number":65,"context_line":"    def get_endpoint_by_host(self):"},{"line_number":66,"context_line":"        \"\"\"Get endpoint for a given host managed by the type_driver"},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"        param host: the Host name of the endpoint"}],"source_content_type":"text/x-python","patch_set":16,"id":"5a890539_d2634fdb","line":65,"in_reply_to":"5a890539_bcce9a81","updated":"2014-11-12 18:32:12.000000000","message":"I partially agree with your comment. Still, I think we should not implement any thing related to type_gre or type_vxlan in type_tunnel. Having abstract methods declared in type_tunnel and implementing those in the respective type driver files would be better.","commit_id":"f653ac2fa7a9a75f31da5ab514a329672a98a965"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"6f7176c9ea7f71b4b90e8bedec2f225241be0681","unresolved":false,"context_lines":[{"line_number":62,"context_line":"        pass"},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"    @abc.abstractmethod"},{"line_number":65,"context_line":"    def get_endpoint_by_host(self):"},{"line_number":66,"context_line":"        \"\"\"Get endpoint for a given host managed by the type_driver"},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"        param host: the Host name of the endpoint"}],"source_content_type":"text/x-python","patch_set":16,"id":"5a890539_f5e7553e","line":65,"in_reply_to":"5a890539_d2634fdb","updated":"2014-11-12 19:06:10.000000000","message":"type_vxlan and type_gre first versions were similar (duplicates) ... some bug were identified on vxlan side and corrected in type_vxlan but not in type_gre although type_gre suffers from the same trouble. You can see the result of such duplications in type_vxlan/gre sync_allocations which have the same functions and initial implementations but end with different implementations and different limitations.","commit_id":"f653ac2fa7a9a75f31da5ab514a329672a98a965"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"b7cee111d1f6ba4446abc91f32951d8dd0c04629","unresolved":false,"context_lines":[{"line_number":62,"context_line":"        pass"},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"    @abc.abstractmethod"},{"line_number":65,"context_line":"    def get_endpoint_by_host(self):"},{"line_number":66,"context_line":"        \"\"\"Get endpoint for a given host managed by the type_driver"},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"        param host: the Host name of the endpoint"}],"source_content_type":"text/x-python","patch_set":16,"id":"7a8c0949_8cc8e675","line":65,"in_reply_to":"7a8c0949_5b6fb392","updated":"2014-11-03 11:32:52.000000000","message":"Hi Assaf,\n\nLooking forward for your reply for the comment above :)","commit_id":"f653ac2fa7a9a75f31da5ab514a329672a98a965"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"e7bf67e2677cc4ce905218589222810c0197ff69","unresolved":false,"context_lines":[{"line_number":62,"context_line":"        pass"},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"    @abc.abstractmethod"},{"line_number":65,"context_line":"    def get_endpoint_by_host(self):"},{"line_number":66,"context_line":"        \"\"\"Get endpoint for a given host managed by the type_driver"},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"        param host: the Host name of the endpoint"}],"source_content_type":"text/x-python","patch_set":16,"id":"5a890539_bcce9a81","line":65,"in_reply_to":"7a8c0949_8cc8e675","updated":"2014-11-12 17:27:39.000000000","message":"vxlan endpoint has an udp attribute but not gre endpoint which implies complexity to share add_endpoint/get_endpoints .. that\u0027s why i choose to have a specific implementation for gre/vxlan.\n\ndelete_endpoint implementations only differ by the DB class (can be replaced by self.model) and the type (self.get_type()) \u003d\u003d\u003e can be shared.\n\nget_endpoint_* implementations return raw db object (good idea?) so not udp attribute trouble \u003d\u003d\u003e can be shared.","commit_id":"f653ac2fa7a9a75f31da5ab514a329672a98a965"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"df3bee28b6dddb26b0648d8fc8cca414d671f5fc","unresolved":false,"context_lines":[{"line_number":62,"context_line":"        pass"},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"    @abc.abstractmethod"},{"line_number":65,"context_line":"    def get_endpoint_by_host(self):"},{"line_number":66,"context_line":"        \"\"\"Get endpoint for a given host managed by the type_driver"},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"        param host: the Host name of the endpoint"}],"source_content_type":"text/x-python","patch_set":16,"id":"7a8c0949_5b6fb392","line":65,"in_reply_to":"7a8c0949_d188f0c8","updated":"2014-10-31 06:17:27.000000000","message":"Are you suggesting to remove abstract methods?\n\nIf this is the case then we need to remove all abstract method like add_endpoint(), get_endpoints() etc and implements all in type_tunnel.py.\n\nBut I feel this will add complexity in type_tunnel.py also the existing code is declaring abstract methods and implementing them in the respective type(vxlan/gre) classes seem to be a better approach. \n\nThat\u0027s the reason we have declared get_endpoint_by_host() and get_endpoint_by_ip(self) as abstract methods and implemented in respective classes.\n\nIs my understanding correct ?","commit_id":"f653ac2fa7a9a75f31da5ab514a329672a98a965"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"e7bf67e2677cc4ce905218589222810c0197ff69","unresolved":false,"context_lines":[{"line_number":75,"context_line":"        pass"},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"    @abc.abstractmethod"},{"line_number":78,"context_line":"    def get_endpoint_by_ip(self):"},{"line_number":79,"context_line":"        \"\"\"Get endpoint for a given tunnel ip managed by the type_driver"},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"        param ip: the IP address of the endpoint"}],"source_content_type":"text/x-python","patch_set":16,"id":"5a890539_7c6fd2c5","line":78,"updated":"2014-11-12 17:27:39.000000000","message":"ip attribute seems missing","commit_id":"f653ac2fa7a9a75f31da5ab514a329672a98a965"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"99a2137531bdec0f9b3948afacaf29d575393483","unresolved":false,"context_lines":[{"line_number":75,"context_line":"        pass"},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"    @abc.abstractmethod"},{"line_number":78,"context_line":"    def get_endpoint_by_ip(self):"},{"line_number":79,"context_line":"        \"\"\"Get endpoint for a given tunnel ip managed by the type_driver"},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"        param ip: the IP address of the endpoint"}],"source_content_type":"text/x-python","patch_set":16,"id":"5a890539_bfdbeceb","line":78,"in_reply_to":"5a890539_7c6fd2c5","updated":"2014-11-12 18:32:12.000000000","message":"I missed it :)","commit_id":"f653ac2fa7a9a75f31da5ab514a329672a98a965"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"e7bf67e2677cc4ce905218589222810c0197ff69","unresolved":false,"context_lines":[{"line_number":208,"context_line":""},{"line_number":209,"context_line":"        host \u003d kwargs.get(\u0027host\u0027)"},{"line_number":210,"context_line":"        driver \u003d self._type_manager.drivers.get(tunnel_type)"},{"line_number":211,"context_line":"        if driver:"},{"line_number":212,"context_line":"            if host:"},{"line_number":213,"context_line":"                host_elements \u003d driver.obj.get_endpoint_by_host(host)"},{"line_number":214,"context_line":"                tunnel_ip_elements \u003d driver.obj.get_endpoint_by_ip(tunnel_ip)"}],"source_content_type":"text/x-python","patch_set":16,"id":"5a890539_5ca5b6b3","line":211,"updated":"2014-11-12 17:27:39.000000000","message":"\"if driver and host\" avoids an extra indentation","commit_id":"f653ac2fa7a9a75f31da5ab514a329672a98a965"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"99a2137531bdec0f9b3948afacaf29d575393483","unresolved":false,"context_lines":[{"line_number":208,"context_line":""},{"line_number":209,"context_line":"        host \u003d kwargs.get(\u0027host\u0027)"},{"line_number":210,"context_line":"        driver \u003d self._type_manager.drivers.get(tunnel_type)"},{"line_number":211,"context_line":"        if driver:"},{"line_number":212,"context_line":"            if host:"},{"line_number":213,"context_line":"                host_elements \u003d driver.obj.get_endpoint_by_host(host)"},{"line_number":214,"context_line":"                tunnel_ip_elements \u003d driver.obj.get_endpoint_by_ip(tunnel_ip)"}],"source_content_type":"text/x-python","patch_set":16,"id":"5a890539_ff4e54c0","line":211,"in_reply_to":"5a890539_5ca5b6b3","updated":"2014-11-12 18:32:12.000000000","message":"Basically, if host condition should be applicable only for those agents which passes hostname as part of tunnel_sync.\n\nSo we can\u0027t combine these two.","commit_id":"f653ac2fa7a9a75f31da5ab514a329672a98a965"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"ee6d3264cf01d6c1799d361f0ce92956e8d32cdc","unresolved":false,"context_lines":[{"line_number":224,"context_line":"                # 4. If passed host is found in DB and passed tunnel ip is not"},{"line_number":225,"context_line":"                #    found, delete the endpoint belonging to that host and"},{"line_number":226,"context_line":"                #    add endpoint with latest (tunnel_ip, host), it is a case"},{"line_number":227,"context_line":"                #    where local_ip of an agent got changed."},{"line_number":228,"context_line":"                if (tunnel_ip_elements and tunnel_ip_elements.host is None"},{"line_number":229,"context_line":"                    and host_elements is None):"},{"line_number":230,"context_line":"                    driver.obj.delete_endpoint(tunnel_ip_elements.ip_address)"}],"source_content_type":"text/x-python","patch_set":16,"id":"7a8c0949_5131600a","line":227,"updated":"2014-10-30 16:49:20.000000000","message":"While the comment is helpful, you can instead (Or in addition to) implement the conditions with helper methods, for example:\n\nif new_endpoint / if changed_ip / if upgrade_host. These helper functions will encapsulate the complicated conditionals so my poor brain doesn\u0027t have to deal with them here.","commit_id":"f653ac2fa7a9a75f31da5ab514a329672a98a965"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"99a2137531bdec0f9b3948afacaf29d575393483","unresolved":false,"context_lines":[{"line_number":224,"context_line":"                # 4. If passed host is found in DB and passed tunnel ip is not"},{"line_number":225,"context_line":"                #    found, delete the endpoint belonging to that host and"},{"line_number":226,"context_line":"                #    add endpoint with latest (tunnel_ip, host), it is a case"},{"line_number":227,"context_line":"                #    where local_ip of an agent got changed."},{"line_number":228,"context_line":"                if (tunnel_ip_elements and tunnel_ip_elements.host is None"},{"line_number":229,"context_line":"                    and host_elements is None):"},{"line_number":230,"context_line":"                    driver.obj.delete_endpoint(tunnel_ip_elements.ip_address)"}],"source_content_type":"text/x-python","patch_set":16,"id":"5a890539_bf3f6c24","line":227,"in_reply_to":"5a890539_9c863e12","updated":"2014-11-12 18:32:12.000000000","message":"Ok, fine will do it :)","commit_id":"f653ac2fa7a9a75f31da5ab514a329672a98a965"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"df3bee28b6dddb26b0648d8fc8cca414d671f5fc","unresolved":false,"context_lines":[{"line_number":224,"context_line":"                # 4. If passed host is found in DB and passed tunnel ip is not"},{"line_number":225,"context_line":"                #    found, delete the endpoint belonging to that host and"},{"line_number":226,"context_line":"                #    add endpoint with latest (tunnel_ip, host), it is a case"},{"line_number":227,"context_line":"                #    where local_ip of an agent got changed."},{"line_number":228,"context_line":"                if (tunnel_ip_elements and tunnel_ip_elements.host is None"},{"line_number":229,"context_line":"                    and host_elements is None):"},{"line_number":230,"context_line":"                    driver.obj.delete_endpoint(tunnel_ip_elements.ip_address)"}],"source_content_type":"text/x-python","patch_set":16,"id":"7a8c0949_7b1aaf18","line":227,"in_reply_to":"7a8c0949_5131600a","updated":"2014-10-31 06:17:27.000000000","message":"Nice suggestion.\n\nI feel it will unnecessarily increase the code, somewhere we have to compromise.","commit_id":"f653ac2fa7a9a75f31da5ab514a329672a98a965"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"e7bf67e2677cc4ce905218589222810c0197ff69","unresolved":false,"context_lines":[{"line_number":224,"context_line":"                # 4. If passed host is found in DB and passed tunnel ip is not"},{"line_number":225,"context_line":"                #    found, delete the endpoint belonging to that host and"},{"line_number":226,"context_line":"                #    add endpoint with latest (tunnel_ip, host), it is a case"},{"line_number":227,"context_line":"                #    where local_ip of an agent got changed."},{"line_number":228,"context_line":"                if (tunnel_ip_elements and tunnel_ip_elements.host is None"},{"line_number":229,"context_line":"                    and host_elements is None):"},{"line_number":230,"context_line":"                    driver.obj.delete_endpoint(tunnel_ip_elements.ip_address)"}],"source_content_type":"text/x-python","patch_set":16,"id":"5a890539_9c863e12","line":227,"in_reply_to":"7a8c0949_7b1aaf18","updated":"2014-11-12 17:27:39.000000000","message":"i would prefer to see the comment just after their associated condition","commit_id":"f653ac2fa7a9a75f31da5ab514a329672a98a965"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"e7bf67e2677cc4ce905218589222810c0197ff69","unresolved":false,"context_lines":[{"line_number":248,"context_line":"            # Return the list of tunnels IP\u0027s to the agent"},{"line_number":249,"context_line":"            return entry"},{"line_number":250,"context_line":"        else:"},{"line_number":251,"context_line":"            msg \u003d _(\"Network type value \u0027%s\u0027 not supported\") % tunnel_type"},{"line_number":252,"context_line":"            raise exc.InvalidInput(error_message\u003dmsg)"},{"line_number":253,"context_line":""},{"line_number":254,"context_line":""}],"source_content_type":"text/x-python","patch_set":16,"id":"5a890539_bc7cda21","line":251,"updated":"2014-11-12 17:27:39.000000000","message":"out of scope","commit_id":"f653ac2fa7a9a75f31da5ab514a329672a98a965"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"99a2137531bdec0f9b3948afacaf29d575393483","unresolved":false,"context_lines":[{"line_number":248,"context_line":"            # Return the list of tunnels IP\u0027s to the agent"},{"line_number":249,"context_line":"            return entry"},{"line_number":250,"context_line":"        else:"},{"line_number":251,"context_line":"            msg \u003d _(\"Network type value \u0027%s\u0027 not supported\") % tunnel_type"},{"line_number":252,"context_line":"            raise exc.InvalidInput(error_message\u003dmsg)"},{"line_number":253,"context_line":""},{"line_number":254,"context_line":""}],"source_content_type":"text/x-python","patch_set":16,"id":"5a890539_b23fa324","line":251,"in_reply_to":"5a890539_bc7cda21","updated":"2014-11-12 18:32:12.000000000","message":"Done","commit_id":"f653ac2fa7a9a75f31da5ab514a329672a98a965"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"6cbad4ff51ab6207ff4ee4a0a369dde2c5d30523","unresolved":false,"context_lines":[{"line_number":203,"context_line":""},{"line_number":204,"context_line":"        tunnel_type \u003d kwargs.get(\u0027tunnel_type\u0027)"},{"line_number":205,"context_line":"        if not tunnel_type:"},{"line_number":206,"context_line":"            msg \u003d _(\"Network type value needed by the ML2 plugin\")"},{"line_number":207,"context_line":"            raise exc.InvalidInput(error_message\u003dmsg)"},{"line_number":208,"context_line":""},{"line_number":209,"context_line":"        host \u003d kwargs.get(\u0027host\u0027)"}],"source_content_type":"text/x-python","patch_set":17,"id":"5a890539_f76e6600","line":206,"updated":"2014-11-13 12:06:34.000000000","message":"Kindly, don\u0027t consider it as out of scope.","commit_id":"3a67ead24e0af6498d532d85c838445d0bf7ee20"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"3403347bee0c8af983a3df72a63bb401d90eda3a","unresolved":false,"context_lines":[{"line_number":203,"context_line":""},{"line_number":204,"context_line":"        tunnel_type \u003d kwargs.get(\u0027tunnel_type\u0027)"},{"line_number":205,"context_line":"        if not tunnel_type:"},{"line_number":206,"context_line":"            msg \u003d _(\"Network type value needed by the ML2 plugin\")"},{"line_number":207,"context_line":"            raise exc.InvalidInput(error_message\u003dmsg)"},{"line_number":208,"context_line":""},{"line_number":209,"context_line":"        host \u003d kwargs.get(\u0027host\u0027)"}],"source_content_type":"text/x-python","patch_set":17,"id":"5a890539_401f376c","line":206,"in_reply_to":"5a890539_e05f430d","updated":"2014-11-14 19:06:22.000000000","message":"Ok fine, I don\u0027t mind posting new review-id covering:\n\n  msg \u003d _(\"Network type value needed by the ML2 plugin\")\n  msg \u003d _(\"Network type value \u0027%s\u0027 not supported\") % tunnel_type\n\nBut, Do you think anyone will bother to approve this nit changes later :)","commit_id":"3a67ead24e0af6498d532d85c838445d0bf7ee20"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"c79e904cdd731742cb0a2dabbcfacda4e2bd1452","unresolved":false,"context_lines":[{"line_number":203,"context_line":""},{"line_number":204,"context_line":"        tunnel_type \u003d kwargs.get(\u0027tunnel_type\u0027)"},{"line_number":205,"context_line":"        if not tunnel_type:"},{"line_number":206,"context_line":"            msg \u003d _(\"Network type value needed by the ML2 plugin\")"},{"line_number":207,"context_line":"            raise exc.InvalidInput(error_message\u003dmsg)"},{"line_number":208,"context_line":""},{"line_number":209,"context_line":"        host \u003d kwargs.get(\u0027host\u0027)"}],"source_content_type":"text/x-python","patch_set":17,"id":"5a890539_e05f430d","line":206,"in_reply_to":"5a890539_f76e6600","updated":"2014-11-14 18:36:05.000000000","message":"According to good practices[1], you should perform such correction is a specific change.\n\n[1] https://wiki.openstack.org/wiki/GitCommitMessages#Example_1","commit_id":"3a67ead24e0af6498d532d85c838445d0bf7ee20"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"6cbad4ff51ab6207ff4ee4a0a369dde2c5d30523","unresolved":false,"context_lines":[{"line_number":208,"context_line":""},{"line_number":209,"context_line":"        host \u003d kwargs.get(\u0027host\u0027)"},{"line_number":210,"context_line":"        driver \u003d self._type_manager.drivers.get(tunnel_type)"},{"line_number":211,"context_line":"        if driver:"},{"line_number":212,"context_line":"            if host:"},{"line_number":213,"context_line":"                host_elements \u003d driver.obj.get_endpoint_by_host(host)"},{"line_number":214,"context_line":"                tunnel_ip_elements \u003d driver.obj.get_endpoint_by_ip(tunnel_ip)"}],"source_content_type":"text/x-python","patch_set":17,"id":"5a890539_17a4d255","line":211,"updated":"2014-11-13 12:06:34.000000000","message":"As suggested in the earlier patch, we find it difficult to put comments on every conditional statement given below. That\u0027s the reason we are mentioning overall use-cases in the comment.\n\nKindly ask here itself if you need any clarification on the conditional statement.","commit_id":"3a67ead24e0af6498d532d85c838445d0bf7ee20"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"c79e904cdd731742cb0a2dabbcfacda4e2bd1452","unresolved":false,"context_lines":[{"line_number":208,"context_line":""},{"line_number":209,"context_line":"        host \u003d kwargs.get(\u0027host\u0027)"},{"line_number":210,"context_line":"        driver \u003d self._type_manager.drivers.get(tunnel_type)"},{"line_number":211,"context_line":"        if driver:"},{"line_number":212,"context_line":"            if host:"},{"line_number":213,"context_line":"                host_elements \u003d driver.obj.get_endpoint_by_host(host)"},{"line_number":214,"context_line":"                tunnel_ip_elements \u003d driver.obj.get_endpoint_by_ip(tunnel_ip)"}],"source_content_type":"text/x-python","patch_set":17,"id":"5a890539_40c1f752","line":211,"in_reply_to":"5a890539_17a4d255","updated":"2014-11-14 18:36:05.000000000","message":"it\u0027s (at least for me) difficult to understand, because i see 4 cases documented inside the if but 3 coded conditions inside the if.\n\niiuc 1. refers to the case host is evaluated to False (outside the if) but documented inside the if.\n\nIt could be clearer (?) if the comment bloc is before the if or if only 2. 3. 4. are documented inside the if.","commit_id":"3a67ead24e0af6498d532d85c838445d0bf7ee20"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"3403347bee0c8af983a3df72a63bb401d90eda3a","unresolved":false,"context_lines":[{"line_number":208,"context_line":""},{"line_number":209,"context_line":"        host \u003d kwargs.get(\u0027host\u0027)"},{"line_number":210,"context_line":"        driver \u003d self._type_manager.drivers.get(tunnel_type)"},{"line_number":211,"context_line":"        if driver:"},{"line_number":212,"context_line":"            if host:"},{"line_number":213,"context_line":"                host_elements \u003d driver.obj.get_endpoint_by_host(host)"},{"line_number":214,"context_line":"                tunnel_ip_elements \u003d driver.obj.get_endpoint_by_ip(tunnel_ip)"}],"source_content_type":"text/x-python","patch_set":17,"id":"5a890539_432d8194","line":211,"in_reply_to":"5a890539_40c1f752","updated":"2014-11-14 19:06:22.000000000","message":"Sounds good. I will do that.\n\nThanks for considering this :)","commit_id":"3a67ead24e0af6498d532d85c838445d0bf7ee20"},{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"85f3e7c8441d0043842daaf52f78d5fd9a4ba5a9","unresolved":false,"context_lines":[{"line_number":235,"context_line":"                    raise exc.InvalidInput(error_message\u003dmsg)"},{"line_number":236,"context_line":"                elif (host_elements and host_elements.ip_address !\u003d tunnel_ip):"},{"line_number":237,"context_line":"                    # Notify all other listening agents to delete stale tunnels"},{"line_number":238,"context_line":"                    self._notifier.tunnel_delete(rpc_context,"},{"line_number":239,"context_line":"                        host_elements.ip_address, tunnel_type)"},{"line_number":240,"context_line":"                    driver.obj.delete_endpoint(host_elements.ip_address)"},{"line_number":241,"context_line":""}],"source_content_type":"text/x-python","patch_set":17,"id":"5a890539_127900c8","line":238,"updated":"2014-11-15 00:23:50.000000000","message":"With this change all the plugins using TunnelRpcCallbackMixin will request at least version 1.3 from the agent. This could create problems. For example what would happen if of agent is used instead of ovs agent? It doesn\u0027t implement version 1.3 . See a similar bug https://bugs.launchpad.net/neutron/+bug/1353309","commit_id":"3a67ead24e0af6498d532d85c838445d0bf7ee20"},{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"076591d4a5c7441beeb1637d7452b8307f862292","unresolved":false,"context_lines":[{"line_number":235,"context_line":"                    raise exc.InvalidInput(error_message\u003dmsg)"},{"line_number":236,"context_line":"                elif (host_elements and host_elements.ip_address !\u003d tunnel_ip):"},{"line_number":237,"context_line":"                    # Notify all other listening agents to delete stale tunnels"},{"line_number":238,"context_line":"                    self._notifier.tunnel_delete(rpc_context,"},{"line_number":239,"context_line":"                        host_elements.ip_address, tunnel_type)"},{"line_number":240,"context_line":"                    driver.obj.delete_endpoint(host_elements.ip_address)"},{"line_number":241,"context_line":""}],"source_content_type":"text/x-python","patch_set":17,"id":"5a890539_e5519a0f","line":238,"in_reply_to":"5a890539_03745066","updated":"2014-11-19 14:12:40.000000000","message":"A quick and dirty fix would be to make sure that all the classes that mix in TunnelAgentRpcApiMixin have version 1.3 . To be honest rpc versioning and mixin are kind of confusing but for that your patch is not to blame","commit_id":"3a67ead24e0af6498d532d85c838445d0bf7ee20"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"00a92bf60c4fc0e961fd99d832149fbbc5b0de99","unresolved":false,"context_lines":[{"line_number":235,"context_line":"                    raise exc.InvalidInput(error_message\u003dmsg)"},{"line_number":236,"context_line":"                elif (host_elements and host_elements.ip_address !\u003d tunnel_ip):"},{"line_number":237,"context_line":"                    # Notify all other listening agents to delete stale tunnels"},{"line_number":238,"context_line":"                    self._notifier.tunnel_delete(rpc_context,"},{"line_number":239,"context_line":"                        host_elements.ip_address, tunnel_type)"},{"line_number":240,"context_line":"                    driver.obj.delete_endpoint(host_elements.ip_address)"},{"line_number":241,"context_line":""}],"source_content_type":"text/x-python","patch_set":17,"id":"5a890539_03745066","line":238,"in_reply_to":"5a890539_127900c8","updated":"2014-11-15 07:16:57.000000000","message":"Ok, then how we could avoid that?\n\nI may need your help to do so.","commit_id":"3a67ead24e0af6498d532d85c838445d0bf7ee20"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"6cbad4ff51ab6207ff4ee4a0a369dde2c5d30523","unresolved":false,"context_lines":[{"line_number":248,"context_line":"            # Return the list of tunnels IP\u0027s to the agent"},{"line_number":249,"context_line":"            return entry"},{"line_number":250,"context_line":"        else:"},{"line_number":251,"context_line":"            msg \u003d _(\"Network type value \u0027%s\u0027 not supported\") % tunnel_type"},{"line_number":252,"context_line":"            raise exc.InvalidInput(error_message\u003dmsg)"},{"line_number":253,"context_line":""},{"line_number":254,"context_line":""}],"source_content_type":"text/x-python","patch_set":17,"id":"5a890539_97a60252","line":251,"updated":"2014-11-13 12:06:34.000000000","message":"ditto","commit_id":"3a67ead24e0af6498d532d85c838445d0bf7ee20"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"57b3ff71c8c3e59fadac0ab622627c615227cc4b","unresolved":false,"context_lines":[{"line_number":228,"context_line":""},{"line_number":229,"context_line":"                if (tunnel_ip_elements and tunnel_ip_elements.host is None"},{"line_number":230,"context_line":"                    and host_elements is None):"},{"line_number":231,"context_line":"                    driver.obj.delete_endpoint(tunnel_ip_elements.ip_address)"},{"line_number":232,"context_line":"                elif (tunnel_ip_elements and tunnel_ip_elements.host !\u003d host):"},{"line_number":233,"context_line":"                    msg \u003d (_(\"Tunnel IP %(ip)s in use with host %(host)s\"),"},{"line_number":234,"context_line":"                           {\u0027ip\u0027: tunnel_ip_elements.ip_address,"}],"source_content_type":"text/x-python","patch_set":18,"id":"5a890539_33902395","line":231,"updated":"2014-11-20 14:17:14.000000000","message":"that\u0027s where logging (beside the exception) would be appropriate! (in each case)","commit_id":"87fd4f6ea9a091ef5447ef9026f43c5d00428d48"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"a2e13e89d093c23633728efaf875e6cc3a489037","unresolved":false,"context_lines":[{"line_number":228,"context_line":""},{"line_number":229,"context_line":"                if (tunnel_ip_elements and tunnel_ip_elements.host is None"},{"line_number":230,"context_line":"                    and host_elements is None):"},{"line_number":231,"context_line":"                    driver.obj.delete_endpoint(tunnel_ip_elements.ip_address)"},{"line_number":232,"context_line":"                elif (tunnel_ip_elements and tunnel_ip_elements.host !\u003d host):"},{"line_number":233,"context_line":"                    msg \u003d (_(\"Tunnel IP %(ip)s in use with host %(host)s\"),"},{"line_number":234,"context_line":"                           {\u0027ip\u0027: tunnel_ip_elements.ip_address,"}],"source_content_type":"text/x-python","patch_set":18,"id":"5a890539_c761d4d4","line":231,"in_reply_to":"5a890539_33902395","updated":"2014-11-20 15:56:43.000000000","message":"Sorry, I didn\u0027t get you.","commit_id":"87fd4f6ea9a091ef5447ef9026f43c5d00428d48"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"b74e1aba4fe79bd4b09c98b28090a3e59ef9bcd2","unresolved":false,"context_lines":[{"line_number":43,"context_line":"        \"\"\"Synchronize type_driver allocation table with configured ranges.\"\"\""},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"    @abc.abstractmethod"},{"line_number":46,"context_line":"    def add_endpoint(self, ip, host):"},{"line_number":47,"context_line":"        \"\"\"Register the endpoint in the type_driver database."},{"line_number":48,"context_line":""},{"line_number":49,"context_line":"        param ip: the IP address of the endpoint"}],"source_content_type":"text/x-python","patch_set":27,"id":"5a890539_201567e5","line":46,"updated":"2014-11-27 00:33:47.000000000","message":"perhaps this could default to None?","commit_id":"9862d81db5aae9f1234a163938873705bb104269"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"c231022d03ad8ed3eab303eaff07b39101b7ef68","unresolved":false,"context_lines":[{"line_number":43,"context_line":"        \"\"\"Synchronize type_driver allocation table with configured ranges.\"\"\""},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"    @abc.abstractmethod"},{"line_number":46,"context_line":"    def add_endpoint(self, ip, host):"},{"line_number":47,"context_line":"        \"\"\"Register the endpoint in the type_driver database."},{"line_number":48,"context_line":""},{"line_number":49,"context_line":"        param ip: the IP address of the endpoint"}],"source_content_type":"text/x-python","patch_set":27,"id":"5a890539_2fb46f34","line":46,"in_reply_to":"5a890539_201567e5","updated":"2014-11-27 08:55:43.000000000","message":"I think it is already covered in\n\n   L208 host \u003d kwargs.get(\u0027host\u0027)\n\nIf tunnel_rpc in agent/rpc.py doesn\u0027t send host argument the get method by default returns None.\n\nReference:\nhttp://www.tutorialspoint.com/python/dictionary_get.htm\n\nand we could simply call  \n   L242 tunnel \u003d driver.obj.add_endpoint(tunnel_ip, host)\n\nwhich adds the endpoint having host\u003dNone.","commit_id":"9862d81db5aae9f1234a163938873705bb104269"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"b74e1aba4fe79bd4b09c98b28090a3e59ef9bcd2","unresolved":false,"context_lines":[{"line_number":66,"context_line":""},{"line_number":67,"context_line":"        param host: the Host name of the endpoint"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"        if host found in type_driver database"},{"line_number":70,"context_line":"           :returns db object for that particular host"},{"line_number":71,"context_line":"        else"},{"line_number":72,"context_line":"           :returns None"}],"source_content_type":"text/x-python","patch_set":27,"id":"5a890539_e0c8bf77","line":69,"updated":"2014-11-27 00:33:47.000000000","message":"I wouldn\u0027t be this verbose about implementation details in an abstract method.","commit_id":"9862d81db5aae9f1234a163938873705bb104269"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"c231022d03ad8ed3eab303eaff07b39101b7ef68","unresolved":false,"context_lines":[{"line_number":66,"context_line":""},{"line_number":67,"context_line":"        param host: the Host name of the endpoint"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"        if host found in type_driver database"},{"line_number":70,"context_line":"           :returns db object for that particular host"},{"line_number":71,"context_line":"        else"},{"line_number":72,"context_line":"           :returns None"}],"source_content_type":"text/x-python","patch_set":27,"id":"5a890539_ef8fc72c","line":69,"in_reply_to":"5a890539_e0c8bf77","updated":"2014-11-27 08:55:43.000000000","message":"I understand, but it helps reviewers to understand what it does :)","commit_id":"9862d81db5aae9f1234a163938873705bb104269"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"b74e1aba4fe79bd4b09c98b28090a3e59ef9bcd2","unresolved":false,"context_lines":[{"line_number":80,"context_line":"        param ip: the IP address of the endpoint"},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"        if ip found in type_driver database"},{"line_number":83,"context_line":"           :returns db object for that particular ip"},{"line_number":84,"context_line":"        else"},{"line_number":85,"context_line":"           :returns None"},{"line_number":86,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":27,"id":"5a890539_00c6ab68","line":83,"updated":"2014-11-27 00:33:47.000000000","message":"ditto","commit_id":"9862d81db5aae9f1234a163938873705bb104269"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"c231022d03ad8ed3eab303eaff07b39101b7ef68","unresolved":false,"context_lines":[{"line_number":80,"context_line":"        param ip: the IP address of the endpoint"},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"        if ip found in type_driver database"},{"line_number":83,"context_line":"           :returns db object for that particular ip"},{"line_number":84,"context_line":"        else"},{"line_number":85,"context_line":"           :returns None"},{"line_number":86,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":27,"id":"5a890539_4f8d3b2a","line":83,"in_reply_to":"5a890539_00c6ab68","updated":"2014-11-27 08:55:43.000000000","message":"same as above","commit_id":"9862d81db5aae9f1234a163938873705bb104269"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"b74e1aba4fe79bd4b09c98b28090a3e59ef9bcd2","unresolved":false,"context_lines":[{"line_number":208,"context_line":"        host \u003d kwargs.get(\u0027host\u0027)"},{"line_number":209,"context_line":"        driver \u003d self._type_manager.drivers.get(tunnel_type)"},{"line_number":210,"context_line":"        if driver:"},{"line_number":211,"context_line":"            # The given conditional statements will verify the following"},{"line_number":212,"context_line":"            # things:"},{"line_number":213,"context_line":"            # 1. If host is not passed from an agent, it is a legacy mode."},{"line_number":214,"context_line":"            # 2. If passed host and tunnel_ip are not found in the DB,"}],"source_content_type":"text/x-python","patch_set":27,"id":"5a890539_e09d1f59","line":211,"updated":"2014-11-27 00:33:47.000000000","message":"if you feel you need to write this much in a comment, probably your logic is overly complex. Besides, try to move this in a method that can be easily tested in isolation, avoiding this one to bloat unnecessarily.","commit_id":"9862d81db5aae9f1234a163938873705bb104269"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"c231022d03ad8ed3eab303eaff07b39101b7ef68","unresolved":false,"context_lines":[{"line_number":208,"context_line":"        host \u003d kwargs.get(\u0027host\u0027)"},{"line_number":209,"context_line":"        driver \u003d self._type_manager.drivers.get(tunnel_type)"},{"line_number":210,"context_line":"        if driver:"},{"line_number":211,"context_line":"            # The given conditional statements will verify the following"},{"line_number":212,"context_line":"            # things:"},{"line_number":213,"context_line":"            # 1. If host is not passed from an agent, it is a legacy mode."},{"line_number":214,"context_line":"            # 2. If passed host and tunnel_ip are not found in the DB,"}],"source_content_type":"text/x-python","patch_set":27,"id":"5a890539_cf3ccb33","line":211,"in_reply_to":"5a890539_e09d1f59","updated":"2014-11-27 08:55:43.000000000","message":"The logic is very simple if we try to understand all scenarios first then review the code :)\n\nI feel that much comments are also not required if we could understand this algorithm given in the link below:\n\nhttps://review.openstack.org/#/c/121000/7/neutron/plugins/ml2/drivers/tunnel_mappings.py see the comments there.\n\nI suggest all reviewer to go through this once to get the context.","commit_id":"9862d81db5aae9f1234a163938873705bb104269"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"b74e1aba4fe79bd4b09c98b28090a3e59ef9bcd2","unresolved":false,"context_lines":[{"line_number":222,"context_line":"            #    add endpoint with latest (tunnel_ip, host), it is a case"},{"line_number":223,"context_line":"            #    where local_ip of an agent got changed."},{"line_number":224,"context_line":"            if host:"},{"line_number":225,"context_line":"                host_elements \u003d driver.obj.get_endpoint_by_host(host)"},{"line_number":226,"context_line":"                tunnel_ip_elements \u003d driver.obj.get_endpoint_by_ip(tunnel_ip)"},{"line_number":227,"context_line":""},{"line_number":228,"context_line":"                if (tunnel_ip_elements and tunnel_ip_elements.host is None"}],"source_content_type":"text/x-python","patch_set":27,"id":"5a890539_00ab0b76","line":225,"updated":"2014-11-27 00:33:47.000000000","message":"this is a single element isn\u0027t it?","commit_id":"9862d81db5aae9f1234a163938873705bb104269"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"c231022d03ad8ed3eab303eaff07b39101b7ef68","unresolved":false,"context_lines":[{"line_number":222,"context_line":"            #    add endpoint with latest (tunnel_ip, host), it is a case"},{"line_number":223,"context_line":"            #    where local_ip of an agent got changed."},{"line_number":224,"context_line":"            if host:"},{"line_number":225,"context_line":"                host_elements \u003d driver.obj.get_endpoint_by_host(host)"},{"line_number":226,"context_line":"                tunnel_ip_elements \u003d driver.obj.get_endpoint_by_ip(tunnel_ip)"},{"line_number":227,"context_line":""},{"line_number":228,"context_line":"                if (tunnel_ip_elements and tunnel_ip_elements.host is None"}],"source_content_type":"text/x-python","patch_set":27,"id":"5a890539_ef76e73e","line":225,"in_reply_to":"5a890539_00ab0b76","updated":"2014-11-27 08:55:43.000000000","message":"see my comments in type_gre.py","commit_id":"9862d81db5aae9f1234a163938873705bb104269"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"b74e1aba4fe79bd4b09c98b28090a3e59ef9bcd2","unresolved":false,"context_lines":[{"line_number":223,"context_line":"            #    where local_ip of an agent got changed."},{"line_number":224,"context_line":"            if host:"},{"line_number":225,"context_line":"                host_elements \u003d driver.obj.get_endpoint_by_host(host)"},{"line_number":226,"context_line":"                tunnel_ip_elements \u003d driver.obj.get_endpoint_by_ip(tunnel_ip)"},{"line_number":227,"context_line":""},{"line_number":228,"context_line":"                if (tunnel_ip_elements and tunnel_ip_elements.host is None"},{"line_number":229,"context_line":"                    and host_elements is None):"}],"source_content_type":"text/x-python","patch_set":27,"id":"5a890539_20a80777","line":226,"updated":"2014-11-27 00:33:47.000000000","message":"so is this one.","commit_id":"9862d81db5aae9f1234a163938873705bb104269"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"c231022d03ad8ed3eab303eaff07b39101b7ef68","unresolved":false,"context_lines":[{"line_number":223,"context_line":"            #    where local_ip of an agent got changed."},{"line_number":224,"context_line":"            if host:"},{"line_number":225,"context_line":"                host_elements \u003d driver.obj.get_endpoint_by_host(host)"},{"line_number":226,"context_line":"                tunnel_ip_elements \u003d driver.obj.get_endpoint_by_ip(tunnel_ip)"},{"line_number":227,"context_line":""},{"line_number":228,"context_line":"                if (tunnel_ip_elements and tunnel_ip_elements.host is None"},{"line_number":229,"context_line":"                    and host_elements is None):"}],"source_content_type":"text/x-python","patch_set":27,"id":"5a890539_0f741335","line":226,"in_reply_to":"5a890539_20a80777","updated":"2014-11-27 08:55:43.000000000","message":"see my comments in type_gre.py","commit_id":"9862d81db5aae9f1234a163938873705bb104269"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"b74e1aba4fe79bd4b09c98b28090a3e59ef9bcd2","unresolved":false,"context_lines":[{"line_number":235,"context_line":"                    raise exc.InvalidInput(error_message\u003dmsg)"},{"line_number":236,"context_line":"                elif (host_elements and host_elements.ip_address !\u003d tunnel_ip):"},{"line_number":237,"context_line":"                    # Notify all other listening agents to delete stale tunnels"},{"line_number":238,"context_line":"                    self._notifier.tunnel_delete(rpc_context,"},{"line_number":239,"context_line":"                        host_elements.ip_address, tunnel_type)"},{"line_number":240,"context_line":"                    driver.obj.delete_endpoint(host_elements.ip_address)"},{"line_number":241,"context_line":""}],"source_content_type":"text/x-python","patch_set":27,"id":"5a890539_402993f1","line":238,"updated":"2014-11-27 00:33:47.000000000","message":"if this is a fanout, wouldn\u0027t this notify the very agent that\u0027s calling into the server?","commit_id":"9862d81db5aae9f1234a163938873705bb104269"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"c231022d03ad8ed3eab303eaff07b39101b7ef68","unresolved":false,"context_lines":[{"line_number":235,"context_line":"                    raise exc.InvalidInput(error_message\u003dmsg)"},{"line_number":236,"context_line":"                elif (host_elements and host_elements.ip_address !\u003d tunnel_ip):"},{"line_number":237,"context_line":"                    # Notify all other listening agents to delete stale tunnels"},{"line_number":238,"context_line":"                    self._notifier.tunnel_delete(rpc_context,"},{"line_number":239,"context_line":"                        host_elements.ip_address, tunnel_type)"},{"line_number":240,"context_line":"                    driver.obj.delete_endpoint(host_elements.ip_address)"},{"line_number":241,"context_line":""}],"source_content_type":"text/x-python","patch_set":27,"id":"5a890539_afd4dfbd","line":238,"in_reply_to":"5a890539_402993f1","updated":"2014-11-27 08:55:43.000000000","message":"Yes, it should be a fanout_cast to delete stale tunnel port/flows from br-tun on every agent.\n\nLet\u0027s say we have NN, CN1, CN2.\n\nThe local_ip of CN2 got changed then we need to inform NN and CN1 to delete the stale port/flow that\u0027s why we are using fanout cast.\n\nAssume we have CN3 also which doesn\u0027t have flow or port belonging to changed local_ip then it will simply ignore it :)","commit_id":"9862d81db5aae9f1234a163938873705bb104269"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"b74e1aba4fe79bd4b09c98b28090a3e59ef9bcd2","unresolved":false,"context_lines":[{"line_number":266,"context_line":"                                       tunnel_type\u003dtunnel_type),"},{"line_number":267,"context_line":"                         topic\u003dself._get_tunnel_update_topic())"},{"line_number":268,"context_line":""},{"line_number":269,"context_line":"    # For tunnel_delete rpc see this https://review.openstack.org/#/c/136106/"}],"source_content_type":"text/x-python","patch_set":27,"id":"5a890539_00c22b34","line":269,"updated":"2014-11-27 00:33:47.000000000","message":"I\u0027d write a TODO: to be removed by http://review...","commit_id":"9862d81db5aae9f1234a163938873705bb104269"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"c231022d03ad8ed3eab303eaff07b39101b7ef68","unresolved":false,"context_lines":[{"line_number":266,"context_line":"                                       tunnel_type\u003dtunnel_type),"},{"line_number":267,"context_line":"                         topic\u003dself._get_tunnel_update_topic())"},{"line_number":268,"context_line":""},{"line_number":269,"context_line":"    # For tunnel_delete rpc see this https://review.openstack.org/#/c/136106/"}],"source_content_type":"text/x-python","patch_set":27,"id":"5a890539_8f97233a","line":269,"in_reply_to":"5a890539_00c22b34","updated":"2014-11-27 08:55:43.000000000","message":"Done","commit_id":"9862d81db5aae9f1234a163938873705bb104269"}],"neutron/plugins/ml2/drivers/type_vxlan.py":[{"author":{"_account_id":9361,"name":"Vivekanandan Narasimhan","email":"n.vivekanandan@ericsson.com","username":"viveknarasimhan"},"change_message_id":"5ea74abb1f26560838a5c67ba1447e081b816309","unresolved":false,"context_lines":[{"line_number":157,"context_line":"        with session.begin(subtransactions\u003dTrue):"},{"line_number":158,"context_line":"            vxlan_endpoint \u003d (session.query(VxlanEndpoints)."},{"line_number":159,"context_line":"                              filter_by(ip_address\u003dip).one())"},{"line_number":160,"context_line":"            session.delete(vxlan_endpoint)"}],"source_content_type":"text/x-python","patch_set":4,"id":"da9df570_a5ce7b81","line":160,"updated":"2014-09-24 09:23:25.000000000","message":"A try .. catch to handle absence of endpoint with input \u0027ip\u0027 here, may be required.","commit_id":"c539a7b39ad8ea1bc9a447bc44668e6d6bdbcdbf"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"006b61ae0a455b11028a751522c8888463a3a0f2","unresolved":false,"context_lines":[{"line_number":157,"context_line":"        with session.begin(subtransactions\u003dTrue):"},{"line_number":158,"context_line":"            vxlan_endpoint \u003d (session.query(VxlanEndpoints)."},{"line_number":159,"context_line":"                              filter_by(ip_address\u003dip).one())"},{"line_number":160,"context_line":"            session.delete(vxlan_endpoint)"}],"source_content_type":"text/x-python","patch_set":4,"id":"da9df570_85489788","line":160,"in_reply_to":"da9df570_a5ce7b81","updated":"2014-09-24 10:29:59.000000000","message":"same comments as type_gre.py","commit_id":"c539a7b39ad8ea1bc9a447bc44668e6d6bdbcdbf"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"7908e4d8a73bae0f1c9e4f682287bdac163988dc","unresolved":false,"context_lines":[{"line_number":60,"context_line":"    \"\"\"Represents tunnel endpoint in RPC mode.\"\"\""},{"line_number":61,"context_line":"    __tablename__ \u003d \u0027ml2_vxlan_endpoints\u0027"},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"    ip_address \u003d sa.Column(sa.String(64), primary_key\u003dTrue)"},{"line_number":64,"context_line":"    udp_port \u003d sa.Column(sa.Integer, nullable\u003dFalse)"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"    def __repr__(self):"}],"source_content_type":"text/x-python","patch_set":7,"id":"da9df570_2f8237c8","line":63,"updated":"2014-09-25 18:16:49.000000000","message":"Why can\u0027t we add a column \u0027host\u0027 here rather than adding a new table?","commit_id":"2204802effe1b4470e5ac985e473595124fd6085"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"158f1692f2acfeb01ca901690de4ff3e75ebb83f","unresolved":false,"context_lines":[{"line_number":60,"context_line":"    \"\"\"Represents tunnel endpoint in RPC mode.\"\"\""},{"line_number":61,"context_line":"    __tablename__ \u003d \u0027ml2_vxlan_endpoints\u0027"},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"    ip_address \u003d sa.Column(sa.String(64), primary_key\u003dTrue)"},{"line_number":64,"context_line":"    udp_port \u003d sa.Column(sa.Integer, nullable\u003dFalse)"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"    def __repr__(self):"}],"source_content_type":"text/x-python","patch_set":7,"id":"da9df570_b54cbac9","line":63,"in_reply_to":"da9df570_2f8237c8","updated":"2014-09-25 19:18:07.000000000","message":"Pls find the reason in tunnel_mappings.py","commit_id":"2204802effe1b4470e5ac985e473595124fd6085"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"deb9cf8dba060aa36f5aff50f02d811c38748e9f","unresolved":false,"context_lines":[{"line_number":59,"context_line":"class VxlanEndpoints(model_base.BASEV2):"},{"line_number":60,"context_line":"    \"\"\"Represents tunnel endpoint in RPC mode.\"\"\""},{"line_number":61,"context_line":"    __tablename__ \u003d \u0027ml2_vxlan_endpoints\u0027"},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"    ip_address \u003d sa.Column(sa.String(64), primary_key\u003dTrue)"},{"line_number":64,"context_line":"    udp_port \u003d sa.Column(sa.Integer, nullable\u003dFalse)"},{"line_number":65,"context_line":"    host \u003d sa.Column(sa.String(255), nullable\u003dTrue, unique\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":9,"id":"baa201ad_fdf3d39c","line":62,"updated":"2014-10-01 13:06:45.000000000","message":"Is this looks fine?\n\n    __table_args__ \u003d (\n        sa.schema.UniqueConstraint(\u0027host\u0027,\n                                   name\u003d\u0027unique_ml2_vxlan_endpoints0host\u0027))","commit_id":"e68d86b2d51b2fa386e19ee2b5c42b8a50fc44b2"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"977640519a4decde02392d60a65e03dd3200ab29","unresolved":false,"context_lines":[{"line_number":157,"context_line":"            except sql_exc.NoResultFound:"},{"line_number":158,"context_line":"                LOG.warning(_LW(\"Vxlan endpoint with host %s doesn\u0027t \""},{"line_number":159,"context_line":"                                \"exists\"), host)"},{"line_number":160,"context_line":"            return host_elements"},{"line_number":161,"context_line":""},{"line_number":162,"context_line":"    def get_endpoint_by_ip(self, ip):"},{"line_number":163,"context_line":"        LOG.debug(\"get_endpoint_by_ip() called for ip %s\", ip)"}],"source_content_type":"text/x-python","patch_set":15,"id":"9aa7fdbe_dbd95ff4","line":160,"updated":"2014-10-24 10:03:13.000000000","message":"ditto","commit_id":"21009db5ed77dde23eeff9ec924ebf4655d8e064"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"977640519a4decde02392d60a65e03dd3200ab29","unresolved":false,"context_lines":[{"line_number":171,"context_line":"            except sql_exc.NoResultFound:"},{"line_number":172,"context_line":"                LOG.warning(_LW(\"Vxlan endpoint with ip %s doesn\u0027t \""},{"line_number":173,"context_line":"                                \"exists\"), ip)"},{"line_number":174,"context_line":"            return ip_elements"},{"line_number":175,"context_line":""},{"line_number":176,"context_line":"    def add_endpoint(self, ip, host, udp_port\u003dVXLAN_UDP_PORT):"},{"line_number":177,"context_line":"        LOG.debug(\"add_vxlan_endpoint() called for ip %s\", ip)"}],"source_content_type":"text/x-python","patch_set":15,"id":"9aa7fdbe_1be04795","line":174,"updated":"2014-10-24 10:03:13.000000000","message":"ditto","commit_id":"21009db5ed77dde23eeff9ec924ebf4655d8e064"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"e7bf67e2677cc4ce905218589222810c0197ff69","unresolved":false,"context_lines":[{"line_number":62,"context_line":""},{"line_number":63,"context_line":"    __tablename__ \u003d \u0027ml2_vxlan_endpoints\u0027"},{"line_number":64,"context_line":"    __table_args__ \u003d ("},{"line_number":65,"context_line":"        sa.UniqueConstraint(\u0027host\u0027,"},{"line_number":66,"context_line":"                            name\u003d\u0027unique_ml2_vxlan_endpoints0host\u0027),"},{"line_number":67,"context_line":"    )"},{"line_number":68,"context_line":"    ip_address \u003d sa.Column(sa.String(64), primary_key\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":16,"id":"5a890539_4845f16e","line":65,"updated":"2014-11-12 17:27:39.000000000","message":"the UniqueConstraint seems redundant with unique\u003dTrue in L70","commit_id":"f653ac2fa7a9a75f31da5ab514a329672a98a965"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"99a2137531bdec0f9b3948afacaf29d575393483","unresolved":false,"context_lines":[{"line_number":62,"context_line":""},{"line_number":63,"context_line":"    __tablename__ \u003d \u0027ml2_vxlan_endpoints\u0027"},{"line_number":64,"context_line":"    __table_args__ \u003d ("},{"line_number":65,"context_line":"        sa.UniqueConstraint(\u0027host\u0027,"},{"line_number":66,"context_line":"                            name\u003d\u0027unique_ml2_vxlan_endpoints0host\u0027),"},{"line_number":67,"context_line":"    )"},{"line_number":68,"context_line":"    ip_address \u003d sa.Column(sa.String(64), primary_key\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":16,"id":"5a890539_b27c0322","line":65,"in_reply_to":"5a890539_4845f16e","updated":"2014-11-12 18:32:12.000000000","message":"Done","commit_id":"f653ac2fa7a9a75f31da5ab514a329672a98a965"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"99a2137531bdec0f9b3948afacaf29d575393483","unresolved":false,"context_lines":[{"line_number":67,"context_line":"    )"},{"line_number":68,"context_line":"    ip_address \u003d sa.Column(sa.String(64), primary_key\u003dTrue)"},{"line_number":69,"context_line":"    udp_port \u003d sa.Column(sa.Integer, nullable\u003dFalse)"},{"line_number":70,"context_line":"    host \u003d sa.Column(sa.String(255), nullable\u003dTrue, unique\u003dTrue)"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"    def __repr__(self):"},{"line_number":73,"context_line":"        return \"\u003cVxlanTunnelEndpoint(%s)\u003e\" % self.ip_address"}],"source_content_type":"text/x-python","patch_set":16,"id":"5a890539_f2768b3d","line":70,"updated":"2014-11-12 18:32:12.000000000","message":"host \u003d sa.Column(sa.String(255), nullable\u003dTrue)","commit_id":"f653ac2fa7a9a75f31da5ab514a329672a98a965"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"e7bf67e2677cc4ce905218589222810c0197ff69","unresolved":false,"context_lines":[{"line_number":135,"context_line":"    def get_endpoints(self):"},{"line_number":136,"context_line":"        \"\"\"Get every vxlan endpoints from database.\"\"\""},{"line_number":137,"context_line":""},{"line_number":138,"context_line":"        LOG.debug(\"get_vxlan_endpoints() called\")"},{"line_number":139,"context_line":"        session \u003d db_api.get_session()"},{"line_number":140,"context_line":""},{"line_number":141,"context_line":"        with session.begin(subtransactions\u003dTrue):"}],"source_content_type":"text/x-python","patch_set":16,"id":"5a890539_bca3fa9c","line":138,"updated":"2014-11-12 17:27:39.000000000","message":"out of scope","commit_id":"f653ac2fa7a9a75f31da5ab514a329672a98a965"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"99a2137531bdec0f9b3948afacaf29d575393483","unresolved":false,"context_lines":[{"line_number":135,"context_line":"    def get_endpoints(self):"},{"line_number":136,"context_line":"        \"\"\"Get every vxlan endpoints from database.\"\"\""},{"line_number":137,"context_line":""},{"line_number":138,"context_line":"        LOG.debug(\"get_vxlan_endpoints() called\")"},{"line_number":139,"context_line":"        session \u003d db_api.get_session()"},{"line_number":140,"context_line":""},{"line_number":141,"context_line":"        with session.begin(subtransactions\u003dTrue):"}],"source_content_type":"text/x-python","patch_set":16,"id":"5a890539_52a59fb3","line":138,"in_reply_to":"5a890539_bca3fa9c","updated":"2014-11-12 18:32:12.000000000","message":"Done","commit_id":"f653ac2fa7a9a75f31da5ab514a329672a98a965"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"e7bf67e2677cc4ce905218589222810c0197ff69","unresolved":false,"context_lines":[{"line_number":154,"context_line":"                host_elements \u003d (session.query(VxlanEndpoints)."},{"line_number":155,"context_line":"                                 filter_by(host\u003dhost).one())"},{"line_number":156,"context_line":"                return host_elements"},{"line_number":157,"context_line":"            except sql_exc.NoResultFound:"},{"line_number":158,"context_line":"                LOG.warning(_LW(\"Vxlan endpoint with host %s doesn\u0027t \""},{"line_number":159,"context_line":"                                \"exists\"), host)"},{"line_number":160,"context_line":"                return None"}],"source_content_type":"text/x-python","patch_set":16,"id":"5a890539_1ca96e7b","line":157,"updated":"2014-11-12 17:27:39.000000000","message":"see type_gre","commit_id":"f653ac2fa7a9a75f31da5ab514a329672a98a965"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"99a2137531bdec0f9b3948afacaf29d575393483","unresolved":false,"context_lines":[{"line_number":154,"context_line":"                host_elements \u003d (session.query(VxlanEndpoints)."},{"line_number":155,"context_line":"                                 filter_by(host\u003dhost).one())"},{"line_number":156,"context_line":"                return host_elements"},{"line_number":157,"context_line":"            except sql_exc.NoResultFound:"},{"line_number":158,"context_line":"                LOG.warning(_LW(\"Vxlan endpoint with host %s doesn\u0027t \""},{"line_number":159,"context_line":"                                \"exists\"), host)"},{"line_number":160,"context_line":"                return None"}],"source_content_type":"text/x-python","patch_set":16,"id":"5a890539_32a2d3ae","line":157,"in_reply_to":"5a890539_1ca96e7b","updated":"2014-11-12 18:32:12.000000000","message":"Done","commit_id":"f653ac2fa7a9a75f31da5ab514a329672a98a965"},{"author":{"_account_id":8449,"name":"Marios Andreou","email":"marios.andreou@gmail.com","username":"marios"},"change_message_id":"222a15e5dabfd48ed891ef52f770101138f19498","unresolved":false,"context_lines":[{"line_number":171,"context_line":"            except sql_exc.NoResultFound:"},{"line_number":172,"context_line":"                LOG.warning(_LW(\"Vxlan endpoint with ip %s doesn\u0027t \""},{"line_number":173,"context_line":"                                \"exists\"), ip)"},{"line_number":174,"context_line":"                return None"},{"line_number":175,"context_line":""},{"line_number":176,"context_line":"    def add_endpoint(self, ip, host, udp_port\u003dVXLAN_UDP_PORT):"},{"line_number":177,"context_line":"        LOG.debug(\"add_vxlan_endpoint() called for ip %s\", ip)"}],"source_content_type":"text/x-python","patch_set":16,"id":"7a8c0949_1cb0be8a","line":174,"updated":"2014-10-31 13:29:14.000000000","message":"+1 to combining these into a get_endpoint_by_attribute() method - dryness is a bit off above","commit_id":"f653ac2fa7a9a75f31da5ab514a329672a98a965"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"b7cee111d1f6ba4446abc91f32951d8dd0c04629","unresolved":false,"context_lines":[{"line_number":171,"context_line":"            except sql_exc.NoResultFound:"},{"line_number":172,"context_line":"                LOG.warning(_LW(\"Vxlan endpoint with ip %s doesn\u0027t \""},{"line_number":173,"context_line":"                                \"exists\"), ip)"},{"line_number":174,"context_line":"                return None"},{"line_number":175,"context_line":""},{"line_number":176,"context_line":"    def add_endpoint(self, ip, host, udp_port\u003dVXLAN_UDP_PORT):"},{"line_number":177,"context_line":"        LOG.debug(\"add_vxlan_endpoint() called for ip %s\", ip)"}],"source_content_type":"text/x-python","patch_set":16,"id":"7a8c0949_ec8dea32","line":174,"in_reply_to":"7a8c0949_1cb0be8a","updated":"2014-11-03 11:32:52.000000000","message":"Sure, we can do it :)\n\nI am looking forward for the Akihiro\u0027s opinion over this proposal.","commit_id":"f653ac2fa7a9a75f31da5ab514a329672a98a965"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"57b3ff71c8c3e59fadac0ab622627c615227cc4b","unresolved":false,"context_lines":[{"line_number":144,"context_line":"                for vxlan_endpoint in vxlan_endpoints]"},{"line_number":145,"context_line":""},{"line_number":146,"context_line":"    def get_endpoint_by_host(self, host):"},{"line_number":147,"context_line":"        LOG.debug(\"get_endpoint_by_host() called for host %s\", host)"},{"line_number":148,"context_line":"        session \u003d db_api.get_session()"},{"line_number":149,"context_line":""},{"line_number":150,"context_line":"        host_elements \u003d (session.query(VxlanEndpoints)."}],"source_content_type":"text/x-python","patch_set":18,"id":"5a890539_d3f6fff8","line":147,"updated":"2014-11-20 14:17:14.000000000","message":"same on logging. getters are to trivial to reflect them in the logs","commit_id":"87fd4f6ea9a091ef5447ef9026f43c5d00428d48"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"a2e13e89d093c23633728efaf875e6cc3a489037","unresolved":false,"context_lines":[{"line_number":144,"context_line":"                for vxlan_endpoint in vxlan_endpoints]"},{"line_number":145,"context_line":""},{"line_number":146,"context_line":"    def get_endpoint_by_host(self, host):"},{"line_number":147,"context_line":"        LOG.debug(\"get_endpoint_by_host() called for host %s\", host)"},{"line_number":148,"context_line":"        session \u003d db_api.get_session()"},{"line_number":149,"context_line":""},{"line_number":150,"context_line":"        host_elements \u003d (session.query(VxlanEndpoints)."}],"source_content_type":"text/x-python","patch_set":18,"id":"5a890539_47f3240a","line":147,"in_reply_to":"5a890539_d3f6fff8","updated":"2014-11-20 15:56:43.000000000","message":"kindly, see the reply in type_gre.py","commit_id":"87fd4f6ea9a091ef5447ef9026f43c5d00428d48"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"b74e1aba4fe79bd4b09c98b28090a3e59ef9bcd2","unresolved":false,"context_lines":[{"line_number":147,"context_line":"        LOG.debug(\"get_endpoint_by_host() called for host %s\", host)"},{"line_number":148,"context_line":"        session \u003d db_api.get_session()"},{"line_number":149,"context_line":""},{"line_number":150,"context_line":"        host_elements \u003d (session.query(VxlanEndpoints)."},{"line_number":151,"context_line":"                         filter_by(host\u003dhost).first())"},{"line_number":152,"context_line":"        return host_elements"},{"line_number":153,"context_line":""}],"source_content_type":"text/x-python","patch_set":27,"id":"5a890539_40db5321","line":150,"updated":"2014-11-27 00:33:47.000000000","message":"same comments made to gre endpoints type driver","commit_id":"9862d81db5aae9f1234a163938873705bb104269"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"c231022d03ad8ed3eab303eaff07b39101b7ef68","unresolved":false,"context_lines":[{"line_number":147,"context_line":"        LOG.debug(\"get_endpoint_by_host() called for host %s\", host)"},{"line_number":148,"context_line":"        session \u003d db_api.get_session()"},{"line_number":149,"context_line":""},{"line_number":150,"context_line":"        host_elements \u003d (session.query(VxlanEndpoints)."},{"line_number":151,"context_line":"                         filter_by(host\u003dhost).first())"},{"line_number":152,"context_line":"        return host_elements"},{"line_number":153,"context_line":""}],"source_content_type":"text/x-python","patch_set":27,"id":"5a890539_f5715adf","line":150,"in_reply_to":"5a890539_40db5321","updated":"2014-11-27 08:55:43.000000000","message":"see my responses in type_gre.py","commit_id":"9862d81db5aae9f1234a163938873705bb104269"}],"neutron/plugins/ml2/rpc.py":[{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"4f195b718b2e1bf30c9d76919367a5dc2b156b94","unresolved":false,"context_lines":[{"line_number":185,"context_line":""},{"line_number":186,"context_line":"    \"\"\""},{"line_number":187,"context_line":""},{"line_number":188,"context_line":"    BASE_RPC_API_VERSION \u003d \u00271.1\u0027"},{"line_number":189,"context_line":""},{"line_number":190,"context_line":"    def __init__(self, topic):"},{"line_number":191,"context_line":"        super(AgentNotifierApi, self).__init__("}],"source_content_type":"text/x-python","patch_set":7,"id":"da9df570_e05cb04d","line":188,"updated":"2014-09-26 08:30:01.000000000","message":"Shall I change it to \n\n    \"\"\"Agent side of the openvswitch rpc API.\n\n    API version history:\n        1.0 - Initial version.\n        1.1 - Added get_active_networks_info, create_dhcp_port,\n              update_dhcp_port, and removed get_dhcp_port methods.\n        1.3 - Added tunnel_delete rpc\n\n    \"\"\"\n\n    BASE_RPC_API_VERSION \u003d \u00271.3\u0027\n\nPlease suggests?","commit_id":"2204802effe1b4470e5ac985e473595124fd6085"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"a98cf223df87c7adc2c33cf41336f32cb0510d4a","unresolved":false,"context_lines":[{"line_number":185,"context_line":""},{"line_number":186,"context_line":"    \"\"\""},{"line_number":187,"context_line":""},{"line_number":188,"context_line":"    BASE_RPC_API_VERSION \u003d \u00271.1\u0027"},{"line_number":189,"context_line":""},{"line_number":190,"context_line":"    def __init__(self, topic):"},{"line_number":191,"context_line":"        super(AgentNotifierApi, self).__init__("}],"source_content_type":"text/x-python","patch_set":7,"id":"da9df570_91624a3c","line":188,"in_reply_to":"da9df570_e05cb04d","updated":"2014-09-26 19:57:35.000000000","message":"Please do not change BASE_RPC_API_VERSION. It is the base version. Bumping this means the old version of agents cannot receive all messages.","commit_id":"2204802effe1b4470e5ac985e473595124fd6085"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"ee6d3264cf01d6c1799d361f0ce92956e8d32cdc","unresolved":false,"context_lines":[{"line_number":181,"context_line":"    API version history:"},{"line_number":182,"context_line":"        1.0 - Initial version."},{"line_number":183,"context_line":"        1.1 - Added get_active_networks_info, create_dhcp_port,"},{"line_number":184,"context_line":"              update_dhcp_port, and removed get_dhcp_port methods."},{"line_number":185,"context_line":"        1.3 - Added tunnel_delete rpc"},{"line_number":186,"context_line":""},{"line_number":187,"context_line":"    \"\"\""}],"source_content_type":"text/x-python","patch_set":16,"id":"7a8c0949_f1216cb5","line":184,"updated":"2014-10-30 16:49:20.000000000","message":"1.3/1.4?","commit_id":"f653ac2fa7a9a75f31da5ab514a329672a98a965"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"df3bee28b6dddb26b0648d8fc8cca414d671f5fc","unresolved":false,"context_lines":[{"line_number":181,"context_line":"    API version history:"},{"line_number":182,"context_line":"        1.0 - Initial version."},{"line_number":183,"context_line":"        1.1 - Added get_active_networks_info, create_dhcp_port,"},{"line_number":184,"context_line":"              update_dhcp_port, and removed get_dhcp_port methods."},{"line_number":185,"context_line":"        1.3 - Added tunnel_delete rpc"},{"line_number":186,"context_line":""},{"line_number":187,"context_line":"    \"\"\""}],"source_content_type":"text/x-python","patch_set":16,"id":"7a8c0949_3b202749","line":184,"in_reply_to":"7a8c0949_f1216cb5","updated":"2014-10-31 06:17:27.000000000","message":"https://review.openstack.org/#/c/121000/16/neutron/plugins/openvswitch/agent/ovs_neutron_agent.py\n\nI think it should be 1.3","commit_id":"f653ac2fa7a9a75f31da5ab514a329672a98a965"},{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"85f3e7c8441d0043842daaf52f78d5fd9a4ba5a9","unresolved":false,"context_lines":[{"line_number":182,"context_line":"        1.0 - Initial version."},{"line_number":183,"context_line":"        1.1 - Added get_active_networks_info, create_dhcp_port,"},{"line_number":184,"context_line":"              update_dhcp_port, and removed get_dhcp_port methods."},{"line_number":185,"context_line":"        1.3 - Added tunnel_delete rpc"},{"line_number":186,"context_line":""},{"line_number":187,"context_line":"    \"\"\""},{"line_number":188,"context_line":""}],"source_content_type":"text/x-python","patch_set":17,"id":"5a890539_52d9c820","line":185,"updated":"2014-11-15 00:23:50.000000000","message":"Could you add also 1.2 to the history?","commit_id":"3a67ead24e0af6498d532d85c838445d0bf7ee20"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"00a92bf60c4fc0e961fd99d832149fbbc5b0de99","unresolved":false,"context_lines":[{"line_number":182,"context_line":"        1.0 - Initial version."},{"line_number":183,"context_line":"        1.1 - Added get_active_networks_info, create_dhcp_port,"},{"line_number":184,"context_line":"              update_dhcp_port, and removed get_dhcp_port methods."},{"line_number":185,"context_line":"        1.3 - Added tunnel_delete rpc"},{"line_number":186,"context_line":""},{"line_number":187,"context_line":"    \"\"\""},{"line_number":188,"context_line":""}],"source_content_type":"text/x-python","patch_set":17,"id":"5a890539_4318181e","line":185,"in_reply_to":"5a890539_52d9c820","updated":"2014-11-15 07:16:57.000000000","message":"Sorry, I didn\u0027t get you.\n\nDo you mean something like this:\n\n\"\"\"Agent side of the openvswitch rpc API.\n   API version history:\n       1.0 - Initial version.\n       1.1 - Added get_active_networks_info, create_dhcp_port,\n              update_dhcp_port, and removed get_dhcp_port methods.\n       1.2 - Added tunnel_delete rpc\n       1.3 - Added tunnel_delete rpc\n\n\"\"\"\n\nAnd, where else we have to add 1.2 ??","commit_id":"3a67ead24e0af6498d532d85c838445d0bf7ee20"},{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"6846c06061f5438bd446bae67ac534647b642526","unresolved":false,"context_lines":[{"line_number":182,"context_line":"        1.0 - Initial version."},{"line_number":183,"context_line":"        1.1 - Added get_active_networks_info, create_dhcp_port,"},{"line_number":184,"context_line":"              update_dhcp_port, and removed get_dhcp_port methods."},{"line_number":185,"context_line":"        1.3 - Added tunnel_delete rpc"},{"line_number":186,"context_line":""},{"line_number":187,"context_line":"    \"\"\""},{"line_number":188,"context_line":""}],"source_content_type":"text/x-python","patch_set":18,"id":"5a890539_c511feb0","line":185,"updated":"2014-11-19 14:35:18.000000000","message":"this line should not be there I think","commit_id":"87fd4f6ea9a091ef5447ef9026f43c5d00428d48"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"a2e13e89d093c23633728efaf875e6cc3a489037","unresolved":false,"context_lines":[{"line_number":182,"context_line":"        1.0 - Initial version."},{"line_number":183,"context_line":"        1.1 - Added get_active_networks_info, create_dhcp_port,"},{"line_number":184,"context_line":"              update_dhcp_port, and removed get_dhcp_port methods."},{"line_number":185,"context_line":"        1.3 - Added tunnel_delete rpc"},{"line_number":186,"context_line":""},{"line_number":187,"context_line":"    \"\"\""},{"line_number":188,"context_line":""}],"source_content_type":"text/x-python","patch_set":18,"id":"5a890539_c719d423","line":185,"in_reply_to":"5a890539_36d3b060","updated":"2014-11-20 15:56:43.000000000","message":"Seriously, RPC is bit difficult to understand, For that I am completely dependent on experienced people but at the same time its great learning for me. \n\nAs Rossella suggested I will remove that line.\n\nThanks :)","commit_id":"87fd4f6ea9a091ef5447ef9026f43c5d00428d48"},{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"a7d27c92063040ab694b460aa52ac0ec218ca260","unresolved":false,"context_lines":[{"line_number":182,"context_line":"        1.0 - Initial version."},{"line_number":183,"context_line":"        1.1 - Added get_active_networks_info, create_dhcp_port,"},{"line_number":184,"context_line":"              update_dhcp_port, and removed get_dhcp_port methods."},{"line_number":185,"context_line":"        1.3 - Added tunnel_delete rpc"},{"line_number":186,"context_line":""},{"line_number":187,"context_line":"    \"\"\""},{"line_number":188,"context_line":""}],"source_content_type":"text/x-python","patch_set":18,"id":"5a890539_36d3b060","line":185,"in_reply_to":"5a890539_73d0eb53","updated":"2014-11-20 15:09:57.000000000","message":"It is confusing, indeed. RpcCallbacks version 1.4 supports tunnel_sync with the new signature including the host. It\u0027s the server side rpc. The client side rpc is in neutron.agent.rpc.PluginApi . Line 185 is a different rpc interface. Even if the name is confusing, TunnelAgentRpcApiMixin is not the client side of TunnelRpcCallbackMixin. TunnelAgentRpcApiMixin is the client side of the rpc, it is used by the plugin to notify the agent of several events. Regarding tunnel_delete there\u0027s no mixin that implements the server side, one implementation can be found in ovs_neutron_agent.tunnel_delete . If you look there the version that supports tunnel delete is 1.3 . Some refactor is really needed, it\u0027s probably not in the scope of this patch. I think this line should be removed since the implementation of version 1.3 is not in this class nor in the Mixin it mixes in.","commit_id":"87fd4f6ea9a091ef5447ef9026f43c5d00428d48"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"57b3ff71c8c3e59fadac0ab622627c615227cc4b","unresolved":false,"context_lines":[{"line_number":182,"context_line":"        1.0 - Initial version."},{"line_number":183,"context_line":"        1.1 - Added get_active_networks_info, create_dhcp_port,"},{"line_number":184,"context_line":"              update_dhcp_port, and removed get_dhcp_port methods."},{"line_number":185,"context_line":"        1.3 - Added tunnel_delete rpc"},{"line_number":186,"context_line":""},{"line_number":187,"context_line":"    \"\"\""},{"line_number":188,"context_line":""}],"source_content_type":"text/x-python","patch_set":18,"id":"5a890539_73d0eb53","line":185,"in_reply_to":"5a890539_a4268f66","updated":"2014-11-20 14:17:14.000000000","message":"I\u0027m wondering why rpc versions don\u0027t match (1.3 and 1.4)","commit_id":"87fd4f6ea9a091ef5447ef9026f43c5d00428d48"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"fee60089abbdac1d5f1e4acf6ac86a66b533a9e5","unresolved":false,"context_lines":[{"line_number":182,"context_line":"        1.0 - Initial version."},{"line_number":183,"context_line":"        1.1 - Added get_active_networks_info, create_dhcp_port,"},{"line_number":184,"context_line":"              update_dhcp_port, and removed get_dhcp_port methods."},{"line_number":185,"context_line":"        1.3 - Added tunnel_delete rpc"},{"line_number":186,"context_line":""},{"line_number":187,"context_line":"    \"\"\""},{"line_number":188,"context_line":""}],"source_content_type":"text/x-python","patch_set":18,"id":"5a890539_a4268f66","line":185,"in_reply_to":"5a890539_c511feb0","updated":"2014-11-20 12:46:29.000000000","message":"I am not sure, once the core suggested me to put it.","commit_id":"87fd4f6ea9a091ef5447ef9026f43c5d00428d48"}],"neutron/plugins/ofagent/agent/ofa_neutron_agent.py":[{"author":{"_account_id":9361,"name":"Vivekanandan Narasimhan","email":"n.vivekanandan@ericsson.com","username":"viveknarasimhan"},"change_message_id":"5ea74abb1f26560838a5c67ba1447e081b816309","unresolved":false,"context_lines":[{"line_number":879,"context_line":"            self.plugin_rpc.tunnel_sync(self.context,"},{"line_number":880,"context_line":"                                        self.local_ip,"},{"line_number":881,"context_line":"                                        self.tunnel_types,"},{"line_number":882,"context_line":"                                        cfg.CONF.host)"},{"line_number":883,"context_line":"        except Exception as e:"},{"line_number":884,"context_line":"            LOG.debug(\"Unable to sync tunnel IP %(local_ip)s: %(e)s\","},{"line_number":885,"context_line":"                      {\u0027local_ip\u0027: self.local_ip, \u0027e\u0027: e})"}],"source_content_type":"text/x-python","patch_set":4,"id":"da9df570_458cef35","line":882,"updated":"2014-09-24 09:23:25.000000000","message":"This might not be exactly related to this change. But is it possible to use a different local IPs for different tunnel types in the agent?","commit_id":"c539a7b39ad8ea1bc9a447bc44668e6d6bdbcdbf"}],"neutron/plugins/openvswitch/agent/ovs_neutron_agent.py":[{"author":{"_account_id":2711,"name":"Zhang Hua","display_name":"Zhang Hua","email":"joshua.zhang@canonical.com","username":"zhhuabj"},"change_message_id":"2b609e516f44ba4be3b93b85726d8d0d3f80f83f","unresolved":false,"context_lines":[{"line_number":350,"context_line":"        if tunnel_type not in self.tunnel_types:"},{"line_number":351,"context_line":"            LOG.error(_(\"tunnel_type %s not supported by agent\"), tunnel_type)"},{"line_number":352,"context_line":"            return"},{"line_number":353,"context_line":"        if tunnel_ip \u003d\u003d self.local_ip:"},{"line_number":354,"context_line":"            return"},{"line_number":355,"context_line":"        port_name \u003d \u0027%s-%s\u0027 % (tunnel_type, self.get_ip_in_hex(tunnel_ip))"},{"line_number":356,"context_line":"        self.tun_br.delete_port(port_name)"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa98f980_20114452","line":353,"updated":"2014-09-12 12:21:07.000000000","message":"maybe this if statement will never happen according to the logic of https://review.openstack.org/#/c/121000/1/neutron/plugins/ml2/drivers/type_tunnel.py","commit_id":"3872cb623f01a4d4248bf6f959897fbc16adc3a1"},{"author":{"_account_id":12711,"name":"Phani Pawan","email":"ppawan@hp.com","username":"phanipawanp"},"change_message_id":"2147ce1d417144e23b7c8cda1b4ab4d8fda0dbe9","unresolved":false,"context_lines":[{"line_number":350,"context_line":"        if tunnel_type not in self.tunnel_types:"},{"line_number":351,"context_line":"            LOG.error(_(\"tunnel_type %s not supported by agent\"), tunnel_type)"},{"line_number":352,"context_line":"            return"},{"line_number":353,"context_line":"        if tunnel_ip \u003d\u003d self.local_ip:"},{"line_number":354,"context_line":"            return"},{"line_number":355,"context_line":"        port_name \u003d \u0027%s-%s\u0027 % (tunnel_type, self.get_ip_in_hex(tunnel_ip))"},{"line_number":356,"context_line":"        self.tun_br.delete_port(port_name)"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa98f980_457e331a","line":353,"in_reply_to":"fa98f980_20114452","updated":"2014-09-15 09:15:45.000000000","message":"Done","commit_id":"3872cb623f01a4d4248bf6f959897fbc16adc3a1"},{"author":{"_account_id":9361,"name":"Vivekanandan Narasimhan","email":"n.vivekanandan@ericsson.com","username":"viveknarasimhan"},"change_message_id":"5ea74abb1f26560838a5c67ba1447e081b816309","unresolved":false,"context_lines":[{"line_number":1313,"context_line":"                                                  self.tunnel_types,"},{"line_number":1314,"context_line":"                                                  cfg.CONF.host)"},{"line_number":1315,"context_line":"            for tunnel_type in self.tunnel_types:"},{"line_number":1316,"context_line":"                if not self.l2_pop:"},{"line_number":1317,"context_line":"                    tunnels \u003d self._get_tunnels(details, tunnel_type)"},{"line_number":1318,"context_line":"                    for tunnel in tunnels:"},{"line_number":1319,"context_line":"                        if self.local_ip !\u003d tunnel[\u0027ip_address\u0027]:"}],"source_content_type":"text/x-python","patch_set":4,"id":"da9df570_85eb37af","line":1316,"updated":"2014-09-24 09:23:25.000000000","message":"move self.l2pop check before the for: loop on self.tunnel_types","commit_id":"c539a7b39ad8ea1bc9a447bc44668e6d6bdbcdbf"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"006b61ae0a455b11028a751522c8888463a3a0f2","unresolved":false,"context_lines":[{"line_number":1313,"context_line":"                                                  self.tunnel_types,"},{"line_number":1314,"context_line":"                                                  cfg.CONF.host)"},{"line_number":1315,"context_line":"            for tunnel_type in self.tunnel_types:"},{"line_number":1316,"context_line":"                if not self.l2_pop:"},{"line_number":1317,"context_line":"                    tunnels \u003d self._get_tunnels(details, tunnel_type)"},{"line_number":1318,"context_line":"                    for tunnel in tunnels:"},{"line_number":1319,"context_line":"                        if self.local_ip !\u003d tunnel[\u0027ip_address\u0027]:"}],"source_content_type":"text/x-python","patch_set":4,"id":"da9df570_653c93e3","line":1316,"in_reply_to":"da9df570_85eb37af","updated":"2014-09-24 10:29:59.000000000","message":"Done","commit_id":"c539a7b39ad8ea1bc9a447bc44668e6d6bdbcdbf"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"38ecf84212412b31c926dcfd65960e5d8944377b","unresolved":false,"context_lines":[{"line_number":1287,"context_line":""},{"line_number":1288,"context_line":"    def tunnel_sync(self):"},{"line_number":1289,"context_line":"        try:"},{"line_number":1290,"context_line":"            for tunnel_type in self.tunnel_types:"},{"line_number":1291,"context_line":"                details \u003d self.plugin_rpc.tunnel_sync(self.context,"},{"line_number":1292,"context_line":"                                                      self.local_ip,"},{"line_number":1293,"context_line":"                                                      tunnel_type)"}],"source_content_type":"text/x-python","patch_set":6,"id":"da9df570_a462dc3b","side":"PARENT","line":1290,"updated":"2014-09-25 10:57:20.000000000","message":"I think this change is another kind of improvement at a glance.\n\nMy question is why this change of RPC API is inevitable to fix the bug. Doesn\u0027t for-loop of tunnel_sync work?\n\nPlease clarify the above point.","commit_id":"694f2db6188bf4ee3e55d6445a5daf94c3c7cbab"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"1f80c755e4aa85db38cc090c5803c55b8adaed82","unresolved":false,"context_lines":[{"line_number":1287,"context_line":""},{"line_number":1288,"context_line":"    def tunnel_sync(self):"},{"line_number":1289,"context_line":"        try:"},{"line_number":1290,"context_line":"            for tunnel_type in self.tunnel_types:"},{"line_number":1291,"context_line":"                details \u003d self.plugin_rpc.tunnel_sync(self.context,"},{"line_number":1292,"context_line":"                                                      self.local_ip,"},{"line_number":1293,"context_line":"                                                      tunnel_type)"}],"source_content_type":"text/x-python","patch_set":6,"id":"da9df570_5baf4b2a","side":"PARENT","line":1290,"in_reply_to":"da9df570_a462dc3b","updated":"2014-09-25 14:27:01.000000000","message":"To address this :\n\nhttps://review.openstack.org/#/c/121000/2/neutron/plugins/ml2/drivers/type_tunnel.py\n\nPlease have a  look at Vivekanandan Narasimhan comments in tunnel_sync()","commit_id":"694f2db6188bf4ee3e55d6445a5daf94c3c7cbab"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"e4a4d54bca2a178b481f77175d140d4ad4e4cce7","unresolved":false,"context_lines":[{"line_number":338,"context_line":"        if not self.l2_pop:"},{"line_number":339,"context_line":"            self._setup_tunnel_port(self.tun_br, tun_name, tunnel_ip,"},{"line_number":340,"context_line":"                                    tunnel_type)"},{"line_number":341,"context_line":""},{"line_number":342,"context_line":"    def tunnel_delete(self, context, **kwargs):"},{"line_number":343,"context_line":"        LOG.debug(_(\"tunnel_delete received\"))"},{"line_number":344,"context_line":"        if not self.enable_tunneling:"}],"source_content_type":"text/x-python","patch_set":6,"id":"da9df570_01163a55","line":341,"updated":"2014-09-25 09:23:29.000000000","message":"This adds a new method to RPC callbacks. Please update the RPC_API_VERSION above and add a version history.","commit_id":"25d745021b343ef8194bfb2f9e6d149618323d5b"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"1f80c755e4aa85db38cc090c5803c55b8adaed82","unresolved":false,"context_lines":[{"line_number":338,"context_line":"        if not self.l2_pop:"},{"line_number":339,"context_line":"            self._setup_tunnel_port(self.tun_br, tun_name, tunnel_ip,"},{"line_number":340,"context_line":"                                    tunnel_type)"},{"line_number":341,"context_line":""},{"line_number":342,"context_line":"    def tunnel_delete(self, context, **kwargs):"},{"line_number":343,"context_line":"        LOG.debug(_(\"tunnel_delete received\"))"},{"line_number":344,"context_line":"        if not self.enable_tunneling:"}],"source_content_type":"text/x-python","patch_set":6,"id":"da9df570_fb0abf77","line":341,"in_reply_to":"da9df570_01163a55","updated":"2014-09-25 14:27:01.000000000","message":"Done","commit_id":"25d745021b343ef8194bfb2f9e6d149618323d5b"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"e4a4d54bca2a178b481f77175d140d4ad4e4cce7","unresolved":false,"context_lines":[{"line_number":340,"context_line":"                                    tunnel_type)"},{"line_number":341,"context_line":""},{"line_number":342,"context_line":"    def tunnel_delete(self, context, **kwargs):"},{"line_number":343,"context_line":"        LOG.debug(_(\"tunnel_delete received\"))"},{"line_number":344,"context_line":"        if not self.enable_tunneling:"},{"line_number":345,"context_line":"            return"},{"line_number":346,"context_line":"        tunnel_ip \u003d kwargs.get(\u0027tunnel_ip\u0027)"}],"source_content_type":"text/x-python","patch_set":6,"id":"da9df570_040d6837","line":343,"updated":"2014-09-25 09:23:29.000000000","message":"No _() for debug message.","commit_id":"25d745021b343ef8194bfb2f9e6d149618323d5b"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"1f80c755e4aa85db38cc090c5803c55b8adaed82","unresolved":false,"context_lines":[{"line_number":340,"context_line":"                                    tunnel_type)"},{"line_number":341,"context_line":""},{"line_number":342,"context_line":"    def tunnel_delete(self, context, **kwargs):"},{"line_number":343,"context_line":"        LOG.debug(_(\"tunnel_delete received\"))"},{"line_number":344,"context_line":"        if not self.enable_tunneling:"},{"line_number":345,"context_line":"            return"},{"line_number":346,"context_line":"        tunnel_ip \u003d kwargs.get(\u0027tunnel_ip\u0027)"}],"source_content_type":"text/x-python","patch_set":6,"id":"da9df570_1b1063a7","line":343,"in_reply_to":"da9df570_040d6837","updated":"2014-09-25 14:27:01.000000000","message":"Done","commit_id":"25d745021b343ef8194bfb2f9e6d149618323d5b"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"e4a4d54bca2a178b481f77175d140d4ad4e4cce7","unresolved":false,"context_lines":[{"line_number":348,"context_line":"            return"},{"line_number":349,"context_line":"        tunnel_type \u003d kwargs.get(\u0027tunnel_type\u0027)"},{"line_number":350,"context_line":"        if not tunnel_type:"},{"line_number":351,"context_line":"            LOG.error(_(\"No tunnel_type specified, cannot delete tunnels\"))"},{"line_number":352,"context_line":"            return"},{"line_number":353,"context_line":"        if tunnel_type not in self.tunnel_types:"},{"line_number":354,"context_line":"            LOG.error(_(\"tunnel_type %s not supported by agent\"), tunnel_type)"}],"source_content_type":"text/x-python","patch_set":6,"id":"da9df570_a401fc06","line":351,"updated":"2014-09-25 09:23:29.000000000","message":"_LE() instead of _()","commit_id":"25d745021b343ef8194bfb2f9e6d149618323d5b"},{"author":{"_account_id":9361,"name":"Vivekanandan Narasimhan","email":"n.vivekanandan@ericsson.com","username":"viveknarasimhan"},"change_message_id":"ba4c2501a00b7d6f0494d6fbb62eeeab283ccce8","unresolved":false,"context_lines":[{"line_number":348,"context_line":"            return"},{"line_number":349,"context_line":"        tunnel_type \u003d kwargs.get(\u0027tunnel_type\u0027)"},{"line_number":350,"context_line":"        if not tunnel_type:"},{"line_number":351,"context_line":"            LOG.error(_(\"No tunnel_type specified, cannot delete tunnels\"))"},{"line_number":352,"context_line":"            return"},{"line_number":353,"context_line":"        if tunnel_type not in self.tunnel_types:"},{"line_number":354,"context_line":"            LOG.error(_(\"tunnel_type %s not supported by agent\"), tunnel_type)"}],"source_content_type":"text/x-python","patch_set":6,"id":"da9df570_e0d76749","line":351,"in_reply_to":"da9df570_3b28c7e1","updated":"2014-09-25 14:56:08.000000000","message":"Hi Akihiro,\r\nIsn\u0027t juno past the \u0027string\u0027 freeze?  Can we still continue to use _LE and _LI for fixes that are in pipeline for Juno RCs?","commit_id":"25d745021b343ef8194bfb2f9e6d149618323d5b"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"1f80c755e4aa85db38cc090c5803c55b8adaed82","unresolved":false,"context_lines":[{"line_number":348,"context_line":"            return"},{"line_number":349,"context_line":"        tunnel_type \u003d kwargs.get(\u0027tunnel_type\u0027)"},{"line_number":350,"context_line":"        if not tunnel_type:"},{"line_number":351,"context_line":"            LOG.error(_(\"No tunnel_type specified, cannot delete tunnels\"))"},{"line_number":352,"context_line":"            return"},{"line_number":353,"context_line":"        if tunnel_type not in self.tunnel_types:"},{"line_number":354,"context_line":"            LOG.error(_(\"tunnel_type %s not supported by agent\"), tunnel_type)"}],"source_content_type":"text/x-python","patch_set":6,"id":"da9df570_3b28c7e1","line":351,"in_reply_to":"da9df570_a401fc06","updated":"2014-09-25 14:27:01.000000000","message":"Done","commit_id":"25d745021b343ef8194bfb2f9e6d149618323d5b"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"40cf0b7efd7233c72c5cd7b0467a108bf65e55b1","unresolved":false,"context_lines":[{"line_number":348,"context_line":"            return"},{"line_number":349,"context_line":"        tunnel_type \u003d kwargs.get(\u0027tunnel_type\u0027)"},{"line_number":350,"context_line":"        if not tunnel_type:"},{"line_number":351,"context_line":"            LOG.error(_(\"No tunnel_type specified, cannot delete tunnels\"))"},{"line_number":352,"context_line":"            return"},{"line_number":353,"context_line":"        if tunnel_type not in self.tunnel_types:"},{"line_number":354,"context_line":"            LOG.error(_(\"tunnel_type %s not supported by agent\"), tunnel_type)"}],"source_content_type":"text/x-python","patch_set":6,"id":"da9df570_efd75049","line":351,"in_reply_to":"da9df570_e0d76749","updated":"2014-09-25 17:22:57.000000000","message":"@Vivekanandan,\n\nYou seems to misunderstand the String Freeze. Both _() and _LE variants are targets of translations, so replacing _() with _LE changes nothing. Adding a new error message itself breaks the String Freeze.\n\nAs a member of I18N team, my another hat , adding a new message like this is on problem. I18N team now focuses on Horizon translations.","commit_id":"25d745021b343ef8194bfb2f9e6d149618323d5b"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"e4a4d54bca2a178b481f77175d140d4ad4e4cce7","unresolved":false,"context_lines":[{"line_number":351,"context_line":"            LOG.error(_(\"No tunnel_type specified, cannot delete tunnels\"))"},{"line_number":352,"context_line":"            return"},{"line_number":353,"context_line":"        if tunnel_type not in self.tunnel_types:"},{"line_number":354,"context_line":"            LOG.error(_(\"tunnel_type %s not supported by agent\"), tunnel_type)"},{"line_number":355,"context_line":"            return"},{"line_number":356,"context_line":"        port_name \u003d \u0027%s-%s\u0027 % (tunnel_type, self.get_ip_in_hex(tunnel_ip))"},{"line_number":357,"context_line":"        self.tun_br.delete_port(port_name)"}],"source_content_type":"text/x-python","patch_set":6,"id":"da9df570_410be229","line":354,"updated":"2014-09-25 09:23:29.000000000","message":"_LE() instead of _()","commit_id":"25d745021b343ef8194bfb2f9e6d149618323d5b"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"1f80c755e4aa85db38cc090c5803c55b8adaed82","unresolved":false,"context_lines":[{"line_number":351,"context_line":"            LOG.error(_(\"No tunnel_type specified, cannot delete tunnels\"))"},{"line_number":352,"context_line":"            return"},{"line_number":353,"context_line":"        if tunnel_type not in self.tunnel_types:"},{"line_number":354,"context_line":"            LOG.error(_(\"tunnel_type %s not supported by agent\"), tunnel_type)"},{"line_number":355,"context_line":"            return"},{"line_number":356,"context_line":"        port_name \u003d \u0027%s-%s\u0027 % (tunnel_type, self.get_ip_in_hex(tunnel_ip))"},{"line_number":357,"context_line":"        self.tun_br.delete_port(port_name)"}],"source_content_type":"text/x-python","patch_set":6,"id":"da9df570_5b258b07","line":354,"in_reply_to":"da9df570_410be229","updated":"2014-09-25 14:27:01.000000000","message":"Done","commit_id":"25d745021b343ef8194bfb2f9e6d149618323d5b"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"7908e4d8a73bae0f1c9e4f682287bdac163988dc","unresolved":false,"context_lines":[{"line_number":129,"context_line":"    # history"},{"line_number":130,"context_line":"    #   1.0 Initial version"},{"line_number":131,"context_line":"    #   1.1 Support Security Group RPC"},{"line_number":132,"context_line":"    #   1.2 Support DVR (Distributed Virtual Router) RPC"},{"line_number":133,"context_line":"    RPC_API_VERSION \u003d \u00271.2\u0027"},{"line_number":134,"context_line":""},{"line_number":135,"context_line":"    def __init__(self, integ_br, tun_br, local_ip,"}],"source_content_type":"text/x-python","patch_set":7,"id":"da9df570_cfec4bf6","line":132,"updated":"2014-09-25 18:16:49.000000000","message":"Please update RPC_API_VERSION to 1.3 to support tunnel_delete.","commit_id":"2204802effe1b4470e5ac985e473595124fd6085"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"158f1692f2acfeb01ca901690de4ff3e75ebb83f","unresolved":false,"context_lines":[{"line_number":129,"context_line":"    # history"},{"line_number":130,"context_line":"    #   1.0 Initial version"},{"line_number":131,"context_line":"    #   1.1 Support Security Group RPC"},{"line_number":132,"context_line":"    #   1.2 Support DVR (Distributed Virtual Router) RPC"},{"line_number":133,"context_line":"    RPC_API_VERSION \u003d \u00271.2\u0027"},{"line_number":134,"context_line":""},{"line_number":135,"context_line":"    def __init__(self, integ_br, tun_br, local_ip,"}],"source_content_type":"text/x-python","patch_set":7,"id":"da9df570_72742868","line":132,"in_reply_to":"da9df570_cfec4bf6","updated":"2014-09-25 19:18:07.000000000","message":"Done","commit_id":"2204802effe1b4470e5ac985e473595124fd6085"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"f9c3dfc92511a74c6f5aabd287e7790013f17099","unresolved":false,"context_lines":[{"line_number":347,"context_line":"        if not self.enable_tunneling:"},{"line_number":348,"context_line":"            return"},{"line_number":349,"context_line":"        tunnel_ip \u003d kwargs.get(\u0027tunnel_ip\u0027)"},{"line_number":350,"context_line":"        if not tunnel_ip:"},{"line_number":351,"context_line":"            return"},{"line_number":352,"context_line":"        tunnel_type \u003d kwargs.get(\u0027tunnel_type\u0027)"},{"line_number":353,"context_line":"        if not tunnel_type:"}],"source_content_type":"text/x-python","patch_set":11,"id":"baa201ad_39300801","line":350,"updated":"2014-10-01 17:38:08.000000000","message":"Isn\u0027t it an error? If so, it is better to log the error.","commit_id":"9651ce85b9ec6e537c81df04341ae01aff056ee0"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"9de4b2918600b7beba15a8ac0c0de128fc573d64","unresolved":false,"context_lines":[{"line_number":347,"context_line":"        if not self.enable_tunneling:"},{"line_number":348,"context_line":"            return"},{"line_number":349,"context_line":"        tunnel_ip \u003d kwargs.get(\u0027tunnel_ip\u0027)"},{"line_number":350,"context_line":"        if not tunnel_ip:"},{"line_number":351,"context_line":"            return"},{"line_number":352,"context_line":"        tunnel_type \u003d kwargs.get(\u0027tunnel_type\u0027)"},{"line_number":353,"context_line":"        if not tunnel_type:"}],"source_content_type":"text/x-python","patch_set":11,"id":"baa201ad_9da39d9d","line":350,"in_reply_to":"baa201ad_39300801","updated":"2014-10-01 18:25:58.000000000","message":"Agreed !","commit_id":"9651ce85b9ec6e537c81df04341ae01aff056ee0"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"e7bf67e2677cc4ce905218589222810c0197ff69","unresolved":false,"context_lines":[{"line_number":320,"context_line":"        LOG.debug(_(\"port_update message processed for port %s\"), port[\u0027id\u0027])"},{"line_number":321,"context_line":""},{"line_number":322,"context_line":"    def tunnel_update(self, context, **kwargs):"},{"line_number":323,"context_line":"        LOG.debug(\"tunnel_update received\")"},{"line_number":324,"context_line":"        if not self.enable_tunneling:"},{"line_number":325,"context_line":"            return"},{"line_number":326,"context_line":"        tunnel_ip \u003d kwargs.get(\u0027tunnel_ip\u0027)"}],"source_content_type":"text/x-python","patch_set":16,"id":"5a890539_5ce136cf","line":323,"updated":"2014-11-12 17:27:39.000000000","message":"out of scope","commit_id":"f653ac2fa7a9a75f31da5ab514a329672a98a965"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"99a2137531bdec0f9b3948afacaf29d575393483","unresolved":false,"context_lines":[{"line_number":320,"context_line":"        LOG.debug(_(\"port_update message processed for port %s\"), port[\u0027id\u0027])"},{"line_number":321,"context_line":""},{"line_number":322,"context_line":"    def tunnel_update(self, context, **kwargs):"},{"line_number":323,"context_line":"        LOG.debug(\"tunnel_update received\")"},{"line_number":324,"context_line":"        if not self.enable_tunneling:"},{"line_number":325,"context_line":"            return"},{"line_number":326,"context_line":"        tunnel_ip \u003d kwargs.get(\u0027tunnel_ip\u0027)"}],"source_content_type":"text/x-python","patch_set":16,"id":"5a890539_72b53bed","line":323,"in_reply_to":"5a890539_5ce136cf","updated":"2014-11-12 18:32:12.000000000","message":"Done","commit_id":"f653ac2fa7a9a75f31da5ab514a329672a98a965"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"e7bf67e2677cc4ce905218589222810c0197ff69","unresolved":false,"context_lines":[{"line_number":329,"context_line":"            return"},{"line_number":330,"context_line":"        tunnel_type \u003d kwargs.get(\u0027tunnel_type\u0027)"},{"line_number":331,"context_line":"        if not tunnel_type:"},{"line_number":332,"context_line":"            LOG.error(_LE(\"No tunnel_type specified, cannot create tunnels\"))"},{"line_number":333,"context_line":"            return"},{"line_number":334,"context_line":"        if tunnel_type not in self.tunnel_types:"},{"line_number":335,"context_line":"            LOG.error(_LE(\"tunnel_type %s not supported by agent\"),"}],"source_content_type":"text/x-python","patch_set":16,"id":"5a890539_7ce8b2b4","line":332,"updated":"2014-11-12 17:27:39.000000000","message":"itto","commit_id":"f653ac2fa7a9a75f31da5ab514a329672a98a965"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"99a2137531bdec0f9b3948afacaf29d575393483","unresolved":false,"context_lines":[{"line_number":329,"context_line":"            return"},{"line_number":330,"context_line":"        tunnel_type \u003d kwargs.get(\u0027tunnel_type\u0027)"},{"line_number":331,"context_line":"        if not tunnel_type:"},{"line_number":332,"context_line":"            LOG.error(_LE(\"No tunnel_type specified, cannot create tunnels\"))"},{"line_number":333,"context_line":"            return"},{"line_number":334,"context_line":"        if tunnel_type not in self.tunnel_types:"},{"line_number":335,"context_line":"            LOG.error(_LE(\"tunnel_type %s not supported by agent\"),"}],"source_content_type":"text/x-python","patch_set":16,"id":"5a890539_92b8e7e6","line":332,"in_reply_to":"5a890539_7ce8b2b4","updated":"2014-11-12 18:32:12.000000000","message":"Done","commit_id":"f653ac2fa7a9a75f31da5ab514a329672a98a965"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"e7bf67e2677cc4ce905218589222810c0197ff69","unresolved":false,"context_lines":[{"line_number":332,"context_line":"            LOG.error(_LE(\"No tunnel_type specified, cannot create tunnels\"))"},{"line_number":333,"context_line":"            return"},{"line_number":334,"context_line":"        if tunnel_type not in self.tunnel_types:"},{"line_number":335,"context_line":"            LOG.error(_LE(\"tunnel_type %s not supported by agent\"),"},{"line_number":336,"context_line":"                      tunnel_type)"},{"line_number":337,"context_line":"            return"},{"line_number":338,"context_line":"        if tunnel_ip \u003d\u003d self.local_ip:"}],"source_content_type":"text/x-python","patch_set":16,"id":"5a890539_9ceb9eaf","line":335,"updated":"2014-11-12 17:27:39.000000000","message":"itto","commit_id":"f653ac2fa7a9a75f31da5ab514a329672a98a965"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"99a2137531bdec0f9b3948afacaf29d575393483","unresolved":false,"context_lines":[{"line_number":332,"context_line":"            LOG.error(_LE(\"No tunnel_type specified, cannot create tunnels\"))"},{"line_number":333,"context_line":"            return"},{"line_number":334,"context_line":"        if tunnel_type not in self.tunnel_types:"},{"line_number":335,"context_line":"            LOG.error(_LE(\"tunnel_type %s not supported by agent\"),"},{"line_number":336,"context_line":"                      tunnel_type)"},{"line_number":337,"context_line":"            return"},{"line_number":338,"context_line":"        if tunnel_ip \u003d\u003d self.local_ip:"}],"source_content_type":"text/x-python","patch_set":16,"id":"5a890539_52be7fd5","line":335,"in_reply_to":"5a890539_9ceb9eaf","updated":"2014-11-12 18:32:12.000000000","message":"Done","commit_id":"f653ac2fa7a9a75f31da5ab514a329672a98a965"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"e7bf67e2677cc4ce905218589222810c0197ff69","unresolved":false,"context_lines":[{"line_number":1337,"context_line":"                                                    tunnel[\u0027ip_address\u0027],"},{"line_number":1338,"context_line":"                                                    tunnel_type)"},{"line_number":1339,"context_line":"        except Exception as e:"},{"line_number":1340,"context_line":"            LOG.debug(\"Unable to sync tunnel IP %(local_ip)s: %(e)s\","},{"line_number":1341,"context_line":"                      {\u0027local_ip\u0027: self.local_ip, \u0027e\u0027: e})"},{"line_number":1342,"context_line":"            return True"},{"line_number":1343,"context_line":"        return False"}],"source_content_type":"text/x-python","patch_set":16,"id":"5a890539_fcdbc218","line":1340,"updated":"2014-11-12 17:27:39.000000000","message":"ditto","commit_id":"f653ac2fa7a9a75f31da5ab514a329672a98a965"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"99a2137531bdec0f9b3948afacaf29d575393483","unresolved":false,"context_lines":[{"line_number":1337,"context_line":"                                                    tunnel[\u0027ip_address\u0027],"},{"line_number":1338,"context_line":"                                                    tunnel_type)"},{"line_number":1339,"context_line":"        except Exception as e:"},{"line_number":1340,"context_line":"            LOG.debug(\"Unable to sync tunnel IP %(local_ip)s: %(e)s\","},{"line_number":1341,"context_line":"                      {\u0027local_ip\u0027: self.local_ip, \u0027e\u0027: e})"},{"line_number":1342,"context_line":"            return True"},{"line_number":1343,"context_line":"        return False"}],"source_content_type":"text/x-python","patch_set":16,"id":"5a890539_12edd7ef","line":1340,"in_reply_to":"5a890539_fcdbc218","updated":"2014-11-12 18:32:12.000000000","message":"Done","commit_id":"f653ac2fa7a9a75f31da5ab514a329672a98a965"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"6cbad4ff51ab6207ff4ee4a0a369dde2c5d30523","unresolved":false,"context_lines":[{"line_number":1348,"context_line":"                                                    tunnel[\u0027ip_address\u0027],"},{"line_number":1349,"context_line":"                                                    tunnel_type)"},{"line_number":1350,"context_line":"        except Exception as e:"},{"line_number":1351,"context_line":"            LOG.debug(\"Unable to sync tunnel IP %(local_ip)s: %(e)s\","},{"line_number":1352,"context_line":"                      {\u0027local_ip\u0027: self.local_ip, \u0027e\u0027: e})"},{"line_number":1353,"context_line":"            return True"},{"line_number":1354,"context_line":"        return False"}],"source_content_type":"text/x-python","patch_set":17,"id":"5a890539_d7ba4abf","line":1351,"updated":"2014-11-13 12:06:34.000000000","message":"I understand it is out of scope :)","commit_id":"3a67ead24e0af6498d532d85c838445d0bf7ee20"}],"neutron/tests/unit/hyperv/test_hyperv_rpcapi.py":[{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"370e7aec84f2ce0e27ea01de34a64928c9300515","unresolved":false,"context_lines":[{"line_number":137,"context_line":"            \u0027tunnel_sync\u0027, rpc_method\u003d\u0027call\u0027,"},{"line_number":138,"context_line":"            tunnel_ip\u003d\u0027fake_tunnel_ip\u0027,"},{"line_number":139,"context_line":"            tunnel_types\u003dNone,"},{"line_number":140,"context_line":"            host\u003d\u0027fake_host\u0027)"}],"source_content_type":"text/x-python","patch_set":7,"id":"da9df570_ef8030c2","line":140,"updated":"2014-09-25 17:38:29.000000000","message":"I missed to add version\u003d\u00271.4\u0027)","commit_id":"2204802effe1b4470e5ac985e473595124fd6085"}],"neutron/tests/unit/ml2/test_tunnel_mappings.py":[{"author":{"_account_id":9093,"name":"Chuck Carlino","email":"chuckjcarlino@gmail.com","username":"ChuckC"},"change_message_id":"0e3f67c0eb97bdd488cac1d8a054b8ae37da571a","unresolved":false,"context_lines":[{"line_number":34,"context_line":"        self.assertEqual(TUNNEL_IP_ONE, ip_address)"},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"        # Update tunnel mapping"},{"line_number":37,"context_line":"        self.assertIsNone(tun_map.update_tunnel_mapping(HOST, TUNNEL_IP_TWO))"}],"source_content_type":"text/x-python","patch_set":6,"id":"da9df570_ad2c8b03","line":37,"updated":"2014-09-24 23:05:12.000000000","message":"do another get and test for TUNNEL_IP_TWO?","commit_id":"25d745021b343ef8194bfb2f9e6d149618323d5b"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"949c9b9191c326226817671ad570b77917454959","unresolved":false,"context_lines":[{"line_number":34,"context_line":"        self.assertEqual(TUNNEL_IP_ONE, ip_address)"},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"        # Update tunnel mapping"},{"line_number":37,"context_line":"        self.assertIsNone(tun_map.update_tunnel_mapping(HOST, TUNNEL_IP_TWO))"}],"source_content_type":"text/x-python","patch_set":6,"id":"da9df570_8bc88a23","line":37,"in_reply_to":"da9df570_ad2c8b03","updated":"2014-09-25 06:25:41.000000000","message":"Done","commit_id":"25d745021b343ef8194bfb2f9e6d149618323d5b"}],"neutron/tests/unit/ml2/test_type_gre.py":[{"author":{"_account_id":9093,"name":"Chuck Carlino","email":"chuckjcarlino@gmail.com","username":"ChuckC"},"change_message_id":"0e3f67c0eb97bdd488cac1d8a054b8ae37da571a","unresolved":false,"context_lines":[{"line_number":43,"context_line":"                          [TUNNEL_IP_ONE, TUNNEL_IP_TWO])"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"        self.assertIsNone(self.driver.delete_endpoint(TUNNEL_IP_ONE))"},{"line_number":46,"context_line":"        self.assertIsNone(self.driver.delete_endpoint(TUNNEL_IP_TWO))"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"    def test_add_same_ip_endpoints(self):"},{"line_number":49,"context_line":"        self.driver.add_endpoint(TUNNEL_IP_ONE)"}],"source_content_type":"text/x-python","patch_set":6,"id":"da9df570_ed5bf384","line":46,"updated":"2014-09-24 23:05:12.000000000","message":"also do get and assert empty list?","commit_id":"25d745021b343ef8194bfb2f9e6d149618323d5b"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"949c9b9191c326226817671ad570b77917454959","unresolved":false,"context_lines":[{"line_number":43,"context_line":"                          [TUNNEL_IP_ONE, TUNNEL_IP_TWO])"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"        self.assertIsNone(self.driver.delete_endpoint(TUNNEL_IP_ONE))"},{"line_number":46,"context_line":"        self.assertIsNone(self.driver.delete_endpoint(TUNNEL_IP_TWO))"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"    def test_add_same_ip_endpoints(self):"},{"line_number":49,"context_line":"        self.driver.add_endpoint(TUNNEL_IP_ONE)"}],"source_content_type":"text/x-python","patch_set":6,"id":"da9df570_6be1a699","line":46,"in_reply_to":"da9df570_ed5bf384","updated":"2014-09-25 06:25:41.000000000","message":"Done","commit_id":"25d745021b343ef8194bfb2f9e6d149618323d5b"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"cb16ed41498b1cefbf015bc942e3bafa1c904eb6","unresolved":false,"context_lines":[{"line_number":43,"context_line":"                          [TUNNEL_IP_ONE, TUNNEL_IP_TWO])"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"        self.assertIsNone(self.driver.delete_endpoint(TUNNEL_IP_ONE))"},{"line_number":46,"context_line":"        self.assertIsNone(self.driver.delete_endpoint(TUNNEL_IP_TWO))"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"    def test_add_same_ip_endpoints(self):"},{"line_number":49,"context_line":"        self.driver.add_endpoint(TUNNEL_IP_ONE)"}],"source_content_type":"text/x-python","patch_set":6,"id":"da9df570_c16a72ed","line":46,"in_reply_to":"da9df570_ed5bf384","updated":"2014-09-25 09:02:43.000000000","message":"Is this fine ,\n\n        # Get all the endpoints\n        endpoints \u003d self.driver.get_endpoints()\n        self.assertNotIn(TUNNEL_IP_ONE, endpoints)\n        self.assertNotIn(TUNNEL_IP_TWO, endpoints)","commit_id":"25d745021b343ef8194bfb2f9e6d149618323d5b"}],"neutron/tests/unit/ml2/test_type_tunnel.py":[{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"d860cde226df9db15b7373db8f37db4a06c69fa6","unresolved":false,"context_lines":[{"line_number":224,"context_line":""},{"line_number":225,"context_line":""},{"line_number":226,"context_line":"class TunnelRpcCallbackTestMixin(test_rpcapi.RpcCallbacksTestCase):"},{"line_number":227,"context_line":""},{"line_number":228,"context_line":"    def test_tunnel_sync(self):"},{"line_number":229,"context_line":"        pass"}],"source_content_type":"text/x-python","patch_set":12,"id":"baa201ad_d4eb4176","line":227,"updated":"2014-10-13 14:33:50.000000000","message":"Work in progress ...I am working on writing UT\u0027s for tunnel_sync().\nIt would be great if anyone can suggest the unit tests that I should cover for the same.","commit_id":"134fe09f66d516b70136ef96e05b9143df164102"}],"neutron/tests/unit/ml2/test_type_vxlan.py":[{"author":{"_account_id":9093,"name":"Chuck Carlino","email":"chuckjcarlino@gmail.com","username":"ChuckC"},"change_message_id":"0e3f67c0eb97bdd488cac1d8a054b8ae37da571a","unresolved":false,"context_lines":[{"line_number":230,"context_line":"        self.assertIsNone(self.driver.delete_endpoint(TUNNEL_IP_ONE))"},{"line_number":231,"context_line":""},{"line_number":232,"context_line":"        # Delete second endpoint"},{"line_number":233,"context_line":"        self.assertIsNone(self.driver.delete_endpoint(TUNNEL_IP_TWO))"},{"line_number":234,"context_line":""},{"line_number":235,"context_line":"    def test_add_same_ip_endpoints(self):"},{"line_number":236,"context_line":"        self.driver.add_endpoint(TUNNEL_IP_ONE, VXLAN_UDP_PORT_ONE)"}],"source_content_type":"text/x-python","patch_set":6,"id":"da9df570_6d4f03be","line":233,"updated":"2014-09-24 23:05:12.000000000","message":"also do get and assert empty list?","commit_id":"25d745021b343ef8194bfb2f9e6d149618323d5b"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"cb16ed41498b1cefbf015bc942e3bafa1c904eb6","unresolved":false,"context_lines":[{"line_number":230,"context_line":"        self.assertIsNone(self.driver.delete_endpoint(TUNNEL_IP_ONE))"},{"line_number":231,"context_line":""},{"line_number":232,"context_line":"        # Delete second endpoint"},{"line_number":233,"context_line":"        self.assertIsNone(self.driver.delete_endpoint(TUNNEL_IP_TWO))"},{"line_number":234,"context_line":""},{"line_number":235,"context_line":"    def test_add_same_ip_endpoints(self):"},{"line_number":236,"context_line":"        self.driver.add_endpoint(TUNNEL_IP_ONE, VXLAN_UDP_PORT_ONE)"}],"source_content_type":"text/x-python","patch_set":6,"id":"da9df570_817ceab6","line":233,"in_reply_to":"da9df570_6d4f03be","updated":"2014-09-25 09:02:43.000000000","message":"# Get all the endpoints\n        endpoints \u003d self.driver.get_endpoints()\n        self.assertNotIn(TUNNEL_IP_ONE, endpoints)\n        self.assertNotIn(TUNNEL_IP_TWO, endpoints)","commit_id":"25d745021b343ef8194bfb2f9e6d149618323d5b"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"949c9b9191c326226817671ad570b77917454959","unresolved":false,"context_lines":[{"line_number":230,"context_line":"        self.assertIsNone(self.driver.delete_endpoint(TUNNEL_IP_ONE))"},{"line_number":231,"context_line":""},{"line_number":232,"context_line":"        # Delete second endpoint"},{"line_number":233,"context_line":"        self.assertIsNone(self.driver.delete_endpoint(TUNNEL_IP_TWO))"},{"line_number":234,"context_line":""},{"line_number":235,"context_line":"    def test_add_same_ip_endpoints(self):"},{"line_number":236,"context_line":"        self.driver.add_endpoint(TUNNEL_IP_ONE, VXLAN_UDP_PORT_ONE)"}],"source_content_type":"text/x-python","patch_set":6,"id":"da9df570_8befaa86","line":233,"in_reply_to":"da9df570_6d4f03be","updated":"2014-09-25 06:25:41.000000000","message":"Done","commit_id":"25d745021b343ef8194bfb2f9e6d149618323d5b"}],"neutron/tests/unit/openvswitch/test_ovs_rpcapi.py":[{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"370e7aec84f2ce0e27ea01de34a64928c9300515","unresolved":false,"context_lines":[{"line_number":124,"context_line":"                           \u0027tunnel_sync\u0027, rpc_method\u003d\u0027call\u0027,"},{"line_number":125,"context_line":"                           tunnel_ip\u003d\u0027fake_tunnel_ip\u0027,"},{"line_number":126,"context_line":"                           tunnel_types\u003dNone,"},{"line_number":127,"context_line":"                           host\u003d\u0027fake_host\u0027)"},{"line_number":128,"context_line":""},{"line_number":129,"context_line":"    def test_update_device_up(self):"},{"line_number":130,"context_line":"        rpcapi \u003d agent_rpc.PluginApi(topics.PLUGIN)"}],"source_content_type":"text/x-python","patch_set":7,"id":"da9df570_cf144ca2","line":127,"updated":"2014-09-25 17:38:29.000000000","message":"I missed to add \nversion\u003d\u00271.4\u0027)","commit_id":"2204802effe1b4470e5ac985e473595124fd6085"}]}
