)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":20336,"name":"heshan","email":"shan.he@huawei.com","username":"shanhe"},"change_message_id":"616caea21be6cc1dd8c2f66e4cb79f7dab88847d","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Hong Hui Xiao \u003chonghui_xiao@yeah.net\u003e"},{"line_number":5,"context_line":"CommitDate: 2016-08-25 18:21:13 +0800"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Allow router_port be in different tenant from router"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Neutron admin support this action, dragonflow should also support it."},{"line_number":10,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"fa7ab95a_eb6e33c8","line":7,"range":{"start_line":7,"start_character":0,"end_line":7,"end_character":52},"updated":"2016-08-26 23:05:44.000000000","message":"Could you explain it in a little more detail?","commit_id":"05db9d1c5aa0992917a09a205cffc62916a0ab97"},{"author":{"_account_id":20297,"name":"duankebo","email":"duankebo@huawei.com","username":"duankebo"},"change_message_id":"da08b13811771b4659af807745ba7a3ff2a2fc19","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Hong Hui Xiao \u003chonghui_xiao@yeah.net\u003e"},{"line_number":5,"context_line":"CommitDate: 2016-08-25 18:21:13 +0800"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Allow router_port be in different tenant from router"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Neutron admin support this action, dragonflow should also support it."},{"line_number":10,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"fa7ab95a_3c5a2351","line":7,"range":{"start_line":7,"start_character":0,"end_line":7,"end_character":52},"in_reply_to":"fa7ab95a_0b48b786","updated":"2016-08-27 02:06:09.000000000","message":"What is the use case?  How about the security concern? What if the ip addresses conflict? We need more discussion on this feature.","commit_id":"05db9d1c5aa0992917a09a205cffc62916a0ab97"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"078566842fd15c19c1b27f740dadd631c84d064e","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Hong Hui Xiao \u003chonghui_xiao@yeah.net\u003e"},{"line_number":5,"context_line":"CommitDate: 2016-08-25 18:21:13 +0800"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Allow router_port be in different tenant from router"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Neutron admin support this action, dragonflow should also support it."},{"line_number":10,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"fa7ab95a_38f1c86b","line":7,"range":{"start_line":7,"start_character":0,"end_line":7,"end_character":52},"in_reply_to":"fa7ab95a_1feceef1","updated":"2016-08-30 13:35:17.000000000","message":"Admin may want to plug a port to router in other tenant, especially in an env which has multiple tenants, but just a few routers. Neutron uses tenant to do privilege management, so normal user can only use/see resources in his tenant. But basically, admin can do anything he wants.","commit_id":"05db9d1c5aa0992917a09a205cffc62916a0ab97"},{"author":{"_account_id":7805,"name":"Li Ma","email":"skywalker.nick@gmail.com","username":"Nick"},"change_message_id":"02f6ce70c28209e7f065b1d688d43927f51f065a","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Hong Hui Xiao \u003chonghui_xiao@yeah.net\u003e"},{"line_number":5,"context_line":"CommitDate: 2016-08-25 18:21:13 +0800"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Allow router_port be in different tenant from router"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Neutron admin support this action, dragonflow should also support it."},{"line_number":10,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"fa7ab95a_b1294af5","line":7,"range":{"start_line":7,"start_character":0,"end_line":7,"end_character":52},"in_reply_to":"fa7ab95a_38f1c86b","updated":"2016-08-31 01:55:27.000000000","message":"Yes, it is the Neutron API behavior. I don\u0027t like it at all, but it is really there. That\u0027s why for the db-lock, it has global lock id to prevent from the failure of identifying tenant id.","commit_id":"05db9d1c5aa0992917a09a205cffc62916a0ab97"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"0cbe9e13945d726f646d4f79cbbb68c409ff6c20","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Hong Hui Xiao \u003chonghui_xiao@yeah.net\u003e"},{"line_number":5,"context_line":"CommitDate: 2016-08-25 18:21:13 +0800"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Allow router_port be in different tenant from router"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Neutron admin support this action, dragonflow should also support it."},{"line_number":10,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"fa7ab95a_1feceef1","line":7,"range":{"start_line":7,"start_character":0,"end_line":7,"end_character":52},"in_reply_to":"fa7ab95a_3c5a2351","updated":"2016-08-30 12:59:13.000000000","message":"@DuanKebo, I think that as Neutron API implementation, if the Neutron API allows this, so should we.\n\n@HongHuiXiao - A usecase would help to understand why Neutron allows this.","commit_id":"05db9d1c5aa0992917a09a205cffc62916a0ab97"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"1fb2ddf29a7e8bd845a73194b55d5cfd233594d4","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Hong Hui Xiao \u003chonghui_xiao@yeah.net\u003e"},{"line_number":5,"context_line":"CommitDate: 2016-08-25 18:21:13 +0800"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Allow router_port be in different tenant from router"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Neutron admin support this action, dragonflow should also support it."},{"line_number":10,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"fa7ab95a_0b48b786","line":7,"range":{"start_line":7,"start_character":0,"end_line":7,"end_character":52},"in_reply_to":"fa7ab95a_eb6e33c8","updated":"2016-08-26 23:34:03.000000000","message":"Neutron will allow admin to add resource to any other resources. For example, admin can plug router port in tenant A to the router in tenan B.\nIn my case, I login with admin account, and want to plug subnet in tenan A to router in tenant B.  This can success in neutron side, and failed in DF side. As a result, the route port will be created in neutron DB, but not in DF DB.","commit_id":"05db9d1c5aa0992917a09a205cffc62916a0ab97"}],"dragonflow/db/api_nb.py":[{"author":{"_account_id":9044,"name":"Will","email":"wangjian.ika@bytedance.com","username":"Will"},"change_message_id":"de5b0e7d05ff3d50a2c8961162f4b60c4f080e2a","unresolved":false,"context_lines":[{"line_number":531,"context_line":""},{"line_number":532,"context_line":"    def add_lrouter_port(self, id, lrouter_id, lswitch_id,"},{"line_number":533,"context_line":"                         topic, **columns):"},{"line_number":534,"context_line":"        lrouter_json \u003d self.driver.get_key(\u0027lrouter\u0027, lrouter_id)"},{"line_number":535,"context_line":"        lrouter \u003d jsonutils.loads(lrouter_json)"},{"line_number":536,"context_line":"        router_version \u003d None"},{"line_number":537,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"fa7ab95a_dfe88919","line":534,"range":{"start_line":534,"start_character":8,"end_line":534,"end_character":65},"updated":"2016-08-26 06:49:57.000000000","message":"I think controllers subscribes NB info via tenant id, creating router without tenant id may lead to controllers could not get the router info","commit_id":"05db9d1c5aa0992917a09a205cffc62916a0ab97"},{"author":{"_account_id":20336,"name":"heshan","email":"shan.he@huawei.com","username":"shanhe"},"change_message_id":"616caea21be6cc1dd8c2f66e4cb79f7dab88847d","unresolved":false,"context_lines":[{"line_number":531,"context_line":""},{"line_number":532,"context_line":"    def add_lrouter_port(self, id, lrouter_id, lswitch_id,"},{"line_number":533,"context_line":"                         topic, **columns):"},{"line_number":534,"context_line":"        lrouter_json \u003d self.driver.get_key(\u0027lrouter\u0027, lrouter_id)"},{"line_number":535,"context_line":"        lrouter \u003d jsonutils.loads(lrouter_json)"},{"line_number":536,"context_line":"        router_version \u003d None"},{"line_number":537,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"fa7ab95a_eb20f39d","line":534,"range":{"start_line":534,"start_character":8,"end_line":534,"end_character":65},"in_reply_to":"fa7ab95a_1807591d","updated":"2016-08-26 23:05:44.000000000","message":"actually, router itself is belong to one tenant implicitly. in DF DB, Dragonflow use such format to make key:\nlocal_key \u003d (\u0027{\u0027 + table + \u0027.\u0027 + topic + \u0027}\u0027 + \u0027.\u0027 + key)\nthe topic is tenant id. Dragonflow register the db changes in the granularity of tenant, when the first port of the tenant is online, the controller will get all the tenant\u0027s info from DF DB, so the topic in DB key is necessary both when creating and getting info from db.","commit_id":"05db9d1c5aa0992917a09a205cffc62916a0ab97"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"56a84cb682d9aea930ec5c66ad3c1485f1ecaec9","unresolved":false,"context_lines":[{"line_number":531,"context_line":""},{"line_number":532,"context_line":"    def add_lrouter_port(self, id, lrouter_id, lswitch_id,"},{"line_number":533,"context_line":"                         topic, **columns):"},{"line_number":534,"context_line":"        lrouter_json \u003d self.driver.get_key(\u0027lrouter\u0027, lrouter_id)"},{"line_number":535,"context_line":"        lrouter \u003d jsonutils.loads(lrouter_json)"},{"line_number":536,"context_line":"        router_version \u003d None"},{"line_number":537,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"fa7ab95a_1807591d","line":534,"range":{"start_line":534,"start_character":8,"end_line":534,"end_character":65},"in_reply_to":"fa7ab95a_dfe88919","updated":"2016-08-26 11:32:37.000000000","message":"I am not sure I get the point... what do you mean by creating router? Here is getting router without tenant id...","commit_id":"05db9d1c5aa0992917a09a205cffc62916a0ab97"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"0cbe9e13945d726f646d4f79cbbb68c409ff6c20","unresolved":false,"context_lines":[{"line_number":531,"context_line":""},{"line_number":532,"context_line":"    def add_lrouter_port(self, id, lrouter_id, lswitch_id,"},{"line_number":533,"context_line":"                         topic, **columns):"},{"line_number":534,"context_line":"        lrouter_json \u003d self.driver.get_key(\u0027lrouter\u0027, lrouter_id)"},{"line_number":535,"context_line":"        lrouter \u003d jsonutils.loads(lrouter_json)"},{"line_number":536,"context_line":"        router_version \u003d None"},{"line_number":537,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"fa7ab95a_dff6068e","line":534,"range":{"start_line":534,"start_character":8,"end_line":534,"end_character":65},"in_reply_to":"fa7ab95a_eb20f39d","updated":"2016-08-30 12:59:13.000000000","message":"@Heshan, I think the topic parameter is optional to speed up record retrieval.","commit_id":"05db9d1c5aa0992917a09a205cffc62916a0ab97"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"0cbe9e13945d726f646d4f79cbbb68c409ff6c20","unresolved":false,"context_lines":[{"line_number":554,"context_line":"        self.driver.set_key(\u0027lrouter\u0027, lrouter_id, lrouter_json,"},{"line_number":555,"context_line":"                            lrouter[\u0027topic\u0027])"},{"line_number":556,"context_line":"        self._send_db_change_event(\u0027lrouter\u0027, lrouter_id, \u0027set\u0027,"},{"line_number":557,"context_line":"                                   lrouter_json, lrouter[\u0027topic\u0027])"},{"line_number":558,"context_line":""},{"line_number":559,"context_line":"    def delete_lrouter_port("},{"line_number":560,"context_line":"            self, lrouter_id, lswitch_id, topic, **columns):"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa7ab95a_3f637243","line":557,"range":{"start_line":557,"start_character":0,"end_line":557,"end_character":66},"updated":"2016-08-30 12:59:13.000000000","message":"In this case, should the changed db event be sent on the port\u0027s topic? Or maybe both? Or the global topic so that everyone sees it (e.g. other tenants that have ports on this router)?\n\nThe event-receiving code will also have to handle this case.","commit_id":"05db9d1c5aa0992917a09a205cffc62916a0ab97"}],"dragonflow/tests/unit/test_api_nb.py":[{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"0cbe9e13945d726f646d4f79cbbb68c409ff6c20","unresolved":false,"context_lines":[{"line_number":41,"context_line":"        router_with_port[\u0027ports\u0027].append(router_port)"},{"line_number":42,"context_line":"        return empty_router, router_with_port"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"    def test_add_lrouter_port(self):"},{"line_number":45,"context_line":"        original_router, expect_router \u003d self._setup_fake_lrouter()"},{"line_number":46,"context_line":"        self.driver.get_key.return_value \u003d jsonutils.dumps(original_router)"},{"line_number":47,"context_line":"        self.api_nb.add_lrouter_port(\u0027fake_id\u0027, \u0027fake_router\u0027,"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa7ab95a_ff802a8d","line":44,"updated":"2016-08-30 12:59:13.000000000","message":"Maybe we should make these fullstack tests, to make sure the database behaves as we expect (e.g. with respect to search by topic)?\n\nThen you can add the router and port via the NbApi, and then read it, and verify the object that was read is the one you expected to read.","commit_id":"05db9d1c5aa0992917a09a205cffc62916a0ab97"}]}
