)]}'
{"tempest/api/network/base.py":[{"author":{"_account_id":16986,"name":"Shuquan Huang","email":"shuquan.huang@live.com","username":"shuquan"},"change_message_id":"9e3da90609be2d04a8c81403f6167fbc6b0059ff","unresolved":false,"context_lines":[{"line_number":219,"context_line":"        ext_gw_info \u003d {}"},{"line_number":220,"context_line":"        if external_network_id:"},{"line_number":221,"context_line":"            ext_gw_info[\u0027network_id\u0027] \u003d external_network_id"},{"line_number":222,"context_line":"        if enable_snat is not None:"},{"line_number":223,"context_line":"            ext_gw_info[\u0027enable_snat\u0027] \u003d enable_snat"},{"line_number":224,"context_line":"        body \u003d cls.client.create_router("},{"line_number":225,"context_line":"            router_name, external_gateway_info\u003dext_gw_info,"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba15a1d1_1361ffa8","line":222,"updated":"2015-09-18 12:42:37.000000000","message":"@Albert\nWith my patch, no matter enable_snat is False or Ture, it will go inside the if code.\nYou can try to print \"False is not None\" and \"True is not None\". The value is True. So either case will go inside the if code.","commit_id":"813362af98e3148faf1900180b33b7a04699f167"},{"author":{"_account_id":14885,"name":"Daniel Mellado","email":"dmellado@redhat.com","username":"daniel-mellado"},"change_message_id":"3e03dc0aa7210e16599615846d9aa634a5745908","unresolved":false,"context_lines":[{"line_number":219,"context_line":"        ext_gw_info \u003d {}"},{"line_number":220,"context_line":"        if external_network_id:"},{"line_number":221,"context_line":"            ext_gw_info[\u0027network_id\u0027] \u003d external_network_id"},{"line_number":222,"context_line":"        if enable_snat is not None:"},{"line_number":223,"context_line":"            ext_gw_info[\u0027enable_snat\u0027] \u003d enable_snat"},{"line_number":224,"context_line":"        body \u003d cls.client.create_router("},{"line_number":225,"context_line":"            router_name, external_gateway_info\u003dext_gw_info,"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba15a1d1_3be09fcc","line":222,"updated":"2015-09-18 08:52:22.000000000","message":"Not really needed, besides please check salvatore\u0027s message in base_routers.py","commit_id":"813362af98e3148faf1900180b33b7a04699f167"},{"author":{"_account_id":13173,"name":"Albert vico","email":"albert.vico@midokura.com","username":"alvico"},"change_message_id":"29014fd79048e0bc52941b1b25205e62ea242abc","unresolved":false,"context_lines":[{"line_number":219,"context_line":"        ext_gw_info \u003d {}"},{"line_number":220,"context_line":"        if external_network_id:"},{"line_number":221,"context_line":"            ext_gw_info[\u0027network_id\u0027] \u003d external_network_id"},{"line_number":222,"context_line":"        if enable_snat is not None:"},{"line_number":223,"context_line":"            ext_gw_info[\u0027enable_snat\u0027] \u003d enable_snat"},{"line_number":224,"context_line":"        body \u003d cls.client.create_router("},{"line_number":225,"context_line":"            router_name, external_gateway_info\u003dext_gw_info,"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba15a1d1_fbe6a7ae","line":222,"updated":"2015-09-18 08:58:50.000000000","message":"Why? what was wrong with the previous condition?","commit_id":"813362af98e3148faf1900180b33b7a04699f167"},{"author":{"_account_id":13173,"name":"Albert vico","email":"albert.vico@midokura.com","username":"alvico"},"change_message_id":"e746c07224bf926d4485ab2cd6414bef85d6bcea","unresolved":false,"context_lines":[{"line_number":219,"context_line":"        ext_gw_info \u003d {}"},{"line_number":220,"context_line":"        if external_network_id:"},{"line_number":221,"context_line":"            ext_gw_info[\u0027network_id\u0027] \u003d external_network_id"},{"line_number":222,"context_line":"        if enable_snat is not None:"},{"line_number":223,"context_line":"            ext_gw_info[\u0027enable_snat\u0027] \u003d enable_snat"},{"line_number":224,"context_line":"        body \u003d cls.client.create_router("},{"line_number":225,"context_line":"            router_name, external_gateway_info\u003dext_gw_info,"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba15a1d1_62bd0301","line":222,"in_reply_to":"ba15a1d1_1361ffa8","updated":"2015-09-18 12:48:48.000000000","message":"Yes, it\u0027s true what you say but that doesn\u0027t make it right. See my solution if you need to have this field in the ext_gw_info. Actually the most lightweight fix, would be just add before the if, the following line and leave the rest untouched:\n\next_gw_info[\u0027enable_snat\u0027] \u003d False\n\nEven though one would argue that if enable_snat have a random value, then you will propagate it. Because of that my suggestion would be the following:\n\next_gw_info[\u0027enable_snat\u0027] \u003d False\nif enable_snat is True:\n    ext_gw_info[\u0027enable_snat\u0027] \u003d enable_snat\n\nsince if enable_snat only check if it is not false, or if it exists.","commit_id":"813362af98e3148faf1900180b33b7a04699f167"},{"author":{"_account_id":13173,"name":"Albert vico","email":"albert.vico@midokura.com","username":"alvico"},"change_message_id":"952838ce3db2cabfc03ea97dc9019d1466b5994f","unresolved":false,"context_lines":[{"line_number":219,"context_line":"        ext_gw_info \u003d {}"},{"line_number":220,"context_line":"        if external_network_id:"},{"line_number":221,"context_line":"            ext_gw_info[\u0027network_id\u0027] \u003d external_network_id"},{"line_number":222,"context_line":"        if enable_snat is not None:"},{"line_number":223,"context_line":"            ext_gw_info[\u0027enable_snat\u0027] \u003d enable_snat"},{"line_number":224,"context_line":"        body \u003d cls.client.create_router("},{"line_number":225,"context_line":"            router_name, external_gateway_info\u003dext_gw_info,"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba15a1d1_9398af79","line":222,"in_reply_to":"ba15a1d1_210e308c","updated":"2015-09-18 10:16:15.000000000","message":"If you want to have some value, my suggestion is:\n\next_gw_info[\u0027enable_snat\u0027] \u003d False\nif enable_snat:\n    ext_gw_info[\u0027enable_snat\u0027] \u003d True","commit_id":"813362af98e3148faf1900180b33b7a04699f167"},{"author":{"_account_id":16986,"name":"Shuquan Huang","email":"shuquan.huang@live.com","username":"shuquan"},"change_message_id":"74b079cf6b59c3a3b245e0658c137836c4d0281e","unresolved":false,"context_lines":[{"line_number":219,"context_line":"        ext_gw_info \u003d {}"},{"line_number":220,"context_line":"        if external_network_id:"},{"line_number":221,"context_line":"            ext_gw_info[\u0027network_id\u0027] \u003d external_network_id"},{"line_number":222,"context_line":"        if enable_snat is not None:"},{"line_number":223,"context_line":"            ext_gw_info[\u0027enable_snat\u0027] \u003d enable_snat"},{"line_number":224,"context_line":"        body \u003d cls.client.create_router("},{"line_number":225,"context_line":"            router_name, external_gateway_info\u003dext_gw_info,"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba15a1d1_ddc870aa","line":222,"in_reply_to":"ba15a1d1_62bd0301","updated":"2015-09-18 13:10:53.000000000","message":"@Albert. Your solution is good. But I think the enable_snat would be a random value when there is a negative test. Therefore, I don\u0027t think we should restrict the type to boolean. We should just make sure we set the value if enable_snat is existing.","commit_id":"813362af98e3148faf1900180b33b7a04699f167"},{"author":{"_account_id":13173,"name":"Albert vico","email":"albert.vico@midokura.com","username":"alvico"},"change_message_id":"3fce8c757facd356ac4612b786d4141239f09bb1","unresolved":false,"context_lines":[{"line_number":219,"context_line":"        ext_gw_info \u003d {}"},{"line_number":220,"context_line":"        if external_network_id:"},{"line_number":221,"context_line":"            ext_gw_info[\u0027network_id\u0027] \u003d external_network_id"},{"line_number":222,"context_line":"        if enable_snat is not None:"},{"line_number":223,"context_line":"            ext_gw_info[\u0027enable_snat\u0027] \u003d enable_snat"},{"line_number":224,"context_line":"        body \u003d cls.client.create_router("},{"line_number":225,"context_line":"            router_name, external_gateway_info\u003dext_gw_info,"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba15a1d1_210e308c","line":222,"in_reply_to":"ba15a1d1_c144144b","updated":"2015-09-18 09:56:12.000000000","message":"if enbale_snat is false it will not go inside the if code, same with if it is None, sorry but I don\u0027t follow your logic, am I missing something?","commit_id":"813362af98e3148faf1900180b33b7a04699f167"},{"author":{"_account_id":14885,"name":"Daniel Mellado","email":"dmellado@redhat.com","username":"daniel-mellado"},"change_message_id":"0ead6a228595d813fd526916d5b2dd24d836d996","unresolved":false,"context_lines":[{"line_number":219,"context_line":"        ext_gw_info \u003d {}"},{"line_number":220,"context_line":"        if external_network_id:"},{"line_number":221,"context_line":"            ext_gw_info[\u0027network_id\u0027] \u003d external_network_id"},{"line_number":222,"context_line":"        if enable_snat is not None:"},{"line_number":223,"context_line":"            ext_gw_info[\u0027enable_snat\u0027] \u003d enable_snat"},{"line_number":224,"context_line":"        body \u003d cls.client.create_router("},{"line_number":225,"context_line":"            router_name, external_gateway_info\u003dext_gw_info,"}],"source_content_type":"text/x-python","patch_set":1,"id":"5a2ca52d_28672ab8","line":222,"in_reply_to":"ba15a1d1_ddc870aa","updated":"2015-10-16 10:47:39.000000000","message":"Whats the current status of this? Is this being blocked? @Albert, could you please review and add comments/unblock the patch? ty!","commit_id":"813362af98e3148faf1900180b33b7a04699f167"},{"author":{"_account_id":16986,"name":"Shuquan Huang","email":"shuquan.huang@live.com","username":"shuquan"},"change_message_id":"c2a23010eac5950eaf3172697b8c8833d7ca70ed","unresolved":false,"context_lines":[{"line_number":219,"context_line":"        ext_gw_info \u003d {}"},{"line_number":220,"context_line":"        if external_network_id:"},{"line_number":221,"context_line":"            ext_gw_info[\u0027network_id\u0027] \u003d external_network_id"},{"line_number":222,"context_line":"        if enable_snat is not None:"},{"line_number":223,"context_line":"            ext_gw_info[\u0027enable_snat\u0027] \u003d enable_snat"},{"line_number":224,"context_line":"        body \u003d cls.client.create_router("},{"line_number":225,"context_line":"            router_name, external_gateway_info\u003dext_gw_info,"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba15a1d1_c144144b","line":222,"in_reply_to":"ba15a1d1_fbe6a7ae","updated":"2015-09-18 09:46:38.000000000","message":"If enable_snat is false then there is no \u0027enable_snat\u0027 attr in ext_gw_info. The logic is not reasonable I think. We can not pass ext_gw_info[\u0027enable_snat\u0027] \u003d false.","commit_id":"813362af98e3148faf1900180b33b7a04699f167"}]}
