)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"b4592890d4b56d105503c9d079a1e804c0998f58","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Tunnel ID range validation for VXLAN/GRE networks"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Currently,there is no check which validates the values of"},{"line_number":10,"context_line":"tunnel ID range for VXLAN/GRE networks.It should be between"},{"line_number":11,"context_line":"1 to 16777215."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Closes-Bug: #1306488"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":22,"id":"1abeadc6_0ec40c91","line":10,"updated":"2014-08-18 11:56:11.000000000","message":"nit: space after period.","commit_id":"b56106cdf2cbe564f9034db04c3cad6448e1dfc9"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"66482e9bcb9f5c60e37caf4006b59c05809eb11d","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Tunnel ID range validation for VXLAN/GRE networks"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Currently,there is no check which validates the values of"},{"line_number":10,"context_line":"tunnel ID range for VXLAN/GRE networks.It should be between"},{"line_number":11,"context_line":"1 to 16777215."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Closes-Bug: #1306488"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":22,"id":"1abeadc6_075eaf45","line":10,"in_reply_to":"1abeadc6_0ec40c91","updated":"2014-08-18 14:39:29.000000000","message":"Done","commit_id":"b56106cdf2cbe564f9034db04c3cad6448e1dfc9"}],"neutron/common/constants.py":[{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"49ea5fb1f8e2e3f03251851dd027887f2e8f5abe","unresolved":false,"context_lines":[{"line_number":44,"context_line":"DHCP_RESPONSE_PORT \u003d 68"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"MIN_VLAN_TAG \u003d 1"},{"line_number":47,"context_line":"MAX_VLAN_TAG \u003d 4094"},{"line_number":48,"context_line":"MIN_VXLAN_VNI \u003d 1"},{"line_number":49,"context_line":"MAX_VXLAN_VNI \u003d 16777215"},{"line_number":50,"context_line":"FLOODING_ENTRY \u003d [\u002700:00:00:00:00:00\u0027, \u00270.0.0.0\u0027]"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAXX%2F%2FylY%3D","line":47,"updated":"2014-04-27 13:48:39.000000000","message":"I couldn\u0027t find any information about this - Do you know if a VNI of 0 is legal or not?","commit_id":"348de9b25a425383f7a3f37f9246aaee3764c6f6"},{"author":{"_account_id":2592,"name":"Mark McClain","email":"mark@mcclain.xyz","username":"markmcclain"},"change_message_id":"b2ac7b3bfc15a875be873e8b17dc305e74726294","unresolved":false,"context_lines":[{"line_number":48,"context_line":"MIN_VLAN_TAG \u003d 1"},{"line_number":49,"context_line":"MAX_VLAN_TAG \u003d 4094"},{"line_number":50,"context_line":"MIN_TUN_TAG \u003d 1"},{"line_number":51,"context_line":"MAX_TUN_TAG \u003d 16777215"},{"line_number":52,"context_line":"MAX_VXLAN_VNI \u003d 16777215"},{"line_number":53,"context_line":"FLOODING_ENTRY \u003d [\u002700:00:00:00:00:00\u0027, \u00270.0.0.0\u0027]"},{"line_number":54,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"1ae5cdf2_ca115f05","line":51,"updated":"2014-06-05 17:48:57.000000000","message":"This is just confusing since this is a constant.  Seems like we should remove MAX_VXLAN_VNI or specify MAX_GRE_TAG.","commit_id":"7fbd76bbed334ed3866b58144b23a2fc47f7690a"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"955a4691b386e1213dcd22011e790f6fafa145ae","unresolved":false,"context_lines":[{"line_number":48,"context_line":"MIN_VLAN_TAG \u003d 1"},{"line_number":49,"context_line":"MAX_VLAN_TAG \u003d 4094"},{"line_number":50,"context_line":"MIN_TUN_TAG \u003d 1"},{"line_number":51,"context_line":"MAX_TUN_TAG \u003d 16777215"},{"line_number":52,"context_line":"MAX_VXLAN_VNI \u003d 16777215"},{"line_number":53,"context_line":"FLOODING_ENTRY \u003d [\u002700:00:00:00:00:00\u0027, \u00270.0.0.0\u0027]"},{"line_number":54,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"1ae5cdf2_0bb1208f","line":51,"updated":"2014-06-02 07:54:51.000000000","message":"the fact these are same for vxlan and gre does not mean it\u0027s common for every tunnel technologies.\nplease use appropriate constants instead.","commit_id":"7fbd76bbed334ed3866b58144b23a2fc47f7690a"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"change_message_id":"95270fe7a5af75ed7a0775cd2a00d2264a7f46dd","unresolved":false,"context_lines":[{"line_number":48,"context_line":"MIN_VLAN_TAG \u003d 1"},{"line_number":49,"context_line":"MAX_VLAN_TAG \u003d 4094"},{"line_number":50,"context_line":"MIN_TUN_TAG \u003d 1"},{"line_number":51,"context_line":"MAX_TUN_TAG \u003d 16777215"},{"line_number":52,"context_line":"MAX_VXLAN_VNI \u003d 16777215"},{"line_number":53,"context_line":"FLOODING_ENTRY \u003d [\u002700:00:00:00:00:00\u0027, \u00270.0.0.0\u0027]"},{"line_number":54,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"1ae5cdf2_1df85de4","line":51,"in_reply_to":"1ae5cdf2_0bb1208f","updated":"2014-06-03 06:29:00.000000000","message":"Yes, I agree to use two sets of constants.","commit_id":"7fbd76bbed334ed3866b58144b23a2fc47f7690a"},{"author":{"_account_id":11825,"name":"Sudhakar Babu Gariganti","email":"sudhakar.gariganti@gmail.com","username":"sudhakar-gariganti"},"change_message_id":"39c635785af78d104fbce77510a3ac82d6c1ebf9","unresolved":false,"context_lines":[{"line_number":48,"context_line":"MIN_VLAN_TAG \u003d 1"},{"line_number":49,"context_line":"MAX_VLAN_TAG \u003d 4094"},{"line_number":50,"context_line":"MIN_BASE_TAG \u003d 1"},{"line_number":51,"context_line":"MAX_BASE_TAG \u003d 16777215"},{"line_number":52,"context_line":"MAX_VXLAN_VNI \u003d 16777215"},{"line_number":53,"context_line":"FLOODING_ENTRY \u003d [\u002700:00:00:00:00:00\u0027, \u00270.0.0.0\u0027]"},{"line_number":54,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"1ae5cdf2_88ea91aa","line":51,"updated":"2014-06-10 05:37:21.000000000","message":"Are MIN_TUNNEL_ID, MAX_TUNNEL_ID better suited??","commit_id":"f17016106c50e0e679c4391bf65a9cb0a57c0611"},{"author":{"_account_id":11825,"name":"Sudhakar Babu Gariganti","email":"sudhakar.gariganti@gmail.com","username":"sudhakar-gariganti"},"change_message_id":"c802d0943f13ad9fb31e90277141dacd932ad2ba","unresolved":false,"context_lines":[{"line_number":48,"context_line":"MIN_VLAN_TAG \u003d 1"},{"line_number":49,"context_line":"MAX_VLAN_TAG \u003d 4094"},{"line_number":50,"context_line":"MIN_BASE_TAG \u003d 1"},{"line_number":51,"context_line":"MAX_BASE_TAG \u003d 16777215"},{"line_number":52,"context_line":"MAX_VXLAN_VNI \u003d 16777215"},{"line_number":53,"context_line":"FLOODING_ENTRY \u003d [\u002700:00:00:00:00:00\u0027, \u00270.0.0.0\u0027]"},{"line_number":54,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"1ae5cdf2_8eeb7977","line":51,"updated":"2014-06-10 06:53:06.000000000","message":"Thanks for clarifying yangxurong . But BASE tag seems too generic as well. If we are considering only for VXLAN and GRE, \ncan we have the constants as MIN_TUN_ID , MAX_GRE_TAG, MAX_VXLAN_TAG , assuming that MIN_TUN_ID is same for all tunnel types. But this will call for changes in the code to  add a check for network type. \n\nYour thoughts??","commit_id":"f17016106c50e0e679c4391bf65a9cb0a57c0611"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"e0b3fea4baf3a5912fe94abbe471a6b1ed03973d","unresolved":false,"context_lines":[{"line_number":48,"context_line":"MIN_VLAN_TAG \u003d 1"},{"line_number":49,"context_line":"MAX_VLAN_TAG \u003d 4094"},{"line_number":50,"context_line":"MIN_BASE_TAG \u003d 1"},{"line_number":51,"context_line":"MAX_BASE_TAG \u003d 16777215"},{"line_number":52,"context_line":"MAX_VXLAN_VNI \u003d 16777215"},{"line_number":53,"context_line":"FLOODING_ENTRY \u003d [\u002700:00:00:00:00:00\u0027, \u00270.0.0.0\u0027]"},{"line_number":54,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"1ae5cdf2_91387fd4","line":51,"range":{"start_line":51,"start_character":4,"end_line":51,"end_character":8},"updated":"2014-06-05 09:20:02.000000000","message":"can you explain what\u0027s \"base tag\"?","commit_id":"f17016106c50e0e679c4391bf65a9cb0a57c0611"},{"author":{"_account_id":8646,"name":"yangxurong","email":"yangxurong@huawei.com","username":"yangxurong"},"change_message_id":"fe385fe4c71e3b0b9b42dd97b6861d72c8dbab17","unresolved":false,"context_lines":[{"line_number":48,"context_line":"MIN_VLAN_TAG \u003d 1"},{"line_number":49,"context_line":"MAX_VLAN_TAG \u003d 4094"},{"line_number":50,"context_line":"MIN_BASE_TAG \u003d 1"},{"line_number":51,"context_line":"MAX_BASE_TAG \u003d 16777215"},{"line_number":52,"context_line":"MAX_VXLAN_VNI \u003d 16777215"},{"line_number":53,"context_line":"FLOODING_ENTRY \u003d [\u002700:00:00:00:00:00\u0027, \u00270.0.0.0\u0027]"},{"line_number":54,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"1ae5cdf2_ab7667d6","line":51,"in_reply_to":"1ae5cdf2_88ea91aa","updated":"2014-06-10 06:19:52.000000000","message":"other reviewers disagree MIN_TUNNEL_ID, MAX_TUNNEL_ID,for tunnel include other types except GRE and VXLAN. so i use BASE.","commit_id":"f17016106c50e0e679c4391bf65a9cb0a57c0611"},{"author":{"_account_id":8646,"name":"yangxurong","email":"yangxurong@huawei.com","username":"yangxurong"},"change_message_id":"7b692ccaa9e1ceb1d49e68d9c7aed92d28fde407","unresolved":false,"context_lines":[{"line_number":48,"context_line":"MIN_VLAN_TAG \u003d 1"},{"line_number":49,"context_line":"MAX_VLAN_TAG \u003d 4094"},{"line_number":50,"context_line":"MIN_BASE_TAG \u003d 1"},{"line_number":51,"context_line":"MAX_BASE_TAG \u003d 16777215"},{"line_number":52,"context_line":"MAX_VXLAN_VNI \u003d 16777215"},{"line_number":53,"context_line":"FLOODING_ENTRY \u003d [\u002700:00:00:00:00:00\u0027, \u00270.0.0.0\u0027]"},{"line_number":54,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"1ae5cdf2_d44d10c6","line":51,"in_reply_to":"1ae5cdf2_8eeb7977","updated":"2014-06-10 08:01:24.000000000","message":"you means we define MIN_TUN_ID to verify in common such as VXLAN and GRE, assuming to add other type, then we add a check for network type?","commit_id":"f17016106c50e0e679c4391bf65a9cb0a57c0611"},{"author":{"_account_id":8646,"name":"yangxurong","email":"yangxurong@huawei.com","username":"yangxurong"},"change_message_id":"1bacaed1fe25b5db77bd47ddf002ae90720102be","unresolved":false,"context_lines":[{"line_number":48,"context_line":"MIN_VLAN_TAG \u003d 1"},{"line_number":49,"context_line":"MAX_VLAN_TAG \u003d 4094"},{"line_number":50,"context_line":"MIN_BASE_TAG \u003d 1"},{"line_number":51,"context_line":"MAX_BASE_TAG \u003d 16777215"},{"line_number":52,"context_line":"MAX_VXLAN_VNI \u003d 16777215"},{"line_number":53,"context_line":"FLOODING_ENTRY \u003d [\u002700:00:00:00:00:00\u0027, \u00270.0.0.0\u0027]"},{"line_number":54,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"1ae5cdf2_784f5334","line":51,"in_reply_to":"1ae5cdf2_91387fd4","updated":"2014-06-05 10:22:27.000000000","message":"that is VXLAN and GRE common range.","commit_id":"f17016106c50e0e679c4391bf65a9cb0a57c0611"},{"author":{"_account_id":11825,"name":"Sudhakar Babu Gariganti","email":"sudhakar.gariganti@gmail.com","username":"sudhakar-gariganti"},"change_message_id":"324a4f64ceff0a8f70c26785d9be40f8c01b7b46","unresolved":false,"context_lines":[{"line_number":48,"context_line":"MIN_VLAN_TAG \u003d 1"},{"line_number":49,"context_line":"MAX_VLAN_TAG \u003d 4094"},{"line_number":50,"context_line":"MIN_BASE_TAG \u003d 1"},{"line_number":51,"context_line":"MAX_BASE_TAG \u003d 16777215"},{"line_number":52,"context_line":"MAX_VXLAN_VNI \u003d 16777215"},{"line_number":53,"context_line":"FLOODING_ENTRY \u003d [\u002700:00:00:00:00:00\u0027, \u00270.0.0.0\u0027]"},{"line_number":54,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"1ae5cdf2_7a298336","line":51,"in_reply_to":"1ae5cdf2_d44d10c6","updated":"2014-06-10 08:50:17.000000000","message":"Here is what I meant:\n\nIn this file we define these constants,\n\nMIN_TUN_TAG \u003d 1\nMAX_GRE_TAG \u003d 16777215\nMAX_VXLAN_TAG \u003d 16777215\n(used _TAG so that it is uniform)\n\nAnd then in utils.py we modify the method to pass network_type also as one of the arguments:\n\ndef is_valid_base_tag(segmentation_id, network_type):\t\n   if network_type is VXLAN:\n\treturn q_const.MIN_TUN_ID \u003c\u003d segmentation_id \u003c\u003d q_const.MAX_VXLAN_TAG\n  else if network_type is GRE:\n         return q_const.MIN_TUN_ID \u003c\u003d segmentation_id \u003c\u003d q_const.MAX_GRE_TAG\n\nModify type_tunnel.py accordingly.\n\nWill this be better??","commit_id":"f17016106c50e0e679c4391bf65a9cb0a57c0611"},{"author":{"_account_id":105,"name":"Kyle Mestery","email":"mestery@mestery.com","username":"mestery"},"change_message_id":"908f16d8d26caff68415e28275ea38e535de2d0f","unresolved":false,"context_lines":[{"line_number":47,"context_line":""},{"line_number":48,"context_line":"MIN_VLAN_TAG \u003d 1"},{"line_number":49,"context_line":"MAX_VLAN_TAG \u003d 4094"},{"line_number":50,"context_line":"MIN_COMM_TAG \u003d 1"},{"line_number":51,"context_line":"MAX_COMM_TAG \u003d 16777215"},{"line_number":52,"context_line":"MIN_GRE_TAG \u003d 1"},{"line_number":53,"context_line":"MAX_GRE_TAG \u003d 16777215"}],"source_content_type":"text/x-python","patch_set":12,"id":"1ae5cdf2_97ee018a","line":50,"updated":"2014-06-11 02:52:39.000000000","message":"I don\u0027t understand what MIN/MAX_COMM_TAG is here, can you explain? Why is the same value as MAX/MIN_GRE/VXLAN_TAG?","commit_id":"b44ea9cff06c0589f530d1a79cc468bd50238f66"},{"author":{"_account_id":8646,"name":"yangxurong","email":"yangxurong@huawei.com","username":"yangxurong"},"change_message_id":"4ceed88258e59911231d4ab7b0c9c6c6f2097e4b","unresolved":false,"context_lines":[{"line_number":47,"context_line":""},{"line_number":48,"context_line":"MIN_VLAN_TAG \u003d 1"},{"line_number":49,"context_line":"MAX_VLAN_TAG \u003d 4094"},{"line_number":50,"context_line":"MIN_COMM_TAG \u003d 1"},{"line_number":51,"context_line":"MAX_COMM_TAG \u003d 16777215"},{"line_number":52,"context_line":"MIN_GRE_TAG \u003d 1"},{"line_number":53,"context_line":"MAX_GRE_TAG \u003d 16777215"}],"source_content_type":"text/x-python","patch_set":12,"id":"1ae5cdf2_2b1ea90c","line":50,"in_reply_to":"1ae5cdf2_97ee018a","updated":"2014-06-11 03:16:55.000000000","message":"MIN/MAX_COMM_TAG defines the same tunnel tag range in common, in fact, VXLAN and GRE have the same range, but if adding other tunnel, we define range respectively, and check the range by network_type.","commit_id":"b44ea9cff06c0589f530d1a79cc468bd50238f66"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"3c77803b9f2a76e24d2f5583ce2944e139a90544","unresolved":false,"context_lines":[{"line_number":51,"context_line":"MAX_GRE_TAG \u003d 16777215"},{"line_number":52,"context_line":"MIN_VXLAN_TAG \u003d 1"},{"line_number":53,"context_line":"MAX_VXLAN_TAG \u003d 16777215"},{"line_number":54,"context_line":"MAX_VXLAN_VNI \u003d 16777215"},{"line_number":55,"context_line":"FLOODING_ENTRY \u003d [\u002700:00:00:00:00:00\u0027, \u00270.0.0.0\u0027]"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"EXT_NS_COMP \u003d \u0027_backward_comp_e_ns\u0027"}],"source_content_type":"text/x-python","patch_set":16,"id":"1ae5cdf2_cef75858","line":54,"updated":"2014-06-17 07:42:52.000000000","message":"why to have separate MAX_VXLAN_TAG and MAX_VXLAN_VNI?","commit_id":"c6617a37cb32012c611f1a97779fa54177b5c9fd"},{"author":{"_account_id":8646,"name":"yangxurong","email":"yangxurong@huawei.com","username":"yangxurong"},"change_message_id":"5d03c5fbcc63b1424a80c4bc0efea8ea52a56f06","unresolved":false,"context_lines":[{"line_number":51,"context_line":"MAX_GRE_TAG \u003d 16777215"},{"line_number":52,"context_line":"MIN_VXLAN_TAG \u003d 1"},{"line_number":53,"context_line":"MAX_VXLAN_TAG \u003d 16777215"},{"line_number":54,"context_line":"MAX_VXLAN_VNI \u003d 16777215"},{"line_number":55,"context_line":"FLOODING_ENTRY \u003d [\u002700:00:00:00:00:00\u0027, \u00270.0.0.0\u0027]"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"EXT_NS_COMP \u003d \u0027_backward_comp_e_ns\u0027"}],"source_content_type":"text/x-python","patch_set":16,"id":"1ae5cdf2_7ca0b0a5","line":54,"in_reply_to":"1ae5cdf2_cef75858","updated":"2014-06-17 13:02:55.000000000","message":"different constant, pls refer code.","commit_id":"c6617a37cb32012c611f1a97779fa54177b5c9fd"},{"author":{"_account_id":7805,"name":"Li Ma","email":"skywalker.nick@gmail.com","username":"Nick"},"change_message_id":"b9c7f307edc58a9eb214d74889672b1d6ae50fbe","unresolved":false,"context_lines":[{"line_number":47,"context_line":""},{"line_number":48,"context_line":"MIN_VLAN_TAG \u003d 1"},{"line_number":49,"context_line":"MAX_VLAN_TAG \u003d 4094"},{"line_number":50,"context_line":"MAX_VXLAN_VNI \u003d 16777215"},{"line_number":51,"context_line":"FLOODING_ENTRY \u003d [\u002700:00:00:00:00:00\u0027, \u00270.0.0.0\u0027]"},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"EXT_NS_COMP \u003d \u0027_backward_comp_e_ns\u0027"}],"source_content_type":"text/x-python","patch_set":19,"id":"1ae5cdf2_e67b1d79","side":"PARENT","line":50,"updated":"2014-06-18 09:40:56.000000000","message":"Other layer 2 components use this constant. A simple workaround is to keep this constant:\nMIN_VXLAN_VNI \u003d 1\nMAX_VXLAN_VNI \u003d 16777215\n\nVNI is also the standard name for VxLAN segmentation.","commit_id":"ff9173ede242d5ce59530221398c7aaa81db2758"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"5c502c15c643eea5d5aa106ede221b0127d83922","unresolved":false,"context_lines":[{"line_number":51,"context_line":"MIN_GRE_TAG \u003d 1"},{"line_number":52,"context_line":"MAX_GRE_TAG \u003d 16777215"},{"line_number":53,"context_line":"MIN_VXLAN_TAG \u003d 1"},{"line_number":54,"context_line":"MAX_VXLAN_TAG \u003d 16777215"},{"line_number":55,"context_line":"FLOODING_ENTRY \u003d [\u002700:00:00:00:00:00\u0027, \u00270.0.0.0\u0027]"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"EXT_NS_COMP \u003d \u0027_backward_comp_e_ns\u0027"}],"source_content_type":"text/x-python","patch_set":20,"id":"1ae5cdf2_f7282535","line":54,"updated":"2014-06-18 11:18:23.000000000","message":"suggest to remove MAX_VXLAN_VNI then.\nI think it only make sense to have one","commit_id":"69acaa8b4133766d8882aef4c113cd5ef14b5374"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"89d12db45e2bfec9f4a29debd5ae5cdd9feaa21b","unresolved":false,"context_lines":[{"line_number":51,"context_line":"MIN_GRE_TAG \u003d 1"},{"line_number":52,"context_line":"MAX_GRE_TAG \u003d 16777215"},{"line_number":53,"context_line":"MIN_VXLAN_TAG \u003d 1"},{"line_number":54,"context_line":"MAX_VXLAN_TAG \u003d 16777215"},{"line_number":55,"context_line":"FLOODING_ENTRY \u003d [\u002700:00:00:00:00:00\u0027, \u00270.0.0.0\u0027]"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"EXT_NS_COMP \u003d \u0027_backward_comp_e_ns\u0027"}],"source_content_type":"text/x-python","patch_set":20,"id":"1ae5cdf2_48d12efa","line":54,"in_reply_to":"1ae5cdf2_f7282535","updated":"2014-06-18 15:53:20.000000000","message":"+1 to have one","commit_id":"69acaa8b4133766d8882aef4c113cd5ef14b5374"},{"author":{"_account_id":105,"name":"Kyle Mestery","email":"mestery@mestery.com","username":"mestery"},"change_message_id":"3683262eac16f05e0e5eeb0a446bbcbe099cf158","unresolved":false,"context_lines":[{"line_number":51,"context_line":"MIN_GRE_TAG \u003d 1"},{"line_number":52,"context_line":"MAX_GRE_TAG \u003d 16777215"},{"line_number":53,"context_line":"MIN_VXLAN_TAG \u003d 1"},{"line_number":54,"context_line":"MAX_VXLAN_TAG \u003d 16777215"},{"line_number":55,"context_line":"FLOODING_ENTRY \u003d [\u002700:00:00:00:00:00\u0027, \u00270.0.0.0\u0027]"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"EXT_NS_COMP \u003d \u0027_backward_comp_e_ns\u0027"}],"source_content_type":"text/x-python","patch_set":20,"id":"1ae5cdf2_e3ddb815","line":54,"in_reply_to":"1ae5cdf2_f7282535","updated":"2014-06-18 18:06:10.000000000","message":"Agreed, we should not need both. But I would suggest keeping MAX_VLAN_VNI in lieu of MAX_VLAN_TAG, as a VNI is the tag for VXLAN.","commit_id":"69acaa8b4133766d8882aef4c113cd5ef14b5374"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"20aee3a5b5906ea94a91adbc74733d99f1c0954d","unresolved":false,"context_lines":[{"line_number":53,"context_line":"MIN_VLAN_TAG \u003d 1"},{"line_number":54,"context_line":"MAX_VLAN_TAG \u003d 4094"},{"line_number":55,"context_line":"MIN_TUNNEL_ID \u003d 1"},{"line_number":56,"context_line":"MAX_TUNNEL_ID \u003d 16777215"},{"line_number":57,"context_line":"FLOODING_ENTRY \u003d [\u002700:00:00:00:00:00\u0027, \u00270.0.0.0\u0027]"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"EXT_NS_COMP \u003d \u0027_backward_comp_e_ns\u0027"}],"source_content_type":"text/x-python","patch_set":22,"id":"1abeadc6_11f8ad7b","line":56,"updated":"2014-08-18 12:02:15.000000000","message":"VXLAN VNI is 24 bit value but GRE key field is 32 bit value. 16777215 is the max of 24 bit value. We should not use this value for GRE key.","commit_id":"b56106cdf2cbe564f9034db04c3cad6448e1dfc9"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"0472f3ca718fb2cf3a077a5b373216a5abb037bf","unresolved":false,"context_lines":[{"line_number":53,"context_line":"MIN_VLAN_TAG \u003d 1"},{"line_number":54,"context_line":"MAX_VLAN_TAG \u003d 4094"},{"line_number":55,"context_line":"MIN_TUNNEL_ID \u003d 1"},{"line_number":56,"context_line":"MAX_TUNNEL_ID \u003d 16777215"},{"line_number":57,"context_line":"FLOODING_ENTRY \u003d [\u002700:00:00:00:00:00\u0027, \u00270.0.0.0\u0027]"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"EXT_NS_COMP \u003d \u0027_backward_comp_e_ns\u0027"}],"source_content_type":"text/x-python","patch_set":22,"id":"1abeadc6_cbdd9916","line":56,"in_reply_to":"1abeadc6_0b6f91c6","updated":"2014-08-18 15:31:49.000000000","message":"2**32 - 1  is more pythonic :)","commit_id":"b56106cdf2cbe564f9034db04c3cad6448e1dfc9"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"66482e9bcb9f5c60e37caf4006b59c05809eb11d","unresolved":false,"context_lines":[{"line_number":53,"context_line":"MIN_VLAN_TAG \u003d 1"},{"line_number":54,"context_line":"MAX_VLAN_TAG \u003d 4094"},{"line_number":55,"context_line":"MIN_TUNNEL_ID \u003d 1"},{"line_number":56,"context_line":"MAX_TUNNEL_ID \u003d 16777215"},{"line_number":57,"context_line":"FLOODING_ENTRY \u003d [\u002700:00:00:00:00:00\u0027, \u00270.0.0.0\u0027]"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"EXT_NS_COMP \u003d \u0027_backward_comp_e_ns\u0027"}],"source_content_type":"text/x-python","patch_set":22,"id":"1abeadc6_a7309b57","line":56,"in_reply_to":"1abeadc6_11f8ad7b","updated":"2014-08-18 14:39:29.000000000","message":"Shall I do it like this:\n#For GRE\nMIN_TUNNEL_ID \u003d 1\nMAX_TUNNEL_ID \u003d 4294967295\n\n#For VXLAN\nMIN_VXLAN_VNI \u003d 1\nMAX_VXLAN_VNI \u003d 16777215\n\nIs it fine? Please suggests...","commit_id":"b56106cdf2cbe564f9034db04c3cad6448e1dfc9"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"aa73af9233ffb67ce92adfbf7170f6558008e627","unresolved":false,"context_lines":[{"line_number":53,"context_line":"MIN_VLAN_TAG \u003d 1"},{"line_number":54,"context_line":"MAX_VLAN_TAG \u003d 4094"},{"line_number":55,"context_line":"MIN_TUNNEL_ID \u003d 1"},{"line_number":56,"context_line":"MAX_TUNNEL_ID \u003d 16777215"},{"line_number":57,"context_line":"FLOODING_ENTRY \u003d [\u002700:00:00:00:00:00\u0027, \u00270.0.0.0\u0027]"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"EXT_NS_COMP \u003d \u0027_backward_comp_e_ns\u0027"}],"source_content_type":"text/x-python","patch_set":22,"id":"1abeadc6_0b6f91c6","line":56,"in_reply_to":"1abeadc6_a7309b57","updated":"2014-08-18 15:21:17.000000000","message":"It looks good to me.\n\nHow about using\n\n  pow(2, 32) - 1\n\ninstead of 4294967295. It seem easier to read.","commit_id":"b56106cdf2cbe564f9034db04c3cad6448e1dfc9"},{"author":{"_account_id":6876,"name":"stephen-ma","email":"stephenbma43@gmail.com","username":"stephen-ma"},"change_message_id":"a8b65578cc23cec00ea0aab7b2c4a9b830d2d11e","unresolved":false,"context_lines":[{"line_number":53,"context_line":"MIN_VLAN_TAG \u003d 1"},{"line_number":54,"context_line":"MAX_VLAN_TAG \u003d 4094"},{"line_number":55,"context_line":"MIN_TUNNEL_ID \u003d 1"},{"line_number":56,"context_line":"MAX_TUNNEL_ID \u003d 16777215"},{"line_number":57,"context_line":"FLOODING_ENTRY \u003d [\u002700:00:00:00:00:00\u0027, \u00270.0.0.0\u0027]"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"EXT_NS_COMP \u003d \u0027_backward_comp_e_ns\u0027"}],"source_content_type":"text/x-python","patch_set":22,"id":"1abeadc6_606c9f9d","line":56,"in_reply_to":"1abeadc6_cbdd9916","updated":"2014-08-18 16:42:15.000000000","message":"Or just \n\n MAX_VXLAN_VNI\u003d0xffffff\n MAX_TUNNEL_ID \u003d 0xffffffff","commit_id":"b56106cdf2cbe564f9034db04c3cad6448e1dfc9"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"68be0c681f7c00ea98c8da68247f2e3e48de33a3","unresolved":false,"context_lines":[{"line_number":52,"context_line":""},{"line_number":53,"context_line":"MIN_VLAN_TAG \u003d 1"},{"line_number":54,"context_line":"MAX_VLAN_TAG \u003d 4094"},{"line_number":55,"context_line":"MIN_TUNNEL_ID \u003d 1"},{"line_number":56,"context_line":"MAX_TUNNEL_ID \u003d 2 ** 32 - 1"},{"line_number":57,"context_line":"MIN_VXLAN_VNI \u003d 1"},{"line_number":58,"context_line":"MAX_VXLAN_VNI \u003d 2 ** 24 - 1"}],"source_content_type":"text/x-python","patch_set":24,"id":"1abeadc6_f41abf7b","line":55,"updated":"2014-08-21 01:49:40.000000000","message":"TUNNEL -\u003e GRE","commit_id":"a5f28ec9fd6f98621ea113860125de8e406fdd97"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"91e3fbd5c988b1f9e4a50d6b59f80cd8f65720a2","unresolved":false,"context_lines":[{"line_number":52,"context_line":""},{"line_number":53,"context_line":"MIN_VLAN_TAG \u003d 1"},{"line_number":54,"context_line":"MAX_VLAN_TAG \u003d 4094"},{"line_number":55,"context_line":"MIN_TUNNEL_ID \u003d 1"},{"line_number":56,"context_line":"MAX_TUNNEL_ID \u003d 2 ** 32 - 1"},{"line_number":57,"context_line":"MIN_VXLAN_VNI \u003d 1"},{"line_number":58,"context_line":"MAX_VXLAN_VNI \u003d 2 ** 24 - 1"}],"source_content_type":"text/x-python","patch_set":24,"id":"1abeadc6_23e6bbe8","line":55,"in_reply_to":"1abeadc6_f41abf7b","updated":"2014-08-21 06:21:46.000000000","message":"I think instead for doing TUNNEL -\u003e GRE. I would suggest we should put a comment above these constants like:\n#for GRE Tunnel\nMIN_TUNNEL_ID \u003d 1\nMAX_TUNNEL_ID \u003d 2 ** 32 - 1\n\n#for VXLAN Tunnel\nMIN_VXLAN_VNI \u003d 1\nMAX_VXLAN_VNI \u003d 2 ** 24 - 1\n\nShare your opinion.","commit_id":"a5f28ec9fd6f98621ea113860125de8e406fdd97"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"2df0f575b895ec167494475fe4328c986beb1dc2","unresolved":false,"context_lines":[{"line_number":52,"context_line":""},{"line_number":53,"context_line":"MIN_VLAN_TAG \u003d 1"},{"line_number":54,"context_line":"MAX_VLAN_TAG \u003d 4094"},{"line_number":55,"context_line":"#For GRE Tunnel"},{"line_number":56,"context_line":"MIN_TUNNEL_ID \u003d 1"},{"line_number":57,"context_line":"MAX_TUNNEL_ID \u003d 2 ** 32 - 1"},{"line_number":58,"context_line":"#For VXLAN Tunnel"}],"source_content_type":"text/x-python","patch_set":26,"id":"1abeadc6_acf8734a","line":55,"updated":"2014-08-25 21:36:56.000000000","message":"iirc, the comment should begin with a space  after #","commit_id":"3f9bde233a0a2ddea0b17aebd169f58f739f2c5a"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"e2625bc3c4f5d2979c39fa90309c6acdd8af5dfc","unresolved":false,"context_lines":[{"line_number":52,"context_line":""},{"line_number":53,"context_line":"MIN_VLAN_TAG \u003d 1"},{"line_number":54,"context_line":"MAX_VLAN_TAG \u003d 4094"},{"line_number":55,"context_line":"#For GRE Tunnel"},{"line_number":56,"context_line":"MIN_TUNNEL_ID \u003d 1"},{"line_number":57,"context_line":"MAX_TUNNEL_ID \u003d 2 ** 32 - 1"},{"line_number":58,"context_line":"#For VXLAN Tunnel"}],"source_content_type":"text/x-python","patch_set":26,"id":"1abeadc6_8a3a9b96","line":55,"in_reply_to":"1abeadc6_acf8734a","updated":"2014-08-26 15:59:43.000000000","message":"Done","commit_id":"3f9bde233a0a2ddea0b17aebd169f58f739f2c5a"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"2df0f575b895ec167494475fe4328c986beb1dc2","unresolved":false,"context_lines":[{"line_number":53,"context_line":"MIN_VLAN_TAG \u003d 1"},{"line_number":54,"context_line":"MAX_VLAN_TAG \u003d 4094"},{"line_number":55,"context_line":"#For GRE Tunnel"},{"line_number":56,"context_line":"MIN_TUNNEL_ID \u003d 1"},{"line_number":57,"context_line":"MAX_TUNNEL_ID \u003d 2 ** 32 - 1"},{"line_number":58,"context_line":"#For VXLAN Tunnel"},{"line_number":59,"context_line":"MIN_VXLAN_VNI \u003d 1"}],"source_content_type":"text/x-python","patch_set":26,"id":"1abeadc6_4cafdf2b","line":56,"updated":"2014-08-25 21:36:56.000000000","message":"MIN/MAX_GRE_ID seems clearer as gre segmentation_id column name is gre_id","commit_id":"3f9bde233a0a2ddea0b17aebd169f58f739f2c5a"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"e2625bc3c4f5d2979c39fa90309c6acdd8af5dfc","unresolved":false,"context_lines":[{"line_number":53,"context_line":"MIN_VLAN_TAG \u003d 1"},{"line_number":54,"context_line":"MAX_VLAN_TAG \u003d 4094"},{"line_number":55,"context_line":"#For GRE Tunnel"},{"line_number":56,"context_line":"MIN_TUNNEL_ID \u003d 1"},{"line_number":57,"context_line":"MAX_TUNNEL_ID \u003d 2 ** 32 - 1"},{"line_number":58,"context_line":"#For VXLAN Tunnel"},{"line_number":59,"context_line":"MIN_VXLAN_VNI \u003d 1"}],"source_content_type":"text/x-python","patch_set":26,"id":"1abeadc6_aa41170d","line":56,"in_reply_to":"1abeadc6_4cafdf2b","updated":"2014-08-26 15:59:43.000000000","message":"Done","commit_id":"3f9bde233a0a2ddea0b17aebd169f58f739f2c5a"},{"author":{"_account_id":7805,"name":"Li Ma","email":"skywalker.nick@gmail.com","username":"Nick"},"change_message_id":"ab721378996f4bdad8b7414441d923de2db1b5d8","unresolved":false,"context_lines":[{"line_number":57,"context_line":"MAX_TUNNEL_ID \u003d 2 ** 32 - 1"},{"line_number":58,"context_line":"#For VXLAN Tunnel"},{"line_number":59,"context_line":"MIN_VXLAN_VNI \u003d 1"},{"line_number":60,"context_line":"MAX_VXLAN_VNI \u003d 2 ** 24 - 1"},{"line_number":61,"context_line":"FLOODING_ENTRY \u003d [\u002700:00:00:00:00:00\u0027, \u00270.0.0.0\u0027]"},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"EXT_NS_COMP \u003d \u0027_backward_comp_e_ns\u0027"}],"source_content_type":"text/x-python","patch_set":26,"id":"1abeadc6_6653c56c","line":60,"updated":"2014-08-26 10:30:06.000000000","message":"Suggest to add a blank line after MAX_VXLAN_VNI, because FLOODING_ENTRY has nothing to do with the tunnel id section.","commit_id":"3f9bde233a0a2ddea0b17aebd169f58f739f2c5a"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"e2625bc3c4f5d2979c39fa90309c6acdd8af5dfc","unresolved":false,"context_lines":[{"line_number":57,"context_line":"MAX_TUNNEL_ID \u003d 2 ** 32 - 1"},{"line_number":58,"context_line":"#For VXLAN Tunnel"},{"line_number":59,"context_line":"MIN_VXLAN_VNI \u003d 1"},{"line_number":60,"context_line":"MAX_VXLAN_VNI \u003d 2 ** 24 - 1"},{"line_number":61,"context_line":"FLOODING_ENTRY \u003d [\u002700:00:00:00:00:00\u0027, \u00270.0.0.0\u0027]"},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"EXT_NS_COMP \u003d \u0027_backward_comp_e_ns\u0027"}],"source_content_type":"text/x-python","patch_set":26,"id":"1abeadc6_ca44931d","line":60,"in_reply_to":"1abeadc6_6653c56c","updated":"2014-08-26 15:59:43.000000000","message":"Done","commit_id":"3f9bde233a0a2ddea0b17aebd169f58f739f2c5a"}],"neutron/common/exceptions.py":[{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"88f0d67af2b16a3c3e701b8b17a3f266e5348276","unresolved":false,"context_lines":[{"line_number":307,"context_line":""},{"line_number":308,"context_line":"class NetworkTunnelRangeError(NeutronException):"},{"line_number":309,"context_line":"    message \u003d _(\"Invalid network Tunnel range: \""},{"line_number":310,"context_line":"                \"\u0027%(tunnel_range)s\u0027 - %(error)s\")"},{"line_number":311,"context_line":""},{"line_number":312,"context_line":"    def __init__(self, **kwargs):"},{"line_number":313,"context_line":"        # Convert tunnel_range tuple to \u0027start:end\u0027 format for display"}],"source_content_type":"text/x-python","patch_set":27,"id":"1abeadc6_17276665","line":310,"updated":"2014-08-27 12:14:31.000000000","message":"Glad you got rid of the quotes. Looks much better!","commit_id":"d0071fa1ffb9c337131ac08c3f41a40e6f4fb0b2"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"547b2d62a14dc41fa9a24cc4d08e7bbe5e1ecb2b","unresolved":false,"context_lines":[{"line_number":307,"context_line":""},{"line_number":308,"context_line":"class NetworkTunnelRangeError(NeutronException):"},{"line_number":309,"context_line":"    message \u003d _(\"Invalid network Tunnel range: \""},{"line_number":310,"context_line":"                \"\u0027%(tunnel_range)s\u0027 - %(error)s\")"},{"line_number":311,"context_line":""},{"line_number":312,"context_line":"    def __init__(self, **kwargs):"},{"line_number":313,"context_line":"        # Convert tunnel_range tuple to \u0027start:end\u0027 format for display"}],"source_content_type":"text/x-python","patch_set":27,"id":"1abeadc6_05a65010","line":310,"in_reply_to":"1abeadc6_17276665","updated":"2014-08-27 13:03:16.000000000","message":"Thanks :)","commit_id":"d0071fa1ffb9c337131ac08c3f41a40e6f4fb0b2"}],"neutron/common/utils.py":[{"author":{"_account_id":7805,"name":"Li Ma","email":"skywalker.nick@gmail.com","username":"Nick"},"change_message_id":"d8272fd2ce154f85784baabf62c8ec5350e0b650","unresolved":false,"context_lines":[{"line_number":270,"context_line":"    return q_const.MIN_VLAN_TAG \u003c\u003d vlan \u003c\u003d q_const.MAX_VLAN_TAG"},{"line_number":271,"context_line":""},{"line_number":272,"context_line":""},{"line_number":273,"context_line":"def is_valid_tunnel_tag(segmentation_id):"},{"line_number":274,"context_line":"    return q_const.MIN_VXLAN_VNI \u003c\u003d segmentation_id \u003c\u003d q_const.MAX_VXLAN_VNI"},{"line_number":275,"context_line":""},{"line_number":276,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"3ae8d1ca_975833fc","line":273,"updated":"2014-05-27 09:57:10.000000000","message":"is it more straightforward to use is_valid_segmentation_id?","commit_id":"52fae613569c53bf48fcd5a70952d86e5ce712d1"},{"author":{"_account_id":7805,"name":"Li Ma","email":"skywalker.nick@gmail.com","username":"Nick"},"change_message_id":"d8272fd2ce154f85784baabf62c8ec5350e0b650","unresolved":false,"context_lines":[{"line_number":271,"context_line":""},{"line_number":272,"context_line":""},{"line_number":273,"context_line":"def is_valid_tunnel_tag(segmentation_id):"},{"line_number":274,"context_line":"    return q_const.MIN_VXLAN_VNI \u003c\u003d segmentation_id \u003c\u003d q_const.MAX_VXLAN_VNI"},{"line_number":275,"context_line":""},{"line_number":276,"context_line":""},{"line_number":277,"context_line":"def get_random_string(length):"}],"source_content_type":"text/x-python","patch_set":8,"id":"3ae8d1ca_175503c6","line":274,"updated":"2014-05-27 09:57:10.000000000","message":"MIN/MAX_VXLAN_VNI cannot stand for GRE tunnel ID. They have the same value but different meaning.","commit_id":"52fae613569c53bf48fcd5a70952d86e5ce712d1"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"74ca8b6dfddbcb89f25d230b0102b688f6225cb9","unresolved":false,"context_lines":[{"line_number":43,"context_line":"synchronized \u003d lockutils.synchronized_with_prefix(SYNCHRONIZED_PREFIX)"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"class cache_method_results(object):"},{"line_number":47,"context_line":"    \"\"\"This decorator is intended for object methods only.\"\"\""},{"line_number":48,"context_line":""},{"line_number":49,"context_line":"    def __init__(self, func):"}],"source_content_type":"text/x-python","patch_set":9,"id":"3ae8d1ca_f7dc1077","line":46,"updated":"2014-05-27 13:33:52.000000000","message":"How does this, and the other functions in this file relate to the changeset?","commit_id":"7fbd76bbed334ed3866b58144b23a2fc47f7690a"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"a6ff7438bcd364267da6a9010818f0a54aab11fd","unresolved":false,"context_lines":[{"line_number":43,"context_line":"synchronized \u003d lockutils.synchronized_with_prefix(SYNCHRONIZED_PREFIX)"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"class cache_method_results(object):"},{"line_number":47,"context_line":"    \"\"\"This decorator is intended for object methods only.\"\"\""},{"line_number":48,"context_line":""},{"line_number":49,"context_line":"    def __init__(self, func):"}],"source_content_type":"text/x-python","patch_set":9,"id":"3ae8d1ca_03adbe31","line":46,"in_reply_to":"3ae8d1ca_1ddb5d1c","updated":"2014-05-27 15:27:23.000000000","message":"Sorry, I was looking at difference between a previous version and saw this change. Must have been a merge.","commit_id":"7fbd76bbed334ed3866b58144b23a2fc47f7690a"},{"author":{"_account_id":8646,"name":"yangxurong","email":"yangxurong@huawei.com","username":"yangxurong"},"change_message_id":"e01242c8723c39c63da2b4a1d57e56f9ea3637ae","unresolved":false,"context_lines":[{"line_number":43,"context_line":"synchronized \u003d lockutils.synchronized_with_prefix(SYNCHRONIZED_PREFIX)"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"class cache_method_results(object):"},{"line_number":47,"context_line":"    \"\"\"This decorator is intended for object methods only.\"\"\""},{"line_number":48,"context_line":""},{"line_number":49,"context_line":"    def __init__(self, func):"}],"source_content_type":"text/x-python","patch_set":9,"id":"3ae8d1ca_1ddb5d1c","line":46,"in_reply_to":"3ae8d1ca_f7dc1077","updated":"2014-05-27 14:27:05.000000000","message":"yes, i add is_valid_tunnel_tag function to validate tunnel id like is_valid_vlan_tag","commit_id":"7fbd76bbed334ed3866b58144b23a2fc47f7690a"},{"author":{"_account_id":6876,"name":"stephen-ma","email":"stephenbma43@gmail.com","username":"stephen-ma"},"change_message_id":"8873c638b3e0a993bc2f80fabf7fa598b131a21d","unresolved":false,"context_lines":[{"line_number":276,"context_line":"    elif network_type is n_const.TYPE_GRE:"},{"line_number":277,"context_line":"        return q_const.MIN_GRE_TAG \u003c\u003d tunnel_id \u003c\u003d q_const.MAX_GRE_TAG"},{"line_number":278,"context_line":"    else:"},{"line_number":279,"context_line":"        return q_const.MIN_COMM_TAG \u003c\u003d tunnel_id \u003c\u003d q_const.MAX_COMM_TAG"},{"line_number":280,"context_line":""},{"line_number":281,"context_line":""},{"line_number":282,"context_line":"def get_random_string(length):"}],"source_content_type":"text/x-python","patch_set":12,"id":"1ae5cdf2_8e4eeb6d","line":279,"updated":"2014-06-11 04:04:02.000000000","message":"If the network_type has no concept of a \"tag\", then this function should always return False.","commit_id":"b44ea9cff06c0589f530d1a79cc468bd50238f66"},{"author":{"_account_id":6876,"name":"stephen-ma","email":"stephenbma43@gmail.com","username":"stephen-ma"},"change_message_id":"b77650b2cacee761f0b5b467ae284de9c9666690","unresolved":false,"context_lines":[{"line_number":270,"context_line":"    return q_const.MIN_VLAN_TAG \u003c\u003d vlan \u003c\u003d q_const.MAX_VLAN_TAG"},{"line_number":271,"context_line":""},{"line_number":272,"context_line":""},{"line_number":273,"context_line":"def is_valid_tunnel_tag(tunnel_id, network_type\u003dNone):"},{"line_number":274,"context_line":"    if network_type is n_const.TYPE_VXLAN:"},{"line_number":275,"context_line":"        return q_const.MIN_VXLAN_TAG \u003c\u003d tunnel_id \u003c\u003d q_const.MAX_VXLAN_TAG"},{"line_number":276,"context_line":"    elif network_type is n_const.TYPE_GRE:"}],"source_content_type":"text/x-python","patch_set":15,"id":"1ae5cdf2_3e0e3c33","line":273,"updated":"2014-06-16 19:39:19.000000000","message":"Why not make is_valid_tunnel_tag a method in the class TunnelTypeDriver? It is only going to be used by instances of TunnelTypeDriver or its derived classes?","commit_id":"8231924044f0f7b719a93c36c6fb0b2b5e9efcb3"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"3c77803b9f2a76e24d2f5583ce2944e139a90544","unresolved":false,"context_lines":[{"line_number":275,"context_line":"    if network_type is n_const.TYPE_VXLAN:"},{"line_number":276,"context_line":"        return q_const.MIN_VXLAN_TAG \u003c\u003d tunnel_id \u003c\u003d q_const.MAX_VXLAN_TAG"},{"line_number":277,"context_line":"    elif network_type is n_const.TYPE_GRE:"},{"line_number":278,"context_line":"        return q_const.MIN_GRE_TAG \u003c\u003d tunnel_id \u003c\u003d q_const.MAX_GRE_TAG"},{"line_number":279,"context_line":""},{"line_number":280,"context_line":""},{"line_number":281,"context_line":"def get_random_string(length):"}],"source_content_type":"text/x-python","patch_set":16,"id":"1ae5cdf2_eeba5470","line":278,"updated":"2014-06-17 07:42:52.000000000","message":"as callers know what network_type is, it\u0027s better to just inline this function.","commit_id":"c6617a37cb32012c611f1a97779fa54177b5c9fd"},{"author":{"_account_id":8646,"name":"yangxurong","email":"yangxurong@huawei.com","username":"yangxurong"},"change_message_id":"5d03c5fbcc63b1424a80c4bc0efea8ea52a56f06","unresolved":false,"context_lines":[{"line_number":275,"context_line":"    if network_type is n_const.TYPE_VXLAN:"},{"line_number":276,"context_line":"        return q_const.MIN_VXLAN_TAG \u003c\u003d tunnel_id \u003c\u003d q_const.MAX_VXLAN_TAG"},{"line_number":277,"context_line":"    elif network_type is n_const.TYPE_GRE:"},{"line_number":278,"context_line":"        return q_const.MIN_GRE_TAG \u003c\u003d tunnel_id \u003c\u003d q_const.MAX_GRE_TAG"},{"line_number":279,"context_line":""},{"line_number":280,"context_line":""},{"line_number":281,"context_line":"def get_random_string(length):"}],"source_content_type":"text/x-python","patch_set":16,"id":"1ae5cdf2_9c91fc48","line":278,"in_reply_to":"1ae5cdf2_eeba5470","updated":"2014-06-17 13:02:55.000000000","message":"in present case, we surely know network_type.","commit_id":"c6617a37cb32012c611f1a97779fa54177b5c9fd"},{"author":{"_account_id":7987,"name":"Ivar Lazzaro","email":"ivarlazzaro@gmail.com","username":"Ivar"},"change_message_id":"3703bb916b8c3d83d6547d8e95a45256e3988255","unresolved":false,"context_lines":[{"line_number":275,"context_line":"    if network_type is n_const.TYPE_VXLAN:"},{"line_number":276,"context_line":"        return q_const.MIN_VXLAN_TAG \u003c\u003d tunnel_id \u003c\u003d q_const.MAX_VXLAN_TAG"},{"line_number":277,"context_line":"    elif network_type is n_const.TYPE_GRE:"},{"line_number":278,"context_line":"        return q_const.MIN_GRE_TAG \u003c\u003d tunnel_id \u003c\u003d q_const.MAX_GRE_TAG"},{"line_number":279,"context_line":""},{"line_number":280,"context_line":""},{"line_number":281,"context_line":"def get_random_string(length):"}],"source_content_type":"text/x-python","patch_set":17,"id":"1ae5cdf2_a999f37a","line":278,"updated":"2014-06-18 03:02:46.000000000","message":"Just a suggestion:\nThis range check is done 2 times here and one in \"is_valid_vlan_range\". You may want to define an \"is_in_range(value, min, max)\" method and use it instead.","commit_id":"d6ac30652f7401fe4bbf39de71fecf458c7bcf18"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"9ebeb9eea64daa6beaf323e9e4f4c5edceb56c0e","unresolved":false,"context_lines":[{"line_number":276,"context_line":"        return q_const.MIN_VXLAN_TAG \u003c\u003d tunnel_id \u003c\u003d q_const.MAX_VXLAN_TAG"},{"line_number":277,"context_line":"    elif network_type is n_const.TYPE_GRE:"},{"line_number":278,"context_line":"        return q_const.MIN_GRE_TAG \u003c\u003d tunnel_id \u003c\u003d q_const.MAX_GRE_TAG"},{"line_number":279,"context_line":""},{"line_number":280,"context_line":""},{"line_number":281,"context_line":"def get_random_string(length):"},{"line_number":282,"context_line":"    \"\"\"Get a random hex string of the specified length."}],"source_content_type":"text/x-python","patch_set":17,"id":"1ae5cdf2_a580398c","line":279,"updated":"2014-06-18 02:25:49.000000000","message":"i still prefer inline this function into the callers.\nbut otherwise please raise an exception for unknown network_type.\n(rather than implicit None)","commit_id":"d6ac30652f7401fe4bbf39de71fecf458c7bcf18"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"0c2aab1f6472c0f5b16a0c5ec27249090b5d72cd","unresolved":false,"context_lines":[{"line_number":36,"context_line":"from neutron.openstack.common import lockutils"},{"line_number":37,"context_line":"from neutron.openstack.common import log as logging"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"TIME_FORMAT \u003d \"%Y-%m-%dT%H:%M:%SZ\""},{"line_number":41,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":42,"context_line":"SYNCHRONIZED_PREFIX \u003d \u0027neutron-\u0027"}],"source_content_type":"text/x-python","patch_set":18,"id":"1ae5cdf2_43c3e889","side":"PARENT","line":39,"updated":"2014-06-18 07:02:11.000000000","message":"unrelated change?","commit_id":"ff9173ede242d5ce59530221398c7aaa81db2758"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"20aee3a5b5906ea94a91adbc74733d99f1c0954d","unresolved":false,"context_lines":[{"line_number":271,"context_line":"    return q_const.MIN_VLAN_TAG \u003c\u003d vlan \u003c\u003d q_const.MAX_VLAN_TAG"},{"line_number":272,"context_line":""},{"line_number":273,"context_line":""},{"line_number":274,"context_line":"def is_valid_tunnel_id(tunnel_id):"},{"line_number":275,"context_line":"    return q_const.MIN_TUNNEL_ID \u003c\u003d tunnel_id \u003c\u003d q_const.MAX_TUNNEL_ID"},{"line_number":276,"context_line":""},{"line_number":277,"context_line":""}],"source_content_type":"text/x-python","patch_set":22,"id":"1abeadc6_91c75d12","line":274,"updated":"2014-08-18 12:02:15.000000000","message":"As I commented in constants.py, MAX_TUNNEL_ID is correct only for VXLAN VNI, so this method name should be is_valid_vxlan_id. (or we should make this method more generic one).","commit_id":"b56106cdf2cbe564f9034db04c3cad6448e1dfc9"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"66482e9bcb9f5c60e37caf4006b59c05809eb11d","unresolved":false,"context_lines":[{"line_number":271,"context_line":"    return q_const.MIN_VLAN_TAG \u003c\u003d vlan \u003c\u003d q_const.MAX_VLAN_TAG"},{"line_number":272,"context_line":""},{"line_number":273,"context_line":""},{"line_number":274,"context_line":"def is_valid_tunnel_id(tunnel_id):"},{"line_number":275,"context_line":"    return q_const.MIN_TUNNEL_ID \u003c\u003d tunnel_id \u003c\u003d q_const.MAX_TUNNEL_ID"},{"line_number":276,"context_line":""},{"line_number":277,"context_line":""}],"source_content_type":"text/x-python","patch_set":22,"id":"1abeadc6_6703e30f","line":274,"in_reply_to":"1abeadc6_91c75d12","updated":"2014-08-18 14:39:29.000000000","message":"Done","commit_id":"b56106cdf2cbe564f9034db04c3cad6448e1dfc9"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"68be0c681f7c00ea98c8da68247f2e3e48de33a3","unresolved":false,"context_lines":[{"line_number":271,"context_line":"    return q_const.MIN_VLAN_TAG \u003c\u003d vlan \u003c\u003d q_const.MAX_VLAN_TAG"},{"line_number":272,"context_line":""},{"line_number":273,"context_line":""},{"line_number":274,"context_line":"def is_valid_tunnel_id(tunnel_id):"},{"line_number":275,"context_line":"    return q_const.MIN_TUNNEL_ID \u003c\u003d tunnel_id \u003c\u003d q_const.MAX_TUNNEL_ID"},{"line_number":276,"context_line":""},{"line_number":277,"context_line":""}],"source_content_type":"text/x-python","patch_set":24,"id":"1abeadc6_172e5d92","line":274,"updated":"2014-08-21 01:49:40.000000000","message":"It is used to check GRE key ID. is_valid_gre_id looks better.","commit_id":"a5f28ec9fd6f98621ea113860125de8e406fdd97"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"91e3fbd5c988b1f9e4a50d6b59f80cd8f65720a2","unresolved":false,"context_lines":[{"line_number":271,"context_line":"    return q_const.MIN_VLAN_TAG \u003c\u003d vlan \u003c\u003d q_const.MAX_VLAN_TAG"},{"line_number":272,"context_line":""},{"line_number":273,"context_line":""},{"line_number":274,"context_line":"def is_valid_tunnel_id(tunnel_id):"},{"line_number":275,"context_line":"    return q_const.MIN_TUNNEL_ID \u003c\u003d tunnel_id \u003c\u003d q_const.MAX_TUNNEL_ID"},{"line_number":276,"context_line":""},{"line_number":277,"context_line":""}],"source_content_type":"text/x-python","patch_set":24,"id":"1abeadc6_c3726710","line":274,"in_reply_to":"1abeadc6_172e5d92","updated":"2014-08-21 06:21:46.000000000","message":"I understand but in ml2_conf.ini we have something like this:\n\n[ml2_type_gre]\n# (ListOpt) Comma-separated list of \u003ctun_min\u003e:\u003ctun_max\u003e tuples enumerating ranges of GRE tunnel IDs that are available for tenant network allocation\n# tunnel_id_ranges \u003d\n\nShall I do this is_valid_gre_tunnel_id(tunnel_id) ?\n \nplease suggests....","commit_id":"a5f28ec9fd6f98621ea113860125de8e406fdd97"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"86cae812a107d84e0b5b9f20f61af6ef62eca62a","unresolved":false,"context_lines":[{"line_number":271,"context_line":"    return q_const.MIN_VLAN_TAG \u003c\u003d vlan \u003c\u003d q_const.MAX_VLAN_TAG"},{"line_number":272,"context_line":""},{"line_number":273,"context_line":""},{"line_number":274,"context_line":"def is_valid_tunnel_id(tunnel_id):"},{"line_number":275,"context_line":"    return q_const.MIN_TUNNEL_ID \u003c\u003d tunnel_id \u003c\u003d q_const.MAX_TUNNEL_ID"},{"line_number":276,"context_line":""},{"line_number":277,"context_line":""}],"source_content_type":"text/x-python","patch_set":24,"id":"1abeadc6_c69c2b6d","line":274,"in_reply_to":"1abeadc6_c3726710","updated":"2014-08-21 12:03:31.000000000","message":"Before adding VXLAN support, GRE is the only tunneling implementation in Neutron. I think this is the reason the word \"tunnel\" is used.\n\n\"GRE tunnel ID\" is not an official wording. In RFC of GRE, it is called as \"GRE key\". I am not sure \"gre tunnel id\" is appropriate though everyone can understand it.","commit_id":"a5f28ec9fd6f98621ea113860125de8e406fdd97"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"9e66d9ebdc30bbefd62ace83057e86f8c3acda5d","unresolved":false,"context_lines":[{"line_number":272,"context_line":""},{"line_number":273,"context_line":""},{"line_number":274,"context_line":"def is_valid_gre_tunnel_id(tunnel_id):"},{"line_number":275,"context_line":"    return q_const.MIN_TUNNEL_ID \u003c\u003d tunnel_id \u003c\u003d q_const.MAX_TUNNEL_ID"},{"line_number":276,"context_line":""},{"line_number":277,"context_line":""},{"line_number":278,"context_line":"def is_valid_vxlan_vni(vni):"}],"source_content_type":"text/x-python","patch_set":25,"id":"1abeadc6_26f5df56","line":275,"updated":"2014-08-21 12:08:48.000000000","message":"As I commented in the previous patchset, I still don\u0027t completely agree with this wording, but it is not a blocking issue to hold this review anymore, so the patch looks good.","commit_id":"de27f50e64e53f8f424e24add363fcad103ea9b5"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"5b925524312ba34024be477df36f330f85dbea6d","unresolved":false,"context_lines":[{"line_number":272,"context_line":""},{"line_number":273,"context_line":""},{"line_number":274,"context_line":"def is_valid_gre_tunnel_id(tunnel_id):"},{"line_number":275,"context_line":"    return q_const.MIN_TUNNEL_ID \u003c\u003d tunnel_id \u003c\u003d q_const.MAX_TUNNEL_ID"},{"line_number":276,"context_line":""},{"line_number":277,"context_line":""},{"line_number":278,"context_line":"def is_valid_vxlan_vni(vni):"}],"source_content_type":"text/x-python","patch_set":25,"id":"1abeadc6_5f6b7af0","line":275,"in_reply_to":"1abeadc6_26f5df56","updated":"2014-08-21 14:50:39.000000000","message":"Thanks,\nSince, I have to submit another patch for addressing Paul\u0027s\ncomments I will change it to is_valid_gre_id().","commit_id":"de27f50e64e53f8f424e24add363fcad103ea9b5"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"2df0f575b895ec167494475fe4328c986beb1dc2","unresolved":false,"context_lines":[{"line_number":271,"context_line":"    return q_const.MIN_VLAN_TAG \u003c\u003d vlan \u003c\u003d q_const.MAX_VLAN_TAG"},{"line_number":272,"context_line":""},{"line_number":273,"context_line":""},{"line_number":274,"context_line":"def is_valid_gre_id(tunnel_id):"},{"line_number":275,"context_line":"    return q_const.MIN_TUNNEL_ID \u003c\u003d tunnel_id \u003c\u003d q_const.MAX_TUNNEL_ID"},{"line_number":276,"context_line":""},{"line_number":277,"context_line":""}],"source_content_type":"text/x-python","patch_set":26,"id":"1abeadc6_ac7dd3b3","line":274,"updated":"2014-08-25 21:36:56.000000000","message":"gre_id instead of tunnel_id","commit_id":"3f9bde233a0a2ddea0b17aebd169f58f739f2c5a"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"e2625bc3c4f5d2979c39fa90309c6acdd8af5dfc","unresolved":false,"context_lines":[{"line_number":271,"context_line":"    return q_const.MIN_VLAN_TAG \u003c\u003d vlan \u003c\u003d q_const.MAX_VLAN_TAG"},{"line_number":272,"context_line":""},{"line_number":273,"context_line":""},{"line_number":274,"context_line":"def is_valid_gre_id(tunnel_id):"},{"line_number":275,"context_line":"    return q_const.MIN_TUNNEL_ID \u003c\u003d tunnel_id \u003c\u003d q_const.MAX_TUNNEL_ID"},{"line_number":276,"context_line":""},{"line_number":277,"context_line":""}],"source_content_type":"text/x-python","patch_set":26,"id":"1abeadc6_ea4a2f26","line":274,"in_reply_to":"1abeadc6_ac7dd3b3","updated":"2014-08-26 15:59:43.000000000","message":"Done","commit_id":"3f9bde233a0a2ddea0b17aebd169f58f739f2c5a"},{"author":{"_account_id":7805,"name":"Li Ma","email":"skywalker.nick@gmail.com","username":"Nick"},"change_message_id":"ab721378996f4bdad8b7414441d923de2db1b5d8","unresolved":false,"context_lines":[{"line_number":272,"context_line":""},{"line_number":273,"context_line":""},{"line_number":274,"context_line":"def is_valid_gre_id(tunnel_id):"},{"line_number":275,"context_line":"    return q_const.MIN_TUNNEL_ID \u003c\u003d tunnel_id \u003c\u003d q_const.MAX_TUNNEL_ID"},{"line_number":276,"context_line":""},{"line_number":277,"context_line":""},{"line_number":278,"context_line":"def is_valid_vxlan_vni(vni):"}],"source_content_type":"text/x-python","patch_set":26,"id":"1abeadc6_a6e4fdac","line":275,"updated":"2014-08-26 10:30:06.000000000","message":"MIN_GRE_ID and MAX_GRE_ID is more appropriate.","commit_id":"3f9bde233a0a2ddea0b17aebd169f58f739f2c5a"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"e2625bc3c4f5d2979c39fa90309c6acdd8af5dfc","unresolved":false,"context_lines":[{"line_number":272,"context_line":""},{"line_number":273,"context_line":""},{"line_number":274,"context_line":"def is_valid_gre_id(tunnel_id):"},{"line_number":275,"context_line":"    return q_const.MIN_TUNNEL_ID \u003c\u003d tunnel_id \u003c\u003d q_const.MAX_TUNNEL_ID"},{"line_number":276,"context_line":""},{"line_number":277,"context_line":""},{"line_number":278,"context_line":"def is_valid_vxlan_vni(vni):"}],"source_content_type":"text/x-python","patch_set":26,"id":"1abeadc6_0a468b21","line":275,"in_reply_to":"1abeadc6_a6e4fdac","updated":"2014-08-26 15:59:43.000000000","message":"Done","commit_id":"3f9bde233a0a2ddea0b17aebd169f58f739f2c5a"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"3992a6325636101fc0b892f7ae4d02cdff4187d9","unresolved":false,"context_lines":[{"line_number":346,"context_line":""},{"line_number":347,"context_line":""},{"line_number":348,"context_line":"def is_dvr_serviced(device_owner):"},{"line_number":349,"context_line":"        \"\"\"Check if the port need to be serviced by DVR"},{"line_number":350,"context_line":""},{"line_number":351,"context_line":"        Helper function to check the device owners of the"},{"line_number":352,"context_line":"        ports in the compute and service node to make sure"}],"source_content_type":"text/x-python","patch_set":28,"id":"1abeadc6_3fd0501e","line":349,"updated":"2014-08-29 13:20:19.000000000","message":"Nit:  port-\u003eports?  Period at end of line. Only consider, if you need to do another patch.","commit_id":"b1fec67c581dcc080d10eb1b0d6590a0812078e4"},{"author":{"_account_id":12737,"name":"Jacek Swiderski","email":"jacek.swiderski@codilime.com","username":"Altran"},"change_message_id":"fc2ced0ab083b3142b2cbcde30ff9b97551a4426","unresolved":false,"context_lines":[{"line_number":346,"context_line":""},{"line_number":347,"context_line":""},{"line_number":348,"context_line":"def is_dvr_serviced(device_owner):"},{"line_number":349,"context_line":"        \"\"\"Check if the port need to be serviced by DVR"},{"line_number":350,"context_line":""},{"line_number":351,"context_line":"        Helper function to check the device owners of the"},{"line_number":352,"context_line":"        ports in the compute and service node to make sure"}],"source_content_type":"text/x-python","patch_set":28,"id":"fa98f980_cc38b9f0","line":349,"updated":"2014-09-12 10:22:25.000000000","message":"This is why I try to check comparisons to both base and previous patch set :)","commit_id":"b1fec67c581dcc080d10eb1b0d6590a0812078e4"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"bacc78f8716ad74a5c5b998414b54aa1e1707543","unresolved":false,"context_lines":[{"line_number":346,"context_line":""},{"line_number":347,"context_line":""},{"line_number":348,"context_line":"def is_dvr_serviced(device_owner):"},{"line_number":349,"context_line":"        \"\"\"Check if the port need to be serviced by DVR"},{"line_number":350,"context_line":""},{"line_number":351,"context_line":"        Helper function to check the device owners of the"},{"line_number":352,"context_line":"        ports in the compute and service node to make sure"}],"source_content_type":"text/x-python","patch_set":28,"id":"1abeadc6_1f00f464","line":349,"in_reply_to":"1abeadc6_3fd0501e","updated":"2014-08-29 13:24:48.000000000","message":"It is completely unrelated to this patch. Such cleanup should be in a separate patch.","commit_id":"b1fec67c581dcc080d10eb1b0d6590a0812078e4"}],"neutron/plugins/common/utils.py":[{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"e558b3bf9573439aa9e06755e12b56868b614cfa","unresolved":false,"context_lines":[{"line_number":21,"context_line":"from neutron.plugins.common import constants as p_const"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"def verify_tunnel_range(tunnel_range, tunnel_type):"},{"line_number":25,"context_line":"        \"\"\"Raise an exception for invalid tunnel range or malformed range.\"\"\""},{"line_number":26,"context_line":"        if tunnel_type is p_const.TYPE_GRE:"},{"line_number":27,"context_line":"            for tunnel_id in tunnel_range:"}],"source_content_type":"text/x-python","patch_set":24,"id":"1abeadc6_7e405334","line":24,"updated":"2014-08-20 20:59:00.000000000","message":"invalid indentation","commit_id":"a5f28ec9fd6f98621ea113860125de8e406fdd97"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"91e3fbd5c988b1f9e4a50d6b59f80cd8f65720a2","unresolved":false,"context_lines":[{"line_number":21,"context_line":"from neutron.plugins.common import constants as p_const"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"def verify_tunnel_range(tunnel_range, tunnel_type):"},{"line_number":25,"context_line":"        \"\"\"Raise an exception for invalid tunnel range or malformed range.\"\"\""},{"line_number":26,"context_line":"        if tunnel_type is p_const.TYPE_GRE:"},{"line_number":27,"context_line":"            for tunnel_id in tunnel_range:"}],"source_content_type":"text/x-python","patch_set":24,"id":"1abeadc6_c3a50748","line":24,"in_reply_to":"1abeadc6_7e405334","updated":"2014-08-21 06:21:46.000000000","message":"Done","commit_id":"a5f28ec9fd6f98621ea113860125de8e406fdd97"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"e558b3bf9573439aa9e06755e12b56868b614cfa","unresolved":false,"context_lines":[{"line_number":29,"context_line":"                    raise n_exc.NetworkTunnelRangeError("},{"line_number":30,"context_line":"                        tunnel_range\u003dtunnel_range,"},{"line_number":31,"context_line":"                        error\u003d_(\"%s is not a valid gre tunnel id\") % tunnel_id)"},{"line_number":32,"context_line":"        if tunnel_type is p_const.TYPE_VXLAN:"},{"line_number":33,"context_line":"            for vni in tunnel_range:"},{"line_number":34,"context_line":"                if not utils.is_valid_vxlan_vni(vni):"},{"line_number":35,"context_line":"                    raise n_exc.NetworkTunnelRangeError("}],"source_content_type":"text/x-python","patch_set":24,"id":"1abeadc6_5e439741","line":32,"updated":"2014-08-20 20:59:00.000000000","message":"elif would avoid to test 2nd condition if tunnel_type is \"gre\"","commit_id":"a5f28ec9fd6f98621ea113860125de8e406fdd97"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"91e3fbd5c988b1f9e4a50d6b59f80cd8f65720a2","unresolved":false,"context_lines":[{"line_number":29,"context_line":"                    raise n_exc.NetworkTunnelRangeError("},{"line_number":30,"context_line":"                        tunnel_range\u003dtunnel_range,"},{"line_number":31,"context_line":"                        error\u003d_(\"%s is not a valid gre tunnel id\") % tunnel_id)"},{"line_number":32,"context_line":"        if tunnel_type is p_const.TYPE_VXLAN:"},{"line_number":33,"context_line":"            for vni in tunnel_range:"},{"line_number":34,"context_line":"                if not utils.is_valid_vxlan_vni(vni):"},{"line_number":35,"context_line":"                    raise n_exc.NetworkTunnelRangeError("}],"source_content_type":"text/x-python","patch_set":24,"id":"1abeadc6_e365a31e","line":32,"in_reply_to":"1abeadc6_5e439741","updated":"2014-08-21 06:21:46.000000000","message":"Done","commit_id":"a5f28ec9fd6f98621ea113860125de8e406fdd97"},{"author":{"_account_id":7805,"name":"Li Ma","email":"skywalker.nick@gmail.com","username":"Nick"},"change_message_id":"ab721378996f4bdad8b7414441d923de2db1b5d8","unresolved":false,"context_lines":[{"line_number":23,"context_line":""},{"line_number":24,"context_line":"def verify_tunnel_range(tunnel_range, tunnel_type):"},{"line_number":25,"context_line":"    \"\"\"Raise an exception for invalid tunnel range or malformed range.\"\"\""},{"line_number":26,"context_line":"    if tunnel_type is p_const.TYPE_GRE:"},{"line_number":27,"context_line":"        for tunnel_id in tunnel_range:"},{"line_number":28,"context_line":"            if not utils.is_valid_gre_id(tunnel_id):"},{"line_number":29,"context_line":"                raise n_exc.NetworkTunnelRangeError("}],"source_content_type":"text/x-python","patch_set":26,"id":"1abeadc6_46a40957","line":26,"updated":"2014-08-26 10:30:06.000000000","message":"gre_id seems more appropriate here.","commit_id":"3f9bde233a0a2ddea0b17aebd169f58f739f2c5a"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"e2625bc3c4f5d2979c39fa90309c6acdd8af5dfc","unresolved":false,"context_lines":[{"line_number":23,"context_line":""},{"line_number":24,"context_line":"def verify_tunnel_range(tunnel_range, tunnel_type):"},{"line_number":25,"context_line":"    \"\"\"Raise an exception for invalid tunnel range or malformed range.\"\"\""},{"line_number":26,"context_line":"    if tunnel_type is p_const.TYPE_GRE:"},{"line_number":27,"context_line":"        for tunnel_id in tunnel_range:"},{"line_number":28,"context_line":"            if not utils.is_valid_gre_id(tunnel_id):"},{"line_number":29,"context_line":"                raise n_exc.NetworkTunnelRangeError("}],"source_content_type":"text/x-python","patch_set":26,"id":"1abeadc6_2a5507c6","line":26,"in_reply_to":"1abeadc6_46a40957","updated":"2014-08-26 15:59:43.000000000","message":"Done","commit_id":"3f9bde233a0a2ddea0b17aebd169f58f739f2c5a"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"88f0d67af2b16a3c3e701b8b17a3f266e5348276","unresolved":false,"context_lines":[{"line_number":28,"context_line":"            if not utils.is_valid_gre_id(gre_id):"},{"line_number":29,"context_line":"                raise n_exc.NetworkTunnelRangeError("},{"line_number":30,"context_line":"                    tunnel_range\u003dtunnel_range,"},{"line_number":31,"context_line":"                    error\u003d_(\" %s is not a valid gre key id\") % gre_id)"},{"line_number":32,"context_line":"    elif tunnel_type is p_const.TYPE_VXLAN:"},{"line_number":33,"context_line":"        for vni in tunnel_range:"},{"line_number":34,"context_line":"            if not utils.is_valid_vxlan_vni(vni):"}],"source_content_type":"text/x-python","patch_set":27,"id":"1abeadc6_da74339e","line":31,"updated":"2014-08-27 12:14:31.000000000","message":"Nit: Can eliminate leading space on all error messages (and in tests too), since space is in the definition of the message.","commit_id":"d0071fa1ffb9c337131ac08c3f41a40e6f4fb0b2"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"547b2d62a14dc41fa9a24cc4d08e7bbe5e1ecb2b","unresolved":false,"context_lines":[{"line_number":28,"context_line":"            if not utils.is_valid_gre_id(gre_id):"},{"line_number":29,"context_line":"                raise n_exc.NetworkTunnelRangeError("},{"line_number":30,"context_line":"                    tunnel_range\u003dtunnel_range,"},{"line_number":31,"context_line":"                    error\u003d_(\" %s is not a valid gre key id\") % gre_id)"},{"line_number":32,"context_line":"    elif tunnel_type is p_const.TYPE_VXLAN:"},{"line_number":33,"context_line":"        for vni in tunnel_range:"},{"line_number":34,"context_line":"            if not utils.is_valid_vxlan_vni(vni):"}],"source_content_type":"text/x-python","patch_set":27,"id":"1abeadc6_a5b4bc35","line":31,"in_reply_to":"1abeadc6_da74339e","updated":"2014-08-27 13:03:16.000000000","message":"Done","commit_id":"d0071fa1ffb9c337131ac08c3f41a40e6f4fb0b2"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"5353e0cf9f368c280666f3cba61a0348ef7281be","unresolved":false,"context_lines":[{"line_number":33,"context_line":"        for vni in tunnel_range:"},{"line_number":34,"context_line":"            if not utils.is_valid_vxlan_vni(vni):"},{"line_number":35,"context_line":"                raise n_exc.NetworkTunnelRangeError("},{"line_number":36,"context_line":"                    tunnel_range\u003dtunnel_range,"},{"line_number":37,"context_line":"                    error\u003d_(\" %s is not a valid vxlan vni\") % vni)"},{"line_number":38,"context_line":"    if tunnel_range[1] \u003c tunnel_range[0]:"},{"line_number":39,"context_line":"        raise n_exc.NetworkTunnelRangeError("}],"source_content_type":"text/x-python","patch_set":27,"id":"1abeadc6_a6712246","line":36,"updated":"2014-08-27 13:52:15.000000000","message":"These are basically the same thing. Can you consolidate?\n\nval_map \u003d {p_const.TYPE_GRE: utils.is_valid_gre_id,\n            p_const.TYPE_VXLAN: utils.is_valid_vxlan_vni}\nif tunnel_type in val_map:\n    for ident in tunnel_range:\n        if not val_map[tunnel_type](ident):\n             raise n_exc.NetworkTunnelRangeError(\n                 tunnel_range\u003dtunnel_range,\n                 error\u003d_(\"%s is not a valid %s identifier\") % (ident, tunnel_type))","commit_id":"d0071fa1ffb9c337131ac08c3f41a40e6f4fb0b2"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"e41e41f2c083fcd93c4e45e947f08ef6fd171785","unresolved":false,"context_lines":[{"line_number":33,"context_line":"        for vni in tunnel_range:"},{"line_number":34,"context_line":"            if not utils.is_valid_vxlan_vni(vni):"},{"line_number":35,"context_line":"                raise n_exc.NetworkTunnelRangeError("},{"line_number":36,"context_line":"                    tunnel_range\u003dtunnel_range,"},{"line_number":37,"context_line":"                    error\u003d_(\" %s is not a valid vxlan vni\") % vni)"},{"line_number":38,"context_line":"    if tunnel_range[1] \u003c tunnel_range[0]:"},{"line_number":39,"context_line":"        raise n_exc.NetworkTunnelRangeError("}],"source_content_type":"text/x-python","patch_set":27,"id":"1abeadc6_eae1f39b","line":36,"in_reply_to":"1abeadc6_a6712246","updated":"2014-08-28 14:02:43.000000000","message":"Done","commit_id":"d0071fa1ffb9c337131ac08c3f41a40e6f4fb0b2"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"88f0d67af2b16a3c3e701b8b17a3f266e5348276","unresolved":false,"context_lines":[{"line_number":34,"context_line":"            if not utils.is_valid_vxlan_vni(vni):"},{"line_number":35,"context_line":"                raise n_exc.NetworkTunnelRangeError("},{"line_number":36,"context_line":"                    tunnel_range\u003dtunnel_range,"},{"line_number":37,"context_line":"                    error\u003d_(\" %s is not a valid vxlan vni\") % vni)"},{"line_number":38,"context_line":"    if tunnel_range[1] \u003c tunnel_range[0]:"},{"line_number":39,"context_line":"        raise n_exc.NetworkTunnelRangeError("},{"line_number":40,"context_line":"            tunnel_range\u003dtunnel_range,"}],"source_content_type":"text/x-python","patch_set":27,"id":"1abeadc6_3a80c745","line":37,"updated":"2014-08-27 12:14:31.000000000","message":"here too.","commit_id":"d0071fa1ffb9c337131ac08c3f41a40e6f4fb0b2"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"547b2d62a14dc41fa9a24cc4d08e7bbe5e1ecb2b","unresolved":false,"context_lines":[{"line_number":34,"context_line":"            if not utils.is_valid_vxlan_vni(vni):"},{"line_number":35,"context_line":"                raise n_exc.NetworkTunnelRangeError("},{"line_number":36,"context_line":"                    tunnel_range\u003dtunnel_range,"},{"line_number":37,"context_line":"                    error\u003d_(\" %s is not a valid vxlan vni\") % vni)"},{"line_number":38,"context_line":"    if tunnel_range[1] \u003c tunnel_range[0]:"},{"line_number":39,"context_line":"        raise n_exc.NetworkTunnelRangeError("},{"line_number":40,"context_line":"            tunnel_range\u003dtunnel_range,"}],"source_content_type":"text/x-python","patch_set":27,"id":"1abeadc6_c5829851","line":37,"in_reply_to":"1abeadc6_3a80c745","updated":"2014-08-27 13:03:16.000000000","message":"Done","commit_id":"d0071fa1ffb9c337131ac08c3f41a40e6f4fb0b2"}],"neutron/plugins/linuxbridge/agent/linuxbridge_neutron_agent.py":[{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"3fc4a96577d39c8a4a65b38ed3d4f370367fce7a","unresolved":false,"context_lines":[{"line_number":114,"context_line":"        return tap_device_name"},{"line_number":115,"context_line":""},{"line_number":116,"context_line":"    def get_vxlan_device_name(self, segmentation_id):"},{"line_number":117,"context_line":"        if 0 \u003c\u003d int(segmentation_id) \u003c\u003d constants.MAX_TUNNEL_ID:"},{"line_number":118,"context_line":"            return VXLAN_INTERFACE_PREFIX + str(segmentation_id)"},{"line_number":119,"context_line":"        else:"},{"line_number":120,"context_line":"            LOG.warning(_(\"Invalid Segmentation ID: %s, will lead to \""}],"source_content_type":"text/x-python","patch_set":22,"id":"1abeadc6_ceabf487","line":117,"updated":"2014-08-18 11:44:17.000000000","message":"you should use:\n\n if is_valid_tunnel_id(int(segmentation_id)):","commit_id":"b56106cdf2cbe564f9034db04c3cad6448e1dfc9"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"66482e9bcb9f5c60e37caf4006b59c05809eb11d","unresolved":false,"context_lines":[{"line_number":114,"context_line":"        return tap_device_name"},{"line_number":115,"context_line":""},{"line_number":116,"context_line":"    def get_vxlan_device_name(self, segmentation_id):"},{"line_number":117,"context_line":"        if 0 \u003c\u003d int(segmentation_id) \u003c\u003d constants.MAX_TUNNEL_ID:"},{"line_number":118,"context_line":"            return VXLAN_INTERFACE_PREFIX + str(segmentation_id)"},{"line_number":119,"context_line":"        else:"},{"line_number":120,"context_line":"            LOG.warning(_(\"Invalid Segmentation ID: %s, will lead to \""}],"source_content_type":"text/x-python","patch_set":22,"id":"1abeadc6_e22521ac","line":117,"in_reply_to":"1abeadc6_ceabf487","updated":"2014-08-18 14:39:29.000000000","message":"Done","commit_id":"b56106cdf2cbe564f9034db04c3cad6448e1dfc9"}],"neutron/plugins/ml2/drivers/type_gre.py":[{"author":{"_account_id":7987,"name":"Ivar Lazzaro","email":"ivarlazzaro@gmail.com","username":"Ivar"},"change_message_id":"3703bb916b8c3d83d6547d8e95a45256e3988255","unresolved":false,"context_lines":[{"line_number":191,"context_line":"                session.add(gre_endpoint)"},{"line_number":192,"context_line":"            return gre_endpoint"},{"line_number":193,"context_line":""},{"line_number":194,"context_line":"    def validate_tunnel_tag(self, segment):"},{"line_number":195,"context_line":"        network_type \u003d segment.get(api.NETWORK_TYPE)"},{"line_number":196,"context_line":"        segmentation_id \u003d segment.get(api.SEGMENTATION_ID)"},{"line_number":197,"context_line":"        if segmentation_id is None:"}],"source_content_type":"text/x-python","patch_set":17,"id":"1ae5cdf2_6939ab3e","line":194,"updated":"2014-06-18 03:02:46.000000000","message":"This is identical to the one on type_vxlan, only the min and max range is different.\n\nShould this implementation be common for all the tunnel type and defined in type_tunnel?","commit_id":"d6ac30652f7401fe4bbf39de71fecf458c7bcf18"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"5c502c15c643eea5d5aa106ede221b0127d83922","unresolved":false,"context_lines":[{"line_number":205,"context_line":"            msg \u003d (_(\"segmentation_id %(segmentation_id)s out of gre range \""},{"line_number":206,"context_line":"                     \"(%(min)s through %(max)s)\") %"},{"line_number":207,"context_line":"                   {\u0027segmentation_id\u0027: segmentation_id,"},{"line_number":208,"context_line":"                    \u0027min\u0027: n_const.MIN_GRE_TAG,"},{"line_number":209,"context_line":"                    \u0027max\u0027: n_const.MAX_GRE_TAG})"},{"line_number":210,"context_line":"            raise exc.InvalidInput(error_message\u003dmsg)"}],"source_content_type":"text/x-python","patch_set":20,"id":"1ae5cdf2_37c8cd74","line":208,"updated":"2014-06-18 11:18:23.000000000","message":"I\u0027m not sure it\u0027s necessary to provide tag ranges here.\nThey are constant anyway.\nIn fact, gre ranges are provided in configuration and there could be whole range of intervals, so I\u0027m not even sure validation is correct. Or if I get your intention correctly, you need to add a docstring to this method indicating that method validates segment_id against constants, not against configuration.\n\nThis applies to vxlan as well.","commit_id":"69acaa8b4133766d8882aef4c113cd5ef14b5374"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"3fc4a96577d39c8a4a65b38ed3d4f370367fce7a","unresolved":false,"context_lines":[{"line_number":77,"context_line":"            self._parse_tunnel_ranges(cfg.CONF.ml2_type_gre.tunnel_id_ranges,"},{"line_number":78,"context_line":"                                      self.gre_id_ranges, p_const.TYPE_GRE)"},{"line_number":79,"context_line":"        except Exception:"},{"line_number":80,"context_line":"            LOG.exception(_(\"Failed to parse tunnel_id_ranges. \""},{"line_number":81,"context_line":"                            \"Service terminated!\"))"},{"line_number":82,"context_line":"            sys.exit(1)"},{"line_number":83,"context_line":"        self._sync_gre_allocations()"}],"source_content_type":"text/x-python","patch_set":22,"id":"1abeadc6_ee1190ad","line":80,"updated":"2014-08-18 11:44:17.000000000","message":"Why moving log from type_tunnel to type_gre/vxlan?","commit_id":"b56106cdf2cbe564f9034db04c3cad6448e1dfc9"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"66482e9bcb9f5c60e37caf4006b59c05809eb11d","unresolved":false,"context_lines":[{"line_number":77,"context_line":"            self._parse_tunnel_ranges(cfg.CONF.ml2_type_gre.tunnel_id_ranges,"},{"line_number":78,"context_line":"                                      self.gre_id_ranges, p_const.TYPE_GRE)"},{"line_number":79,"context_line":"        except Exception:"},{"line_number":80,"context_line":"            LOG.exception(_(\"Failed to parse tunnel_id_ranges. \""},{"line_number":81,"context_line":"                            \"Service terminated!\"))"},{"line_number":82,"context_line":"            sys.exit(1)"},{"line_number":83,"context_line":"        self._sync_gre_allocations()"}],"source_content_type":"text/x-python","patch_set":22,"id":"1abeadc6_b3f37909","line":80,"in_reply_to":"1abeadc6_ee1190ad","updated":"2014-08-18 14:39:29.000000000","message":"For more clarity to display why service terminated.\nspecially to display failed to parse \u0027tunnel_id_ranges\u0027 or \u0027vni_ranges\u0027.","commit_id":"b56106cdf2cbe564f9034db04c3cad6448e1dfc9"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"b4592890d4b56d105503c9d079a1e804c0998f58","unresolved":false,"context_lines":[{"line_number":79,"context_line":"        except Exception:"},{"line_number":80,"context_line":"            LOG.exception(_(\"Failed to parse tunnel_id_ranges. \""},{"line_number":81,"context_line":"                            \"Service terminated!\"))"},{"line_number":82,"context_line":"            sys.exit(1)"},{"line_number":83,"context_line":"        self._sync_gre_allocations()"},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"    def reserve_provider_segment(self, session, segment):"}],"source_content_type":"text/x-python","patch_set":22,"id":"1abeadc6_3193e9a4","line":82,"updated":"2014-08-18 11:56:11.000000000","message":"Use raise SystemExit()","commit_id":"b56106cdf2cbe564f9034db04c3cad6448e1dfc9"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"66482e9bcb9f5c60e37caf4006b59c05809eb11d","unresolved":false,"context_lines":[{"line_number":79,"context_line":"        except Exception:"},{"line_number":80,"context_line":"            LOG.exception(_(\"Failed to parse tunnel_id_ranges. \""},{"line_number":81,"context_line":"                            \"Service terminated!\"))"},{"line_number":82,"context_line":"            sys.exit(1)"},{"line_number":83,"context_line":"        self._sync_gre_allocations()"},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"    def reserve_provider_segment(self, session, segment):"}],"source_content_type":"text/x-python","patch_set":22,"id":"1abeadc6_4255f5c4","line":82,"in_reply_to":"1abeadc6_3193e9a4","updated":"2014-08-18 14:39:29.000000000","message":"I googled it and found that,\n According to documentation sys.exit(s) effectively does raise SystemExit(s), so it\u0027s pretty much the same thing.\n\nAlso, I could see that if we use raise SystemExit(), we could avoid import sys.\n\nWill do it.","commit_id":"b56106cdf2cbe564f9034db04c3cad6448e1dfc9"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"aa73af9233ffb67ce92adfbf7170f6558008e627","unresolved":false,"context_lines":[{"line_number":79,"context_line":"        except Exception:"},{"line_number":80,"context_line":"            LOG.exception(_(\"Failed to parse tunnel_id_ranges. \""},{"line_number":81,"context_line":"                            \"Service terminated!\"))"},{"line_number":82,"context_line":"            sys.exit(1)"},{"line_number":83,"context_line":"        self._sync_gre_allocations()"},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"    def reserve_provider_segment(self, session, segment):"}],"source_content_type":"text/x-python","patch_set":22,"id":"1abeadc6_cbff5900","line":82,"in_reply_to":"1abeadc6_4255f5c4","updated":"2014-08-18 15:21:17.000000000","message":"The biggest difference is that we can catch SystemExit exception but we cannot catch sys.exit(). If sys.exit() is called in the code, unit tests will exit immediately without any output to mention it. It makes harder to debug what happens.","commit_id":"b56106cdf2cbe564f9034db04c3cad6448e1dfc9"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"68be0c681f7c00ea98c8da68247f2e3e48de33a3","unresolved":false,"context_lines":[{"line_number":74,"context_line":"        try:"},{"line_number":75,"context_line":"            self._parse_tunnel_ranges(cfg.CONF.ml2_type_gre.tunnel_id_ranges,"},{"line_number":76,"context_line":"                                      self.gre_id_ranges, p_const.TYPE_GRE)"},{"line_number":77,"context_line":"        except Exception:"},{"line_number":78,"context_line":"            LOG.exception(_(\"Failed to parse tunnel_id_ranges. \""},{"line_number":79,"context_line":"                            \"Service terminated!\"))"},{"line_number":80,"context_line":"            raise SystemExit()"}],"source_content_type":"text/x-python","patch_set":24,"id":"1abeadc6_b7492962","line":77,"updated":"2014-08-21 01:49:40.000000000","message":"Catching generic exception is not suggested. Please specify more specific exception.","commit_id":"a5f28ec9fd6f98621ea113860125de8e406fdd97"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"91e3fbd5c988b1f9e4a50d6b59f80cd8f65720a2","unresolved":false,"context_lines":[{"line_number":74,"context_line":"        try:"},{"line_number":75,"context_line":"            self._parse_tunnel_ranges(cfg.CONF.ml2_type_gre.tunnel_id_ranges,"},{"line_number":76,"context_line":"                                      self.gre_id_ranges, p_const.TYPE_GRE)"},{"line_number":77,"context_line":"        except Exception:"},{"line_number":78,"context_line":"            LOG.exception(_(\"Failed to parse tunnel_id_ranges. \""},{"line_number":79,"context_line":"                            \"Service terminated!\"))"},{"line_number":80,"context_line":"            raise SystemExit()"}],"source_content_type":"text/x-python","patch_set":24,"id":"1abeadc6_036b7ff2","line":77,"in_reply_to":"1abeadc6_b7492962","updated":"2014-08-21 06:21:46.000000000","message":"Done","commit_id":"a5f28ec9fd6f98621ea113860125de8e406fdd97"},{"author":{"_account_id":6876,"name":"stephen-ma","email":"stephenbma43@gmail.com","username":"stephen-ma"},"change_message_id":"f66fb3a908bd3c7f2de8e4bcc22b156f3b1a93d0","unresolved":false,"context_lines":[{"line_number":73,"context_line":"        self.gre_id_ranges \u003d []"},{"line_number":74,"context_line":"        try:"},{"line_number":75,"context_line":"            self._parse_tunnel_ranges(cfg.CONF.ml2_type_gre.tunnel_id_ranges,"},{"line_number":76,"context_line":"                                      self.gre_id_ranges, p_const.TYPE_GRE)"},{"line_number":77,"context_line":"        except exc.NetworkTunnelRangeError:"},{"line_number":78,"context_line":"            LOG.exception(_(\"Failed to parse tunnel_id_ranges. \""},{"line_number":79,"context_line":"                            \"Service terminated!\"))"}],"source_content_type":"text/x-python","patch_set":26,"id":"1abeadc6_7b69eef7","line":76,"updated":"2014-08-22 23:08:37.000000000","message":"See my comments in type_tunnel.py.","commit_id":"3f9bde233a0a2ddea0b17aebd169f58f739f2c5a"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"e2625bc3c4f5d2979c39fa90309c6acdd8af5dfc","unresolved":false,"context_lines":[{"line_number":73,"context_line":"        self.gre_id_ranges \u003d []"},{"line_number":74,"context_line":"        try:"},{"line_number":75,"context_line":"            self._parse_tunnel_ranges(cfg.CONF.ml2_type_gre.tunnel_id_ranges,"},{"line_number":76,"context_line":"                                      self.gre_id_ranges, p_const.TYPE_GRE)"},{"line_number":77,"context_line":"        except exc.NetworkTunnelRangeError:"},{"line_number":78,"context_line":"            LOG.exception(_(\"Failed to parse tunnel_id_ranges. \""},{"line_number":79,"context_line":"                            \"Service terminated!\"))"}],"source_content_type":"text/x-python","patch_set":26,"id":"1abeadc6_4a5083d4","line":76,"in_reply_to":"1abeadc6_7b69eef7","updated":"2014-08-26 15:59:43.000000000","message":"Done","commit_id":"3f9bde233a0a2ddea0b17aebd169f58f739f2c5a"},{"author":{"_account_id":12737,"name":"Jacek Swiderski","email":"jacek.swiderski@codilime.com","username":"Altran"},"change_message_id":"fc2ced0ab083b3142b2cbcde30ff9b97551a4426","unresolved":false,"context_lines":[{"line_number":72,"context_line":"        try:"},{"line_number":73,"context_line":"            self._initialize(cfg.CONF.ml2_type_gre.tunnel_id_ranges)"},{"line_number":74,"context_line":"        except exc.NetworkTunnelRangeError:"},{"line_number":75,"context_line":"            LOG.exception(_(\"Failed to parse tunnel_id_ranges. \""},{"line_number":76,"context_line":"                            \"Service terminated!\"))"},{"line_number":77,"context_line":"            raise SystemExit()"},{"line_number":78,"context_line":""}],"source_content_type":"text/x-python","patch_set":28,"id":"fa98f980_0f42b33d","line":75,"updated":"2014-09-12 10:22:25.000000000","message":"nit: _LE","commit_id":"b1fec67c581dcc080d10eb1b0d6590a0812078e4"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"bcf8a4ab044f64ef19cf255afcd289a7680a498a","unresolved":false,"context_lines":[{"line_number":72,"context_line":"        try:"},{"line_number":73,"context_line":"            self._initialize(cfg.CONF.ml2_type_gre.tunnel_id_ranges)"},{"line_number":74,"context_line":"        except exc.NetworkTunnelRangeError:"},{"line_number":75,"context_line":"            LOG.exception(_(\"Failed to parse tunnel_id_ranges. \""},{"line_number":76,"context_line":"                            \"Service terminated!\"))"},{"line_number":77,"context_line":"            raise SystemExit()"},{"line_number":78,"context_line":""}],"source_content_type":"text/x-python","patch_set":28,"id":"fa98f980_cf550bc3","line":75,"in_reply_to":"fa98f980_0f42b33d","updated":"2014-09-12 10:27:32.000000000","message":"not necessary: style in this file is mixed.","commit_id":"b1fec67c581dcc080d10eb1b0d6590a0812078e4"},{"author":{"_account_id":12737,"name":"Jacek Swiderski","email":"jacek.swiderski@codilime.com","username":"Altran"},"change_message_id":"fc2ced0ab083b3142b2cbcde30ff9b97551a4426","unresolved":false,"context_lines":[{"line_number":74,"context_line":"        except exc.NetworkTunnelRangeError:"},{"line_number":75,"context_line":"            LOG.exception(_(\"Failed to parse tunnel_id_ranges. \""},{"line_number":76,"context_line":"                            \"Service terminated!\"))"},{"line_number":77,"context_line":"            raise SystemExit()"},{"line_number":78,"context_line":""},{"line_number":79,"context_line":"    def sync_allocations(self):"},{"line_number":80,"context_line":""}],"source_content_type":"text/x-python","patch_set":28,"id":"fa98f980_cf542b00","line":77,"updated":"2014-09-12 10:22:25.000000000","message":"SystemExit(1) ?","commit_id":"b1fec67c581dcc080d10eb1b0d6590a0812078e4"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"bcf8a4ab044f64ef19cf255afcd289a7680a498a","unresolved":false,"context_lines":[{"line_number":74,"context_line":"        except exc.NetworkTunnelRangeError:"},{"line_number":75,"context_line":"            LOG.exception(_(\"Failed to parse tunnel_id_ranges. \""},{"line_number":76,"context_line":"                            \"Service terminated!\"))"},{"line_number":77,"context_line":"            raise SystemExit()"},{"line_number":78,"context_line":""},{"line_number":79,"context_line":"    def sync_allocations(self):"},{"line_number":80,"context_line":""}],"source_content_type":"text/x-python","patch_set":28,"id":"fa98f980_8f5f83e4","line":77,"in_reply_to":"fa98f980_cf542b00","updated":"2014-09-12 10:27:32.000000000","message":"not necessary as well","commit_id":"b1fec67c581dcc080d10eb1b0d6590a0812078e4"}],"neutron/plugins/ml2/drivers/type_tunnel.py":[{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"2d231b3c3520285aa9e07f3ebd890f62dbbd2487","unresolved":false,"context_lines":[{"line_number":15,"context_line":"import abc"},{"line_number":16,"context_line":"import six"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"from neutron.common import constants as q_const"},{"line_number":19,"context_line":"from neutron.common import exceptions as exc"},{"line_number":20,"context_line":"from neutron.common import topics"},{"line_number":21,"context_line":"from neutron.common import utils"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAXH%2F%2FC0E%3D","line":18,"updated":"2014-04-24 12:39:16.000000000","message":"q_const -\u003e n_const","commit_id":"ca4f79b61389f4dc6f8327c9f1ba70da566e8837"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"49ea5fb1f8e2e3f03251851dd027887f2e8f5abe","unresolved":false,"context_lines":[{"line_number":79,"context_line":"                    \"network\") % segment.get(api.NETWORK_TYPE)"},{"line_number":80,"context_line":"            raise exc.InvalidInput(error_message\u003dmsg)"},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"        if not utils.is_valid_vxlan_tag(segmentation_id):"},{"line_number":83,"context_line":"            msg \u003d (_(\"segmentation_id out of range (%(min)s through \""},{"line_number":84,"context_line":"                     \"%(max)s)\") %"},{"line_number":85,"context_line":"                   {\u0027min\u0027: n_const.MIN_VXLAN_VNI,"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAXX%2F%2FylU%3D","line":82,"updated":"2014-04-27 13:48:39.000000000","message":"I think it would be super helpful to specify the invalid segmentation_id in the exception message.","commit_id":"348de9b25a425383f7a3f37f9246aaee3764c6f6"},{"author":{"_account_id":8792,"name":"Manish Godara","email":"manishg@yahoo-inc.com","username":"manishg"},"change_message_id":"9aca342b5a5ff599493f365fcaad6e36cea32a6c","unresolved":false,"context_lines":[{"line_number":80,"context_line":"            raise exc.InvalidInput(error_message\u003dmsg)"},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"        if not utils.is_valid_vxlan_tag(segmentation_id):"},{"line_number":83,"context_line":"            msg \u003d (_(\"segmentation_id out of range (%(min)s through \""},{"line_number":84,"context_line":"                     \"%(max)s)\") %"},{"line_number":85,"context_line":"                   {\u0027min\u0027: n_const.MIN_VXLAN_VNI,"},{"line_number":86,"context_line":"                    \u0027max\u0027: n_const.MAX_VXLAN_VNI})"}],"source_content_type":"text/x-python","patch_set":5,"id":"facab960_02eeaaec","line":83,"updated":"2014-04-28 20:56:12.000000000","message":"Agree with Assaf, \"segmentation_id (%(segmentation_id)s) out ....\" is a good idea.","commit_id":"348de9b25a425383f7a3f37f9246aaee3764c6f6"},{"author":{"_account_id":7805,"name":"Li Ma","email":"skywalker.nick@gmail.com","username":"Nick"},"change_message_id":"ff4b60dc955da756adbe9cc21d83b836e56d658c","unresolved":false,"context_lines":[{"line_number":79,"context_line":"                    \"network\") % segment.get(api.NETWORK_TYPE)"},{"line_number":80,"context_line":"            raise exc.InvalidInput(error_message\u003dmsg)"},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"        if not utils.is_valid_vxlan_tag(segmentation_id):"},{"line_number":83,"context_line":"            msg \u003d (_(\"segmentation_id %(segmentation_id)s out of range \""},{"line_number":84,"context_line":"                     \"(%(min)s through %(max)s)\") %"},{"line_number":85,"context_line":"                   {\u0027segmentation_id\u0027: segmentation_id,"}],"source_content_type":"text/x-python","patch_set":7,"id":"3ae8d1ca_30d05053","line":82,"updated":"2014-05-27 03:36:10.000000000","message":"For better understanding, check network_type first is appropriate and readable.\nmy two cents.","commit_id":"80b8df32fb9d984574f95d464b62780243342c0b"},{"author":{"_account_id":8646,"name":"yangxurong","email":"yangxurong@huawei.com","username":"yangxurong"},"change_message_id":"995fbd8609c5aafc3af56baead5ef0894ba25afc","unresolved":false,"context_lines":[{"line_number":79,"context_line":"                    \"network\") % segment.get(api.NETWORK_TYPE)"},{"line_number":80,"context_line":"            raise exc.InvalidInput(error_message\u003dmsg)"},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"        if not utils.is_valid_vxlan_tag(segmentation_id):"},{"line_number":83,"context_line":"            msg \u003d (_(\"segmentation_id %(segmentation_id)s out of range \""},{"line_number":84,"context_line":"                     \"(%(min)s through %(max)s)\") %"},{"line_number":85,"context_line":"                   {\u0027segmentation_id\u0027: segmentation_id,"}],"source_content_type":"text/x-python","patch_set":7,"id":"3ae8d1ca_3004d07d","line":82,"in_reply_to":"3ae8d1ca_30d05053","updated":"2014-05-27 04:02:02.000000000","message":"hi,Li Ma\nthanks your comment,from my perspective,GRE and VXLAN would be generic case,so i think it\u0027s no necessary, if other tunnel type will be added,it\u0027s better to reimplement validate function.what do you think?:)","commit_id":"80b8df32fb9d984574f95d464b62780243342c0b"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"change_message_id":"e2439b8786f8dd216c8899c988666ddc0349a39b","unresolved":false,"context_lines":[{"line_number":85,"context_line":"                   {\u0027segmentation_id\u0027: segmentation_id,"},{"line_number":86,"context_line":"                    \u0027min\u0027: n_const.MIN_VXLAN_VNI,"},{"line_number":87,"context_line":"                    \u0027max\u0027: n_const.MAX_VXLAN_VNI})"},{"line_number":88,"context_line":"            raise exc.InvalidInput(error_message\u003dmsg)"},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"        for key, value in segment.items():"},{"line_number":91,"context_line":"            if value and key not in [api.NETWORK_TYPE,"}],"source_content_type":"text/x-python","patch_set":7,"id":"7adec928_d0729748","line":88,"updated":"2014-05-22 10:00:53.000000000","message":"the tunnel contains gre, vxlan and maybe others","commit_id":"80b8df32fb9d984574f95d464b62780243342c0b"},{"author":{"_account_id":8646,"name":"yangxurong","email":"yangxurong@huawei.com","username":"yangxurong"},"change_message_id":"778edc9aa0bc7902ed91fbbde0921acaddb335b0","unresolved":false,"context_lines":[{"line_number":85,"context_line":"                   {\u0027segmentation_id\u0027: segmentation_id,"},{"line_number":86,"context_line":"                    \u0027min\u0027: n_const.MIN_VXLAN_VNI,"},{"line_number":87,"context_line":"                    \u0027max\u0027: n_const.MAX_VXLAN_VNI})"},{"line_number":88,"context_line":"            raise exc.InvalidInput(error_message\u003dmsg)"},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"        for key, value in segment.items():"},{"line_number":91,"context_line":"            if value and key not in [api.NETWORK_TYPE,"}],"source_content_type":"text/x-python","patch_set":7,"id":"5adbc538_233e33b9","line":88,"in_reply_to":"5adbc538_085eb445","updated":"2014-05-26 14:30:04.000000000","message":"@Assaf Muller\ntunnel_id or segmentation_id would be more proper?:)","commit_id":"80b8df32fb9d984574f95d464b62780243342c0b"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"e37a2572c308872dc7c9704c9301416bdacdf44e","unresolved":false,"context_lines":[{"line_number":85,"context_line":"                   {\u0027segmentation_id\u0027: segmentation_id,"},{"line_number":86,"context_line":"                    \u0027min\u0027: n_const.MIN_VXLAN_VNI,"},{"line_number":87,"context_line":"                    \u0027max\u0027: n_const.MAX_VXLAN_VNI})"},{"line_number":88,"context_line":"            raise exc.InvalidInput(error_message\u003dmsg)"},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"        for key, value in segment.items():"},{"line_number":91,"context_line":"            if value and key not in [api.NETWORK_TYPE,"}],"source_content_type":"text/x-python","patch_set":7,"id":"5adbc538_085eb445","line":88,"in_reply_to":"5adbc538_75a003f5","updated":"2014-05-26 14:25:18.000000000","message":"Not if the function has vxlan in its name ;-)","commit_id":"80b8df32fb9d984574f95d464b62780243342c0b"},{"author":{"_account_id":8646,"name":"yangxurong","email":"yangxurong@huawei.com","username":"yangxurong"},"change_message_id":"6cd07cf54c74b293c0fbe7a1440e6deb3052b6de","unresolved":false,"context_lines":[{"line_number":85,"context_line":"                   {\u0027segmentation_id\u0027: segmentation_id,"},{"line_number":86,"context_line":"                    \u0027min\u0027: n_const.MIN_VXLAN_VNI,"},{"line_number":87,"context_line":"                    \u0027max\u0027: n_const.MAX_VXLAN_VNI})"},{"line_number":88,"context_line":"            raise exc.InvalidInput(error_message\u003dmsg)"},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"        for key, value in segment.items():"},{"line_number":91,"context_line":"            if value and key not in [api.NETWORK_TYPE,"}],"source_content_type":"text/x-python","patch_set":7,"id":"5adbc538_75a003f5","line":88,"in_reply_to":"7adec928_aaa2e197","updated":"2014-05-26 02:45:25.000000000","message":"@gongysh, @Assaf Muller\nI have checked it, GRE and VXLAN packet use 24bit id range. So, this generic fix is plausible, what do you think?:)","commit_id":"80b8df32fb9d984574f95d464b62780243342c0b"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"403c238911825267fb791a39e6eed215f57ba40f","unresolved":false,"context_lines":[{"line_number":85,"context_line":"                   {\u0027segmentation_id\u0027: segmentation_id,"},{"line_number":86,"context_line":"                    \u0027min\u0027: n_const.MIN_VXLAN_VNI,"},{"line_number":87,"context_line":"                    \u0027max\u0027: n_const.MAX_VXLAN_VNI})"},{"line_number":88,"context_line":"            raise exc.InvalidInput(error_message\u003dmsg)"},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"        for key, value in segment.items():"},{"line_number":91,"context_line":"            if value and key not in [api.NETWORK_TYPE,"}],"source_content_type":"text/x-python","patch_set":7,"id":"7adec928_aaa2e197","line":88,"in_reply_to":"7adec928_cb72e848","updated":"2014-05-22 21:23:53.000000000","message":"Well, GRE tunnel id is also 24 bit. I imagine this problem exhibits for GRE as well (I didn\u0027t check). Why not fix it for the generic case? :)","commit_id":"80b8df32fb9d984574f95d464b62780243342c0b"},{"author":{"_account_id":8646,"name":"yangxurong","email":"yangxurong@huawei.com","username":"yangxurong"},"change_message_id":"a8d7ccca626cd2258a13c2581d0881047c0970c7","unresolved":false,"context_lines":[{"line_number":85,"context_line":"                   {\u0027segmentation_id\u0027: segmentation_id,"},{"line_number":86,"context_line":"                    \u0027min\u0027: n_const.MIN_VXLAN_VNI,"},{"line_number":87,"context_line":"                    \u0027max\u0027: n_const.MAX_VXLAN_VNI})"},{"line_number":88,"context_line":"            raise exc.InvalidInput(error_message\u003dmsg)"},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"        for key, value in segment.items():"},{"line_number":91,"context_line":"            if value and key not in [api.NETWORK_TYPE,"}],"source_content_type":"text/x-python","patch_set":7,"id":"7adec928_cb72e848","line":88,"in_reply_to":"7adec928_d0729748","updated":"2014-05-22 10:43:23.000000000","message":"Hi, gogysh\n    thanks for your comment, so which fix do you think better: judge the NETWORK_TYPE in type_tunnel.py or implement in type_vxlan.py?","commit_id":"80b8df32fb9d984574f95d464b62780243342c0b"},{"author":{"_account_id":7805,"name":"Li Ma","email":"skywalker.nick@gmail.com","username":"Nick"},"change_message_id":"d8272fd2ce154f85784baabf62c8ec5350e0b650","unresolved":false,"context_lines":[{"line_number":74,"context_line":"            raise exc.InvalidInput(error_message\u003dmsg)"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"        segmentation_id \u003d segment.get(api.SEGMENTATION_ID)"},{"line_number":77,"context_line":"        if segmentation_id is None:"},{"line_number":78,"context_line":"            msg \u003d _(\"segmentation_id required for %s provider \""},{"line_number":79,"context_line":"                    \"network\") % segment.get(api.NETWORK_TYPE)"},{"line_number":80,"context_line":"            raise exc.InvalidInput(error_message\u003dmsg)"}],"source_content_type":"text/x-python","patch_set":8,"id":"3ae8d1ca_b72b6f2f","line":77,"updated":"2014-05-27 09:57:10.000000000","message":"Why change this?","commit_id":"52fae613569c53bf48fcd5a70952d86e5ce712d1"},{"author":{"_account_id":7805,"name":"Li Ma","email":"skywalker.nick@gmail.com","username":"Nick"},"change_message_id":"d8272fd2ce154f85784baabf62c8ec5350e0b650","unresolved":false,"context_lines":[{"line_number":84,"context_line":"                     \"(%(min)s through %(max)s)\") %"},{"line_number":85,"context_line":"                   {\u0027segmentation_id\u0027: segmentation_id,"},{"line_number":86,"context_line":"                    \u0027min\u0027: n_const.MIN_VXLAN_VNI,"},{"line_number":87,"context_line":"                    \u0027max\u0027: n_const.MAX_VXLAN_VNI})"},{"line_number":88,"context_line":"            raise exc.InvalidInput(error_message\u003dmsg)"},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"        for key, value in segment.items():"}],"source_content_type":"text/x-python","patch_set":8,"id":"3ae8d1ca_5c9a5215","line":87,"updated":"2014-05-27 09:57:10.000000000","message":"If you wanna check VxLAN and GRE in the same function, the constants used here and inside is_valid_tunnel_tag function are confusing, because MIN/MAX_VXLAN_VNI cannot stand for GRE tunnel ID. They have the same value but different meaning.","commit_id":"52fae613569c53bf48fcd5a70952d86e5ce712d1"},{"author":{"_account_id":2592,"name":"Mark McClain","email":"mark@mcclain.xyz","username":"markmcclain"},"change_message_id":"b2ac7b3bfc15a875be873e8b17dc305e74726294","unresolved":false,"context_lines":[{"line_number":74,"context_line":"            raise exc.InvalidInput(error_message\u003dmsg)"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"        segmentation_id \u003d segment.get(api.SEGMENTATION_ID)"},{"line_number":77,"context_line":"        if segmentation_id is None:"},{"line_number":78,"context_line":"            msg \u003d _(\"segmentation_id required for %s provider \""},{"line_number":79,"context_line":"                    \"network\") % segment.get(api.NETWORK_TYPE)"},{"line_number":80,"context_line":"            raise exc.InvalidInput(error_message\u003dmsg)"}],"source_content_type":"text/x-python","patch_set":9,"id":"1ae5cdf2_aa0ed3e2","line":77,"updated":"2014-06-05 17:48:57.000000000","message":"why the change here?","commit_id":"7fbd76bbed334ed3866b58144b23a2fc47f7690a"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"867d25efb6d2d62754d20784a3a2a0b66fd3dfd7","unresolved":false,"context_lines":[{"line_number":86,"context_line":"                   {\u0027segmentation_id\u0027: segmentation_id,"},{"line_number":87,"context_line":"                    \u0027min\u0027: n_const.MIN_COMM_TAG,"},{"line_number":88,"context_line":"                    \u0027max\u0027: n_const.MAX_COMM_TAG})"},{"line_number":89,"context_line":"            raise exc.InvalidInput(error_message\u003dmsg)"},{"line_number":90,"context_line":""},{"line_number":91,"context_line":"        for key, value in segment.items():"},{"line_number":92,"context_line":"            if value and key not in [api.NETWORK_TYPE,"}],"source_content_type":"text/x-python","patch_set":12,"id":"1ae5cdf2_fdfbc844","line":89,"updated":"2014-06-10 11:42:36.000000000","message":"it\u0027s better to make this check an abstract method and implement it in each type drivers.","commit_id":"b44ea9cff06c0589f530d1a79cc468bd50238f66"},{"author":{"_account_id":6876,"name":"stephen-ma","email":"stephenbma43@gmail.com","username":"stephen-ma"},"change_message_id":"ab12895e8f03b2c2d7fa9a0ac5e79bb6584084e7","unresolved":false,"context_lines":[{"line_number":86,"context_line":"                   {\u0027segmentation_id\u0027: segmentation_id,"},{"line_number":87,"context_line":"                    \u0027min\u0027: n_const.MIN_COMM_TAG,"},{"line_number":88,"context_line":"                    \u0027max\u0027: n_const.MAX_COMM_TAG})"},{"line_number":89,"context_line":"            raise exc.InvalidInput(error_message\u003dmsg)"},{"line_number":90,"context_line":""},{"line_number":91,"context_line":"        for key, value in segment.items():"},{"line_number":92,"context_line":"            if value and key not in [api.NETWORK_TYPE,"}],"source_content_type":"text/x-python","patch_set":12,"id":"1ae5cdf2_f583a153","line":89,"in_reply_to":"1ae5cdf2_fdfbc844","updated":"2014-06-11 18:38:29.000000000","message":"Adding to Takashi\u0027s comment, The vxlan type driver is derived from the tunnel type driver.  If this branch were hit for a vxlan type driver, the error message would give an invalid range for vxlan of 1 and 4094.","commit_id":"b44ea9cff06c0589f530d1a79cc468bd50238f66"},{"author":{"_account_id":11825,"name":"Sudhakar Babu Gariganti","email":"sudhakar.gariganti@gmail.com","username":"sudhakar-gariganti"},"change_message_id":"510d53ba96a3c0a5ca6628865b0a19c3e430bf51","unresolved":false,"context_lines":[{"line_number":84,"context_line":"            msg \u003d (_(\"segmentation_id %(segmentation_id)s out of base range \""},{"line_number":85,"context_line":"                     \"(%(min)s through %(max)s)\") %"},{"line_number":86,"context_line":"                   {\u0027segmentation_id\u0027: segmentation_id,"},{"line_number":87,"context_line":"                    \u0027min\u0027: n_const.MIN_COMM_TAG,"},{"line_number":88,"context_line":"                    \u0027max\u0027: n_const.MAX_COMM_TAG})"},{"line_number":89,"context_line":"            raise exc.InvalidInput(error_message\u003dmsg)"},{"line_number":90,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"1ae5cdf2_18b2cf93","line":87,"updated":"2014-06-13 04:06:21.000000000","message":"Here in the message, we are defaulting to print the COMM tags. We need to print the appropriate network based tag values right?","commit_id":"20011851482f2ca34ec5904b29f49c2f4f468666"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"3882c55527c30ae6c798be33e6b3d22e7410df44","unresolved":false,"context_lines":[{"line_number":86,"context_line":"                   {\u0027segmentation_id\u0027: segmentation_id,"},{"line_number":87,"context_line":"                    \u0027min\u0027: n_const.MIN_COMM_TAG,"},{"line_number":88,"context_line":"                    \u0027max\u0027: n_const.MAX_COMM_TAG})"},{"line_number":89,"context_line":"            raise exc.InvalidInput(error_message\u003dmsg)"},{"line_number":90,"context_line":""},{"line_number":91,"context_line":"        for key, value in segment.items():"},{"line_number":92,"context_line":"            if value and key not in [api.NETWORK_TYPE,"}],"source_content_type":"text/x-python","patch_set":13,"id":"1ae5cdf2_bbbb95c2","line":89,"updated":"2014-06-13 04:37:12.000000000","message":"i still think the way i suggested in patch set 12 is better.\nin that way these COMM constants are not necessary.","commit_id":"20011851482f2ca34ec5904b29f49c2f4f468666"},{"author":{"_account_id":6876,"name":"stephen-ma","email":"stephenbma43@gmail.com","username":"stephen-ma"},"change_message_id":"0a650257b870aa09b1f69e1272b5c76ddbe04047","unresolved":false,"context_lines":[{"line_number":86,"context_line":"                   {\u0027segmentation_id\u0027: segmentation_id,"},{"line_number":87,"context_line":"                    \u0027min\u0027: n_const.MIN_COMM_TAG,"},{"line_number":88,"context_line":"                    \u0027max\u0027: n_const.MAX_COMM_TAG})"},{"line_number":89,"context_line":"            raise exc.InvalidInput(error_message\u003dmsg)"},{"line_number":90,"context_line":""},{"line_number":91,"context_line":"        for key, value in segment.items():"},{"line_number":92,"context_line":"            if value and key not in [api.NETWORK_TYPE,"}],"source_content_type":"text/x-python","patch_set":13,"id":"1ae5cdf2_edf9d580","line":89,"in_reply_to":"1ae5cdf2_bbbb95c2","updated":"2014-06-13 15:24:28.000000000","message":"I agree Yamamoto\u0027s comments.","commit_id":"20011851482f2ca34ec5904b29f49c2f4f468666"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"e3033cd264a7e0007bd8ccc16f63dd1092c1b7e5","unresolved":false,"context_lines":[{"line_number":66,"context_line":"        LOG.info(_(\"%(type)s ID ranges: %(range)s\"),"},{"line_number":67,"context_line":"                 {\u0027type\u0027: tunnel_type, \u0027range\u0027: current_range})"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"    def validate_provider_segment(self, segment):"},{"line_number":70,"context_line":"        physical_network \u003d segment.get(api.PHYSICAL_NETWORK)"},{"line_number":71,"context_line":"        network_type \u003d segment.get(api.NETWORK_TYPE)"},{"line_number":72,"context_line":"        if physical_network:"}],"source_content_type":"text/x-python","patch_set":15,"id":"1ae5cdf2_af86c1b8","line":69,"updated":"2014-06-16 02:44:06.000000000","message":"this method seems now unused, right?\nhow about making this an abstract method?","commit_id":"8231924044f0f7b719a93c36c6fb0b2b5e9efcb3"},{"author":{"_account_id":7805,"name":"Li Ma","email":"skywalker.nick@gmail.com","username":"Nick"},"change_message_id":"4d769f3cdff65d9e044cd15a7f63329812ed00aa","unresolved":false,"context_lines":[{"line_number":66,"context_line":"        LOG.info(_(\"%(type)s ID ranges: %(range)s\"),"},{"line_number":67,"context_line":"                 {\u0027type\u0027: tunnel_type, \u0027range\u0027: current_range})"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"    def validate_provider_segment(self, segment):"},{"line_number":70,"context_line":"        physical_network \u003d segment.get(api.PHYSICAL_NETWORK)"},{"line_number":71,"context_line":"        network_type \u003d segment.get(api.NETWORK_TYPE)"},{"line_number":72,"context_line":"        if physical_network:"}],"source_content_type":"text/x-python","patch_set":15,"id":"1ae5cdf2_6072daae","line":69,"in_reply_to":"1ae5cdf2_38ecb0f3","updated":"2014-06-17 02:12:20.000000000","message":"+1\nimplements this function in each tunnel type is appropriate.","commit_id":"8231924044f0f7b719a93c36c6fb0b2b5e9efcb3"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"238dd0c90fd7acc484418e0bd1520c88b1d7ea2e","unresolved":false,"context_lines":[{"line_number":66,"context_line":"        LOG.info(_(\"%(type)s ID ranges: %(range)s\"),"},{"line_number":67,"context_line":"                 {\u0027type\u0027: tunnel_type, \u0027range\u0027: current_range})"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"    def validate_provider_segment(self, segment):"},{"line_number":70,"context_line":"        physical_network \u003d segment.get(api.PHYSICAL_NETWORK)"},{"line_number":71,"context_line":"        network_type \u003d segment.get(api.NETWORK_TYPE)"},{"line_number":72,"context_line":"        if physical_network:"}],"source_content_type":"text/x-python","patch_set":15,"id":"1ae5cdf2_38ecb0f3","line":69,"in_reply_to":"1ae5cdf2_8ab3b3e8","updated":"2014-06-16 08:19:21.000000000","message":"i prefer an abstract method because these COMM constants might not be appropriate for the \"other tunnel\"s.","commit_id":"8231924044f0f7b719a93c36c6fb0b2b5e9efcb3"},{"author":{"_account_id":8646,"name":"yangxurong","email":"yangxurong@huawei.com","username":"yangxurong"},"change_message_id":"718d952a6c504fcbaf798942c233e1f84c711a27","unresolved":false,"context_lines":[{"line_number":66,"context_line":"        LOG.info(_(\"%(type)s ID ranges: %(range)s\"),"},{"line_number":67,"context_line":"                 {\u0027type\u0027: tunnel_type, \u0027range\u0027: current_range})"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"    def validate_provider_segment(self, segment):"},{"line_number":70,"context_line":"        physical_network \u003d segment.get(api.PHYSICAL_NETWORK)"},{"line_number":71,"context_line":"        network_type \u003d segment.get(api.NETWORK_TYPE)"},{"line_number":72,"context_line":"        if physical_network:"}],"source_content_type":"text/x-python","patch_set":15,"id":"1ae5cdf2_8ab3b3e8","line":69,"in_reply_to":"1ae5cdf2_af86c1b8","updated":"2014-06-16 03:19:36.000000000","message":"yes, it is unused in present case, but i am afraid that it would be useful for other tunnel latter, hence, let\u0027s keep it in. ok?","commit_id":"8231924044f0f7b719a93c36c6fb0b2b5e9efcb3"},{"author":{"_account_id":6876,"name":"stephen-ma","email":"stephenbma43@gmail.com","username":"stephen-ma"},"change_message_id":"fab042dd3c90dc9b5dc491122df27b75e6c867f2","unresolved":false,"context_lines":[{"line_number":65,"context_line":"                 {\u0027type\u0027: tunnel_type, \u0027range\u0027: current_range})"},{"line_number":66,"context_line":""},{"line_number":67,"context_line":"    @abc.abstractmethod"},{"line_number":68,"context_line":"    def validate_provider_segment(self, segment):"},{"line_number":69,"context_line":"        \"\"\"Validate tunnel provider information"},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"        param segment: dict contain network_type, physical_network,"}],"source_content_type":"text/x-python","patch_set":16,"id":"1ae5cdf2_cb6bb384","line":68,"updated":"2014-06-17 16:23:55.000000000","message":"Note this code now in the baseline is replicated in the VxlanTypeDriver and the GreTypeDriver.  This replication can be avoided.  The only difference is the code block to validate the tags.  \n\nSo keep the current validate_provider_segment code.  And have a new method validate_tag as an abstract function in TunnelTypeDriver.  Insert self.validate_tag(...) at line 79 of the baseline.  Then define the actual implementation of validate_tag in VxlanTypeDriver and GreTypeDriver.\n\nFor example, for the VxlanTypeDriver, validate_tag method would be type_vxlan.c, lines 221-227.","commit_id":"c6617a37cb32012c611f1a97779fa54177b5c9fd"},{"author":{"_account_id":6876,"name":"stephen-ma","email":"stephenbma43@gmail.com","username":"stephen-ma"},"change_message_id":"af5b40f23066f97af15dd21a4ba67dec11a1d357","unresolved":false,"context_lines":[{"line_number":70,"context_line":"            except ValueError as ex:"},{"line_number":71,"context_line":"                LOG.error(_(\"Invalid tunnel ID range: \u0027%(range)s\u0027 - %(e)s. \""},{"line_number":72,"context_line":"                            \"Agent terminated!\"),"},{"line_number":73,"context_line":"                          {\u0027range\u0027: tunnel_ranges, \u0027e\u0027: ex})"},{"line_number":74,"context_line":"        LOG.info(_(\"%(type)s ID ranges: %(range)s\"),"},{"line_number":75,"context_line":"                 {\u0027type\u0027: tunnel_type, \u0027range\u0027: current_range})"},{"line_number":76,"context_line":""}],"source_content_type":"text/x-python","patch_set":20,"id":"1ae5cdf2_06a1d2f7","line":73,"updated":"2014-06-18 18:40:39.000000000","message":"This method is only checking that the min and max values are integers. The method validate_tunnel_tag should be called in this method to check the range passed in from the config files are valid.  Sorry, didn\u0027t notice this until now.","commit_id":"69acaa8b4133766d8882aef4c113cd5ef14b5374"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"3fc4a96577d39c8a4a65b38ed3d4f370367fce7a","unresolved":false,"context_lines":[{"line_number":57,"context_line":"                tun_min, tun_max \u003d entry.split(\u0027:\u0027)"},{"line_number":58,"context_line":"                tun_min \u003d tun_min.strip()"},{"line_number":59,"context_line":"                tun_max \u003d tun_max.strip()"},{"line_number":60,"context_line":"                tunnel_range \u003d (int(tun_min), int(tun_max))"},{"line_number":61,"context_line":"            except ValueError as ex:"},{"line_number":62,"context_line":"                raise exc.NetworkTunnelRangeError(tunnel_range\u003dentry, error\u003dex)"},{"line_number":63,"context_line":"            plugin_utils.verify_tunnel_range(tunnel_range)"}],"source_content_type":"text/x-python","patch_set":22,"id":"1abeadc6_6ec1002e","line":60,"updated":"2014-08-18 11:44:17.000000000","message":"() are not needed","commit_id":"b56106cdf2cbe564f9034db04c3cad6448e1dfc9"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"66482e9bcb9f5c60e37caf4006b59c05809eb11d","unresolved":false,"context_lines":[{"line_number":57,"context_line":"                tun_min, tun_max \u003d entry.split(\u0027:\u0027)"},{"line_number":58,"context_line":"                tun_min \u003d tun_min.strip()"},{"line_number":59,"context_line":"                tun_max \u003d tun_max.strip()"},{"line_number":60,"context_line":"                tunnel_range \u003d (int(tun_min), int(tun_max))"},{"line_number":61,"context_line":"            except ValueError as ex:"},{"line_number":62,"context_line":"                raise exc.NetworkTunnelRangeError(tunnel_range\u003dentry, error\u003dex)"},{"line_number":63,"context_line":"            plugin_utils.verify_tunnel_range(tunnel_range)"}],"source_content_type":"text/x-python","patch_set":22,"id":"1abeadc6_d78d4033","line":60,"in_reply_to":"1abeadc6_6ec1002e","updated":"2014-08-18 14:39:29.000000000","message":"Done","commit_id":"b56106cdf2cbe564f9034db04c3cad6448e1dfc9"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"9c8fe2708302827b3dbf32b53d60a6ac81dbb971","unresolved":false,"context_lines":[{"line_number":60,"context_line":"                tunnel_range \u003d int(tun_min), int(tun_max)"},{"line_number":61,"context_line":"            except ValueError as ex:"},{"line_number":62,"context_line":"                raise exc.NetworkTunnelRangeError(tunnel_range\u003dentry, error\u003dex)"},{"line_number":63,"context_line":"            plugin_utils.verify_tunnel_range(tunnel_range)"},{"line_number":64,"context_line":"            current_range.append(tunnel_range)"},{"line_number":65,"context_line":"        LOG.info(_(\"%(type)s ID ranges: %(range)s\"),"},{"line_number":66,"context_line":"                 {\u0027type\u0027: tunnel_type, \u0027range\u0027: current_range})"}],"source_content_type":"text/x-python","patch_set":23,"id":"1abeadc6_6591adf0","line":63,"updated":"2014-08-20 17:51:18.000000000","message":"Sorry, forget to pass tunnel_type in verify_tunnel_range()","commit_id":"aae70fc81816f397ab83ee3493140460baa7efbd"},{"author":{"_account_id":6876,"name":"stephen-ma","email":"stephenbma43@gmail.com","username":"stephen-ma"},"change_message_id":"f66fb3a908bd3c7f2de8e4bcc22b156f3b1a93d0","unresolved":false,"context_lines":[{"line_number":50,"context_line":"        \"\"\""},{"line_number":51,"context_line":"        pass"},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"    def _parse_tunnel_ranges(self, tunnel_ranges, current_range, tunnel_type):"},{"line_number":54,"context_line":"        for entry in tunnel_ranges:"},{"line_number":55,"context_line":"            entry \u003d entry.strip()"},{"line_number":56,"context_line":"            try:"}],"source_content_type":"text/x-python","patch_set":26,"id":"1abeadc6_fbffbe31","line":53,"updated":"2014-08-22 23:08:37.000000000","message":"If you add an abstract method in the TunnelTypeDriver class:\n\n   @abc.abstractmethod\n   def get_type(self):\n       pass\n\nThen the tunnel_type is not needed as an argument.  The get_type method is already in the TypeVxlanDriver and TypeGreDriver.","commit_id":"3f9bde233a0a2ddea0b17aebd169f58f739f2c5a"},{"author":{"_account_id":6876,"name":"stephen-ma","email":"stephenbma43@gmail.com","username":"stephen-ma"},"change_message_id":"3db54b8e18a4ebf47e848a075184c96b5c23fc7c","unresolved":false,"context_lines":[{"line_number":50,"context_line":"        \"\"\""},{"line_number":51,"context_line":"        pass"},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"    def _parse_tunnel_ranges(self, tunnel_ranges, current_range, tunnel_type):"},{"line_number":54,"context_line":"        for entry in tunnel_ranges:"},{"line_number":55,"context_line":"            entry \u003d entry.strip()"},{"line_number":56,"context_line":"            try:"}],"source_content_type":"text/x-python","patch_set":26,"id":"1abeadc6_f7b31c08","line":53,"in_reply_to":"1abeadc6_4ed63229","updated":"2014-08-25 17:50:15.000000000","message":"The tunnel_type argument is not needed here because this method can use self.get_type() to get it.  \n\nSo disregard only the comment on adding an abstract method get_type() in this class.","commit_id":"3f9bde233a0a2ddea0b17aebd169f58f739f2c5a"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"e2625bc3c4f5d2979c39fa90309c6acdd8af5dfc","unresolved":false,"context_lines":[{"line_number":50,"context_line":"        \"\"\""},{"line_number":51,"context_line":"        pass"},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"    def _parse_tunnel_ranges(self, tunnel_ranges, current_range, tunnel_type):"},{"line_number":54,"context_line":"        for entry in tunnel_ranges:"},{"line_number":55,"context_line":"            entry \u003d entry.strip()"},{"line_number":56,"context_line":"            try:"}],"source_content_type":"text/x-python","patch_set":26,"id":"1abeadc6_6a5e1feb","line":53,"in_reply_to":"1abeadc6_f7b31c08","updated":"2014-08-26 15:59:43.000000000","message":"Done","commit_id":"3f9bde233a0a2ddea0b17aebd169f58f739f2c5a"},{"author":{"_account_id":6876,"name":"stephen-ma","email":"stephenbma43@gmail.com","username":"stephen-ma"},"change_message_id":"c453e6ee83afb76f5ed5dc57e19f024a751a757d","unresolved":false,"context_lines":[{"line_number":50,"context_line":"        \"\"\""},{"line_number":51,"context_line":"        pass"},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"    def _parse_tunnel_ranges(self, tunnel_ranges, current_range, tunnel_type):"},{"line_number":54,"context_line":"        for entry in tunnel_ranges:"},{"line_number":55,"context_line":"            entry \u003d entry.strip()"},{"line_number":56,"context_line":"            try:"}],"source_content_type":"text/x-python","patch_set":26,"id":"1abeadc6_4ed63229","line":53,"in_reply_to":"1abeadc6_fbffbe31","updated":"2014-08-22 23:21:44.000000000","message":"Disregard this comment.  The get_type method is already an abstract method in the parent class of TunnelTypeDriver (neutron.plugins.ml2.driver_api.TypeDriver).","commit_id":"3f9bde233a0a2ddea0b17aebd169f58f739f2c5a"},{"author":{"_account_id":6876,"name":"stephen-ma","email":"stephenbma43@gmail.com","username":"stephen-ma"},"change_message_id":"f66fb3a908bd3c7f2de8e4bcc22b156f3b1a93d0","unresolved":false,"context_lines":[{"line_number":60,"context_line":"                tunnel_range \u003d int(tun_min), int(tun_max)"},{"line_number":61,"context_line":"            except ValueError as ex:"},{"line_number":62,"context_line":"                raise exc.NetworkTunnelRangeError(tunnel_range\u003dentry, error\u003dex)"},{"line_number":63,"context_line":"            plugin_utils.verify_tunnel_range(tunnel_range, tunnel_type)"},{"line_number":64,"context_line":"            current_range.append(tunnel_range)"},{"line_number":65,"context_line":"        LOG.info(_(\"%(type)s ID ranges: %(range)s\"),"},{"line_number":66,"context_line":"                 {\u0027type\u0027: tunnel_type, \u0027range\u0027: current_range})"}],"source_content_type":"text/x-python","patch_set":26,"id":"1abeadc6_3bf6965d","line":63,"updated":"2014-08-22 23:08:37.000000000","message":"Change tunnel_type to self.get_type().","commit_id":"3f9bde233a0a2ddea0b17aebd169f58f739f2c5a"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"e2625bc3c4f5d2979c39fa90309c6acdd8af5dfc","unresolved":false,"context_lines":[{"line_number":60,"context_line":"                tunnel_range \u003d int(tun_min), int(tun_max)"},{"line_number":61,"context_line":"            except ValueError as ex:"},{"line_number":62,"context_line":"                raise exc.NetworkTunnelRangeError(tunnel_range\u003dentry, error\u003dex)"},{"line_number":63,"context_line":"            plugin_utils.verify_tunnel_range(tunnel_range, tunnel_type)"},{"line_number":64,"context_line":"            current_range.append(tunnel_range)"},{"line_number":65,"context_line":"        LOG.info(_(\"%(type)s ID ranges: %(range)s\"),"},{"line_number":66,"context_line":"                 {\u0027type\u0027: tunnel_type, \u0027range\u0027: current_range})"}],"source_content_type":"text/x-python","patch_set":26,"id":"1abeadc6_8a61bbaa","line":63,"in_reply_to":"1abeadc6_3bf6965d","updated":"2014-08-26 15:59:43.000000000","message":"Done","commit_id":"3f9bde233a0a2ddea0b17aebd169f58f739f2c5a"},{"author":{"_account_id":6876,"name":"stephen-ma","email":"stephenbma43@gmail.com","username":"stephen-ma"},"change_message_id":"f66fb3a908bd3c7f2de8e4bcc22b156f3b1a93d0","unresolved":false,"context_lines":[{"line_number":63,"context_line":"            plugin_utils.verify_tunnel_range(tunnel_range, tunnel_type)"},{"line_number":64,"context_line":"            current_range.append(tunnel_range)"},{"line_number":65,"context_line":"        LOG.info(_(\"%(type)s ID ranges: %(range)s\"),"},{"line_number":66,"context_line":"                 {\u0027type\u0027: tunnel_type, \u0027range\u0027: current_range})"},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"    def is_partial_segment(self, segment):"},{"line_number":69,"context_line":"        return segment.get(api.SEGMENTATION_ID) is None"}],"source_content_type":"text/x-python","patch_set":26,"id":"1abeadc6_5b98b21b","line":66,"updated":"2014-08-22 23:08:37.000000000","message":"same comment as L63.","commit_id":"3f9bde233a0a2ddea0b17aebd169f58f739f2c5a"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"e2625bc3c4f5d2979c39fa90309c6acdd8af5dfc","unresolved":false,"context_lines":[{"line_number":63,"context_line":"            plugin_utils.verify_tunnel_range(tunnel_range, tunnel_type)"},{"line_number":64,"context_line":"            current_range.append(tunnel_range)"},{"line_number":65,"context_line":"        LOG.info(_(\"%(type)s ID ranges: %(range)s\"),"},{"line_number":66,"context_line":"                 {\u0027type\u0027: tunnel_type, \u0027range\u0027: current_range})"},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"    def is_partial_segment(self, segment):"},{"line_number":69,"context_line":"        return segment.get(api.SEGMENTATION_ID) is None"}],"source_content_type":"text/x-python","patch_set":26,"id":"1abeadc6_aa5837fb","line":66,"in_reply_to":"1abeadc6_5b98b21b","updated":"2014-08-26 15:59:43.000000000","message":"Done","commit_id":"3f9bde233a0a2ddea0b17aebd169f58f739f2c5a"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"88f0d67af2b16a3c3e701b8b17a3f266e5348276","unresolved":false,"context_lines":[{"line_number":76,"context_line":"            plugin_utils.verify_tunnel_range(tunnel_range, self.get_type())"},{"line_number":77,"context_line":"            current_range.append(tunnel_range)"},{"line_number":78,"context_line":"        LOG.info(_(\"%(type)s ID ranges: %(range)s\"),"},{"line_number":79,"context_line":"                 {\u0027type\u0027: self.get_type(), \u0027range\u0027: current_range})"},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"    def is_partial_segment(self, segment):"},{"line_number":82,"context_line":"        return segment.get(api.SEGMENTATION_ID) is None"}],"source_content_type":"text/x-python","patch_set":27,"id":"1abeadc6_379d425a","line":79,"updated":"2014-08-27 12:14:31.000000000","message":"Nit: since you\u0027re modifying the log message, you can use _LI()","commit_id":"d0071fa1ffb9c337131ac08c3f41a40e6f4fb0b2"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"5353e0cf9f368c280666f3cba61a0348ef7281be","unresolved":false,"context_lines":[{"line_number":76,"context_line":"            plugin_utils.verify_tunnel_range(tunnel_range, self.get_type())"},{"line_number":77,"context_line":"            current_range.append(tunnel_range)"},{"line_number":78,"context_line":"        LOG.info(_(\"%(type)s ID ranges: %(range)s\"),"},{"line_number":79,"context_line":"                 {\u0027type\u0027: self.get_type(), \u0027range\u0027: current_range})"},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"    def is_partial_segment(self, segment):"},{"line_number":82,"context_line":"        return segment.get(api.SEGMENTATION_ID) is None"}],"source_content_type":"text/x-python","patch_set":27,"id":"1abeadc6_8620a6f8","line":79,"in_reply_to":"1abeadc6_2580ac45","updated":"2014-08-27 13:52:15.000000000","message":"It\u0027s a helper for the translators. At the top you put \n\nfrom neutron.openstack.common.gettextutils import _LI\n\nAnd then use that in place of the regular _ on INFO messages.","commit_id":"d0071fa1ffb9c337131ac08c3f41a40e6f4fb0b2"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"547b2d62a14dc41fa9a24cc4d08e7bbe5e1ecb2b","unresolved":false,"context_lines":[{"line_number":76,"context_line":"            plugin_utils.verify_tunnel_range(tunnel_range, self.get_type())"},{"line_number":77,"context_line":"            current_range.append(tunnel_range)"},{"line_number":78,"context_line":"        LOG.info(_(\"%(type)s ID ranges: %(range)s\"),"},{"line_number":79,"context_line":"                 {\u0027type\u0027: self.get_type(), \u0027range\u0027: current_range})"},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"    def is_partial_segment(self, segment):"},{"line_number":82,"context_line":"        return segment.get(api.SEGMENTATION_ID) is None"}],"source_content_type":"text/x-python","patch_set":27,"id":"1abeadc6_2580ac45","line":79,"in_reply_to":"1abeadc6_379d425a","updated":"2014-08-27 13:03:16.000000000","message":"I didn\u0027t get this !\nPlease share example.","commit_id":"d0071fa1ffb9c337131ac08c3f41a40e6f4fb0b2"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"e41e41f2c083fcd93c4e45e947f08ef6fd171785","unresolved":false,"context_lines":[{"line_number":76,"context_line":"            plugin_utils.verify_tunnel_range(tunnel_range, self.get_type())"},{"line_number":77,"context_line":"            current_range.append(tunnel_range)"},{"line_number":78,"context_line":"        LOG.info(_(\"%(type)s ID ranges: %(range)s\"),"},{"line_number":79,"context_line":"                 {\u0027type\u0027: self.get_type(), \u0027range\u0027: current_range})"},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"    def is_partial_segment(self, segment):"},{"line_number":82,"context_line":"        return segment.get(api.SEGMENTATION_ID) is None"}],"source_content_type":"text/x-python","patch_set":27,"id":"1abeadc6_7bce932e","line":79,"in_reply_to":"1abeadc6_8620a6f8","updated":"2014-08-28 14:02:43.000000000","message":"Done","commit_id":"d0071fa1ffb9c337131ac08c3f41a40e6f4fb0b2"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"f83e9afa747f1541629b2c389aa253598bc2a129","unresolved":false,"context_lines":[{"line_number":76,"context_line":"            plugin_utils.verify_tunnel_range(tunnel_range, self.get_type())"},{"line_number":77,"context_line":"            current_range.append(tunnel_range)"},{"line_number":78,"context_line":"        LOG.info(_(\"%(type)s ID ranges: %(range)s\"),"},{"line_number":79,"context_line":"                 {\u0027type\u0027: self.get_type(), \u0027range\u0027: current_range})"},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"    def is_partial_segment(self, segment):"},{"line_number":82,"context_line":"        return segment.get(api.SEGMENTATION_ID) is None"}],"source_content_type":"text/x-python","patch_set":27,"id":"1abeadc6_ec6a0aec","line":79,"in_reply_to":"1abeadc6_8620a6f8","updated":"2014-08-27 21:16:59.000000000","message":"Yeah, there are ones for error _LE, info _LI, and warning _LW (I think exception is _LC).","commit_id":"d0071fa1ffb9c337131ac08c3f41a40e6f4fb0b2"}],"neutron/plugins/ml2/drivers/type_vxlan.py":[{"author":{"_account_id":6876,"name":"stephen-ma","email":"stephenbma43@gmail.com","username":"stephen-ma"},"change_message_id":"fab042dd3c90dc9b5dc491122df27b75e6c867f2","unresolved":false,"context_lines":[{"line_number":213,"context_line":"            raise exc.InvalidInput(error_message\u003dmsg)"},{"line_number":214,"context_line":""},{"line_number":215,"context_line":"        segmentation_id \u003d segment.get(api.SEGMENTATION_ID)"},{"line_number":216,"context_line":"        if segmentation_id is None:"},{"line_number":217,"context_line":"            msg \u003d _(\"segmentation_id required for %s provider \""},{"line_number":218,"context_line":"                    \"network\") % network_type"},{"line_number":219,"context_line":"            raise exc.InvalidInput(error_message\u003dmsg)"}],"source_content_type":"text/x-python","patch_set":16,"id":"1ae5cdf2_6811c55c","line":216,"updated":"2014-06-17 16:23:55.000000000","message":"if not segmentation_id:","commit_id":"c6617a37cb32012c611f1a97779fa54177b5c9fd"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"3c77803b9f2a76e24d2f5583ce2944e139a90544","unresolved":false,"context_lines":[{"line_number":224,"context_line":"                   {\u0027segmentation_id\u0027: segmentation_id,"},{"line_number":225,"context_line":"                    \u0027min\u0027: n_const.MIN_VXLAN_TAG,"},{"line_number":226,"context_line":"                    \u0027max\u0027: n_const.MAX_VXLAN_TAG})"},{"line_number":227,"context_line":"            raise exc.InvalidInput(error_message\u003dmsg)"},{"line_number":228,"context_line":""},{"line_number":229,"context_line":"        for key, value in segment.items():"},{"line_number":230,"context_line":"            if value and key not in [api.NETWORK_TYPE,"}],"source_content_type":"text/x-python","patch_set":16,"id":"1ae5cdf2_ee48948c","line":227,"updated":"2014-06-17 07:42:52.000000000","message":"it might be better to make only this block (segmentation_id range check) abs method.","commit_id":"c6617a37cb32012c611f1a97779fa54177b5c9fd"},{"author":{"_account_id":8646,"name":"yangxurong","email":"yangxurong@huawei.com","username":"yangxurong"},"change_message_id":"5d03c5fbcc63b1424a80c4bc0efea8ea52a56f06","unresolved":false,"context_lines":[{"line_number":224,"context_line":"                   {\u0027segmentation_id\u0027: segmentation_id,"},{"line_number":225,"context_line":"                    \u0027min\u0027: n_const.MIN_VXLAN_TAG,"},{"line_number":226,"context_line":"                    \u0027max\u0027: n_const.MAX_VXLAN_TAG})"},{"line_number":227,"context_line":"            raise exc.InvalidInput(error_message\u003dmsg)"},{"line_number":228,"context_line":""},{"line_number":229,"context_line":"        for key, value in segment.items():"},{"line_number":230,"context_line":"            if value and key not in [api.NETWORK_TYPE,"}],"source_content_type":"text/x-python","patch_set":16,"id":"1ae5cdf2_bc595890","line":227,"in_reply_to":"1ae5cdf2_ee48948c","updated":"2014-06-17 13:02:55.000000000","message":"can you explain that why do we need to make block? btw,can you give all of your considers at a time,in order to fix it effectively. thank you!","commit_id":"c6617a37cb32012c611f1a97779fa54177b5c9fd"},{"author":{"_account_id":6876,"name":"stephen-ma","email":"stephenbma43@gmail.com","username":"stephen-ma"},"change_message_id":"fab042dd3c90dc9b5dc491122df27b75e6c867f2","unresolved":false,"context_lines":[{"line_number":231,"context_line":"                                     api.SEGMENTATION_ID]:"},{"line_number":232,"context_line":"                msg \u003d (_(\"%(key)s prohibited for %(tunnel)s provider network\"),"},{"line_number":233,"context_line":"                       {\u0027key\u0027: key, \u0027tunnel\u0027: network_type})"},{"line_number":234,"context_line":"                raise exc.InvalidInput(error_message\u003dmsg)"}],"source_content_type":"text/x-python","patch_set":16,"id":"1ae5cdf2_0b2e7b8c","line":234,"updated":"2014-06-17 16:23:55.000000000","message":"See my comment in type_tunnel.py, line 68.","commit_id":"c6617a37cb32012c611f1a97779fa54177b5c9fd"},{"author":{"_account_id":7987,"name":"Ivar Lazzaro","email":"ivarlazzaro@gmail.com","username":"Ivar"},"change_message_id":"430409e518f758d6550cfd2ffbb91ebc59d24894","unresolved":false,"context_lines":[{"line_number":206,"context_line":"    def _is_valid_vxlan_tag(self, segment_id):"},{"line_number":207,"context_line":"        return n_const.MIN_VXLAN_TAG \u003c\u003d segment_id \u003c\u003d n_const.MAX_VXLAN_TAG"},{"line_number":208,"context_line":""},{"line_number":209,"context_line":"    def validate_tunnel_tag(self, segment):"},{"line_number":210,"context_line":"        network_type \u003d segment.get(api.NETWORK_TYPE)"},{"line_number":211,"context_line":"        segmentation_id \u003d segment.get(api.SEGMENTATION_ID)"},{"line_number":212,"context_line":"        if segmentation_id is None:"}],"source_content_type":"text/x-python","patch_set":20,"id":"1ae5cdf2_e67946fd","line":209,"updated":"2014-06-18 18:42:06.000000000","message":"Same comment as patch 17: this method is exactly the same as \"validate_tunnel_tag\" in GreTypeDriver. Why not moving this implementation in TunnelTypeDriver to avoid maintaining both?\n\nIf you are concerned about retrieving the correct tunnel range value for each tunnel implementation, you could either add it as a parameter or defining \"min_tunnel_id\" and \"max_tunnel_id\" as a common class member.\n\nSame comment goes for \"_is_valid_*_tag\"","commit_id":"69acaa8b4133766d8882aef4c113cd5ef14b5374"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"e63687a25529ac9b71b832017262e92417c42788","unresolved":false,"context_lines":[{"line_number":84,"context_line":"            self._parse_tunnel_ranges(cfg.CONF.ml2_type_vxlan.vni_ranges,"},{"line_number":85,"context_line":"                                      self.vxlan_vni_ranges,"},{"line_number":86,"context_line":"                                      p_const.TYPE_VXLAN)"},{"line_number":87,"context_line":"        except Exception:"},{"line_number":88,"context_line":"            LOG.exception(_(\"Failed to parse vxlan_vni_ranges. \""},{"line_number":89,"context_line":"                            \"Service terminated!\"))"},{"line_number":90,"context_line":"            sys.exit(1)"}],"source_content_type":"text/x-python","patch_set":22,"id":"1abeadc6_775b6d54","line":87,"updated":"2014-08-19 06:40:53.000000000","message":"Avoid catching the general Exception class. Only catch the types that you expect to be thrown.","commit_id":"b56106cdf2cbe564f9034db04c3cad6448e1dfc9"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"b4592890d4b56d105503c9d079a1e804c0998f58","unresolved":false,"context_lines":[{"line_number":87,"context_line":"        except Exception:"},{"line_number":88,"context_line":"            LOG.exception(_(\"Failed to parse vxlan_vni_ranges. \""},{"line_number":89,"context_line":"                            \"Service terminated!\"))"},{"line_number":90,"context_line":"            sys.exit(1)"},{"line_number":91,"context_line":"        self._sync_vxlan_allocations()"},{"line_number":92,"context_line":""},{"line_number":93,"context_line":"    def reserve_provider_segment(self, session, segment):"}],"source_content_type":"text/x-python","patch_set":22,"id":"1abeadc6_d1cab5a0","line":90,"updated":"2014-08-18 11:56:11.000000000","message":"SystemExit()","commit_id":"b56106cdf2cbe564f9034db04c3cad6448e1dfc9"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"66482e9bcb9f5c60e37caf4006b59c05809eb11d","unresolved":false,"context_lines":[{"line_number":87,"context_line":"        except Exception:"},{"line_number":88,"context_line":"            LOG.exception(_(\"Failed to parse vxlan_vni_ranges. \""},{"line_number":89,"context_line":"                            \"Service terminated!\"))"},{"line_number":90,"context_line":"            sys.exit(1)"},{"line_number":91,"context_line":"        self._sync_vxlan_allocations()"},{"line_number":92,"context_line":""},{"line_number":93,"context_line":"    def reserve_provider_segment(self, session, segment):"}],"source_content_type":"text/x-python","patch_set":22,"id":"1abeadc6_02205d48","line":90,"in_reply_to":"1abeadc6_d1cab5a0","updated":"2014-08-18 14:39:29.000000000","message":"Done","commit_id":"b56106cdf2cbe564f9034db04c3cad6448e1dfc9"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"68be0c681f7c00ea98c8da68247f2e3e48de33a3","unresolved":false,"context_lines":[{"line_number":82,"context_line":"            self._parse_tunnel_ranges(cfg.CONF.ml2_type_vxlan.vni_ranges,"},{"line_number":83,"context_line":"                                      self.vxlan_vni_ranges,"},{"line_number":84,"context_line":"                                      p_const.TYPE_VXLAN)"},{"line_number":85,"context_line":"        except Exception:"},{"line_number":86,"context_line":"            LOG.exception(_(\"Failed to parse vxlan_vni_ranges. \""},{"line_number":87,"context_line":"                            \"Service terminated!\"))"},{"line_number":88,"context_line":"            raise SystemExit()"}],"source_content_type":"text/x-python","patch_set":24,"id":"1abeadc6_177c9d82","line":85,"updated":"2014-08-21 01:49:40.000000000","message":"Catching generic exception is not suggested. Please specify more specific exception.","commit_id":"a5f28ec9fd6f98621ea113860125de8e406fdd97"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"91e3fbd5c988b1f9e4a50d6b59f80cd8f65720a2","unresolved":false,"context_lines":[{"line_number":82,"context_line":"            self._parse_tunnel_ranges(cfg.CONF.ml2_type_vxlan.vni_ranges,"},{"line_number":83,"context_line":"                                      self.vxlan_vni_ranges,"},{"line_number":84,"context_line":"                                      p_const.TYPE_VXLAN)"},{"line_number":85,"context_line":"        except Exception:"},{"line_number":86,"context_line":"            LOG.exception(_(\"Failed to parse vxlan_vni_ranges. \""},{"line_number":87,"context_line":"                            \"Service terminated!\"))"},{"line_number":88,"context_line":"            raise SystemExit()"}],"source_content_type":"text/x-python","patch_set":24,"id":"1abeadc6_a37f2baa","line":85,"in_reply_to":"1abeadc6_177c9d82","updated":"2014-08-21 06:21:46.000000000","message":"Done","commit_id":"a5f28ec9fd6f98621ea113860125de8e406fdd97"},{"author":{"_account_id":6876,"name":"stephen-ma","email":"stephenbma43@gmail.com","username":"stephen-ma"},"change_message_id":"f66fb3a908bd3c7f2de8e4bcc22b156f3b1a93d0","unresolved":false,"context_lines":[{"line_number":81,"context_line":"        try:"},{"line_number":82,"context_line":"            self._parse_tunnel_ranges(cfg.CONF.ml2_type_vxlan.vni_ranges,"},{"line_number":83,"context_line":"                                      self.vxlan_vni_ranges,"},{"line_number":84,"context_line":"                                      p_const.TYPE_VXLAN)"},{"line_number":85,"context_line":"        except exc.NetworkTunnelRangeError:"},{"line_number":86,"context_line":"            LOG.exception(_(\"Failed to parse vni_ranges. \""},{"line_number":87,"context_line":"                            \"Service terminated!\"))"}],"source_content_type":"text/x-python","patch_set":26,"id":"1abeadc6_ce3c02cb","line":84,"updated":"2014-08-22 23:08:37.000000000","message":"See my comments in type_tunnel.py.","commit_id":"3f9bde233a0a2ddea0b17aebd169f58f739f2c5a"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"e2625bc3c4f5d2979c39fa90309c6acdd8af5dfc","unresolved":false,"context_lines":[{"line_number":81,"context_line":"        try:"},{"line_number":82,"context_line":"            self._parse_tunnel_ranges(cfg.CONF.ml2_type_vxlan.vni_ranges,"},{"line_number":83,"context_line":"                                      self.vxlan_vni_ranges,"},{"line_number":84,"context_line":"                                      p_const.TYPE_VXLAN)"},{"line_number":85,"context_line":"        except exc.NetworkTunnelRangeError:"},{"line_number":86,"context_line":"            LOG.exception(_(\"Failed to parse vni_ranges. \""},{"line_number":87,"context_line":"                            \"Service terminated!\"))"}],"source_content_type":"text/x-python","patch_set":26,"id":"1abeadc6_ea714f78","line":84,"in_reply_to":"1abeadc6_ce3c02cb","updated":"2014-08-26 15:59:43.000000000","message":"Done","commit_id":"3f9bde233a0a2ddea0b17aebd169f58f739f2c5a"},{"author":{"_account_id":12737,"name":"Jacek Swiderski","email":"jacek.swiderski@codilime.com","username":"Altran"},"change_message_id":"fc2ced0ab083b3142b2cbcde30ff9b97551a4426","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":28,"id":"fa98f980_4f5f5b0f","updated":"2014-09-12 10:22:25.000000000","message":"Same comments as type_gre.py","commit_id":"b1fec67c581dcc080d10eb1b0d6590a0812078e4"}],"neutron/tests/unit/ml2/test_type_gre.py":[{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"77a7aba7b92163dffbfc235723f654b52bb23463","unresolved":false,"context_lines":[{"line_number":55,"context_line":"        with testtools.ExpectedException(exc.InvalidInput):"},{"line_number":56,"context_line":"            self.driver.validate_provider_segment(segment)"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"    def test_validate_provider_segmentation_id_exceed_max(self):"},{"line_number":59,"context_line":"        segment \u003d {api.NETWORK_TYPE: \u0027gre\u0027,"},{"line_number":60,"context_line":"                   api.PHYSICAL_NETWORK: None,"},{"line_number":61,"context_line":"                   api.SEGMENTATION_ID: constants.MAX_BASE_TAG + 1}"}],"source_content_type":"text/x-python","patch_set":11,"id":"1ae5cdf2_fb0efd8a","line":58,"updated":"2014-06-05 11:35:57.000000000","message":"Just for completeness, test below min, valid min and valid max, missing ID, and invalid key.\n\nIf possible, consider moving into a common test module, rather than testing here and for VXLAN, to remove duplication.","commit_id":"f17016106c50e0e679c4391bf65a9cb0a57c0611"}],"neutron/tests/unit/ml2/test_type_vxlan.py":[{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"2d231b3c3520285aa9e07f3ebd890f62dbbd2487","unresolved":false,"context_lines":[{"line_number":76,"context_line":"        with testtools.ExpectedException(exc.InvalidInput):"},{"line_number":77,"context_line":"            self.driver.validate_provider_segment(segment)"},{"line_number":78,"context_line":""},{"line_number":79,"context_line":"        segment[api.SEGMENTATION_ID] \u003d 16777216"},{"line_number":80,"context_line":"        with testtools.ExpectedException(exc.InvalidInput):"},{"line_number":81,"context_line":"            self.driver.validate_provider_segment(segment)"},{"line_number":82,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAXH%2F%2FCzs%3D","line":79,"updated":"2014-04-24 12:39:16.000000000","message":"Could consider using \tMAX_VXLAN_VNI+1, so that change to limit won\u0027t require test change.\n\nCould do another test with min-1, for completeness.","commit_id":"ca4f79b61389f4dc6f8327c9f1ba70da566e8837"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"c1b4bd3b0d1ce41baffd8f1ba975f3df053f7582","unresolved":false,"context_lines":[{"line_number":69,"context_line":"        with testtools.ExpectedException(exc.InvalidInput):"},{"line_number":70,"context_line":"            self.driver.validate_provider_segment(segment)"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"    def test_validate_provider_segmentation_id(self):"},{"line_number":73,"context_line":"        segment \u003d {api.NETWORK_TYPE: \u0027vxlan\u0027,"},{"line_number":74,"context_line":"                   api.PHYSICAL_NETWORK: \u0027phys_net\u0027,"},{"line_number":75,"context_line":"                   api.SEGMENTATION_ID: constants.MIN_VXLAN_VNI - 1}"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAXX%2F%2F3wo%3D","line":72,"updated":"2014-04-25 16:41:45.000000000","message":"I\u0027d like to see a more focused testing strategy, as follows:\n\n- separate unit testing of is_valid_vxlan_tag()\n- separate tests for each failure mode of validate_provider_segment().  It should not be necessary to test more than a single failure condition of is_valid_vxlan_tag() when testing validate_provider_segment(), since those conditions would be validated in the tests for is_valid_vxlan_tag().\n\nSome general guidelines for unit testing are to test functionality as close as possible to where it is implemented, and in validating a single execution path per test, e.g.\n\n test_validate_provider_segmentation_id_raises_for_missing_id\n test_validate_provider_segmentation_id_raises_for_invalid_tag\n ...","commit_id":"8242411696aad3afa2a04629f5cef7c0e4f2a60d"},{"author":{"_account_id":7805,"name":"Li Ma","email":"skywalker.nick@gmail.com","username":"Nick"},"change_message_id":"d8272fd2ce154f85784baabf62c8ec5350e0b650","unresolved":false,"context_lines":[{"line_number":70,"context_line":"            self.driver.validate_provider_segment(segment)"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"    def test_validate_provider_segmentation_id_missing_id(self):"},{"line_number":73,"context_line":"        segment \u003d {api.NETWORK_TYPE: \u0027vxlan\u0027,"},{"line_number":74,"context_line":"                   api.PHYSICAL_NETWORK: None,"},{"line_number":75,"context_line":"                   api.SEGMENTATION_ID: None}"},{"line_number":76,"context_line":"        with testtools.ExpectedException(exc.InvalidInput):"}],"source_content_type":"text/x-python","patch_set":8,"id":"3ae8d1ca_37003faa","line":73,"updated":"2014-05-27 09:57:10.000000000","message":"Your solution deals with both VxLAN and GRE. Need to provide more test cases for GRE.","commit_id":"52fae613569c53bf48fcd5a70952d86e5ce712d1"},{"author":{"_account_id":2592,"name":"Mark McClain","email":"mark@mcclain.xyz","username":"markmcclain"},"change_message_id":"b2ac7b3bfc15a875be873e8b17dc305e74726294","unresolved":false,"context_lines":[{"line_number":68,"context_line":"        segment[api.PHYSICAL_NETWORK] \u003d None"},{"line_number":69,"context_line":"        with testtools.ExpectedException(exc.InvalidInput):"},{"line_number":70,"context_line":"            self.driver.validate_provider_segment(segment)"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"    def test_validate_provider_segmentation_id_missing_id(self):"},{"line_number":73,"context_line":"        segment \u003d {api.NETWORK_TYPE: \u0027vxlan\u0027,"},{"line_number":74,"context_line":"                   api.PHYSICAL_NETWORK: None,"}],"source_content_type":"text/x-python","patch_set":9,"id":"1ae5cdf2_8a0bd7d4","line":71,"updated":"2014-06-05 17:48:57.000000000","message":"Actually on second reading I think we can use what is here.","commit_id":"7fbd76bbed334ed3866b58144b23a2fc47f7690a"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"b23fa01a17e6b3a85d336543fd9fa6bc582590f7","unresolved":false,"context_lines":[{"line_number":68,"context_line":"        segment[api.PHYSICAL_NETWORK] \u003d None"},{"line_number":69,"context_line":"        with testtools.ExpectedException(exc.InvalidInput):"},{"line_number":70,"context_line":"            self.driver.validate_provider_segment(segment)"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"    def test_validate_provider_segmentation_id_missing_id(self):"},{"line_number":73,"context_line":"        segment \u003d {api.NETWORK_TYPE: \u0027vxlan\u0027,"},{"line_number":74,"context_line":"                   api.PHYSICAL_NETWORK: None,"}],"source_content_type":"text/x-python","patch_set":9,"id":"3ae8d1ca_40ca5250","line":71,"updated":"2014-05-27 19:14:13.000000000","message":"How about creating a new test_type_tunnel module, in it define these tests as private, then define two sets of tests: One for GRE, one for VXLAN, that will both use these tests below with a \u0027gre\u0027 or \u0027vxlan\u0027 parameter.","commit_id":"7fbd76bbed334ed3866b58144b23a2fc47f7690a"},{"author":{"_account_id":2592,"name":"Mark McClain","email":"mark@mcclain.xyz","username":"markmcclain"},"change_message_id":"762f1c24c5d6e674cc0117805d67d6f3cd7e3e88","unresolved":false,"context_lines":[{"line_number":68,"context_line":"        segment[api.PHYSICAL_NETWORK] \u003d None"},{"line_number":69,"context_line":"        with testtools.ExpectedException(exc.InvalidInput):"},{"line_number":70,"context_line":"            self.driver.validate_provider_segment(segment)"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"    def test_validate_provider_segmentation_id_missing_id(self):"},{"line_number":73,"context_line":"        segment \u003d {api.NETWORK_TYPE: \u0027vxlan\u0027,"},{"line_number":74,"context_line":"                   api.PHYSICAL_NETWORK: None,"}],"source_content_type":"text/x-python","patch_set":9,"id":"3ae8d1ca_e62c44ae","line":71,"in_reply_to":"3ae8d1ca_40ca5250","updated":"2014-05-28 08:39:02.000000000","message":"+1","commit_id":"7fbd76bbed334ed3866b58144b23a2fc47f7690a"},{"author":{"_account_id":8646,"name":"yangxurong","email":"yangxurong@huawei.com","username":"yangxurong"},"change_message_id":"869fc136ed901b3a877171287eb6dc0e58dd3190","unresolved":false,"context_lines":[{"line_number":68,"context_line":"        segment[api.PHYSICAL_NETWORK] \u003d None"},{"line_number":69,"context_line":"        with testtools.ExpectedException(exc.InvalidInput):"},{"line_number":70,"context_line":"            self.driver.validate_provider_segment(segment)"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"    def test_validate_provider_segmentation_id_missing_id(self):"},{"line_number":73,"context_line":"        segment \u003d {api.NETWORK_TYPE: \u0027vxlan\u0027,"},{"line_number":74,"context_line":"                   api.PHYSICAL_NETWORK: None,"}],"source_content_type":"text/x-python","patch_set":9,"id":"3ae8d1ca_703523f6","line":71,"in_reply_to":"3ae8d1ca_40ca5250","updated":"2014-05-29 04:04:29.000000000","message":"@Assaf Muller, @mark mcclain\t\nthanks your review, but i think a new test_type_tunnel module is no difference, i will add tests for GRE in module test_type_gre, ok?","commit_id":"7fbd76bbed334ed3866b58144b23a2fc47f7690a"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"77a7aba7b92163dffbfc235723f654b52bb23463","unresolved":false,"context_lines":[{"line_number":69,"context_line":"        with testtools.ExpectedException(exc.InvalidInput):"},{"line_number":70,"context_line":"            self.driver.validate_provider_segment(segment)"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"    def test_validate_provider_segmentation_id_missing_id(self):"},{"line_number":73,"context_line":"        segment \u003d {api.NETWORK_TYPE: \u0027vxlan\u0027,"},{"line_number":74,"context_line":"                   api.PHYSICAL_NETWORK: None,"},{"line_number":75,"context_line":"                   api.SEGMENTATION_ID: None}"}],"source_content_type":"text/x-python","patch_set":11,"id":"1ae5cdf2_be538315","line":72,"updated":"2014-06-05 11:35:57.000000000","message":"For completeness, test invalid tag.","commit_id":"f17016106c50e0e679c4391bf65a9cb0a57c0611"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"77a7aba7b92163dffbfc235723f654b52bb23463","unresolved":false,"context_lines":[{"line_number":76,"context_line":"        with testtools.ExpectedException(exc.InvalidInput):"},{"line_number":77,"context_line":"            self.driver.validate_provider_segment(segment)"},{"line_number":78,"context_line":""},{"line_number":79,"context_line":"    def test_validate_provider_segmentation_id_zero(self):"},{"line_number":80,"context_line":"        segment \u003d {api.NETWORK_TYPE: \u0027vxlan\u0027,"},{"line_number":81,"context_line":"                   api.PHYSICAL_NETWORK: None,"},{"line_number":82,"context_line":"                   api.SEGMENTATION_ID: constants.MIN_BASE_TAG - 1}"}],"source_content_type":"text/x-python","patch_set":11,"id":"1ae5cdf2_7b290d9a","line":79,"updated":"2014-06-05 11:35:57.000000000","message":"Maybe just call this test_validate_provider_segmentation_id_exceeding_min, so as not reflect a specific minimum (it\u0027ll probably never change, but nice to leave it generic).","commit_id":"f17016106c50e0e679c4391bf65a9cb0a57c0611"},{"author":{"_account_id":7987,"name":"Ivar Lazzaro","email":"ivarlazzaro@gmail.com","username":"Ivar"},"change_message_id":"6e77969639826c2075f1bbeefc5685caf7defd49","unresolved":false,"context_lines":[{"line_number":69,"context_line":"        with testtools.ExpectedException(exc.InvalidInput):"},{"line_number":70,"context_line":"            self.driver.validate_provider_segment(segment)"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"    def test_validate_provider_segmentation_id_missing_id(self):"},{"line_number":73,"context_line":"        segment \u003d {api.NETWORK_TYPE: \u0027vxlan\u0027,"},{"line_number":74,"context_line":"                   api.PHYSICAL_NETWORK: None,"},{"line_number":75,"context_line":"                   api.SEGMENTATION_ID: None}"}],"source_content_type":"text/x-python","patch_set":17,"id":"1ae5cdf2_e9621b3c","line":72,"updated":"2014-06-18 03:06:13.000000000","message":"Same goes for the tests... We may want to define a super test for tunnel types which contains all the common code. (but this may be out of the scope of this patch)","commit_id":"d6ac30652f7401fe4bbf39de71fecf458c7bcf18"}],"neutron/tests/unit/test_common_utils.py":[{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"3fc4a96577d39c8a4a65b38ed3d4f370367fce7a","unresolved":false,"context_lines":[{"line_number":64,"context_line":"        self.assertEqual(self.parse([\u0027\u0027]), {})"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":""},{"line_number":67,"context_line":"class UtilTestParseTunnelRanges(base.BaseTestCase):"},{"line_number":68,"context_line":"    _err_prefix \u003d \"Invalid network Tunnel range: \u0027\""},{"line_number":69,"context_line":"    _err_bad_tunnel \u003d \"\u0027 - \u0027%s is not a valid tunnel id\u0027\""},{"line_number":70,"context_line":"    _err_range \u003d \"\u0027 - \u0027End of tunnel range is less than start of tunnel range\u0027\""}],"source_content_type":"text/x-python","patch_set":22,"id":"1abeadc6_eed6f0c4","line":67,"updated":"2014-08-18 11:44:17.000000000","message":"Why do we 2 classes?","commit_id":"b56106cdf2cbe564f9034db04c3cad6448e1dfc9"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"0472f3ca718fb2cf3a077a5b373216a5abb037bf","unresolved":false,"context_lines":[{"line_number":64,"context_line":"        self.assertEqual(self.parse([\u0027\u0027]), {})"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":""},{"line_number":67,"context_line":"class UtilTestParseTunnelRanges(base.BaseTestCase):"},{"line_number":68,"context_line":"    _err_prefix \u003d \"Invalid network Tunnel range: \u0027\""},{"line_number":69,"context_line":"    _err_bad_tunnel \u003d \"\u0027 - \u0027%s is not a valid tunnel id\u0027\""},{"line_number":70,"context_line":"    _err_range \u003d \"\u0027 - \u0027End of tunnel range is less than start of tunnel range\u0027\""}],"source_content_type":"text/x-python","patch_set":22,"id":"1abeadc6_eb7ed5e3","line":67,"in_reply_to":"1abeadc6_774e2cc3","updated":"2014-08-18 15:31:49.000000000","message":"for vlan case, it\u0027s because 2 classes inherit from UtilTestParseVlanRanges","commit_id":"b56106cdf2cbe564f9034db04c3cad6448e1dfc9"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"66482e9bcb9f5c60e37caf4006b59c05809eb11d","unresolved":false,"context_lines":[{"line_number":64,"context_line":"        self.assertEqual(self.parse([\u0027\u0027]), {})"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":""},{"line_number":67,"context_line":"class UtilTestParseTunnelRanges(base.BaseTestCase):"},{"line_number":68,"context_line":"    _err_prefix \u003d \"Invalid network Tunnel range: \u0027\""},{"line_number":69,"context_line":"    _err_bad_tunnel \u003d \"\u0027 - \u0027%s is not a valid tunnel id\u0027\""},{"line_number":70,"context_line":"    _err_range \u003d \"\u0027 - \u0027End of tunnel range is less than start of tunnel range\u0027\""}],"source_content_type":"text/x-python","patch_set":22,"id":"1abeadc6_774e2cc3","line":67,"in_reply_to":"1abeadc6_eed6f0c4","updated":"2014-08-18 14:39:29.000000000","message":"Just to maintain the consistency I have used 2 classes.\nIf you could see for VLAN range validation we also have these \nclasses UtilTestParseVlanRanges(base.BaseTestCase):\nclass TestVlanRangeVerifyValid(UtilTestParseVlanRanges):","commit_id":"b56106cdf2cbe564f9034db04c3cad6448e1dfc9"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"b4592890d4b56d105503c9d079a1e804c0998f58","unresolved":false,"context_lines":[{"line_number":66,"context_line":""},{"line_number":67,"context_line":"class UtilTestParseTunnelRanges(base.BaseTestCase):"},{"line_number":68,"context_line":"    _err_prefix \u003d \"Invalid network Tunnel range: \u0027\""},{"line_number":69,"context_line":"    _err_bad_tunnel \u003d \"\u0027 - \u0027%s is not a valid tunnel id\u0027\""},{"line_number":70,"context_line":"    _err_range \u003d \"\u0027 - \u0027End of tunnel range is less than start of tunnel range\u0027\""},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"    def _trange_invalid_tunnel(self, t_range_tuple, n):"}],"source_content_type":"text/x-python","patch_set":22,"id":"1abeadc6_71ee41ee","line":69,"updated":"2014-08-18 11:56:11.000000000","message":"why the single quotes around the rest of the string (I see the leading quote is to enclose the tunnel range?\n\nwhy not have _err_prefix have the single quotes and range?\n    _err_prefix \u003d \"Invalid network tunnel range: \u0027%(lo)d:%(hi)d\u0027 - \"\n\nThen, _err_bad_tunnel and _err_range,c an just have the rest of the message.","commit_id":"b56106cdf2cbe564f9034db04c3cad6448e1dfc9"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"66482e9bcb9f5c60e37caf4006b59c05809eb11d","unresolved":false,"context_lines":[{"line_number":66,"context_line":""},{"line_number":67,"context_line":"class UtilTestParseTunnelRanges(base.BaseTestCase):"},{"line_number":68,"context_line":"    _err_prefix \u003d \"Invalid network Tunnel range: \u0027\""},{"line_number":69,"context_line":"    _err_bad_tunnel \u003d \"\u0027 - \u0027%s is not a valid tunnel id\u0027\""},{"line_number":70,"context_line":"    _err_range \u003d \"\u0027 - \u0027End of tunnel range is less than start of tunnel range\u0027\""},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"    def _trange_invalid_tunnel(self, t_range_tuple, n):"}],"source_content_type":"text/x-python","patch_set":22,"id":"1abeadc6_f7febc6a","line":69,"in_reply_to":"1abeadc6_71ee41ee","updated":"2014-08-18 14:39:29.000000000","message":"Actually, I have taken the VLAN range test cases as reference.\n\nclass UtilTestParseVlanRanges(base.BaseTestCase):\n    _err_prefix \u003d \"Invalid network VLAN range: \u0027\"\n    _err_too_few \u003d \"\u0027 - \u0027need more than 2 values to unpack\u0027\"\n    _err_too_many \u003d \"\u0027 - \u0027too many values to unpack\u0027\"\n    _err_not_int \u003d \"\u0027 - \u0027invalid literal for int() with base 10: \u0027%s\u0027\u0027\"\n    _err_bad_vlan \u003d \"\u0027 - \u0027%s is not a valid VLAN tag\u0027\"\n    _err_range \u003d \"\u0027 - \u0027End of VLAN range is less than start of VLAN range\u0027\"\n\nI will change it based on your suggestion.","commit_id":"b56106cdf2cbe564f9034db04c3cad6448e1dfc9"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"3fc4a96577d39c8a4a65b38ed3d4f370367fce7a","unresolved":false,"context_lines":[{"line_number":69,"context_line":"    _err_bad_tunnel \u003d \"\u0027 - \u0027%s is not a valid tunnel id\u0027\""},{"line_number":70,"context_line":"    _err_range \u003d \"\u0027 - \u0027End of tunnel range is less than start of tunnel range\u0027\""},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"    def _trange_invalid_tunnel(self, t_range_tuple, n):"},{"line_number":73,"context_line":"        tunnel_id \u003d t_range_tuple[n - 1]"},{"line_number":74,"context_line":"        t_range_str \u003d \u0027%d:%d\u0027 % t_range_tuple"},{"line_number":75,"context_line":"        return self._err_prefix + t_range_str + (self._err_bad_tunnel"}],"source_content_type":"text/x-python","patch_set":22,"id":"1abeadc6_eeed108d","line":72,"updated":"2014-08-18 11:44:17.000000000","message":"use meaningful method names","commit_id":"b56106cdf2cbe564f9034db04c3cad6448e1dfc9"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"66482e9bcb9f5c60e37caf4006b59c05809eb11d","unresolved":false,"context_lines":[{"line_number":69,"context_line":"    _err_bad_tunnel \u003d \"\u0027 - \u0027%s is not a valid tunnel id\u0027\""},{"line_number":70,"context_line":"    _err_range \u003d \"\u0027 - \u0027End of tunnel range is less than start of tunnel range\u0027\""},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"    def _trange_invalid_tunnel(self, t_range_tuple, n):"},{"line_number":73,"context_line":"        tunnel_id \u003d t_range_tuple[n - 1]"},{"line_number":74,"context_line":"        t_range_str \u003d \u0027%d:%d\u0027 % t_range_tuple"},{"line_number":75,"context_line":"        return self._err_prefix + t_range_str + (self._err_bad_tunnel"}],"source_content_type":"text/x-python","patch_set":22,"id":"1abeadc6_22239906","line":72,"in_reply_to":"1abeadc6_eeed108d","updated":"2014-08-18 14:39:29.000000000","message":"Done","commit_id":"b56106cdf2cbe564f9034db04c3cad6448e1dfc9"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"20aee3a5b5906ea94a91adbc74733d99f1c0954d","unresolved":false,"context_lines":[{"line_number":85,"context_line":"        return plugin_utils.verify_tunnel_range(tunnel_range)"},{"line_number":86,"context_line":""},{"line_number":87,"context_line":"    def test_range_valid_ranges(self):"},{"line_number":88,"context_line":"        self.assertIsNone(self.verify_range((1, 16777215)))"},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"    def check_one_tunnel_id_invalid(self, bad_range, which):"},{"line_number":91,"context_line":"        expected_msg \u003d self._trange_invalid_tunnel(bad_range, which)"}],"source_content_type":"text/x-python","patch_set":22,"id":"1abeadc6_b17e19e3","line":88,"updated":"2014-08-18 12:02:15.000000000","message":"This range is correct for VXLAN VNI, but it is not true for GRE Key field (it is 32 bit field). Please take into account GRE key field range. IMO we need separate tests for VXLAN and GRE.","commit_id":"b56106cdf2cbe564f9034db04c3cad6448e1dfc9"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"66482e9bcb9f5c60e37caf4006b59c05809eb11d","unresolved":false,"context_lines":[{"line_number":85,"context_line":"        return plugin_utils.verify_tunnel_range(tunnel_range)"},{"line_number":86,"context_line":""},{"line_number":87,"context_line":"    def test_range_valid_ranges(self):"},{"line_number":88,"context_line":"        self.assertIsNone(self.verify_range((1, 16777215)))"},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"    def check_one_tunnel_id_invalid(self, bad_range, which):"},{"line_number":91,"context_line":"        expected_msg \u003d self._trange_invalid_tunnel(bad_range, which)"}],"source_content_type":"text/x-python","patch_set":22,"id":"1abeadc6_023f7d26","line":88,"in_reply_to":"1abeadc6_b17e19e3","updated":"2014-08-18 14:39:29.000000000","message":"Will do it.","commit_id":"b56106cdf2cbe564f9034db04c3cad6448e1dfc9"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"3fc4a96577d39c8a4a65b38ed3d4f370367fce7a","unresolved":false,"context_lines":[{"line_number":91,"context_line":"        expected_msg \u003d self._trange_invalid_tunnel(bad_range, which)"},{"line_number":92,"context_line":"        err \u003d self.assertRaises(n_exc.NetworkTunnelRangeError,"},{"line_number":93,"context_line":"                                self.verify_range, bad_range)"},{"line_number":94,"context_line":"        self.assertEqual(str(err), expected_msg)"},{"line_number":95,"context_line":""},{"line_number":96,"context_line":"    def test_range_first_tunel_id_invalid_negative(self):"},{"line_number":97,"context_line":"        self.check_one_tunnel_id_invalid((-1, 1000), 1)"}],"source_content_type":"text/x-python","patch_set":22,"id":"1abeadc6_ae4f9891","line":94,"updated":"2014-08-18 11:44:17.000000000","message":"Same remarl on argument order","commit_id":"b56106cdf2cbe564f9034db04c3cad6448e1dfc9"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"66482e9bcb9f5c60e37caf4006b59c05809eb11d","unresolved":false,"context_lines":[{"line_number":91,"context_line":"        expected_msg \u003d self._trange_invalid_tunnel(bad_range, which)"},{"line_number":92,"context_line":"        err \u003d self.assertRaises(n_exc.NetworkTunnelRangeError,"},{"line_number":93,"context_line":"                                self.verify_range, bad_range)"},{"line_number":94,"context_line":"        self.assertEqual(str(err), expected_msg)"},{"line_number":95,"context_line":""},{"line_number":96,"context_line":"    def test_range_first_tunel_id_invalid_negative(self):"},{"line_number":97,"context_line":"        self.check_one_tunnel_id_invalid((-1, 1000), 1)"}],"source_content_type":"text/x-python","patch_set":22,"id":"1abeadc6_223c792f","line":94,"in_reply_to":"1abeadc6_ae4f9891","updated":"2014-08-18 14:39:29.000000000","message":"Done","commit_id":"b56106cdf2cbe564f9034db04c3cad6448e1dfc9"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"3fc4a96577d39c8a4a65b38ed3d4f370367fce7a","unresolved":false,"context_lines":[{"line_number":100,"context_line":"        self.check_one_tunnel_id_invalid((0, 1000), 1)"},{"line_number":101,"context_line":""},{"line_number":102,"context_line":"    def test_range_first_tunnel_id_invalid_limit_plus_one(self):"},{"line_number":103,"context_line":"        self.check_one_tunnel_id_invalid((16777216, 1000), 1)"},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"    def test_range_first_tunnel_id_invalid_too_big(self):"},{"line_number":106,"context_line":"        self.check_one_tunnel_id_invalid((17777216, 1000), 1)"}],"source_content_type":"text/x-python","patch_set":22,"id":"1abeadc6_ee17d04f","line":103,"updated":"2014-08-18 11:44:17.000000000","message":"Do we need so many tests?\n\nI would prefer you use MIN_TUNNEL_ID (-1), MAX_TUNNEL_ID (+1)","commit_id":"b56106cdf2cbe564f9034db04c3cad6448e1dfc9"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"b4592890d4b56d105503c9d079a1e804c0998f58","unresolved":false,"context_lines":[{"line_number":100,"context_line":"        self.check_one_tunnel_id_invalid((0, 1000), 1)"},{"line_number":101,"context_line":""},{"line_number":102,"context_line":"    def test_range_first_tunnel_id_invalid_limit_plus_one(self):"},{"line_number":103,"context_line":"        self.check_one_tunnel_id_invalid((16777216, 1000), 1)"},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"    def test_range_first_tunnel_id_invalid_too_big(self):"},{"line_number":106,"context_line":"        self.check_one_tunnel_id_invalid((17777216, 1000), 1)"}],"source_content_type":"text/x-python","patch_set":22,"id":"1abeadc6_51adc587","line":103,"in_reply_to":"1abeadc6_ee17d04f","updated":"2014-08-18 11:56:11.000000000","message":"+1","commit_id":"b56106cdf2cbe564f9034db04c3cad6448e1dfc9"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"66482e9bcb9f5c60e37caf4006b59c05809eb11d","unresolved":false,"context_lines":[{"line_number":100,"context_line":"        self.check_one_tunnel_id_invalid((0, 1000), 1)"},{"line_number":101,"context_line":""},{"line_number":102,"context_line":"    def test_range_first_tunnel_id_invalid_limit_plus_one(self):"},{"line_number":103,"context_line":"        self.check_one_tunnel_id_invalid((16777216, 1000), 1)"},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"    def test_range_first_tunnel_id_invalid_too_big(self):"},{"line_number":106,"context_line":"        self.check_one_tunnel_id_invalid((17777216, 1000), 1)"}],"source_content_type":"text/x-python","patch_set":22,"id":"1abeadc6_a2308957","line":103,"in_reply_to":"1abeadc6_ee17d04f","updated":"2014-08-18 14:39:29.000000000","message":"I have tried to test all possible invalid values for tunnel_id.\nBTW  same kind of tests are already there in a same file for VLAN.\n\nI will try to reduce it.","commit_id":"b56106cdf2cbe564f9034db04c3cad6448e1dfc9"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"3fc4a96577d39c8a4a65b38ed3d4f370367fce7a","unresolved":false,"context_lines":[{"line_number":128,"context_line":"        expected_msg \u003d self._trange_invalid(bad_range)"},{"line_number":129,"context_line":"        err \u003d self.assertRaises(n_exc.NetworkTunnelRangeError,"},{"line_number":130,"context_line":"                                self.verify_range, bad_range)"},{"line_number":131,"context_line":"        self.assertEqual(str(err), expected_msg)"},{"line_number":132,"context_line":""},{"line_number":133,"context_line":""},{"line_number":134,"context_line":"class UtilTestParseVlanRanges(base.BaseTestCase):"}],"source_content_type":"text/x-python","patch_set":22,"id":"1abeadc6_eebb5070","line":131,"updated":"2014-08-18 11:44:17.000000000","message":"You should respect the following argument order:\n\n self.assertEqual(expected, observed)","commit_id":"b56106cdf2cbe564f9034db04c3cad6448e1dfc9"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"66482e9bcb9f5c60e37caf4006b59c05809eb11d","unresolved":false,"context_lines":[{"line_number":128,"context_line":"        expected_msg \u003d self._trange_invalid(bad_range)"},{"line_number":129,"context_line":"        err \u003d self.assertRaises(n_exc.NetworkTunnelRangeError,"},{"line_number":130,"context_line":"                                self.verify_range, bad_range)"},{"line_number":131,"context_line":"        self.assertEqual(str(err), expected_msg)"},{"line_number":132,"context_line":""},{"line_number":133,"context_line":""},{"line_number":134,"context_line":"class UtilTestParseVlanRanges(base.BaseTestCase):"}],"source_content_type":"text/x-python","patch_set":22,"id":"1abeadc6_42db351b","line":131,"in_reply_to":"1abeadc6_eebb5070","updated":"2014-08-18 14:39:29.000000000","message":"Sure, I will do it.","commit_id":"b56106cdf2cbe564f9034db04c3cad6448e1dfc9"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"6fcfd3eb7239536f1e2ff373055acf247ccd3c10","unresolved":false,"context_lines":[{"line_number":66,"context_line":"        self.assertEqual(self.parse([\u0027\u0027]), {})"},{"line_number":67,"context_line":""},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"class UtilTestParseTunnelRanges(base.BaseTestCase):"},{"line_number":70,"context_line":"    _err_prefix \u003d \"Invalid network Tunnel range: \u0027%d:%d\u0027 - \""},{"line_number":71,"context_line":"    _err_bad_gre_tunnel \u003d \"\u0027 %s is not a valid gre tunnel id\u0027\""},{"line_number":72,"context_line":"    _err_bad_vxlan_tunnel \u003d \"\u0027 %s is not a valid vxlan vni\u0027\""}],"source_content_type":"text/x-python","patch_set":25,"id":"1abeadc6_e473df4b","line":69,"updated":"2014-08-21 12:55:45.000000000","message":"You can do two things here. One, make the error messages generic (or allow a member variable to specify the type. For example, use self.tunnel_type in the messages.\n\nSecond, you can put the test cases from the child classes in this class (one copy with a generic name), and then the GRE and VXLAN subclasses can specify the limits and the tunnel type and no longer have to contain duplicated test methods themselves.","commit_id":"de27f50e64e53f8f424e24add363fcad103ea9b5"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"5b925524312ba34024be477df36f330f85dbea6d","unresolved":false,"context_lines":[{"line_number":66,"context_line":"        self.assertEqual(self.parse([\u0027\u0027]), {})"},{"line_number":67,"context_line":""},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"class UtilTestParseTunnelRanges(base.BaseTestCase):"},{"line_number":70,"context_line":"    _err_prefix \u003d \"Invalid network Tunnel range: \u0027%d:%d\u0027 - \""},{"line_number":71,"context_line":"    _err_bad_gre_tunnel \u003d \"\u0027 %s is not a valid gre tunnel id\u0027\""},{"line_number":72,"context_line":"    _err_bad_vxlan_tunnel \u003d \"\u0027 %s is not a valid vxlan vni\u0027\""}],"source_content_type":"text/x-python","patch_set":25,"id":"1abeadc6_3a896c75","line":69,"in_reply_to":"1abeadc6_e473df4b","updated":"2014-08-21 14:50:39.000000000","message":"I really appreciate your suggestions:\nFor One,\n_err_bad_gre_tunnel \u003d \"\u0027 %s is not a valid gre tunnel id\u0027\"\n _err_bad_vxlan_tunnel \u003d \"\u0027 %s is not a valid vxlan vni\u0027\"\n\nDo you mean I should make it:\n\n_err_bad_tunnel \u003d  \"\u0027 %s is not a valid %s\u0027\"\nwhere second %s would be self.tunnel_type?\nBut still I have to append \u0027tunnel_id\u0027 and \u0027vni\u0027 that looks odd to make the assert equal.\n\nFor Second,\nDo you mean I have to do it like the way I have done for _verify_range() method ? \n\nCould you please share some example with generic methods name, it would be a great help.","commit_id":"de27f50e64e53f8f424e24add363fcad103ea9b5"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"6fcfd3eb7239536f1e2ff373055acf247ccd3c10","unresolved":false,"context_lines":[{"line_number":68,"context_line":""},{"line_number":69,"context_line":"class UtilTestParseTunnelRanges(base.BaseTestCase):"},{"line_number":70,"context_line":"    _err_prefix \u003d \"Invalid network Tunnel range: \u0027%d:%d\u0027 - \""},{"line_number":71,"context_line":"    _err_bad_gre_tunnel \u003d \"\u0027 %s is not a valid gre tunnel id\u0027\""},{"line_number":72,"context_line":"    _err_bad_vxlan_tunnel \u003d \"\u0027 %s is not a valid vxlan vni\u0027\""},{"line_number":73,"context_line":"    _err_range \u003d \"\u0027End of tunnel range is less than start of tunnel range\u0027\""},{"line_number":74,"context_line":""}],"source_content_type":"text/x-python","patch_set":25,"id":"1abeadc6_84a86bdc","line":71,"updated":"2014-08-21 12:55:45.000000000","message":"I still don\u0027t understand why there are single quotes on this and the next two variables. Won\u0027t it produce:\n\n    Invalid network Tunnel range: \u0027100:200\u0027 - \u0027 150 is not a valid gre tunnel id\u0027\n\nSeems like they are unneeded as is the leading space on this and the next variable.","commit_id":"de27f50e64e53f8f424e24add363fcad103ea9b5"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"5b925524312ba34024be477df36f330f85dbea6d","unresolved":false,"context_lines":[{"line_number":68,"context_line":""},{"line_number":69,"context_line":"class UtilTestParseTunnelRanges(base.BaseTestCase):"},{"line_number":70,"context_line":"    _err_prefix \u003d \"Invalid network Tunnel range: \u0027%d:%d\u0027 - \""},{"line_number":71,"context_line":"    _err_bad_gre_tunnel \u003d \"\u0027 %s is not a valid gre tunnel id\u0027\""},{"line_number":72,"context_line":"    _err_bad_vxlan_tunnel \u003d \"\u0027 %s is not a valid vxlan vni\u0027\""},{"line_number":73,"context_line":"    _err_range \u003d \"\u0027End of tunnel range is less than start of tunnel range\u0027\""},{"line_number":74,"context_line":""}],"source_content_type":"text/x-python","patch_set":25,"id":"1abeadc6_7a5a042b","line":71,"in_reply_to":"1abeadc6_84a86bdc","updated":"2014-08-21 14:50:39.000000000","message":"It is required for self.assertEqual(expected_msg, str(err)).\nIf I remove single quotes assertEqual fails.\n\nYou could see in the following function I have used single quotes around error msg.\n\nclass NetworkTunnelRangeError(NeutronException):\n\tmessage \u003d _(\"Invalid network Tunnel range: \"\n                \"\u0027%(tunnel_range)s\u0027 - \u0027%(error)s\u0027 \")\n\nSo str(err) is coming with single quote.\n\nI hope this is fine for you.","commit_id":"de27f50e64e53f8f424e24add363fcad103ea9b5"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"6fcfd3eb7239536f1e2ff373055acf247ccd3c10","unresolved":false,"context_lines":[{"line_number":105,"context_line":"        self.assertEqual(expected_msg, str(err))"},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"    def test_range_first_tunel_id_invalid_negative(self):"},{"line_number":108,"context_line":"        self.check_one_tunnel_id_invalid((-abs(self._tun_min),"},{"line_number":109,"context_line":"                                        self._tun_max), 1)"},{"line_number":110,"context_line":""},{"line_number":111,"context_line":"    def test_range_first_tunnel_id_invalid_zero(self):"}],"source_content_type":"text/x-python","patch_set":25,"id":"1abeadc6_44d7334b","line":108,"updated":"2014-08-21 12:55:45.000000000","message":"Can just test right at boundary, min - 1 vs -abs()","commit_id":"de27f50e64e53f8f424e24add363fcad103ea9b5"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"5b925524312ba34024be477df36f330f85dbea6d","unresolved":false,"context_lines":[{"line_number":105,"context_line":"        self.assertEqual(expected_msg, str(err))"},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"    def test_range_first_tunel_id_invalid_negative(self):"},{"line_number":108,"context_line":"        self.check_one_tunnel_id_invalid((-abs(self._tun_min),"},{"line_number":109,"context_line":"                                        self._tun_max), 1)"},{"line_number":110,"context_line":""},{"line_number":111,"context_line":"    def test_range_first_tunnel_id_invalid_zero(self):"}],"source_content_type":"text/x-python","patch_set":25,"id":"1abeadc6_5f39baf0","line":108,"in_reply_to":"1abeadc6_44d7334b","updated":"2014-08-21 14:50:39.000000000","message":"Done","commit_id":"de27f50e64e53f8f424e24add363fcad103ea9b5"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"6fcfd3eb7239536f1e2ff373055acf247ccd3c10","unresolved":false,"context_lines":[{"line_number":109,"context_line":"                                        self._tun_max), 1)"},{"line_number":110,"context_line":""},{"line_number":111,"context_line":"    def test_range_first_tunnel_id_invalid_zero(self):"},{"line_number":112,"context_line":"        self.check_one_tunnel_id_invalid((0, self._tun_max), 1)"},{"line_number":113,"context_line":""},{"line_number":114,"context_line":"    def test_range_second_tunnel_id_invalid_limit_plus_one(self):"},{"line_number":115,"context_line":"        self.check_one_tunnel_id_invalid((self._tun_min,"}],"source_content_type":"text/x-python","patch_set":25,"id":"1abeadc6_8444eb1b","line":112,"updated":"2014-08-21 12:55:45.000000000","message":"This will be covered by previous test.","commit_id":"de27f50e64e53f8f424e24add363fcad103ea9b5"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"5b925524312ba34024be477df36f330f85dbea6d","unresolved":false,"context_lines":[{"line_number":109,"context_line":"                                        self._tun_max), 1)"},{"line_number":110,"context_line":""},{"line_number":111,"context_line":"    def test_range_first_tunnel_id_invalid_zero(self):"},{"line_number":112,"context_line":"        self.check_one_tunnel_id_invalid((0, self._tun_max), 1)"},{"line_number":113,"context_line":""},{"line_number":114,"context_line":"    def test_range_second_tunnel_id_invalid_limit_plus_one(self):"},{"line_number":115,"context_line":"        self.check_one_tunnel_id_invalid((self._tun_min,"}],"source_content_type":"text/x-python","patch_set":25,"id":"1abeadc6_7f3e76db","line":112,"in_reply_to":"1abeadc6_8444eb1b","updated":"2014-08-21 14:50:39.000000000","message":"Done","commit_id":"de27f50e64e53f8f424e24add363fcad103ea9b5"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"4664a049ae51bc737836af5b25264ece8f768cf5","unresolved":false,"context_lines":[{"line_number":68,"context_line":""},{"line_number":69,"context_line":"class UtilTestParseTunnelRanges(base.BaseTestCase):"},{"line_number":70,"context_line":"    _err_prefix \u003d \"Invalid network Tunnel range: \u0027%d:%d\u0027 - \""},{"line_number":71,"context_line":"    _err_bad_gre_tunnel \u003d \"\u0027 %s is not a valid gre tunnel id\u0027\""},{"line_number":72,"context_line":"    _err_bad_vxlan_tunnel \u003d \"\u0027 %s is not a valid vxlan vni\u0027\""},{"line_number":73,"context_line":"    _err_range \u003d \"\u0027End of tunnel range is less than start of tunnel range\u0027\""},{"line_number":74,"context_line":"    _type_gre \u003d p_const.TYPE_GRE"}],"source_content_type":"text/x-python","patch_set":26,"id":"1abeadc6_f1088493","line":71,"updated":"2014-08-25 21:10:33.000000000","message":"Got your response in version 8. So the actual message is a bit awkward. The single quote around %(error)s was not needed. You could consider fixing that here or under a separate change.","commit_id":"3f9bde233a0a2ddea0b17aebd169f58f739f2c5a"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"e2625bc3c4f5d2979c39fa90309c6acdd8af5dfc","unresolved":false,"context_lines":[{"line_number":68,"context_line":""},{"line_number":69,"context_line":"class UtilTestParseTunnelRanges(base.BaseTestCase):"},{"line_number":70,"context_line":"    _err_prefix \u003d \"Invalid network Tunnel range: \u0027%d:%d\u0027 - \""},{"line_number":71,"context_line":"    _err_bad_gre_tunnel \u003d \"\u0027 %s is not a valid gre tunnel id\u0027\""},{"line_number":72,"context_line":"    _err_bad_vxlan_tunnel \u003d \"\u0027 %s is not a valid vxlan vni\u0027\""},{"line_number":73,"context_line":"    _err_range \u003d \"\u0027End of tunnel range is less than start of tunnel range\u0027\""},{"line_number":74,"context_line":"    _type_gre \u003d p_const.TYPE_GRE"}],"source_content_type":"text/x-python","patch_set":26,"id":"1abeadc6_2a6c279c","line":71,"in_reply_to":"1abeadc6_f1088493","updated":"2014-08-26 15:59:43.000000000","message":"Done","commit_id":"3f9bde233a0a2ddea0b17aebd169f58f739f2c5a"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"4664a049ae51bc737836af5b25264ece8f768cf5","unresolved":false,"context_lines":[{"line_number":69,"context_line":"class UtilTestParseTunnelRanges(base.BaseTestCase):"},{"line_number":70,"context_line":"    _err_prefix \u003d \"Invalid network Tunnel range: \u0027%d:%d\u0027 - \""},{"line_number":71,"context_line":"    _err_bad_gre_tunnel \u003d \"\u0027 %s is not a valid gre tunnel id\u0027\""},{"line_number":72,"context_line":"    _err_bad_vxlan_tunnel \u003d \"\u0027 %s is not a valid vxlan vni\u0027\""},{"line_number":73,"context_line":"    _err_range \u003d \"\u0027End of tunnel range is less than start of tunnel range\u0027\""},{"line_number":74,"context_line":"    _type_gre \u003d p_const.TYPE_GRE"},{"line_number":75,"context_line":"    _type_vxlan \u003d p_const.TYPE_VXLAN"}],"source_content_type":"text/x-python","patch_set":26,"id":"1abeadc6_b1452cb5","line":72,"updated":"2014-08-25 21:10:33.000000000","message":"You could parameterize the tunnel type portion of the string and define in the child classes, or put the whole error message suffix in the child classes as a member and then refer to them (e.g. self.error_suffix)","commit_id":"3f9bde233a0a2ddea0b17aebd169f58f739f2c5a"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"e2625bc3c4f5d2979c39fa90309c6acdd8af5dfc","unresolved":false,"context_lines":[{"line_number":69,"context_line":"class UtilTestParseTunnelRanges(base.BaseTestCase):"},{"line_number":70,"context_line":"    _err_prefix \u003d \"Invalid network Tunnel range: \u0027%d:%d\u0027 - \""},{"line_number":71,"context_line":"    _err_bad_gre_tunnel \u003d \"\u0027 %s is not a valid gre tunnel id\u0027\""},{"line_number":72,"context_line":"    _err_bad_vxlan_tunnel \u003d \"\u0027 %s is not a valid vxlan vni\u0027\""},{"line_number":73,"context_line":"    _err_range \u003d \"\u0027End of tunnel range is less than start of tunnel range\u0027\""},{"line_number":74,"context_line":"    _type_gre \u003d p_const.TYPE_GRE"},{"line_number":75,"context_line":"    _type_vxlan \u003d p_const.TYPE_VXLAN"}],"source_content_type":"text/x-python","patch_set":26,"id":"1abeadc6_fd12f256","line":72,"in_reply_to":"1abeadc6_b1452cb5","updated":"2014-08-26 15:59:43.000000000","message":"Done","commit_id":"3f9bde233a0a2ddea0b17aebd169f58f739f2c5a"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"4664a049ae51bc737836af5b25264ece8f768cf5","unresolved":false,"context_lines":[{"line_number":71,"context_line":"    _err_bad_gre_tunnel \u003d \"\u0027 %s is not a valid gre tunnel id\u0027\""},{"line_number":72,"context_line":"    _err_bad_vxlan_tunnel \u003d \"\u0027 %s is not a valid vxlan vni\u0027\""},{"line_number":73,"context_line":"    _err_range \u003d \"\u0027End of tunnel range is less than start of tunnel range\u0027\""},{"line_number":74,"context_line":"    _type_gre \u003d p_const.TYPE_GRE"},{"line_number":75,"context_line":"    _type_vxlan \u003d p_const.TYPE_VXLAN"},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"    def _range_invalid_gre_tunnel(self, t_range_tuple, n):"}],"source_content_type":"text/x-python","patch_set":26,"id":"1abeadc6_31111cad","line":74,"updated":"2014-08-25 21:10:33.000000000","message":"These two could be defined in the child classes, as say, self.tunnel_type.","commit_id":"3f9bde233a0a2ddea0b17aebd169f58f739f2c5a"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"e2625bc3c4f5d2979c39fa90309c6acdd8af5dfc","unresolved":false,"context_lines":[{"line_number":71,"context_line":"    _err_bad_gre_tunnel \u003d \"\u0027 %s is not a valid gre tunnel id\u0027\""},{"line_number":72,"context_line":"    _err_bad_vxlan_tunnel \u003d \"\u0027 %s is not a valid vxlan vni\u0027\""},{"line_number":73,"context_line":"    _err_range \u003d \"\u0027End of tunnel range is less than start of tunnel range\u0027\""},{"line_number":74,"context_line":"    _type_gre \u003d p_const.TYPE_GRE"},{"line_number":75,"context_line":"    _type_vxlan \u003d p_const.TYPE_VXLAN"},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"    def _range_invalid_gre_tunnel(self, t_range_tuple, n):"}],"source_content_type":"text/x-python","patch_set":26,"id":"1abeadc6_dd0c563e","line":74,"in_reply_to":"1abeadc6_31111cad","updated":"2014-08-26 15:59:43.000000000","message":"Done","commit_id":"3f9bde233a0a2ddea0b17aebd169f58f739f2c5a"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"4664a049ae51bc737836af5b25264ece8f768cf5","unresolved":false,"context_lines":[{"line_number":90,"context_line":"    def _verify_range(self, tunnel_range, tunnel_type):"},{"line_number":91,"context_line":"        return plugin_utils.verify_tunnel_range(tunnel_range, tunnel_type)"},{"line_number":92,"context_line":""},{"line_number":93,"context_line":"    def _check_range_valid_ranges(self, tunnel_range, tunnel_type):"},{"line_number":94,"context_line":"        self.assertIsNone(self._verify_range(tunnel_range, tunnel_type))"},{"line_number":95,"context_line":""},{"line_number":96,"context_line":"    def _check_range_invalid_ranges(self, bad_range, tunnel_type, which):"}],"source_content_type":"text/x-python","patch_set":26,"id":"1abeadc6_f1cb241c","line":93,"updated":"2014-08-25 21:10:33.000000000","message":"tunnel_type can be eliminated in the calls, and just reference self.tunnel_type. You can then eliminate the conditional logic.","commit_id":"3f9bde233a0a2ddea0b17aebd169f58f739f2c5a"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"e2625bc3c4f5d2979c39fa90309c6acdd8af5dfc","unresolved":false,"context_lines":[{"line_number":90,"context_line":"    def _verify_range(self, tunnel_range, tunnel_type):"},{"line_number":91,"context_line":"        return plugin_utils.verify_tunnel_range(tunnel_range, tunnel_type)"},{"line_number":92,"context_line":""},{"line_number":93,"context_line":"    def _check_range_valid_ranges(self, tunnel_range, tunnel_type):"},{"line_number":94,"context_line":"        self.assertIsNone(self._verify_range(tunnel_range, tunnel_type))"},{"line_number":95,"context_line":""},{"line_number":96,"context_line":"    def _check_range_invalid_ranges(self, bad_range, tunnel_type, which):"}],"source_content_type":"text/x-python","patch_set":26,"id":"1abeadc6_3d1d4a67","line":93,"in_reply_to":"1abeadc6_f1cb241c","updated":"2014-08-26 15:59:43.000000000","message":"Done","commit_id":"3f9bde233a0a2ddea0b17aebd169f58f739f2c5a"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"4664a049ae51bc737836af5b25264ece8f768cf5","unresolved":false,"context_lines":[{"line_number":93,"context_line":"    def _check_range_valid_ranges(self, tunnel_range, tunnel_type):"},{"line_number":94,"context_line":"        self.assertIsNone(self._verify_range(tunnel_range, tunnel_type))"},{"line_number":95,"context_line":""},{"line_number":96,"context_line":"    def _check_range_invalid_ranges(self, bad_range, tunnel_type, which):"},{"line_number":97,"context_line":"        if tunnel_type is self._type_gre:"},{"line_number":98,"context_line":"            expected_msg \u003d self._range_invalid_gre_tunnel(bad_range, which)"},{"line_number":99,"context_line":"            err \u003d self.assertRaises(n_exc.NetworkTunnelRangeError,"}],"source_content_type":"text/x-python","patch_set":26,"id":"1abeadc6_cc73efb2","line":96,"updated":"2014-08-25 21:10:33.000000000","message":"So, this could be\n    expected_msg \u003d self._build_invalid_tunnel_range_msg(bad_range, which)\n    err \u003d self.assertRaises(n_exc.NetworkTunnelRangeError,\n                            self._verify_range, bad_range, self.tunnel_type)\n    self.assertEqual(expected_msg, err)\n\nwhere _build_invalid_tunnel_range_msg() could use self.error_suffix to form the tail end of the message, based on the child class.","commit_id":"3f9bde233a0a2ddea0b17aebd169f58f739f2c5a"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"e2625bc3c4f5d2979c39fa90309c6acdd8af5dfc","unresolved":false,"context_lines":[{"line_number":93,"context_line":"    def _check_range_valid_ranges(self, tunnel_range, tunnel_type):"},{"line_number":94,"context_line":"        self.assertIsNone(self._verify_range(tunnel_range, tunnel_type))"},{"line_number":95,"context_line":""},{"line_number":96,"context_line":"    def _check_range_invalid_ranges(self, bad_range, tunnel_type, which):"},{"line_number":97,"context_line":"        if tunnel_type is self._type_gre:"},{"line_number":98,"context_line":"            expected_msg \u003d self._range_invalid_gre_tunnel(bad_range, which)"},{"line_number":99,"context_line":"            err \u003d self.assertRaises(n_exc.NetworkTunnelRangeError,"}],"source_content_type":"text/x-python","patch_set":26,"id":"1abeadc6_7d26e2bb","line":96,"in_reply_to":"1abeadc6_cc73efb2","updated":"2014-08-26 15:59:43.000000000","message":"Done","commit_id":"3f9bde233a0a2ddea0b17aebd169f58f739f2c5a"},{"author":{"_account_id":6876,"name":"stephen-ma","email":"stephenbma43@gmail.com","username":"stephen-ma"},"change_message_id":"aa3cbc464ef62966aecb79d830008e32b1068e55","unresolved":false,"context_lines":[{"line_number":73,"context_line":""},{"line_number":74,"context_line":"    def _build_invalid_tunnel_range_msg(self, t_range_tuple, n):"},{"line_number":75,"context_line":"        bad_id \u003d t_range_tuple[n - 1]"},{"line_number":76,"context_line":"        return (self._err_prefix % t_range_tuple) + (self._err_suffix"},{"line_number":77,"context_line":"                                                 % bad_id)"},{"line_number":78,"context_line":""},{"line_number":79,"context_line":"    def _build_range_reversed_msg(self, t_range_tuple):"}],"source_content_type":"text/x-python","patch_set":27,"id":"1abeadc6_a76ce037","line":76,"updated":"2014-08-26 21:17:58.000000000","message":"Need to have _err_suffix declared at L73 because err_prefix is declared at L71.","commit_id":"d0071fa1ffb9c337131ac08c3f41a40e6f4fb0b2"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"88f0d67af2b16a3c3e701b8b17a3f266e5348276","unresolved":false,"context_lines":[{"line_number":73,"context_line":""},{"line_number":74,"context_line":"    def _build_invalid_tunnel_range_msg(self, t_range_tuple, n):"},{"line_number":75,"context_line":"        bad_id \u003d t_range_tuple[n - 1]"},{"line_number":76,"context_line":"        return (self._err_prefix % t_range_tuple) + (self._err_suffix"},{"line_number":77,"context_line":"                                                 % bad_id)"},{"line_number":78,"context_line":""},{"line_number":79,"context_line":"    def _build_range_reversed_msg(self, t_range_tuple):"}],"source_content_type":"text/x-python","patch_set":27,"id":"1abeadc6_570c7e42","line":76,"in_reply_to":"1abeadc6_a76ce037","updated":"2014-08-27 12:14:31.000000000","message":"No, this is OK. The subclasses, which uses this method, will define the _err_suffix.","commit_id":"d0071fa1ffb9c337131ac08c3f41a40e6f4fb0b2"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"88f0d67af2b16a3c3e701b8b17a3f266e5348276","unresolved":false,"context_lines":[{"line_number":79,"context_line":"    def _build_range_reversed_msg(self, t_range_tuple):"},{"line_number":80,"context_line":"        return (self._err_prefix % t_range_tuple) + self._err_range"},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"    def _verify_range(self, tunnel_range, tunnel_type):"},{"line_number":83,"context_line":"        return plugin_utils.verify_tunnel_range(tunnel_range, tunnel_type)"},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"    def _check_range_valid_ranges(self, tunnel_range):"}],"source_content_type":"text/x-python","patch_set":27,"id":"1abeadc6_d7c7ae10","line":82,"updated":"2014-08-27 12:14:31.000000000","message":"Can skip tunnel_type parameter and use self.tunnel_type on L83.","commit_id":"d0071fa1ffb9c337131ac08c3f41a40e6f4fb0b2"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"547b2d62a14dc41fa9a24cc4d08e7bbe5e1ecb2b","unresolved":false,"context_lines":[{"line_number":79,"context_line":"    def _build_range_reversed_msg(self, t_range_tuple):"},{"line_number":80,"context_line":"        return (self._err_prefix % t_range_tuple) + self._err_range"},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"    def _verify_range(self, tunnel_range, tunnel_type):"},{"line_number":83,"context_line":"        return plugin_utils.verify_tunnel_range(tunnel_range, tunnel_type)"},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"    def _check_range_valid_ranges(self, tunnel_range):"}],"source_content_type":"text/x-python","patch_set":27,"id":"1abeadc6_45968895","line":82,"in_reply_to":"1abeadc6_d7c7ae10","updated":"2014-08-27 13:03:16.000000000","message":"Done","commit_id":"d0071fa1ffb9c337131ac08c3f41a40e6f4fb0b2"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"88f0d67af2b16a3c3e701b8b17a3f266e5348276","unresolved":false,"context_lines":[{"line_number":89,"context_line":"        expected_msg \u003d self._build_invalid_tunnel_range_msg(bad_range, which)"},{"line_number":90,"context_line":"        err \u003d self.assertRaises(n_exc.NetworkTunnelRangeError,"},{"line_number":91,"context_line":"                                self._verify_range, bad_range,"},{"line_number":92,"context_line":"                                self.tunnel_type)"},{"line_number":93,"context_line":"        self.assertEqual(expected_msg, str(err))"},{"line_number":94,"context_line":""},{"line_number":95,"context_line":"    def _check_range_reversed(self, bad_range):"}],"source_content_type":"text/x-python","patch_set":27,"id":"1abeadc6_57db9eec","line":92,"updated":"2014-08-27 12:14:31.000000000","message":"Can remove self.tunnel_type parameter.","commit_id":"d0071fa1ffb9c337131ac08c3f41a40e6f4fb0b2"},{"author":{"_account_id":6876,"name":"stephen-ma","email":"stephenbma43@gmail.com","username":"stephen-ma"},"change_message_id":"aa3cbc464ef62966aecb79d830008e32b1068e55","unresolved":false,"context_lines":[{"line_number":89,"context_line":"        expected_msg \u003d self._build_invalid_tunnel_range_msg(bad_range, which)"},{"line_number":90,"context_line":"        err \u003d self.assertRaises(n_exc.NetworkTunnelRangeError,"},{"line_number":91,"context_line":"                                self._verify_range, bad_range,"},{"line_number":92,"context_line":"                                self.tunnel_type)"},{"line_number":93,"context_line":"        self.assertEqual(expected_msg, str(err))"},{"line_number":94,"context_line":""},{"line_number":95,"context_line":"    def _check_range_reversed(self, bad_range):"}],"source_content_type":"text/x-python","patch_set":27,"id":"1abeadc6_675ac884","line":92,"updated":"2014-08-26 21:17:58.000000000","message":"Same comment as L76 regarding tunnel_type.","commit_id":"d0071fa1ffb9c337131ac08c3f41a40e6f4fb0b2"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"547b2d62a14dc41fa9a24cc4d08e7bbe5e1ecb2b","unresolved":false,"context_lines":[{"line_number":89,"context_line":"        expected_msg \u003d self._build_invalid_tunnel_range_msg(bad_range, which)"},{"line_number":90,"context_line":"        err \u003d self.assertRaises(n_exc.NetworkTunnelRangeError,"},{"line_number":91,"context_line":"                                self._verify_range, bad_range,"},{"line_number":92,"context_line":"                                self.tunnel_type)"},{"line_number":93,"context_line":"        self.assertEqual(expected_msg, str(err))"},{"line_number":94,"context_line":""},{"line_number":95,"context_line":"    def _check_range_reversed(self, bad_range):"}],"source_content_type":"text/x-python","patch_set":27,"id":"1abeadc6_8590a096","line":92,"in_reply_to":"1abeadc6_57db9eec","updated":"2014-08-27 13:03:16.000000000","message":"Done","commit_id":"d0071fa1ffb9c337131ac08c3f41a40e6f4fb0b2"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"547b2d62a14dc41fa9a24cc4d08e7bbe5e1ecb2b","unresolved":false,"context_lines":[{"line_number":89,"context_line":"        expected_msg \u003d self._build_invalid_tunnel_range_msg(bad_range, which)"},{"line_number":90,"context_line":"        err \u003d self.assertRaises(n_exc.NetworkTunnelRangeError,"},{"line_number":91,"context_line":"                                self._verify_range, bad_range,"},{"line_number":92,"context_line":"                                self.tunnel_type)"},{"line_number":93,"context_line":"        self.assertEqual(expected_msg, str(err))"},{"line_number":94,"context_line":""},{"line_number":95,"context_line":"    def _check_range_reversed(self, bad_range):"}],"source_content_type":"text/x-python","patch_set":27,"id":"1abeadc6_6591c499","line":92,"in_reply_to":"1abeadc6_675ac884","updated":"2014-08-27 13:03:16.000000000","message":"Done","commit_id":"d0071fa1ffb9c337131ac08c3f41a40e6f4fb0b2"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"88f0d67af2b16a3c3e701b8b17a3f266e5348276","unresolved":false,"context_lines":[{"line_number":103,"context_line":"class TestGreTunnelRangeVerifyValid(UtilTestParseTunnelRanges):"},{"line_number":104,"context_line":"    _tun_min \u003d constants.MIN_GRE_ID"},{"line_number":105,"context_line":"    _tun_max \u003d constants.MAX_GRE_ID"},{"line_number":106,"context_line":"    _err_suffix \u003d \" %s is not a valid gre key id\""},{"line_number":107,"context_line":"    tunnel_type \u003d p_const.TYPE_GRE"},{"line_number":108,"context_line":""},{"line_number":109,"context_line":"    def test_range_gre_id_valid(self):"}],"source_content_type":"text/x-python","patch_set":27,"id":"1abeadc6_3aa9a7df","line":106,"updated":"2014-08-27 12:14:31.000000000","message":"nit: can remove leading space (as long as also done in real message)","commit_id":"d0071fa1ffb9c337131ac08c3f41a40e6f4fb0b2"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"547b2d62a14dc41fa9a24cc4d08e7bbe5e1ecb2b","unresolved":false,"context_lines":[{"line_number":103,"context_line":"class TestGreTunnelRangeVerifyValid(UtilTestParseTunnelRanges):"},{"line_number":104,"context_line":"    _tun_min \u003d constants.MIN_GRE_ID"},{"line_number":105,"context_line":"    _tun_max \u003d constants.MAX_GRE_ID"},{"line_number":106,"context_line":"    _err_suffix \u003d \" %s is not a valid gre key id\""},{"line_number":107,"context_line":"    tunnel_type \u003d p_const.TYPE_GRE"},{"line_number":108,"context_line":""},{"line_number":109,"context_line":"    def test_range_gre_id_valid(self):"}],"source_content_type":"text/x-python","patch_set":27,"id":"1abeadc6_05f490f0","line":106,"in_reply_to":"1abeadc6_3aa9a7df","updated":"2014-08-27 13:03:16.000000000","message":"Done","commit_id":"d0071fa1ffb9c337131ac08c3f41a40e6f4fb0b2"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"88f0d67af2b16a3c3e701b8b17a3f266e5348276","unresolved":false,"context_lines":[{"line_number":122,"context_line":"class TestVxlanTunnelRangeVerifyValid(UtilTestParseTunnelRanges):"},{"line_number":123,"context_line":"    _vni_min \u003d constants.MIN_VXLAN_VNI"},{"line_number":124,"context_line":"    _vni_max \u003d constants.MAX_VXLAN_VNI"},{"line_number":125,"context_line":"    _err_suffix \u003d \" %s is not a valid vxlan vni\""},{"line_number":126,"context_line":"    tunnel_type \u003d p_const.TYPE_VXLAN"},{"line_number":127,"context_line":""},{"line_number":128,"context_line":"    def test_range_vni_valid(self):"}],"source_content_type":"text/x-python","patch_set":27,"id":"1abeadc6_7aaa3fd3","line":125,"updated":"2014-08-27 12:14:31.000000000","message":"nit: can remove leading space.","commit_id":"d0071fa1ffb9c337131ac08c3f41a40e6f4fb0b2"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"547b2d62a14dc41fa9a24cc4d08e7bbe5e1ecb2b","unresolved":false,"context_lines":[{"line_number":122,"context_line":"class TestVxlanTunnelRangeVerifyValid(UtilTestParseTunnelRanges):"},{"line_number":123,"context_line":"    _vni_min \u003d constants.MIN_VXLAN_VNI"},{"line_number":124,"context_line":"    _vni_max \u003d constants.MAX_VXLAN_VNI"},{"line_number":125,"context_line":"    _err_suffix \u003d \" %s is not a valid vxlan vni\""},{"line_number":126,"context_line":"    tunnel_type \u003d p_const.TYPE_VXLAN"},{"line_number":127,"context_line":""},{"line_number":128,"context_line":"    def test_range_vni_valid(self):"}],"source_content_type":"text/x-python","patch_set":27,"id":"1abeadc6_25f7ccf6","line":125,"in_reply_to":"1abeadc6_7aaa3fd3","updated":"2014-08-27 13:03:16.000000000","message":"Done","commit_id":"d0071fa1ffb9c337131ac08c3f41a40e6f4fb0b2"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"e7abf9f5ff1cf7486eae207e4b70220a7925ee60","unresolved":false,"context_lines":[{"line_number":104,"context_line":"    _tun_max \u003d constants.MAX_GRE_ID"},{"line_number":105,"context_line":"    tunnel_type \u003d p_const.TYPE_GRE"},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"    def test_range_gre_id_valid(self):"},{"line_number":108,"context_line":"        self._check_range_valid_ranges((self._tun_min, self._tun_max))"},{"line_number":109,"context_line":""},{"line_number":110,"context_line":"    def test_range_gre_id_invalid(self):"}],"source_content_type":"text/x-python","patch_set":28,"id":"1abeadc6_d5f3bd70","line":107,"updated":"2014-08-29 14:18:22.000000000","message":"the 3 tests can be factorized between TestGre/VxlanTunnelRangeVerifyValid","commit_id":"b1fec67c581dcc080d10eb1b0d6590a0812078e4"},{"author":{"_account_id":12737,"name":"Jacek Swiderski","email":"jacek.swiderski@codilime.com","username":"Altran"},"change_message_id":"fc2ced0ab083b3142b2cbcde30ff9b97551a4426","unresolved":false,"context_lines":[{"line_number":104,"context_line":"    _tun_max \u003d constants.MAX_GRE_ID"},{"line_number":105,"context_line":"    tunnel_type \u003d p_const.TYPE_GRE"},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"    def test_range_gre_id_valid(self):"},{"line_number":108,"context_line":"        self._check_range_valid_ranges((self._tun_min, self._tun_max))"},{"line_number":109,"context_line":""},{"line_number":110,"context_line":"    def test_range_gre_id_invalid(self):"}],"source_content_type":"text/x-python","patch_set":28,"id":"fa98f980_0fb0f341","line":107,"in_reply_to":"1abeadc6_d5f3bd70","updated":"2014-09-12 10:22:25.000000000","message":"+1","commit_id":"b1fec67c581dcc080d10eb1b0d6590a0812078e4"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"82d3e98cdee3a1409f04402ce03a60771eba5f21","unresolved":false,"context_lines":[{"line_number":104,"context_line":"    _tun_max \u003d constants.MAX_GRE_ID"},{"line_number":105,"context_line":"    tunnel_type \u003d p_const.TYPE_GRE"},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"    def test_range_gre_id_valid(self):"},{"line_number":108,"context_line":"        self._check_range_valid_ranges((self._tun_min, self._tun_max))"},{"line_number":109,"context_line":""},{"line_number":110,"context_line":"    def test_range_gre_id_invalid(self):"}],"source_content_type":"text/x-python","patch_set":28,"id":"fa98f980_9227aab5","line":107,"in_reply_to":"fa98f980_0f6e332f","updated":"2014-09-12 10:55:17.000000000","message":"gre/vxlan have distinct classes because they requires specific implementations for some methods, other (must of them) methods[1] and tests[2] are shared to avoid code duplication, to avoid code correction on vxlan side without correcting gre side ...\n\n[1]https://review.openstack.org/111198\n[2]https://review.openstack.org/115351","commit_id":"b1fec67c581dcc080d10eb1b0d6590a0812078e4"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"4ded250c8d553cca685a455d479462b78c20d6a9","unresolved":false,"context_lines":[{"line_number":104,"context_line":"    _tun_max \u003d constants.MAX_GRE_ID"},{"line_number":105,"context_line":"    tunnel_type \u003d p_const.TYPE_GRE"},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"    def test_range_gre_id_valid(self):"},{"line_number":108,"context_line":"        self._check_range_valid_ranges((self._tun_min, self._tun_max))"},{"line_number":109,"context_line":""},{"line_number":110,"context_line":"    def test_range_gre_id_invalid(self):"}],"source_content_type":"text/x-python","patch_set":28,"id":"fa98f980_0f6e332f","line":107,"in_reply_to":"fa98f980_0fb0f341","updated":"2014-09-12 10:43:31.000000000","message":"I didn\u0027t get the above comment. Could you please elaborate?\nIMO its better to have a separate class for GRE and VXLAN tunnel range validation like the way we have separate classes in  type_gre and type_vxlan.","commit_id":"b1fec67c581dcc080d10eb1b0d6590a0812078e4"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"f180303bec0f314897e784c6e239ce6a4e5849f8","unresolved":false,"context_lines":[{"line_number":104,"context_line":"    _tun_max \u003d constants.MAX_GRE_ID"},{"line_number":105,"context_line":"    tunnel_type \u003d p_const.TYPE_GRE"},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"    def test_range_gre_id_valid(self):"},{"line_number":108,"context_line":"        self._check_range_valid_ranges((self._tun_min, self._tun_max))"},{"line_number":109,"context_line":""},{"line_number":110,"context_line":"    def test_range_gre_id_invalid(self):"}],"source_content_type":"text/x-python","patch_set":28,"id":"fa98f980_d5490361","line":107,"in_reply_to":"fa98f980_55b60c3f","updated":"2014-09-13 12:56:40.000000000","message":"Is this refactored code looks fine ?\n\nclass UtilTestParseTunnelRanges(base.BaseTestCase):\n    TUN_MIN \u003d None\n    TUN_MAX \u003d None\n    TYPE \u003d None\n    _err_prefix \u003d \"Invalid network Tunnel range: \u0027%d:%d\u0027 - \"\n    _err_suffix \u003d \"%s is not a valid %s identifier\"\n    _err_range \u003d \"End of tunnel range is less than start of tunnel range\"\n\n    def _build_invalid_tunnel_range_msg(self, t_range_tuple, n):\n        bad_id \u003d t_range_tuple[n - 1]\n        return (self._err_prefix % t_range_tuple) + (self._err_suffix\n                                                 % (bad_id, self.TYPE))\n\n    def _build_range_reversed_msg(self, t_range_tuple):\n        return (self._err_prefix % t_range_tuple) + self._err_range\n\n    def _verify_range(self, tunnel_range):\n        return plugin_utils.verify_tunnel_range(tunnel_range, self.TYPE)\n\n    def _check_range_valid_ranges(self, tunnel_range):\n        self.assertIsNone(self._verify_range(tunnel_range))\n\n    def _check_range_invalid_ranges(self, bad_range, which):\n        expected_msg \u003d self._build_invalid_tunnel_range_msg(bad_range, which)\n        err \u003d self.assertRaises(n_exc.NetworkTunnelRangeError,\n                                self._verify_range, bad_range)\n        self.assertEqual(expected_msg, str(err))\n\n    def _check_range_reversed(self, bad_range):\n        err \u003d self.assertRaises(n_exc.NetworkTunnelRangeError,\n                                self._verify_range, bad_range)\n        expected_msg \u003d self._build_range_reversed_msg(bad_range)\n        self.assertEqual(expected_msg, str(err))\n\n    if TYPE:\n        def test_range_tunnel_id_valid(self):\n            self._check_range_valid_ranges((self.TUN_MIN, self.TUN_MAX))\n\n        def test_range_tunnel_id_invalid(self):\n            self._check_range_invalid_ranges((-1, self.TUN_MAX), 1)\n            self._check_range_invalid_ranges((self.TUN_MIN,\n                                              self.TUN_MAX + 1), 2)\n            self._check_range_invalid_ranges((self.TUN_MIN - 1,\n                                              self.TUN_MAX + 1), 1)\n\n        def test_range_tunnel_id_reversed(self):\n            self._check_range_reversed((self.TUN_MAX, self.TUN_MIN))\n\n\nclass TestGreTunnelRangeVerifyValid(UtilTestParseTunnelRanges):\n    TUN_MIN \u003d constants.MIN_GRE_ID\n    TUN_MAX \u003d constants.MAX_GRE_ID\n    TYPE \u003d p_const.TYPE_GRE\n\n\nclass TestVxlanTunnelRangeVerifyValid(UtilTestParseTunnelRanges):\n    TUN_MIN \u003d constants.MIN_VXLAN_VNI\n    TUN_MAX \u003d constants.MAX_VXLAN_VNI\n    TYPE \u003d p_const.TYPE_VXLAN","commit_id":"b1fec67c581dcc080d10eb1b0d6590a0812078e4"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"45546d0612f5a4c5755c009fa85eb42055afddcc","unresolved":false,"context_lines":[{"line_number":104,"context_line":"    _tun_max \u003d constants.MAX_GRE_ID"},{"line_number":105,"context_line":"    tunnel_type \u003d p_const.TYPE_GRE"},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"    def test_range_gre_id_valid(self):"},{"line_number":108,"context_line":"        self._check_range_valid_ranges((self._tun_min, self._tun_max))"},{"line_number":109,"context_line":""},{"line_number":110,"context_line":"    def test_range_gre_id_invalid(self):"}],"source_content_type":"text/x-python","patch_set":28,"id":"fa98f980_d33bbfce","line":107,"in_reply_to":"fa98f980_6bea1dd9","updated":"2014-09-15 16:02:49.000000000","message":"Thanks for all your valuable suggestions.\nDone","commit_id":"b1fec67c581dcc080d10eb1b0d6590a0812078e4"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"f4c76cc0e31efda20a409068de0ea8375db30ed2","unresolved":false,"context_lines":[{"line_number":104,"context_line":"    _tun_max \u003d constants.MAX_GRE_ID"},{"line_number":105,"context_line":"    tunnel_type \u003d p_const.TYPE_GRE"},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"    def test_range_gre_id_valid(self):"},{"line_number":108,"context_line":"        self._check_range_valid_ranges((self._tun_min, self._tun_max))"},{"line_number":109,"context_line":""},{"line_number":110,"context_line":"    def test_range_gre_id_invalid(self):"}],"source_content_type":"text/x-python","patch_set":28,"id":"fa98f980_f25c767f","line":107,"in_reply_to":"fa98f980_9227aab5","updated":"2014-09-12 11:34:28.000000000","message":"Thanks for clarification :) \nI need your help in factorizing this ?\nShall I put all these tests  from TestGreTunnelRangeVerifyValid, TestVxlanTunnelRangeVerifyValid  and helper methods  from UtilTestParseTunnelRanges into a single class named \"TestTunnelRangeVerifyValid\" ?\n\nPlease suggests....","commit_id":"b1fec67c581dcc080d10eb1b0d6590a0812078e4"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"2bd6c4b806ad0be34b9547d82c4f0e4c3eea501f","unresolved":false,"context_lines":[{"line_number":104,"context_line":"    _tun_max \u003d constants.MAX_GRE_ID"},{"line_number":105,"context_line":"    tunnel_type \u003d p_const.TYPE_GRE"},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"    def test_range_gre_id_valid(self):"},{"line_number":108,"context_line":"        self._check_range_valid_ranges((self._tun_min, self._tun_max))"},{"line_number":109,"context_line":""},{"line_number":110,"context_line":"    def test_range_gre_id_invalid(self):"}],"source_content_type":"text/x-python","patch_set":28,"id":"fa98f980_6bea1dd9","line":107,"in_reply_to":"fa98f980_d5490361","updated":"2014-09-15 14:47:30.000000000","message":"UtilTestParseTunnelRanges should not inherit from testcase otherwise the test framework try to run its tests ... you try to do it using \"if TYPE:\" which is IMHO unusual and tricky.\n\n\nthe right pattern is:\n\nclass TestParseTunnelRangesMixin(object):\n  # Mixin suffix means you can use me only through multi-inherence.\n  # same code without if TYPE:\n\nclass TestGre....(TestParseTunnelRangesMixin, base.BaseTestCase):\n  # same code\n\n\nprefer to propose new patchsets instead of comments, it\u0027s easier to follow and comment.","commit_id":"b1fec67c581dcc080d10eb1b0d6590a0812078e4"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"3aee1f9f18e2be75d17e5e219eaa33fd57836879","unresolved":false,"context_lines":[{"line_number":104,"context_line":"    _tun_max \u003d constants.MAX_GRE_ID"},{"line_number":105,"context_line":"    tunnel_type \u003d p_const.TYPE_GRE"},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"    def test_range_gre_id_valid(self):"},{"line_number":108,"context_line":"        self._check_range_valid_ranges((self._tun_min, self._tun_max))"},{"line_number":109,"context_line":""},{"line_number":110,"context_line":"    def test_range_gre_id_invalid(self):"}],"source_content_type":"text/x-python","patch_set":28,"id":"fa98f980_55b60c3f","line":107,"in_reply_to":"fa98f980_f25c767f","updated":"2014-09-12 11:44:48.000000000","message":"you can reuse type_gre/vxlan test archi:\n - A mixin class[1] with parameters defining common tests \n - 2 test classes[2] inheriting from the mixin class setting gre/vxlan parameters\n\n\n [1]https://github.com/openstack/neutron/blob/master/neutron/tests/unit/ml2/test_type_vxlan.py#L41-L43\n [2]https://github.com/openstack/neutron/blob/master/neutron/tests/unit/ml2/test_type_vxlan.py#L205-L207","commit_id":"b1fec67c581dcc080d10eb1b0d6590a0812078e4"}]}
