)]}'
{"neutron/db/l3_db.py":[{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"54058f8c002b9f7057706919c98ef2abe1b9cbdd","unresolved":false,"context_lines":[{"line_number":352,"context_line":"        if not gw_port[\u0027fixed_ips\u0027]:"},{"line_number":353,"context_line":"            LOG.debug(\u0027No IPs available for external network %s\u0027,"},{"line_number":354,"context_line":"                      network_id)"},{"line_number":355,"context_line":"        try:"},{"line_number":356,"context_line":"            with context.session.begin(subtransactions\u003dTrue):"},{"line_number":357,"context_line":"                router.gw_port \u003d self._core_plugin._get_port("},{"line_number":358,"context_line":"                    context.elevated(), gw_port[\u0027id\u0027])"}],"source_content_type":"text/x-python","patch_set":5,"id":"7aa08908_bb757333","line":355,"updated":"2016-06-16 11:01:12.000000000","message":"please add a unit test for this","commit_id":"fa7ed0592a9be836e59b1349d1a857addc8e0023"},{"author":{"_account_id":19554,"name":"Nam","email":"namnh68@fsoft.com.vn","username":"namnh"},"change_message_id":"81382f48f5c6d697ca5fc0955e12a8d830e3b060","unresolved":false,"context_lines":[{"line_number":352,"context_line":"        if not gw_port[\u0027fixed_ips\u0027]:"},{"line_number":353,"context_line":"            LOG.debug(\u0027No IPs available for external network %s\u0027,"},{"line_number":354,"context_line":"                      network_id)"},{"line_number":355,"context_line":"        try:"},{"line_number":356,"context_line":"            with context.session.begin(subtransactions\u003dTrue):"},{"line_number":357,"context_line":"                router.gw_port \u003d self._core_plugin._get_port("},{"line_number":358,"context_line":"                    context.elevated(), gw_port[\u0027id\u0027])"}],"source_content_type":"text/x-python","patch_set":5,"id":"3aaa91ec_07b20906","line":355,"in_reply_to":"3aaa91ec_6287e961","updated":"2016-06-24 06:54:55.000000000","message":"Hi Ms.Ann\n\nThanks for your time and sorry for my reply late. Currently, I am trying to find another solution to fix this bug. One more, we have a new problem when I reproduce it. Quite simple, you can do it:\n\nStep 1: Create router\n\n# neutron router-create router-test\n\nStep 2: Using API-worked:\n\n# neutron router-gateway-set router-test public \u0026 neutron router-gateway-set router-test public\n\nHere is result: http://paste.openstack.org/show/521846/\n\nAnd logs: http://paste.openstack.org/show/521852/\n\nI have reported this to Mr.Kevin, I think it\u0027s related to his patch. [1]\n\nHow do you think about this?\n\n[1] https://review.openstack.org/#/c/328185/5","commit_id":"fa7ed0592a9be836e59b1349d1a857addc8e0023"},{"author":{"_account_id":7249,"name":"Ann Taraday","email":"akamyshnikova@mirantis.com","username":"AKamyshnikova"},"change_message_id":"715023af2277a99c0e1b159dfbb7bedbb52af094","unresolved":false,"context_lines":[{"line_number":352,"context_line":"        if not gw_port[\u0027fixed_ips\u0027]:"},{"line_number":353,"context_line":"            LOG.debug(\u0027No IPs available for external network %s\u0027,"},{"line_number":354,"context_line":"                      network_id)"},{"line_number":355,"context_line":"        try:"},{"line_number":356,"context_line":"            with context.session.begin(subtransactions\u003dTrue):"},{"line_number":357,"context_line":"                router.gw_port \u003d self._core_plugin._get_port("},{"line_number":358,"context_line":"                    context.elevated(), gw_port[\u0027id\u0027])"}],"source_content_type":"text/x-python","patch_set":5,"id":"3aaa91ec_6287e961","line":355,"in_reply_to":"3aaa91ec_8b41620e","updated":"2016-06-22 13:23:31.000000000","message":"I think that you can try to imitate this with mock without rely on db.","commit_id":"fa7ed0592a9be836e59b1349d1a857addc8e0023"},{"author":{"_account_id":19554,"name":"Nam","email":"namnh68@fsoft.com.vn","username":"namnh"},"change_message_id":"47cec10bd9445325bf0f4a358f664694c12371d5","unresolved":false,"context_lines":[{"line_number":352,"context_line":"        if not gw_port[\u0027fixed_ips\u0027]:"},{"line_number":353,"context_line":"            LOG.debug(\u0027No IPs available for external network %s\u0027,"},{"line_number":354,"context_line":"                      network_id)"},{"line_number":355,"context_line":"        try:"},{"line_number":356,"context_line":"            with context.session.begin(subtransactions\u003dTrue):"},{"line_number":357,"context_line":"                router.gw_port \u003d self._core_plugin._get_port("},{"line_number":358,"context_line":"                    context.elevated(), gw_port[\u0027id\u0027])"}],"source_content_type":"text/x-python","patch_set":5,"id":"3aaa91ec_8b41620e","line":355,"in_reply_to":"7aa08908_bb757333","updated":"2016-06-22 12:23:03.000000000","message":"Thanks for your comment.\n\nI may be wrong but in my opinion, my solution need to detect the type of backend DB and I write a trigger for Myslq and Postresql, so when I run unit-test, it won\u0027t not have my trigger. So we need to write a trigger for sqlite.right?\n\nMaybe, I will write for sqlite but there is a issue that this bug just occurs when there are multiple requests, at least two requests at the same time. Could you please give me some keys to run unit-test with concurrent requests.","commit_id":"fa7ed0592a9be836e59b1349d1a857addc8e0023"},{"author":{"_account_id":7249,"name":"Ann Taraday","email":"akamyshnikova@mirantis.com","username":"AKamyshnikova"},"change_message_id":"aadbff145ff1550b48d28e9bcf398ffc8cac5732","unresolved":false,"context_lines":[{"line_number":367,"context_line":"            # NOTE(namnh): Need to delete port which was just created above."},{"line_number":368,"context_line":"            self._core_plugin.delete_port(context.elevated(), gw_port[\u0027id\u0027],"},{"line_number":369,"context_line":"                                          l3_port_check\u003dFalse)"},{"line_number":370,"context_line":"            raise"},{"line_number":371,"context_line":""},{"line_number":372,"context_line":"    def _validate_gw_info(self, context, gw_port, info, ext_ips):"},{"line_number":373,"context_line":"        network_id \u003d info[\u0027network_id\u0027] if info else None"}],"source_content_type":"text/x-python","patch_set":5,"id":"3aaa91ec_e56db833","line":370,"range":{"start_line":370,"start_character":12,"end_line":370,"end_character":17},"updated":"2016-06-22 08:38:06.000000000","message":"You should use excutils.save_and_reraise_exception() for this","commit_id":"fa7ed0592a9be836e59b1349d1a857addc8e0023"},{"author":{"_account_id":19554,"name":"Nam","email":"namnh68@fsoft.com.vn","username":"namnh"},"change_message_id":"47cec10bd9445325bf0f4a358f664694c12371d5","unresolved":false,"context_lines":[{"line_number":367,"context_line":"            # NOTE(namnh): Need to delete port which was just created above."},{"line_number":368,"context_line":"            self._core_plugin.delete_port(context.elevated(), gw_port[\u0027id\u0027],"},{"line_number":369,"context_line":"                                          l3_port_check\u003dFalse)"},{"line_number":370,"context_line":"            raise"},{"line_number":371,"context_line":""},{"line_number":372,"context_line":"    def _validate_gw_info(self, context, gw_port, info, ext_ips):"},{"line_number":373,"context_line":"        network_id \u003d info[\u0027network_id\u0027] if info else None"}],"source_content_type":"text/x-python","patch_set":5,"id":"3aaa91ec_8135c147","line":370,"range":{"start_line":370,"start_character":12,"end_line":370,"end_character":17},"in_reply_to":"3aaa91ec_e56db833","updated":"2016-06-22 12:23:03.000000000","message":"Hi Ms.Ann\n\nWelcome to my patch set and thank you for your time.\n\nI will update this in next patch. \n\nBy the way, could you see file: 3eb7b0c427c8_add_trigger_to_database.py and see my comment which I replied garyk\u0027s one. Do you have any suggestion for this.","commit_id":"fa7ed0592a9be836e59b1349d1a857addc8e0023"}],"neutron/db/migration/alembic_migrations/versions/newton/expand/3eb7b0c427c8_add_trigger_to_database.py":[{"author":{"_account_id":7249,"name":"Ann Taraday","email":"akamyshnikova@mirantis.com","username":"AKamyshnikova"},"change_message_id":"aadbff145ff1550b48d28e9bcf398ffc8cac5732","unresolved":false,"context_lines":[{"line_number":83,"context_line":"    elif op.get_bind().engine.name \u003d\u003d \u0027postgresql\u0027:"},{"line_number":84,"context_line":"        op.create_sp(add_function_for_postgresql)"},{"line_number":85,"context_line":"        op.create_trigger(add_trigger_for_postgresql)"},{"line_number":86,"context_line":"    else:"},{"line_number":87,"context_line":"        return"},{"line_number":88,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"3aaa91ec_a5b61088","line":87,"range":{"start_line":86,"start_character":4,"end_line":87,"end_character":14},"updated":"2016-06-22 08:38:06.000000000","message":"I think this is not needed","commit_id":"fa7ed0592a9be836e59b1349d1a857addc8e0023"},{"author":{"_account_id":7249,"name":"Ann Taraday","email":"akamyshnikova@mirantis.com","username":"AKamyshnikova"},"change_message_id":"715023af2277a99c0e1b159dfbb7bedbb52af094","unresolved":false,"context_lines":[{"line_number":83,"context_line":"    elif op.get_bind().engine.name \u003d\u003d \u0027postgresql\u0027:"},{"line_number":84,"context_line":"        op.create_sp(add_function_for_postgresql)"},{"line_number":85,"context_line":"        op.create_trigger(add_trigger_for_postgresql)"},{"line_number":86,"context_line":"    else:"},{"line_number":87,"context_line":"        return"},{"line_number":88,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"3aaa91ec_424c6d70","line":87,"range":{"start_line":86,"start_character":4,"end_line":87,"end_character":14},"in_reply_to":"3aaa91ec_214fad93","updated":"2016-06-22 13:23:31.000000000","message":"I\u0027m not sure that this worth to right separate case for unit tests. Good functional test would be enough as this should work on mysql and postgres.","commit_id":"fa7ed0592a9be836e59b1349d1a857addc8e0023"},{"author":{"_account_id":19554,"name":"Nam","email":"namnh68@fsoft.com.vn","username":"namnh"},"change_message_id":"47cec10bd9445325bf0f4a358f664694c12371d5","unresolved":false,"context_lines":[{"line_number":83,"context_line":"    elif op.get_bind().engine.name \u003d\u003d \u0027postgresql\u0027:"},{"line_number":84,"context_line":"        op.create_sp(add_function_for_postgresql)"},{"line_number":85,"context_line":"        op.create_trigger(add_trigger_for_postgresql)"},{"line_number":86,"context_line":"    else:"},{"line_number":87,"context_line":"        return"},{"line_number":88,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"3aaa91ec_214fad93","line":87,"range":{"start_line":86,"start_character":4,"end_line":87,"end_character":14},"in_reply_to":"3aaa91ec_a5b61088","updated":"2016-06-22 12:23:03.000000000","message":"Yes, I will remove it.\n\nHere is point to detect backend DB\u0027s type. So when we run unit-test, this won\u0027t update to sqlite ( It use sqlite as default) So in my point of view, I may write for sqlite, but there is a prblem that it need to run concurrent requests :(","commit_id":"fa7ed0592a9be836e59b1349d1a857addc8e0023"}],"neutron/tests/functional/db/test_trigger.py":[{"author":{"_account_id":7249,"name":"Ann Taraday","email":"akamyshnikova@mirantis.com","username":"AKamyshnikova"},"change_message_id":"aadbff145ff1550b48d28e9bcf398ffc8cac5732","unresolved":false,"context_lines":[{"line_number":29,"context_line":"DEVICE_OWNER_ROUTER_GW \u003d l3_constants.DEVICE_OWNER_ROUTER_GW"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"class TestTrigger(base.MySQLTestCase, base.PostgreSQLTestCase):"},{"line_number":33,"context_line":"    \u0027\u0027\u0027"},{"line_number":34,"context_line":"    For the opportunistic testing you need to set up a db named"},{"line_number":35,"context_line":"    \u0027openstack_citest\u0027 with user \u0027openstack_citest\u0027 and password"}],"source_content_type":"text/x-python","patch_set":5,"id":"3aaa91ec_575f1f72","line":32,"range":{"start_line":32,"start_character":0,"end_line":32,"end_character":63},"updated":"2016-06-22 08:38:06.000000000","message":"I\u0027m not sure I understand this. We want to check that your migration works for both mysql and postgres - so we should have classes inherited MySQLTestCase and PostgreSQLTestCase,  there should be two separate classes, as for now test is running only against one dialect.","commit_id":"fa7ed0592a9be836e59b1349d1a857addc8e0023"},{"author":{"_account_id":19554,"name":"Nam","email":"namnh68@fsoft.com.vn","username":"namnh"},"change_message_id":"47cec10bd9445325bf0f4a358f664694c12371d5","unresolved":false,"context_lines":[{"line_number":29,"context_line":"DEVICE_OWNER_ROUTER_GW \u003d l3_constants.DEVICE_OWNER_ROUTER_GW"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"class TestTrigger(base.MySQLTestCase, base.PostgreSQLTestCase):"},{"line_number":33,"context_line":"    \u0027\u0027\u0027"},{"line_number":34,"context_line":"    For the opportunistic testing you need to set up a db named"},{"line_number":35,"context_line":"    \u0027openstack_citest\u0027 with user \u0027openstack_citest\u0027 and password"}],"source_content_type":"text/x-python","patch_set":5,"id":"3aaa91ec_1c793694","line":32,"range":{"start_line":32,"start_character":0,"end_line":32,"end_character":63},"in_reply_to":"3aaa91ec_575f1f72","updated":"2016-06-22 12:23:03.000000000","message":"At this point. I agree with you, I will write two separate classes. Thanks!","commit_id":"fa7ed0592a9be836e59b1349d1a857addc8e0023"},{"author":{"_account_id":7249,"name":"Ann Taraday","email":"akamyshnikova@mirantis.com","username":"AKamyshnikova"},"change_message_id":"aadbff145ff1550b48d28e9bcf398ffc8cac5732","unresolved":false,"context_lines":[{"line_number":49,"context_line":"    Normally, there is only one record with \u0027router_gateway\u0027 value for one"},{"line_number":50,"context_line":"    router. So this trigger will ensure that this cannot occur. An this test"},{"line_number":51,"context_line":"    will check cases:"},{"line_number":52,"context_line":"    + Case 1: Adding new two records have same \"router_id\" in table"},{"line_number":53,"context_line":"              \"router_port\" which is include three columns are"},{"line_number":54,"context_line":"              [route_id, port_id ,port_type\u003d\u0027router_gateway\"]."},{"line_number":55,"context_line":"        --\u003e The result is that impossible to create it."}],"source_content_type":"text/x-python","patch_set":5,"id":"3aaa91ec_3704137d","line":52,"updated":"2016-06-22 08:38:06.000000000","message":"Can we split test_trigger into separate tests for each case?","commit_id":"fa7ed0592a9be836e59b1349d1a857addc8e0023"},{"author":{"_account_id":19554,"name":"Nam","email":"namnh68@fsoft.com.vn","username":"namnh"},"change_message_id":"47cec10bd9445325bf0f4a358f664694c12371d5","unresolved":false,"context_lines":[{"line_number":49,"context_line":"    Normally, there is only one record with \u0027router_gateway\u0027 value for one"},{"line_number":50,"context_line":"    router. So this trigger will ensure that this cannot occur. An this test"},{"line_number":51,"context_line":"    will check cases:"},{"line_number":52,"context_line":"    + Case 1: Adding new two records have same \"router_id\" in table"},{"line_number":53,"context_line":"              \"router_port\" which is include three columns are"},{"line_number":54,"context_line":"              [route_id, port_id ,port_type\u003d\u0027router_gateway\"]."},{"line_number":55,"context_line":"        --\u003e The result is that impossible to create it."}],"source_content_type":"text/x-python","patch_set":5,"id":"3aaa91ec_dc55ee1d","line":52,"in_reply_to":"3aaa91ec_3704137d","updated":"2016-06-22 12:23:03.000000000","message":"I know what you mean but this case we shouldn\u0027t split. Becase I want to test my trigger, if we split then it will lose some records in \"routerports\" table","commit_id":"fa7ed0592a9be836e59b1349d1a857addc8e0023"},{"author":{"_account_id":7249,"name":"Ann Taraday","email":"akamyshnikova@mirantis.com","username":"AKamyshnikova"},"change_message_id":"aadbff145ff1550b48d28e9bcf398ffc8cac5732","unresolved":false,"context_lines":[{"line_number":93,"context_line":"        self.owner_router_gw \u003d DEVICE_OWNER_ROUTER_GW"},{"line_number":94,"context_line":"        self.owner_router_intf \u003d DEVICE_OWNER_ROUTER_INTF"},{"line_number":95,"context_line":""},{"line_number":96,"context_line":"    def get_engine(self):"},{"line_number":97,"context_line":"        return self.engine"},{"line_number":98,"context_line":""},{"line_number":99,"context_line":"    def create_network(self):"},{"line_number":100,"context_line":"        network \u003d {\u0027tenant_id\u0027: self.tenant_id,"}],"source_content_type":"text/x-python","patch_set":5,"id":"3aaa91ec_f71a8b16","line":97,"range":{"start_line":96,"start_character":4,"end_line":97,"end_character":26},"updated":"2016-06-22 08:38:06.000000000","message":"you can use just self.engine everywhere, this was done in TestModelMigrationSync for implementation reason https://github.com/openstack/oslo.db/blob/master/oslo_db/sqlalchemy/test_migrations.py#L385","commit_id":"fa7ed0592a9be836e59b1349d1a857addc8e0023"},{"author":{"_account_id":19554,"name":"Nam","email":"namnh68@fsoft.com.vn","username":"namnh"},"change_message_id":"47cec10bd9445325bf0f4a358f664694c12371d5","unresolved":false,"context_lines":[{"line_number":93,"context_line":"        self.owner_router_gw \u003d DEVICE_OWNER_ROUTER_GW"},{"line_number":94,"context_line":"        self.owner_router_intf \u003d DEVICE_OWNER_ROUTER_INTF"},{"line_number":95,"context_line":""},{"line_number":96,"context_line":"    def get_engine(self):"},{"line_number":97,"context_line":"        return self.engine"},{"line_number":98,"context_line":""},{"line_number":99,"context_line":"    def create_network(self):"},{"line_number":100,"context_line":"        network \u003d {\u0027tenant_id\u0027: self.tenant_id,"}],"source_content_type":"text/x-python","patch_set":5,"id":"3aaa91ec_3c187284","line":97,"range":{"start_line":96,"start_character":4,"end_line":97,"end_character":26},"in_reply_to":"3aaa91ec_f71a8b16","updated":"2016-06-22 12:23:03.000000000","message":"Oh. Thanks for this information. I will test and update it in next patch","commit_id":"fa7ed0592a9be836e59b1349d1a857addc8e0023"}]}
