)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":7018,"name":"Abhishek Raut","email":"rauta@vmware.com","username":"abhiraut"},"change_message_id":"a2d3d181a34a2e426620168859144d08eb172a26","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     aaronzhang231 \u003cfenzhang@cisco.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2014-05-27 23:53:09 -0700"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"control update, delete for cisco-network-profile"},{"line_number":8,"context_line":"Add new behavior to control update and delete operations for the"},{"line_number":9,"context_line":"cisco-network-profile resource extension."},{"line_number":10,"context_line":"The new behavior is to allow update and delete operations only if"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"3ae8d1ca_1e08822c","line":7,"updated":"2014-05-28 18:09:20.000000000","message":"Add a new line after this single line commit summary. Capitalize it.","commit_id":"c51464905de11c820c08771aac5ecf5a4be4e03a"},{"author":{"_account_id":9680,"name":"AARON ZHANG","email":"fenzhang@cisco.com","username":"AARON_ZHANG"},"change_message_id":"077cd38b25227552a6df273b19f107488555c4bd","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     aaronzhang231 \u003cfenzhang@cisco.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2014-05-27 23:53:09 -0700"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"control update, delete for cisco-network-profile"},{"line_number":8,"context_line":"Add new behavior to control update and delete operations for the"},{"line_number":9,"context_line":"cisco-network-profile resource extension."},{"line_number":10,"context_line":"The new behavior is to allow update and delete operations only if"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"3ae8d1ca_3ef99380","line":7,"in_reply_to":"3ae8d1ca_1e08822c","updated":"2014-05-29 23:52:26.000000000","message":"Done","commit_id":"c51464905de11c820c08771aac5ecf5a4be4e03a"}],"neutron/plugins/cisco/common/cisco_exceptions.py":[{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"af0fe091a62b5f5df227dc6944c2a69e304680bd","unresolved":false,"context_lines":[{"line_number":171,"context_line":""},{"line_number":172,"context_line":"class NetworkProfileInUse(exceptions.InUse):"},{"line_number":173,"context_line":"    \"\"\"Network Profile with the given UUID is in use.\"\"\""},{"line_number":174,"context_line":"    message \u003d _(\"One or more network segments belonging to network\""},{"line_number":175,"context_line":"                \" profile %(profile)s is in use.\")"},{"line_number":176,"context_line":""},{"line_number":177,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"3ae8d1ca_21c296e9","line":174,"updated":"2014-05-28 09:01:09.000000000","message":"nit: it\u0027s better to put space at the end of the line rather than in the beginning of the next line","commit_id":"c51464905de11c820c08771aac5ecf5a4be4e03a"},{"author":{"_account_id":9680,"name":"AARON ZHANG","email":"fenzhang@cisco.com","username":"AARON_ZHANG"},"change_message_id":"077cd38b25227552a6df273b19f107488555c4bd","unresolved":false,"context_lines":[{"line_number":171,"context_line":""},{"line_number":172,"context_line":"class NetworkProfileInUse(exceptions.InUse):"},{"line_number":173,"context_line":"    \"\"\"Network Profile with the given UUID is in use.\"\"\""},{"line_number":174,"context_line":"    message \u003d _(\"One or more network segments belonging to network\""},{"line_number":175,"context_line":"                \" profile %(profile)s is in use.\")"},{"line_number":176,"context_line":""},{"line_number":177,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"3ae8d1ca_fe364b51","line":174,"in_reply_to":"3ae8d1ca_21c296e9","updated":"2014-05-29 23:52:26.000000000","message":"Done","commit_id":"c51464905de11c820c08771aac5ecf5a4be4e03a"}],"neutron/plugins/cisco/db/n1kv_db_v2.py":[{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"af0fe091a62b5f5df227dc6944c2a69e304680bd","unresolved":false,"context_lines":[{"line_number":405,"context_line":"        seg_min, seg_max \u003d get_segment_range(net_p)"},{"line_number":406,"context_line":"        if net_p[\u0027segment_type\u0027] \u003d\u003d c_const.NETWORK_TYPE_VLAN:"},{"line_number":407,"context_line":"            for vlan_id in range(seg_min, seg_max + 1):"},{"line_number":408,"context_line":"                alloc \u003d (db_session.query(n1kv_models_v2.N1kvVlanAllocation)."},{"line_number":409,"context_line":"                         filter_by(physical_network\u003dnet_p[\u0027physical_network\u0027],"},{"line_number":410,"context_line":"                                   vlan_id\u003dvlan_id)."},{"line_number":411,"context_line":"                         one())"}],"source_content_type":"text/x-python","patch_set":1,"id":"3ae8d1ca_01ef5a88","line":408,"updated":"2014-05-28 09:01:09.000000000","message":"I\u0027m thinking if there\u0027s a more optimal way of deleting those items rather than fetch-and-delete them one by one.\n\nAlso, I think this code needs to handle NoResultFound exception","commit_id":"c51464905de11c820c08771aac5ecf5a4be4e03a"},{"author":{"_account_id":9680,"name":"AARON ZHANG","email":"fenzhang@cisco.com","username":"AARON_ZHANG"},"change_message_id":"077cd38b25227552a6df273b19f107488555c4bd","unresolved":false,"context_lines":[{"line_number":405,"context_line":"        seg_min, seg_max \u003d get_segment_range(net_p)"},{"line_number":406,"context_line":"        if net_p[\u0027segment_type\u0027] \u003d\u003d c_const.NETWORK_TYPE_VLAN:"},{"line_number":407,"context_line":"            for vlan_id in range(seg_min, seg_max + 1):"},{"line_number":408,"context_line":"                alloc \u003d (db_session.query(n1kv_models_v2.N1kvVlanAllocation)."},{"line_number":409,"context_line":"                         filter_by(physical_network\u003dnet_p[\u0027physical_network\u0027],"},{"line_number":410,"context_line":"                                   vlan_id\u003dvlan_id)."},{"line_number":411,"context_line":"                         one())"}],"source_content_type":"text/x-python","patch_set":1,"id":"1ae5cdf2_f56b3883","line":408,"in_reply_to":"3ae8d1ca_01ef5a88","updated":"2014-05-29 23:52:26.000000000","message":"for the deleting routine, we optimized it to fetch all and then do delete;\n\nthe query returns an empty list [] when nothing is found, so it should be safe without handling NoResultFound exception here","commit_id":"c51464905de11c820c08771aac5ecf5a4be4e03a"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"af0fe091a62b5f5df227dc6944c2a69e304680bd","unresolved":false,"context_lines":[{"line_number":412,"context_line":"                db_session.delete(alloc)"},{"line_number":413,"context_line":"        elif net_p[\u0027segment_type\u0027] \u003d\u003d c_const.NETWORK_TYPE_OVERLAY:"},{"line_number":414,"context_line":"            for vxlan_id in range(seg_min, seg_max + 1):"},{"line_number":415,"context_line":"                alloc \u003d (db_session.query(n1kv_models_v2.N1kvVxlanAllocation)."},{"line_number":416,"context_line":"                         filter_by(vxlan_id\u003dvxlan_id).one())"},{"line_number":417,"context_line":"                db_session.delete(alloc)"},{"line_number":418,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"3ae8d1ca_41a08243","line":415,"updated":"2014-05-28 09:01:09.000000000","message":"same as above","commit_id":"c51464905de11c820c08771aac5ecf5a4be4e03a"},{"author":{"_account_id":9680,"name":"AARON ZHANG","email":"fenzhang@cisco.com","username":"AARON_ZHANG"},"change_message_id":"077cd38b25227552a6df273b19f107488555c4bd","unresolved":false,"context_lines":[{"line_number":412,"context_line":"                db_session.delete(alloc)"},{"line_number":413,"context_line":"        elif net_p[\u0027segment_type\u0027] \u003d\u003d c_const.NETWORK_TYPE_OVERLAY:"},{"line_number":414,"context_line":"            for vxlan_id in range(seg_min, seg_max + 1):"},{"line_number":415,"context_line":"                alloc \u003d (db_session.query(n1kv_models_v2.N1kvVxlanAllocation)."},{"line_number":416,"context_line":"                         filter_by(vxlan_id\u003dvxlan_id).one())"},{"line_number":417,"context_line":"                db_session.delete(alloc)"},{"line_number":418,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"1ae5cdf2_95e2f401","line":415,"in_reply_to":"3ae8d1ca_41a08243","updated":"2014-05-29 23:52:26.000000000","message":"Done","commit_id":"c51464905de11c820c08771aac5ecf5a4be4e03a"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"54287553153cb83d83d1d290f2b239a2d8ba85f5","unresolved":false,"context_lines":[{"line_number":411,"context_line":"                          (n1kv_models_v2.N1kvVlanAllocation."},{"line_number":412,"context_line":"                           vlan_id \u003e\u003d seg_min),"},{"line_number":413,"context_line":"                          (n1kv_models_v2.N1kvVlanAllocation."},{"line_number":414,"context_line":"                           vlan_id \u003c\u003d seg_max))))"},{"line_number":415,"context_line":"            for alloc in allocs:"},{"line_number":416,"context_line":"                db_session.delete(alloc)"},{"line_number":417,"context_line":"        elif net_p[\u0027segment_type\u0027] \u003d\u003d c_const.NETWORK_TYPE_OVERLAY:"}],"source_content_type":"text/x-python","patch_set":3,"id":"1ae5cdf2_46a09643","line":414,"updated":"2014-05-31 10:19:32.000000000","message":"Actually it can be made even simpler:\n (db_session.query(...).filter(...).delete()\nand no need to fetch/iterate/delete","commit_id":"8a73f4e36b91c414079b6de90f8dc5f3f834e7d0"},{"author":{"_account_id":9680,"name":"AARON ZHANG","email":"fenzhang@cisco.com","username":"AARON_ZHANG"},"change_message_id":"bb41968c7461340a3cd1f4a64d5bc8c82b9d9255","unresolved":false,"context_lines":[{"line_number":411,"context_line":"                          (n1kv_models_v2.N1kvVlanAllocation."},{"line_number":412,"context_line":"                           vlan_id \u003e\u003d seg_min),"},{"line_number":413,"context_line":"                          (n1kv_models_v2.N1kvVlanAllocation."},{"line_number":414,"context_line":"                           vlan_id \u003c\u003d seg_max))))"},{"line_number":415,"context_line":"            for alloc in allocs:"},{"line_number":416,"context_line":"                db_session.delete(alloc)"},{"line_number":417,"context_line":"        elif net_p[\u0027segment_type\u0027] \u003d\u003d c_const.NETWORK_TYPE_OVERLAY:"}],"source_content_type":"text/x-python","patch_set":3,"id":"1ae5cdf2_40593035","line":414,"in_reply_to":"1ae5cdf2_46a09643","updated":"2014-06-03 00:42:45.000000000","message":"Done","commit_id":"8a73f4e36b91c414079b6de90f8dc5f3f834e7d0"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"54287553153cb83d83d1d290f2b239a2d8ba85f5","unresolved":false,"context_lines":[{"line_number":420,"context_line":"                          (n1kv_models_v2.N1kvVxlanAllocation."},{"line_number":421,"context_line":"                           vxlan_id \u003e\u003d seg_min),"},{"line_number":422,"context_line":"                          (n1kv_models_v2.N1kvVxlanAllocation."},{"line_number":423,"context_line":"                           vxlan_id \u003c\u003d seg_max))))"},{"line_number":424,"context_line":"            for alloc in allocs:"},{"line_number":425,"context_line":"                db_session.delete(alloc)"},{"line_number":426,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"1ae5cdf2_66a59252","line":423,"updated":"2014-05-31 10:19:32.000000000","message":"same as above","commit_id":"8a73f4e36b91c414079b6de90f8dc5f3f834e7d0"},{"author":{"_account_id":9680,"name":"AARON ZHANG","email":"fenzhang@cisco.com","username":"AARON_ZHANG"},"change_message_id":"bb41968c7461340a3cd1f4a64d5bc8c82b9d9255","unresolved":false,"context_lines":[{"line_number":420,"context_line":"                          (n1kv_models_v2.N1kvVxlanAllocation."},{"line_number":421,"context_line":"                           vxlan_id \u003e\u003d seg_min),"},{"line_number":422,"context_line":"                          (n1kv_models_v2.N1kvVxlanAllocation."},{"line_number":423,"context_line":"                           vxlan_id \u003c\u003d seg_max))))"},{"line_number":424,"context_line":"            for alloc in allocs:"},{"line_number":425,"context_line":"                db_session.delete(alloc)"},{"line_number":426,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"1ae5cdf2_e0479c49","line":423,"in_reply_to":"1ae5cdf2_66a59252","updated":"2014-06-03 00:42:45.000000000","message":"Done","commit_id":"8a73f4e36b91c414079b6de90f8dc5f3f834e7d0"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"12c573bd1c9603a44f43e9d1a8ba1b780a877b3b","unresolved":false,"context_lines":[{"line_number":1346,"context_line":"                db_session\u003dcontext.session,"},{"line_number":1347,"context_line":"                physical_network\u003dnet_p[\"physical_network\"]"},{"line_number":1348,"context_line":"            )"},{"line_number":1349,"context_line":"            if ((1 \u003e seg_min or seg_max \u003e 4093) or"},{"line_number":1350,"context_line":"                seg_min in range(3968, 4048) or"},{"line_number":1351,"context_line":"                seg_max in range(3968, 4048) or"},{"line_number":1352,"context_line":"                (seg_min in range(1, 3968) and"}],"source_content_type":"text/x-python","patch_set":3,"id":"1ae5cdf2_94b0e88c","line":1349,"updated":"2014-06-02 11:51:01.000000000","message":"Don\u0027t need extra parens on this line.\n\nDo we need to check that min \u003c\u003d max?\n\nWould be a little shorter (and arguably easier to understand) if reversed logic:\n\n    if not(seg_min \u003c\u003d seg_max and\n           (seg_min in range(1,3968) and seg_max in range(1, 3968)) or\n            (seg_min in range(4048, 4094) and seg_max in range(4048,4094))):","commit_id":"8a73f4e36b91c414079b6de90f8dc5f3f834e7d0"},{"author":{"_account_id":9680,"name":"AARON ZHANG","email":"fenzhang@cisco.com","username":"AARON_ZHANG"},"change_message_id":"bb41968c7461340a3cd1f4a64d5bc8c82b9d9255","unresolved":false,"context_lines":[{"line_number":1346,"context_line":"                db_session\u003dcontext.session,"},{"line_number":1347,"context_line":"                physical_network\u003dnet_p[\"physical_network\"]"},{"line_number":1348,"context_line":"            )"},{"line_number":1349,"context_line":"            if ((1 \u003e seg_min or seg_max \u003e 4093) or"},{"line_number":1350,"context_line":"                seg_min in range(3968, 4048) or"},{"line_number":1351,"context_line":"                seg_max in range(3968, 4048) or"},{"line_number":1352,"context_line":"                (seg_min in range(1, 3968) and"}],"source_content_type":"text/x-python","patch_set":3,"id":"1ae5cdf2_b9e1469c","line":1349,"in_reply_to":"1ae5cdf2_94b0e88c","updated":"2014-06-03 00:42:45.000000000","message":"Done","commit_id":"8a73f4e36b91c414079b6de90f8dc5f3f834e7d0"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"12c573bd1c9603a44f43e9d1a8ba1b780a877b3b","unresolved":false,"context_lines":[{"line_number":1359,"context_line":"                              c_const.NETWORK_TYPE_MULTI_SEGMENT,"},{"line_number":1360,"context_line":"                              c_const.NETWORK_TYPE_TRUNK]:"},{"line_number":1361,"context_line":"            profiles \u003d _get_network_profiles()"},{"line_number":1362,"context_line":"            if ((seg_min \u003c 4096) or (seg_max \u003e 16000000)):"},{"line_number":1363,"context_line":"                msg \u003d _(\"segment range is invalid. Valid range is :\""},{"line_number":1364,"context_line":"                        \" 4096-16000000\")"},{"line_number":1365,"context_line":"                LOG.exception(msg)"}],"source_content_type":"text/x-python","patch_set":3,"id":"1ae5cdf2_947708d4","line":1362,"updated":"2014-06-02 11:51:01.000000000","message":"Check min \u003c\u003d max?","commit_id":"8a73f4e36b91c414079b6de90f8dc5f3f834e7d0"},{"author":{"_account_id":9680,"name":"AARON ZHANG","email":"fenzhang@cisco.com","username":"AARON_ZHANG"},"change_message_id":"bb41968c7461340a3cd1f4a64d5bc8c82b9d9255","unresolved":false,"context_lines":[{"line_number":1359,"context_line":"                              c_const.NETWORK_TYPE_MULTI_SEGMENT,"},{"line_number":1360,"context_line":"                              c_const.NETWORK_TYPE_TRUNK]:"},{"line_number":1361,"context_line":"            profiles \u003d _get_network_profiles()"},{"line_number":1362,"context_line":"            if ((seg_min \u003c 4096) or (seg_max \u003e 16000000)):"},{"line_number":1363,"context_line":"                msg \u003d _(\"segment range is invalid. Valid range is :\""},{"line_number":1364,"context_line":"                        \" 4096-16000000\")"},{"line_number":1365,"context_line":"                LOG.exception(msg)"}],"source_content_type":"text/x-python","patch_set":3,"id":"1ae5cdf2_efbdc069","line":1362,"in_reply_to":"1ae5cdf2_947708d4","updated":"2014-06-03 00:42:45.000000000","message":"Done","commit_id":"8a73f4e36b91c414079b6de90f8dc5f3f834e7d0"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"6e3ae5d4344b7503b2a65d7b84ac920d091257a9","unresolved":false,"context_lines":[{"line_number":1089,"context_line":"        if context.is_admin and \"remove_tenant\" in p:"},{"line_number":1090,"context_line":"            delete_profile_binding(context.session, p[\"remove_tenant\"], id)"},{"line_number":1091,"context_line":"            is_updated \u003d True"},{"line_number":1092,"context_line":"        if original_net_p.segment_type \u003d\u003d c_const.NETWORK_TYPE_TRUNK:"},{"line_number":1093,"context_line":"            #TODO(abhraut): Remove check when Trunk supports segment range."},{"line_number":1094,"context_line":"            if \"segment_range\" in p and p[\"segment_range\"]:"},{"line_number":1095,"context_line":"                msg \u003d _(\"segment_range not required for TRUNK\")"}],"source_content_type":"text/x-python","patch_set":4,"id":"1ae5cdf2_cb42a567","line":1092,"updated":"2014-06-03 12:11:57.000000000","message":"Still concerned about the coverage of UT for all this new logic. Is it covered somewhere?","commit_id":"a5c801194ddb6757dbb99bdfb498e36abef75053"},{"author":{"_account_id":9680,"name":"AARON ZHANG","email":"fenzhang@cisco.com","username":"AARON_ZHANG"},"change_message_id":"5416504aea3523ccb3d70ba9aa33cc9ffeea1301","unresolved":false,"context_lines":[{"line_number":1089,"context_line":"        if context.is_admin and \"remove_tenant\" in p:"},{"line_number":1090,"context_line":"            delete_profile_binding(context.session, p[\"remove_tenant\"], id)"},{"line_number":1091,"context_line":"            is_updated \u003d True"},{"line_number":1092,"context_line":"        if original_net_p.segment_type \u003d\u003d c_const.NETWORK_TYPE_TRUNK:"},{"line_number":1093,"context_line":"            #TODO(abhraut): Remove check when Trunk supports segment range."},{"line_number":1094,"context_line":"            if \"segment_range\" in p and p[\"segment_range\"]:"},{"line_number":1095,"context_line":"                msg \u003d _(\"segment_range not required for TRUNK\")"}],"source_content_type":"text/x-python","patch_set":4,"id":"1ae5cdf2_d90b4e8c","line":1092,"in_reply_to":"1ae5cdf2_cb42a567","updated":"2014-06-03 20:58:17.000000000","message":"Done","commit_id":"a5c801194ddb6757dbb99bdfb498e36abef75053"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"6e3ae5d4344b7503b2a65d7b84ac920d091257a9","unresolved":false,"context_lines":[{"line_number":1338,"context_line":"                physical_network\u003dnet_p[\"physical_network\"]"},{"line_number":1339,"context_line":"            )"},{"line_number":1340,"context_line":"            if not ((seg_min \u003c\u003d seg_max) and"},{"line_number":1341,"context_line":"                    ((seg_min in range(1, 3968) and"},{"line_number":1342,"context_line":"                      seg_max in range(1, 3968)) or"},{"line_number":1343,"context_line":"                     (seg_min in range(4048, 4094) and"},{"line_number":1344,"context_line":"                      seg_max in range(4048, 4094)))):"}],"source_content_type":"text/x-python","patch_set":4,"id":"1ae5cdf2_ab6ab9eb","line":1341,"updated":"2014-06-03 12:11:57.000000000","message":"Wondering whether magic numbers should be replaced with constants for VLAN limits?\n\nIs there something notable about the range from 3968-4047? Could it ever change?\n\nSame question with L1354","commit_id":"a5c801194ddb6757dbb99bdfb498e36abef75053"},{"author":{"_account_id":9680,"name":"AARON ZHANG","email":"fenzhang@cisco.com","username":"AARON_ZHANG"},"change_message_id":"5416504aea3523ccb3d70ba9aa33cc9ffeea1301","unresolved":false,"context_lines":[{"line_number":1338,"context_line":"                physical_network\u003dnet_p[\"physical_network\"]"},{"line_number":1339,"context_line":"            )"},{"line_number":1340,"context_line":"            if not ((seg_min \u003c\u003d seg_max) and"},{"line_number":1341,"context_line":"                    ((seg_min in range(1, 3968) and"},{"line_number":1342,"context_line":"                      seg_max in range(1, 3968)) or"},{"line_number":1343,"context_line":"                     (seg_min in range(4048, 4094) and"},{"line_number":1344,"context_line":"                      seg_max in range(4048, 4094)))):"}],"source_content_type":"text/x-python","patch_set":4,"id":"1ae5cdf2_7eb7803a","line":1341,"in_reply_to":"1ae5cdf2_ab6ab9eb","updated":"2014-06-03 20:58:17.000000000","message":"3968-4047 is cisco reserved vlan range. added constants for it.\nDone","commit_id":"a5c801194ddb6757dbb99bdfb498e36abef75053"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"6e3ae5d4344b7503b2a65d7b84ac920d091257a9","unresolved":false,"context_lines":[{"line_number":1350,"context_line":"                              c_const.NETWORK_TYPE_MULTI_SEGMENT,"},{"line_number":1351,"context_line":"                              c_const.NETWORK_TYPE_TRUNK]:"},{"line_number":1352,"context_line":"            profiles \u003d _get_network_profiles()"},{"line_number":1353,"context_line":"            if ((seg_min \u003e seg_max) or (seg_min \u003c 4096) or"},{"line_number":1354,"context_line":"                (seg_max \u003e 16000000)):"},{"line_number":1355,"context_line":"                msg \u003d _(\"segment range is invalid. Valid range is :\""},{"line_number":1356,"context_line":"                        \" 4096-16000000\")"}],"source_content_type":"text/x-python","patch_set":4,"id":"1ae5cdf2_2b8869c4","line":1353,"updated":"2014-06-03 12:11:57.000000000","message":"nit: extra parens not need around each comparison.","commit_id":"a5c801194ddb6757dbb99bdfb498e36abef75053"},{"author":{"_account_id":9680,"name":"AARON ZHANG","email":"fenzhang@cisco.com","username":"AARON_ZHANG"},"change_message_id":"5416504aea3523ccb3d70ba9aa33cc9ffeea1301","unresolved":false,"context_lines":[{"line_number":1350,"context_line":"                              c_const.NETWORK_TYPE_MULTI_SEGMENT,"},{"line_number":1351,"context_line":"                              c_const.NETWORK_TYPE_TRUNK]:"},{"line_number":1352,"context_line":"            profiles \u003d _get_network_profiles()"},{"line_number":1353,"context_line":"            if ((seg_min \u003e seg_max) or (seg_min \u003c 4096) or"},{"line_number":1354,"context_line":"                (seg_max \u003e 16000000)):"},{"line_number":1355,"context_line":"                msg \u003d _(\"segment range is invalid. Valid range is :\""},{"line_number":1356,"context_line":"                        \" 4096-16000000\")"}],"source_content_type":"text/x-python","patch_set":4,"id":"1ae5cdf2_9eb44c36","line":1353,"in_reply_to":"1ae5cdf2_2b8869c4","updated":"2014-06-03 20:58:17.000000000","message":"Done","commit_id":"a5c801194ddb6757dbb99bdfb498e36abef75053"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"da7c3f6e235ce5dcb66cb2451765ca701621f869","unresolved":false,"context_lines":[{"line_number":1127,"context_line":"        # Update network profile if name is updated and the network profile"},{"line_number":1128,"context_line":"        # is not yet updated."},{"line_number":1129,"context_line":"        if \"name\" in p and not is_updated:"},{"line_number":1130,"context_line":"            is_updated \u003d True"},{"line_number":1131,"context_line":"        # Return network profile if it is successfully updated."},{"line_number":1132,"context_line":"        if is_updated:"},{"line_number":1133,"context_line":"            return self._make_network_profile_dict("}],"source_content_type":"text/x-python","patch_set":5,"id":"1ae5cdf2_3c57b6cb","line":1130,"updated":"2014-06-04 02:25:59.000000000","message":"1129,1130 could be...\n\nis_updated |\u003d \u0027name\u0027 in p","commit_id":"928d3ab23e9a37c9ecf3fea616ab32ffe3fbc5b0"},{"author":{"_account_id":9680,"name":"AARON ZHANG","email":"fenzhang@cisco.com","username":"AARON_ZHANG"},"change_message_id":"48fe13530d0e322ea65276cac31573c502745d69","unresolved":false,"context_lines":[{"line_number":1127,"context_line":"        # Update network profile if name is updated and the network profile"},{"line_number":1128,"context_line":"        # is not yet updated."},{"line_number":1129,"context_line":"        if \"name\" in p and not is_updated:"},{"line_number":1130,"context_line":"            is_updated \u003d True"},{"line_number":1131,"context_line":"        # Return network profile if it is successfully updated."},{"line_number":1132,"context_line":"        if is_updated:"},{"line_number":1133,"context_line":"            return self._make_network_profile_dict("}],"source_content_type":"text/x-python","patch_set":5,"id":"1ae5cdf2_8dd6914d","line":1130,"in_reply_to":"1ae5cdf2_3c57b6cb","updated":"2014-06-05 18:22:52.000000000","message":"Is there any performance concern for this change? otherwise I think the original code may be easier to read...","commit_id":"928d3ab23e9a37c9ecf3fea616ab32ffe3fbc5b0"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"da7c3f6e235ce5dcb66cb2451765ca701621f869","unresolved":false,"context_lines":[{"line_number":1346,"context_line":"                     (seg_min in range(c_const.NEXUS_VLAN_RESERVED_MAX + 1,"},{"line_number":1347,"context_line":"                                       constants.MAX_VLAN_TAG) and"},{"line_number":1348,"context_line":"                      seg_max in range(c_const.NEXUS_VLAN_RESERVED_MAX + 1,"},{"line_number":1349,"context_line":"                                       constants.MAX_VLAN_TAG)))):"},{"line_number":1350,"context_line":"                msg \u003d _(\"Segment range is invalid, select from 1-3967, \""},{"line_number":1351,"context_line":"                        \"4048-4093\")"},{"line_number":1352,"context_line":"                LOG.exception(msg)"}],"source_content_type":"text/x-python","patch_set":5,"id":"1ae5cdf2_7c285ee2","line":1349,"updated":"2014-06-04 02:25:59.000000000","message":"Each one of these range calls constructs a list of every integer in the range. Is is possible to convert these to regular \u003e\u003c bounds checks? \n\nSome of this validation looks to be shared with 1358-1360. Maybe some of it could be moved before the branch at 1336.","commit_id":"928d3ab23e9a37c9ecf3fea616ab32ffe3fbc5b0"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"c12ecd1d7ba9041e4a53012d18cfb1f31c00baeb","unresolved":false,"context_lines":[{"line_number":1346,"context_line":"                     (seg_min in range(c_const.NEXUS_VLAN_RESERVED_MAX + 1,"},{"line_number":1347,"context_line":"                                       constants.MAX_VLAN_TAG) and"},{"line_number":1348,"context_line":"                      seg_max in range(c_const.NEXUS_VLAN_RESERVED_MAX + 1,"},{"line_number":1349,"context_line":"                                       constants.MAX_VLAN_TAG)))):"},{"line_number":1350,"context_line":"                msg \u003d _(\"Segment range is invalid, select from 1-3967, \""},{"line_number":1351,"context_line":"                        \"4048-4093\")"},{"line_number":1352,"context_line":"                LOG.exception(msg)"}],"source_content_type":"text/x-python","patch_set":5,"id":"1ae5cdf2_fd699ff9","line":1349,"in_reply_to":"1ae5cdf2_38f5f456","updated":"2014-06-05 03:07:05.000000000","message":"That\u0027s good to know because this is actually much nicer to read. Maybe there is an optimization in the backend for ranges of integers.","commit_id":"928d3ab23e9a37c9ecf3fea616ab32ffe3fbc5b0"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"07375ef2b5928c93dd44aa55c8b314ed49ad1c73","unresolved":false,"context_lines":[{"line_number":1346,"context_line":"                     (seg_min in range(c_const.NEXUS_VLAN_RESERVED_MAX + 1,"},{"line_number":1347,"context_line":"                                       constants.MAX_VLAN_TAG) and"},{"line_number":1348,"context_line":"                      seg_max in range(c_const.NEXUS_VLAN_RESERVED_MAX + 1,"},{"line_number":1349,"context_line":"                                       constants.MAX_VLAN_TAG)))):"},{"line_number":1350,"context_line":"                msg \u003d _(\"Segment range is invalid, select from 1-3967, \""},{"line_number":1351,"context_line":"                        \"4048-4093\")"},{"line_number":1352,"context_line":"                LOG.exception(msg)"}],"source_content_type":"text/x-python","patch_set":5,"id":"1ae5cdf2_38f5f456","line":1349,"in_reply_to":"1ae5cdf2_7c285ee2","updated":"2014-06-04 10:54:07.000000000","message":"I did a quick timeit check of range vs comparison and the comparison was a bit slower. Not sure why, other than it is a small range?","commit_id":"928d3ab23e9a37c9ecf3fea616ab32ffe3fbc5b0"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"da7c3f6e235ce5dcb66cb2451765ca701621f869","unresolved":false,"context_lines":[{"line_number":1348,"context_line":"                      seg_max in range(c_const.NEXUS_VLAN_RESERVED_MAX + 1,"},{"line_number":1349,"context_line":"                                       constants.MAX_VLAN_TAG)))):"},{"line_number":1350,"context_line":"                msg \u003d _(\"Segment range is invalid, select from 1-3967, \""},{"line_number":1351,"context_line":"                        \"4048-4093\")"},{"line_number":1352,"context_line":"                LOG.exception(msg)"},{"line_number":1353,"context_line":"                raise n_exc.InvalidInput(error_message\u003dmsg)"},{"line_number":1354,"context_line":"        elif segment_type in [c_const.NETWORK_TYPE_OVERLAY,"}],"source_content_type":"text/x-python","patch_set":5,"id":"1ae5cdf2_dc1b32c8","line":1351,"updated":"2014-06-04 02:25:59.000000000","message":"Shouldn\u0027t this message be based on the constants as well?","commit_id":"928d3ab23e9a37c9ecf3fea616ab32ffe3fbc5b0"},{"author":{"_account_id":9680,"name":"AARON ZHANG","email":"fenzhang@cisco.com","username":"AARON_ZHANG"},"change_message_id":"48fe13530d0e322ea65276cac31573c502745d69","unresolved":false,"context_lines":[{"line_number":1348,"context_line":"                      seg_max in range(c_const.NEXUS_VLAN_RESERVED_MAX + 1,"},{"line_number":1349,"context_line":"                                       constants.MAX_VLAN_TAG)))):"},{"line_number":1350,"context_line":"                msg \u003d _(\"Segment range is invalid, select from 1-3967, \""},{"line_number":1351,"context_line":"                        \"4048-4093\")"},{"line_number":1352,"context_line":"                LOG.exception(msg)"},{"line_number":1353,"context_line":"                raise n_exc.InvalidInput(error_message\u003dmsg)"},{"line_number":1354,"context_line":"        elif segment_type in [c_const.NETWORK_TYPE_OVERLAY,"}],"source_content_type":"text/x-python","patch_set":5,"id":"1ae5cdf2_b771f80d","line":1351,"in_reply_to":"1ae5cdf2_dc1b32c8","updated":"2014-06-05 18:22:52.000000000","message":"Done","commit_id":"928d3ab23e9a37c9ecf3fea616ab32ffe3fbc5b0"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"07375ef2b5928c93dd44aa55c8b314ed49ad1c73","unresolved":false,"context_lines":[{"line_number":1348,"context_line":"                      seg_max in range(c_const.NEXUS_VLAN_RESERVED_MAX + 1,"},{"line_number":1349,"context_line":"                                       constants.MAX_VLAN_TAG)))):"},{"line_number":1350,"context_line":"                msg \u003d _(\"Segment range is invalid, select from 1-3967, \""},{"line_number":1351,"context_line":"                        \"4048-4093\")"},{"line_number":1352,"context_line":"                LOG.exception(msg)"},{"line_number":1353,"context_line":"                raise n_exc.InvalidInput(error_message\u003dmsg)"},{"line_number":1354,"context_line":"        elif segment_type in [c_const.NETWORK_TYPE_OVERLAY,"}],"source_content_type":"text/x-python","patch_set":5,"id":"1ae5cdf2_58e640b1","line":1351,"in_reply_to":"1ae5cdf2_dc1b32c8","updated":"2014-06-04 10:54:07.000000000","message":"I agree","commit_id":"928d3ab23e9a37c9ecf3fea616ab32ffe3fbc5b0"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"da7c3f6e235ce5dcb66cb2451765ca701621f869","unresolved":false,"context_lines":[{"line_number":1361,"context_line":"                msg \u003d _(\"segment range is invalid. Valid range is :\""},{"line_number":1362,"context_line":"                        \" 4096-16000000\")"},{"line_number":1363,"context_line":"                LOG.exception(msg)"},{"line_number":1364,"context_line":"                raise n_exc.InvalidInput(error_message\u003dmsg)"},{"line_number":1365,"context_line":"        if profiles:"},{"line_number":1366,"context_line":"            for profile in profiles:"},{"line_number":1367,"context_line":"                if id and profile.id \u003d\u003d id:"}],"source_content_type":"text/x-python","patch_set":5,"id":"1ae5cdf2_5c5e4277","line":1364,"updated":"2014-06-04 02:25:59.000000000","message":"put 1357 here to avoid a  call to _get_network_profiles() if the range is invalid.","commit_id":"928d3ab23e9a37c9ecf3fea616ab32ffe3fbc5b0"},{"author":{"_account_id":9680,"name":"AARON ZHANG","email":"fenzhang@cisco.com","username":"AARON_ZHANG"},"change_message_id":"48fe13530d0e322ea65276cac31573c502745d69","unresolved":false,"context_lines":[{"line_number":1361,"context_line":"                msg \u003d _(\"segment range is invalid. Valid range is :\""},{"line_number":1362,"context_line":"                        \" 4096-16000000\")"},{"line_number":1363,"context_line":"                LOG.exception(msg)"},{"line_number":1364,"context_line":"                raise n_exc.InvalidInput(error_message\u003dmsg)"},{"line_number":1365,"context_line":"        if profiles:"},{"line_number":1366,"context_line":"            for profile in profiles:"},{"line_number":1367,"context_line":"                if id and profile.id \u003d\u003d id:"}],"source_content_type":"text/x-python","patch_set":5,"id":"1ae5cdf2_cdcc19be","line":1364,"in_reply_to":"1ae5cdf2_5c5e4277","updated":"2014-06-05 18:22:52.000000000","message":"Done","commit_id":"928d3ab23e9a37c9ecf3fea616ab32ffe3fbc5b0"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"fa35960f60a945d8519a3e2cf15bce84bf49b16c","unresolved":false,"context_lines":[{"line_number":1092,"context_line":"            is_updated \u003d True"},{"line_number":1093,"context_line":"        if original_net_p.segment_type \u003d\u003d c_const.NETWORK_TYPE_TRUNK:"},{"line_number":1094,"context_line":"            #TODO(abhraut): Remove check when Trunk supports segment range."},{"line_number":1095,"context_line":"            if \"segment_range\" in p and p[\"segment_range\"]:"},{"line_number":1096,"context_line":"                msg \u003d _(\"segment_range not required for TRUNK\")"},{"line_number":1097,"context_line":"                LOG.exception(msg)"},{"line_number":1098,"context_line":"                raise n_exc.InvalidInput(error_message\u003dmsg)"}],"source_content_type":"text/x-python","patch_set":6,"id":"1ae5cdf2_6f5e6214","line":1095,"updated":"2014-06-08 06:31:14.000000000","message":"nit: if p.get(\u0027segement_range\u0027):","commit_id":"da1ff48870eef7ba98c81d9e882e3543f73f2485"},{"author":{"_account_id":9680,"name":"AARON ZHANG","email":"fenzhang@cisco.com","username":"AARON_ZHANG"},"change_message_id":"6578f60ff16f395e4e3f973a0d1ef8497f363acc","unresolved":false,"context_lines":[{"line_number":1092,"context_line":"            is_updated \u003d True"},{"line_number":1093,"context_line":"        if original_net_p.segment_type \u003d\u003d c_const.NETWORK_TYPE_TRUNK:"},{"line_number":1094,"context_line":"            #TODO(abhraut): Remove check when Trunk supports segment range."},{"line_number":1095,"context_line":"            if \"segment_range\" in p and p[\"segment_range\"]:"},{"line_number":1096,"context_line":"                msg \u003d _(\"segment_range not required for TRUNK\")"},{"line_number":1097,"context_line":"                LOG.exception(msg)"},{"line_number":1098,"context_line":"                raise n_exc.InvalidInput(error_message\u003dmsg)"}],"source_content_type":"text/x-python","patch_set":6,"id":"1ae5cdf2_e23980d9","line":1095,"in_reply_to":"1ae5cdf2_6f5e6214","updated":"2014-06-09 22:10:40.000000000","message":"Done","commit_id":"da1ff48870eef7ba98c81d9e882e3543f73f2485"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"fa35960f60a945d8519a3e2cf15bce84bf49b16c","unresolved":false,"context_lines":[{"line_number":1094,"context_line":"            #TODO(abhraut): Remove check when Trunk supports segment range."},{"line_number":1095,"context_line":"            if \"segment_range\" in p and p[\"segment_range\"]:"},{"line_number":1096,"context_line":"                msg \u003d _(\"segment_range not required for TRUNK\")"},{"line_number":1097,"context_line":"                LOG.exception(msg)"},{"line_number":1098,"context_line":"                raise n_exc.InvalidInput(error_message\u003dmsg)"},{"line_number":1099,"context_line":"        if original_net_p.segment_type in [c_const.NETWORK_TYPE_VLAN,"},{"line_number":1100,"context_line":"                                           c_const.NETWORK_TYPE_TRUNK]:"}],"source_content_type":"text/x-python","patch_set":6,"id":"1ae5cdf2_af9f8ab3","line":1097,"updated":"2014-06-08 06:31:14.000000000","message":"there\u0027s not exception context here, I think LOG.error would be more appropriate","commit_id":"da1ff48870eef7ba98c81d9e882e3543f73f2485"},{"author":{"_account_id":9680,"name":"AARON ZHANG","email":"fenzhang@cisco.com","username":"AARON_ZHANG"},"change_message_id":"6578f60ff16f395e4e3f973a0d1ef8497f363acc","unresolved":false,"context_lines":[{"line_number":1094,"context_line":"            #TODO(abhraut): Remove check when Trunk supports segment range."},{"line_number":1095,"context_line":"            if \"segment_range\" in p and p[\"segment_range\"]:"},{"line_number":1096,"context_line":"                msg \u003d _(\"segment_range not required for TRUNK\")"},{"line_number":1097,"context_line":"                LOG.exception(msg)"},{"line_number":1098,"context_line":"                raise n_exc.InvalidInput(error_message\u003dmsg)"},{"line_number":1099,"context_line":"        if original_net_p.segment_type in [c_const.NETWORK_TYPE_VLAN,"},{"line_number":1100,"context_line":"                                           c_const.NETWORK_TYPE_TRUNK]:"}],"source_content_type":"text/x-python","patch_set":6,"id":"1ae5cdf2_02358cda","line":1097,"in_reply_to":"1ae5cdf2_af9f8ab3","updated":"2014-06-09 22:10:40.000000000","message":"Done","commit_id":"da1ff48870eef7ba98c81d9e882e3543f73f2485"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"fa35960f60a945d8519a3e2cf15bce84bf49b16c","unresolved":false,"context_lines":[{"line_number":1098,"context_line":"                raise n_exc.InvalidInput(error_message\u003dmsg)"},{"line_number":1099,"context_line":"        if original_net_p.segment_type in [c_const.NETWORK_TYPE_VLAN,"},{"line_number":1100,"context_line":"                                           c_const.NETWORK_TYPE_TRUNK]:"},{"line_number":1101,"context_line":"            if \"multicast_ip_range\" in p and p[\"multicast_ip_range\"]:"},{"line_number":1102,"context_line":"                msg \u003d _(\"multicast_ip_range not required\")"},{"line_number":1103,"context_line":"                LOG.exception(msg)"},{"line_number":1104,"context_line":"                raise n_exc.InvalidInput(error_message\u003dmsg)"}],"source_content_type":"text/x-python","patch_set":6,"id":"1ae5cdf2_8f9acec3","line":1101,"updated":"2014-06-08 06:31:14.000000000","message":"use .get() to check for key existense","commit_id":"da1ff48870eef7ba98c81d9e882e3543f73f2485"},{"author":{"_account_id":9680,"name":"AARON ZHANG","email":"fenzhang@cisco.com","username":"AARON_ZHANG"},"change_message_id":"6578f60ff16f395e4e3f973a0d1ef8497f363acc","unresolved":false,"context_lines":[{"line_number":1098,"context_line":"                raise n_exc.InvalidInput(error_message\u003dmsg)"},{"line_number":1099,"context_line":"        if original_net_p.segment_type in [c_const.NETWORK_TYPE_VLAN,"},{"line_number":1100,"context_line":"                                           c_const.NETWORK_TYPE_TRUNK]:"},{"line_number":1101,"context_line":"            if \"multicast_ip_range\" in p and p[\"multicast_ip_range\"]:"},{"line_number":1102,"context_line":"                msg \u003d _(\"multicast_ip_range not required\")"},{"line_number":1103,"context_line":"                LOG.exception(msg)"},{"line_number":1104,"context_line":"                raise n_exc.InvalidInput(error_message\u003dmsg)"}],"source_content_type":"text/x-python","patch_set":6,"id":"1ae5cdf2_223448dd","line":1101,"in_reply_to":"1ae5cdf2_8f9acec3","updated":"2014-06-09 22:10:40.000000000","message":"Done","commit_id":"da1ff48870eef7ba98c81d9e882e3543f73f2485"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"fa35960f60a945d8519a3e2cf15bce84bf49b16c","unresolved":false,"context_lines":[{"line_number":1100,"context_line":"                                           c_const.NETWORK_TYPE_TRUNK]:"},{"line_number":1101,"context_line":"            if \"multicast_ip_range\" in p and p[\"multicast_ip_range\"]:"},{"line_number":1102,"context_line":"                msg \u003d _(\"multicast_ip_range not required\")"},{"line_number":1103,"context_line":"                LOG.exception(msg)"},{"line_number":1104,"context_line":"                raise n_exc.InvalidInput(error_message\u003dmsg)"},{"line_number":1105,"context_line":"        # Update segment range if network profile is not in use."},{"line_number":1106,"context_line":"        if (\"segment_range\" in p and p[\"segment_range\"] and"}],"source_content_type":"text/x-python","patch_set":6,"id":"1ae5cdf2_efa992e0","line":1103,"updated":"2014-06-08 06:31:14.000000000","message":"LOG.error?","commit_id":"da1ff48870eef7ba98c81d9e882e3543f73f2485"},{"author":{"_account_id":9680,"name":"AARON ZHANG","email":"fenzhang@cisco.com","username":"AARON_ZHANG"},"change_message_id":"6578f60ff16f395e4e3f973a0d1ef8497f363acc","unresolved":false,"context_lines":[{"line_number":1100,"context_line":"                                           c_const.NETWORK_TYPE_TRUNK]:"},{"line_number":1101,"context_line":"            if \"multicast_ip_range\" in p and p[\"multicast_ip_range\"]:"},{"line_number":1102,"context_line":"                msg \u003d _(\"multicast_ip_range not required\")"},{"line_number":1103,"context_line":"                LOG.exception(msg)"},{"line_number":1104,"context_line":"                raise n_exc.InvalidInput(error_message\u003dmsg)"},{"line_number":1105,"context_line":"        # Update segment range if network profile is not in use."},{"line_number":1106,"context_line":"        if (\"segment_range\" in p and p[\"segment_range\"] and"}],"source_content_type":"text/x-python","patch_set":6,"id":"1ae5cdf2_422f9488","line":1103,"in_reply_to":"1ae5cdf2_efa992e0","updated":"2014-06-09 22:10:40.000000000","message":"Done","commit_id":"da1ff48870eef7ba98c81d9e882e3543f73f2485"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"fa35960f60a945d8519a3e2cf15bce84bf49b16c","unresolved":false,"context_lines":[{"line_number":1103,"context_line":"                LOG.exception(msg)"},{"line_number":1104,"context_line":"                raise n_exc.InvalidInput(error_message\u003dmsg)"},{"line_number":1105,"context_line":"        # Update segment range if network profile is not in use."},{"line_number":1106,"context_line":"        if (\"segment_range\" in p and p[\"segment_range\"] and"},{"line_number":1107,"context_line":"            p[\"segment_range\"] !\u003d original_net_p.segment_range):"},{"line_number":1108,"context_line":"            if not self._segment_in_use(context.session, original_net_p):"},{"line_number":1109,"context_line":"                delete_segment_allocations(context.session, original_net_p)"}],"source_content_type":"text/x-python","patch_set":6,"id":"1ae5cdf2_ef80b248","line":1106,"updated":"2014-06-08 06:31:14.000000000","message":"could be rewritten as:\n\nif p.get(segment_range) !\u003d original_net_p.segment_range:","commit_id":"da1ff48870eef7ba98c81d9e882e3543f73f2485"},{"author":{"_account_id":9680,"name":"AARON ZHANG","email":"fenzhang@cisco.com","username":"AARON_ZHANG"},"change_message_id":"6578f60ff16f395e4e3f973a0d1ef8497f363acc","unresolved":false,"context_lines":[{"line_number":1103,"context_line":"                LOG.exception(msg)"},{"line_number":1104,"context_line":"                raise n_exc.InvalidInput(error_message\u003dmsg)"},{"line_number":1105,"context_line":"        # Update segment range if network profile is not in use."},{"line_number":1106,"context_line":"        if (\"segment_range\" in p and p[\"segment_range\"] and"},{"line_number":1107,"context_line":"            p[\"segment_range\"] !\u003d original_net_p.segment_range):"},{"line_number":1108,"context_line":"            if not self._segment_in_use(context.session, original_net_p):"},{"line_number":1109,"context_line":"                delete_segment_allocations(context.session, original_net_p)"}],"source_content_type":"text/x-python","patch_set":6,"id":"1ae5cdf2_224b685a","line":1106,"in_reply_to":"1ae5cdf2_ef80b248","updated":"2014-06-09 22:10:40.000000000","message":"Done","commit_id":"da1ff48870eef7ba98c81d9e882e3543f73f2485"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"fa35960f60a945d8519a3e2cf15bce84bf49b16c","unresolved":false,"context_lines":[{"line_number":1117,"context_line":"                is_updated \u003d True"},{"line_number":1118,"context_line":"            else:"},{"line_number":1119,"context_line":"                raise c_exc.NetworkProfileInUse(profile\u003did)"},{"line_number":1120,"context_line":"        if (\u0027multicast_ip_range\u0027 in p and p[\"multicast_ip_range\"] and"},{"line_number":1121,"context_line":"            p[\"multicast_ip_range\"] !\u003d original_net_p[\"multicast_ip_range\"]):"},{"line_number":1122,"context_line":"            self._validate_multicast_ip_range(p)"},{"line_number":1123,"context_line":"            if not self._segment_in_use(context.session, original_net_p):"}],"source_content_type":"text/x-python","patch_set":6,"id":"1ae5cdf2_0f95de87","line":1120,"updated":"2014-06-08 06:31:14.000000000","message":"same as above","commit_id":"da1ff48870eef7ba98c81d9e882e3543f73f2485"},{"author":{"_account_id":9680,"name":"AARON ZHANG","email":"fenzhang@cisco.com","username":"AARON_ZHANG"},"change_message_id":"6578f60ff16f395e4e3f973a0d1ef8497f363acc","unresolved":false,"context_lines":[{"line_number":1117,"context_line":"                is_updated \u003d True"},{"line_number":1118,"context_line":"            else:"},{"line_number":1119,"context_line":"                raise c_exc.NetworkProfileInUse(profile\u003did)"},{"line_number":1120,"context_line":"        if (\u0027multicast_ip_range\u0027 in p and p[\"multicast_ip_range\"] and"},{"line_number":1121,"context_line":"            p[\"multicast_ip_range\"] !\u003d original_net_p[\"multicast_ip_range\"]):"},{"line_number":1122,"context_line":"            self._validate_multicast_ip_range(p)"},{"line_number":1123,"context_line":"            if not self._segment_in_use(context.session, original_net_p):"}],"source_content_type":"text/x-python","patch_set":6,"id":"1ae5cdf2_629bb0c9","line":1120,"in_reply_to":"1ae5cdf2_0f95de87","updated":"2014-06-09 22:10:40.000000000","message":"Done","commit_id":"da1ff48870eef7ba98c81d9e882e3543f73f2485"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"fa35960f60a945d8519a3e2cf15bce84bf49b16c","unresolved":false,"context_lines":[{"line_number":1292,"context_line":"        if segment_type \u003d\u003d c_const.NETWORK_TYPE_TRUNK:"},{"line_number":1293,"context_line":"            if net_p[\"segment_range\"]:"},{"line_number":1294,"context_line":"                msg \u003d _(\"segment_range not required for trunk\")"},{"line_number":1295,"context_line":"                LOG.exception(msg)"},{"line_number":1296,"context_line":"                raise n_exc.InvalidInput(error_message\u003dmsg)"},{"line_number":1297,"context_line":"        if segment_type in [c_const.NETWORK_TYPE_TRUNK,"},{"line_number":1298,"context_line":"                            c_const.NETWORK_TYPE_OVERLAY]:"}],"source_content_type":"text/x-python","patch_set":6,"id":"1ae5cdf2_cff21606","line":1295,"updated":"2014-06-08 06:31:14.000000000","message":"LOG.error","commit_id":"da1ff48870eef7ba98c81d9e882e3543f73f2485"},{"author":{"_account_id":9680,"name":"AARON ZHANG","email":"fenzhang@cisco.com","username":"AARON_ZHANG"},"change_message_id":"6578f60ff16f395e4e3f973a0d1ef8497f363acc","unresolved":false,"context_lines":[{"line_number":1292,"context_line":"        if segment_type \u003d\u003d c_const.NETWORK_TYPE_TRUNK:"},{"line_number":1293,"context_line":"            if net_p[\"segment_range\"]:"},{"line_number":1294,"context_line":"                msg \u003d _(\"segment_range not required for trunk\")"},{"line_number":1295,"context_line":"                LOG.exception(msg)"},{"line_number":1296,"context_line":"                raise n_exc.InvalidInput(error_message\u003dmsg)"},{"line_number":1297,"context_line":"        if segment_type in [c_const.NETWORK_TYPE_TRUNK,"},{"line_number":1298,"context_line":"                            c_const.NETWORK_TYPE_OVERLAY]:"}],"source_content_type":"text/x-python","patch_set":6,"id":"1ae5cdf2_02aaecd1","line":1295,"in_reply_to":"1ae5cdf2_cff21606","updated":"2014-06-09 22:10:40.000000000","message":"Done","commit_id":"da1ff48870eef7ba98c81d9e882e3543f73f2485"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"fa35960f60a945d8519a3e2cf15bce84bf49b16c","unresolved":false,"context_lines":[{"line_number":1349,"context_line":"                        \"nmin\": c_const.NEXUS_VLAN_RESERVED_MIN - 1,"},{"line_number":1350,"context_line":"                        \"nmax\": c_const.NEXUS_VLAN_RESERVED_MAX + 1,"},{"line_number":1351,"context_line":"                        \"max\": constants.MAX_VLAN_TAG - 1})"},{"line_number":1352,"context_line":"                LOG.exception(msg)"},{"line_number":1353,"context_line":"                raise n_exc.InvalidInput(error_message\u003dmsg)"},{"line_number":1354,"context_line":"            profiles \u003d _get_network_profiles("},{"line_number":1355,"context_line":"                db_session\u003dcontext.session,"}],"source_content_type":"text/x-python","patch_set":6,"id":"1ae5cdf2_eff7d2f3","line":1352,"updated":"2014-06-08 06:31:14.000000000","message":"LOG.error","commit_id":"da1ff48870eef7ba98c81d9e882e3543f73f2485"},{"author":{"_account_id":9680,"name":"AARON ZHANG","email":"fenzhang@cisco.com","username":"AARON_ZHANG"},"change_message_id":"6578f60ff16f395e4e3f973a0d1ef8497f363acc","unresolved":false,"context_lines":[{"line_number":1349,"context_line":"                        \"nmin\": c_const.NEXUS_VLAN_RESERVED_MIN - 1,"},{"line_number":1350,"context_line":"                        \"nmax\": c_const.NEXUS_VLAN_RESERVED_MAX + 1,"},{"line_number":1351,"context_line":"                        \"max\": constants.MAX_VLAN_TAG - 1})"},{"line_number":1352,"context_line":"                LOG.exception(msg)"},{"line_number":1353,"context_line":"                raise n_exc.InvalidInput(error_message\u003dmsg)"},{"line_number":1354,"context_line":"            profiles \u003d _get_network_profiles("},{"line_number":1355,"context_line":"                db_session\u003dcontext.session,"}],"source_content_type":"text/x-python","patch_set":6,"id":"1ae5cdf2_42b4f434","line":1352,"in_reply_to":"1ae5cdf2_eff7d2f3","updated":"2014-06-09 22:10:40.000000000","message":"Done","commit_id":"da1ff48870eef7ba98c81d9e882e3543f73f2485"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"ff9475fc1b2c1f2312a6aef106f290e85633f814","unresolved":false,"context_lines":[{"line_number":1362,"context_line":"                seg_min \u003c c_const.NEXUS_VXLAN_MIN or"},{"line_number":1363,"context_line":"                seg_max \u003e c_const.NEXUS_VXLAN_MAX):"},{"line_number":1364,"context_line":"                msg \u003d _(\"segment range is invalid. Valid range is : \""},{"line_number":1365,"context_line":"                        \"4096-16000000\")"},{"line_number":1366,"context_line":"                LOG.exception(msg)"},{"line_number":1367,"context_line":"                raise n_exc.InvalidInput(error_message\u003dmsg)"},{"line_number":1368,"context_line":"            profiles \u003d _get_network_profiles(db_session\u003dcontext.session)"}],"source_content_type":"text/x-python","patch_set":6,"id":"1ae5cdf2_bbaaa382","line":1365,"updated":"2014-06-05 18:51:38.000000000","message":"Could use the constant here and add one for 16000000.","commit_id":"da1ff48870eef7ba98c81d9e882e3543f73f2485"},{"author":{"_account_id":9680,"name":"AARON ZHANG","email":"fenzhang@cisco.com","username":"AARON_ZHANG"},"change_message_id":"6578f60ff16f395e4e3f973a0d1ef8497f363acc","unresolved":false,"context_lines":[{"line_number":1362,"context_line":"                seg_min \u003c c_const.NEXUS_VXLAN_MIN or"},{"line_number":1363,"context_line":"                seg_max \u003e c_const.NEXUS_VXLAN_MAX):"},{"line_number":1364,"context_line":"                msg \u003d _(\"segment range is invalid. Valid range is : \""},{"line_number":1365,"context_line":"                        \"4096-16000000\")"},{"line_number":1366,"context_line":"                LOG.exception(msg)"},{"line_number":1367,"context_line":"                raise n_exc.InvalidInput(error_message\u003dmsg)"},{"line_number":1368,"context_line":"            profiles \u003d _get_network_profiles(db_session\u003dcontext.session)"}],"source_content_type":"text/x-python","patch_set":6,"id":"1ae5cdf2_a2ca189f","line":1365,"in_reply_to":"1ae5cdf2_bbaaa382","updated":"2014-06-09 22:10:40.000000000","message":"Done","commit_id":"da1ff48870eef7ba98c81d9e882e3543f73f2485"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"fa35960f60a945d8519a3e2cf15bce84bf49b16c","unresolved":false,"context_lines":[{"line_number":1363,"context_line":"                seg_max \u003e c_const.NEXUS_VXLAN_MAX):"},{"line_number":1364,"context_line":"                msg \u003d _(\"segment range is invalid. Valid range is : \""},{"line_number":1365,"context_line":"                        \"4096-16000000\")"},{"line_number":1366,"context_line":"                LOG.exception(msg)"},{"line_number":1367,"context_line":"                raise n_exc.InvalidInput(error_message\u003dmsg)"},{"line_number":1368,"context_line":"            profiles \u003d _get_network_profiles(db_session\u003dcontext.session)"},{"line_number":1369,"context_line":"        if profiles:"}],"source_content_type":"text/x-python","patch_set":6,"id":"1ae5cdf2_0fdcfe73","line":1366,"updated":"2014-06-08 06:31:14.000000000","message":"LOG.error","commit_id":"da1ff48870eef7ba98c81d9e882e3543f73f2485"},{"author":{"_account_id":9680,"name":"AARON ZHANG","email":"fenzhang@cisco.com","username":"AARON_ZHANG"},"change_message_id":"6578f60ff16f395e4e3f973a0d1ef8497f363acc","unresolved":false,"context_lines":[{"line_number":1363,"context_line":"                seg_max \u003e c_const.NEXUS_VXLAN_MAX):"},{"line_number":1364,"context_line":"                msg \u003d _(\"segment range is invalid. Valid range is : \""},{"line_number":1365,"context_line":"                        \"4096-16000000\")"},{"line_number":1366,"context_line":"                LOG.exception(msg)"},{"line_number":1367,"context_line":"                raise n_exc.InvalidInput(error_message\u003dmsg)"},{"line_number":1368,"context_line":"            profiles \u003d _get_network_profiles(db_session\u003dcontext.session)"},{"line_number":1369,"context_line":"        if profiles:"}],"source_content_type":"text/x-python","patch_set":6,"id":"1ae5cdf2_e2c34088","line":1366,"in_reply_to":"1ae5cdf2_0fdcfe73","updated":"2014-06-09 22:10:40.000000000","message":"Done","commit_id":"da1ff48870eef7ba98c81d9e882e3543f73f2485"},{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"27ce74fe60f3c2bf4083377943847dd7f8226fc8","unresolved":false,"context_lines":[{"line_number":998,"context_line":""},{"line_number":999,"context_line":"    def _segment_in_use(self, db_session, network_profile):"},{"line_number":1000,"context_line":"        \"\"\"Verify whether a segment is allocated for given network profile.\"\"\""},{"line_number":1001,"context_line":"        with db_session.begin(subtransactions\u003dTrue):"},{"line_number":1002,"context_line":"            return (db_session.query(n1kv_models_v2.N1kvNetworkBinding)."},{"line_number":1003,"context_line":"                    filter_by(profile_id\u003dnetwork_profile[\u0027id\u0027])).first()"},{"line_number":1004,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"1ae5cdf2_2cd7bb24","line":1001,"updated":"2014-06-10 15:10:47.000000000","message":"is a transaction really needed here?","commit_id":"accd56fea86a0cd5f1706cbdd5b1bbc31c4cf479"},{"author":{"_account_id":9680,"name":"AARON ZHANG","email":"fenzhang@cisco.com","username":"AARON_ZHANG"},"change_message_id":"717a85814a430ecf3cd9c447c4dbf68998844ba0","unresolved":false,"context_lines":[{"line_number":998,"context_line":""},{"line_number":999,"context_line":"    def _segment_in_use(self, db_session, network_profile):"},{"line_number":1000,"context_line":"        \"\"\"Verify whether a segment is allocated for given network profile.\"\"\""},{"line_number":1001,"context_line":"        with db_session.begin(subtransactions\u003dTrue):"},{"line_number":1002,"context_line":"            return (db_session.query(n1kv_models_v2.N1kvNetworkBinding)."},{"line_number":1003,"context_line":"                    filter_by(profile_id\u003dnetwork_profile[\u0027id\u0027])).first()"},{"line_number":1004,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"1ae5cdf2_0cd2f5d1","line":1001,"in_reply_to":"1ae5cdf2_2cd7bb24","updated":"2014-06-10 19:07:22.000000000","message":"this method would be a sub-transaction of an outer transaction. I agree it\u0027s not a need here. Just to guarantee isolation, we made it a sub-transaction.","commit_id":"accd56fea86a0cd5f1706cbdd5b1bbc31c4cf479"},{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"27ce74fe60f3c2bf4083377943847dd7f8226fc8","unresolved":false,"context_lines":[{"line_number":1067,"context_line":"        _profile \u003d delete_network_profile(context.session, id)"},{"line_number":1068,"context_line":"        return self._make_network_profile_dict(_profile)"},{"line_number":1069,"context_line":""},{"line_number":1070,"context_line":"    def update_network_profile(self, context, id, network_profile):"},{"line_number":1071,"context_line":"        \"\"\""},{"line_number":1072,"context_line":"        Update a network profile."},{"line_number":1073,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"1ae5cdf2_ec2f9386","line":1070,"updated":"2014-06-10 15:10:47.000000000","message":"This method is too long, please consider creating internal methods to improve readability. I will leave some suggestions in the following comments","commit_id":"accd56fea86a0cd5f1706cbdd5b1bbc31c4cf479"},{"author":{"_account_id":9680,"name":"AARON ZHANG","email":"fenzhang@cisco.com","username":"AARON_ZHANG"},"change_message_id":"717a85814a430ecf3cd9c447c4dbf68998844ba0","unresolved":false,"context_lines":[{"line_number":1067,"context_line":"        _profile \u003d delete_network_profile(context.session, id)"},{"line_number":1068,"context_line":"        return self._make_network_profile_dict(_profile)"},{"line_number":1069,"context_line":""},{"line_number":1070,"context_line":"    def update_network_profile(self, context, id, network_profile):"},{"line_number":1071,"context_line":"        \"\"\""},{"line_number":1072,"context_line":"        Update a network profile."},{"line_number":1073,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"1ae5cdf2_05648d47","line":1070,"in_reply_to":"1ae5cdf2_ec2f9386","updated":"2014-06-10 19:07:22.000000000","message":"Thanks for you suggestion. But I think the logic of this method is not complicated, it looks long only because we had a few comments and many lines were wrapped up to comply with the max line length regulation. wrapping some logic into internal methods would be artificial and reduce readability since programmer has to look up and down to find the func signature.","commit_id":"accd56fea86a0cd5f1706cbdd5b1bbc31c4cf479"},{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"27ce74fe60f3c2bf4083377943847dd7f8226fc8","unresolved":false,"context_lines":[{"line_number":1090,"context_line":"        if context.is_admin and \"remove_tenant\" in p:"},{"line_number":1091,"context_line":"            delete_profile_binding(context.session, p[\"remove_tenant\"], id)"},{"line_number":1092,"context_line":"            is_updated \u003d True"},{"line_number":1093,"context_line":"        if original_net_p.segment_type \u003d\u003d c_const.NETWORK_TYPE_TRUNK:"},{"line_number":1094,"context_line":"            #TODO(abhraut): Remove check when Trunk supports segment range."},{"line_number":1095,"context_line":"            if p.get(\u0027segment_range\u0027):"},{"line_number":1096,"context_line":"                msg \u003d _(\"segment_range not required for TRUNK\")"}],"source_content_type":"text/x-python","patch_set":7,"id":"1ae5cdf2_51b74086","line":1093,"updated":"2014-06-10 15:10:47.000000000","message":"please wrap lines 1093-1098 in an internal method _check_segment_range_for_trunk","commit_id":"accd56fea86a0cd5f1706cbdd5b1bbc31c4cf479"},{"author":{"_account_id":9680,"name":"AARON ZHANG","email":"fenzhang@cisco.com","username":"AARON_ZHANG"},"change_message_id":"717a85814a430ecf3cd9c447c4dbf68998844ba0","unresolved":false,"context_lines":[{"line_number":1090,"context_line":"        if context.is_admin and \"remove_tenant\" in p:"},{"line_number":1091,"context_line":"            delete_profile_binding(context.session, p[\"remove_tenant\"], id)"},{"line_number":1092,"context_line":"            is_updated \u003d True"},{"line_number":1093,"context_line":"        if original_net_p.segment_type \u003d\u003d c_const.NETWORK_TYPE_TRUNK:"},{"line_number":1094,"context_line":"            #TODO(abhraut): Remove check when Trunk supports segment range."},{"line_number":1095,"context_line":"            if p.get(\u0027segment_range\u0027):"},{"line_number":1096,"context_line":"                msg \u003d _(\"segment_range not required for TRUNK\")"}],"source_content_type":"text/x-python","patch_set":7,"id":"1ae5cdf2_654b912b","line":1093,"in_reply_to":"1ae5cdf2_51b74086","updated":"2014-06-10 19:07:22.000000000","message":"thanks for you suggestion, but I don\u0027t think it\u0027s a good idea to wrap it in an internal method here for three reasons:\n1. this is the only place this code is used, so wrapping it wouldn\u0027t add reusability;\n2. including func signature and invocation, it would introduce more lines of code and reduce the readability since programmer has to look up and down to check the argument passing and return value\n3. it would decrease performance due to func invocation will cost some work, very slightly tho.","commit_id":"accd56fea86a0cd5f1706cbdd5b1bbc31c4cf479"},{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"27ce74fe60f3c2bf4083377943847dd7f8226fc8","unresolved":false,"context_lines":[{"line_number":1096,"context_line":"                msg \u003d _(\"segment_range not required for TRUNK\")"},{"line_number":1097,"context_line":"                LOG.error(msg)"},{"line_number":1098,"context_line":"                raise n_exc.InvalidInput(error_message\u003dmsg)"},{"line_number":1099,"context_line":"        if original_net_p.segment_type in [c_const.NETWORK_TYPE_VLAN,"},{"line_number":1100,"context_line":"                                           c_const.NETWORK_TYPE_TRUNK]:"},{"line_number":1101,"context_line":"            if p.get(\"multicast_ip_range\"):"},{"line_number":1102,"context_line":"                msg \u003d _(\"multicast_ip_range not required\")"}],"source_content_type":"text/x-python","patch_set":7,"id":"1ae5cdf2_d1819090","line":1099,"updated":"2014-06-10 15:10:47.000000000","message":"same here, wrap 1099.1104 in an internal method _check_multicast_ip_range","commit_id":"accd56fea86a0cd5f1706cbdd5b1bbc31c4cf479"},{"author":{"_account_id":9680,"name":"AARON ZHANG","email":"fenzhang@cisco.com","username":"AARON_ZHANG"},"change_message_id":"717a85814a430ecf3cd9c447c4dbf68998844ba0","unresolved":false,"context_lines":[{"line_number":1096,"context_line":"                msg \u003d _(\"segment_range not required for TRUNK\")"},{"line_number":1097,"context_line":"                LOG.error(msg)"},{"line_number":1098,"context_line":"                raise n_exc.InvalidInput(error_message\u003dmsg)"},{"line_number":1099,"context_line":"        if original_net_p.segment_type in [c_const.NETWORK_TYPE_VLAN,"},{"line_number":1100,"context_line":"                                           c_const.NETWORK_TYPE_TRUNK]:"},{"line_number":1101,"context_line":"            if p.get(\"multicast_ip_range\"):"},{"line_number":1102,"context_line":"                msg \u003d _(\"multicast_ip_range not required\")"}],"source_content_type":"text/x-python","patch_set":7,"id":"1ae5cdf2_0562cdac","line":1099,"in_reply_to":"1ae5cdf2_d1819090","updated":"2014-06-10 19:07:22.000000000","message":"same as above","commit_id":"accd56fea86a0cd5f1706cbdd5b1bbc31c4cf479"}],"neutron/tests/unit/cisco/n1kv/test_n1kv_plugin.py":[{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"fa35960f60a945d8519a3e2cf15bce84bf49b16c","unresolved":false,"context_lines":[{"line_number":420,"context_line":"        data \u003d self._prepare_net_profile_data(\u0027overlay\u0027)"},{"line_number":421,"context_line":"        net_p_req \u003d self.new_create_request(\u0027network_profiles\u0027, data)"},{"line_number":422,"context_line":"        res \u003d net_p_req.get_response(self.ext_api)"},{"line_number":423,"context_line":"        self.assertEqual(res.status_int, 201)"},{"line_number":424,"context_line":"        net_p \u003d self.deserialize(self.fmt, res)"},{"line_number":425,"context_line":"        data \u003d {\u0027network_profile\u0027: {\u0027multicast_ip_range\u0027:"},{"line_number":426,"context_line":"                                    \u0027224.0.1.0-224.0.1.100\u0027}}"}],"source_content_type":"text/x-python","patch_set":6,"id":"1ae5cdf2_8fcf2eb3","line":423,"updated":"2014-06-08 06:31:14.000000000","message":"nit: as per documentation, expected value goes first, and checked - as second parameter.\n\nI know that the rest of the file is written differently, so I would not mind if you leave it as is. I\u0027m just noticing that many developers fix usage of assertEqual in unit tests.","commit_id":"da1ff48870eef7ba98c81d9e882e3543f73f2485"},{"author":{"_account_id":9680,"name":"AARON ZHANG","email":"fenzhang@cisco.com","username":"AARON_ZHANG"},"change_message_id":"6578f60ff16f395e4e3f973a0d1ef8497f363acc","unresolved":false,"context_lines":[{"line_number":420,"context_line":"        data \u003d self._prepare_net_profile_data(\u0027overlay\u0027)"},{"line_number":421,"context_line":"        net_p_req \u003d self.new_create_request(\u0027network_profiles\u0027, data)"},{"line_number":422,"context_line":"        res \u003d net_p_req.get_response(self.ext_api)"},{"line_number":423,"context_line":"        self.assertEqual(res.status_int, 201)"},{"line_number":424,"context_line":"        net_p \u003d self.deserialize(self.fmt, res)"},{"line_number":425,"context_line":"        data \u003d {\u0027network_profile\u0027: {\u0027multicast_ip_range\u0027:"},{"line_number":426,"context_line":"                                    \u0027224.0.1.0-224.0.1.100\u0027}}"}],"source_content_type":"text/x-python","patch_set":6,"id":"1ae5cdf2_6d0561c1","line":423,"in_reply_to":"1ae5cdf2_8fcf2eb3","updated":"2014-06-09 22:10:40.000000000","message":"sure. I will pay attention to it for future commits.","commit_id":"da1ff48870eef7ba98c81d9e882e3543f73f2485"}]}
