)]}'
{"quantum/db/db_base_plugin_v2.py":[{"author":{"_account_id":1736,"name":"Ivan Kolodyazhny","email":"e0ne@e0ne.info","username":"e0ne"},"change_message_id":"7a145d216cc59e1e04d228dc77d54ec1a3cc695a","unresolved":false,"context_lines":[{"line_number":495,"context_line":""},{"line_number":496,"context_line":"        # Check if the requested IP is in a defined allocation pool"},{"line_number":497,"context_line":"        pool_qry \u003d context.session.query(models_v2.IPAllocationPool)"},{"line_number":498,"context_line":"        allocation_pools \u003d pool_qry.filter_by(subnet_id\u003dsubnet_id).all()"},{"line_number":499,"context_line":"        for allocation_pool in allocation_pools:"},{"line_number":500,"context_line":"            allocation_pool_range \u003d netaddr.IPRange("},{"line_number":501,"context_line":"                allocation_pool[\u0027first_ip\u0027],"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAALn%2F%2FtlI%3D","line":498,"updated":"2012-11-11 16:30:21.000000000","message":"address \u003d netaddr.IPAddress(ip_address)","commit_id":"21c7519834964ac3536f65f595654af1cfe7ed16"},{"author":{"_account_id":1736,"name":"Ivan Kolodyazhny","email":"e0ne@e0ne.info","username":"e0ne"},"change_message_id":"7a145d216cc59e1e04d228dc77d54ec1a3cc695a","unresolved":false,"context_lines":[{"line_number":500,"context_line":"            allocation_pool_range \u003d netaddr.IPRange("},{"line_number":501,"context_line":"                allocation_pool[\u0027first_ip\u0027],"},{"line_number":502,"context_line":"                allocation_pool[\u0027last_ip\u0027])"},{"line_number":503,"context_line":"            if netaddr.IPAddress(ip_address) in allocation_pool_range:"},{"line_number":504,"context_line":"                return True"},{"line_number":505,"context_line":"        return False"},{"line_number":506,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAALn%2F%2FtlE%3D","line":503,"updated":"2012-11-11 16:30:21.000000000","message":"Move netaddr.IPAddress(ip_address) instantiation out of the loop\naddress in allocation_pool_range:","commit_id":"21c7519834964ac3536f65f595654af1cfe7ed16"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"unresolved":false,"context_lines":[{"line_number":500,"context_line":"            allocation_pool_range \u003d netaddr.IPRange("},{"line_number":501,"context_line":"                allocation_pool[\u0027first_ip\u0027],"},{"line_number":502,"context_line":"                allocation_pool[\u0027last_ip\u0027])"},{"line_number":503,"context_line":"            if netaddr.IPAddress(ip_address) in allocation_pool_range:"},{"line_number":504,"context_line":"                return True"},{"line_number":505,"context_line":"        return False"},{"line_number":506,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAMH%2F%2F%2F14%3D","line":503,"in_reply_to":"AAAALn%2F%2FtlE%3D","updated":"2012-11-12 07:13:43.000000000","message":"Done","commit_id":"21c7519834964ac3536f65f595654af1cfe7ed16"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"unresolved":false,"context_lines":[{"line_number":489,"context_line":"    def _check_ip_in_allocation_pool(context, subnet_id, gateway_ip,"},{"line_number":490,"context_line":"                                     ip_address):"},{"line_number":491,"context_line":"        \"\"\"Validate that the IP address is either the default gateway or"},{"line_number":492,"context_line":"           in the allocation pools of the subnet.\"\"\""},{"line_number":493,"context_line":"        # Check if the IP is the gateway"},{"line_number":494,"context_line":"        if ip_address \u003d\u003d gateway_ip:"},{"line_number":495,"context_line":"            return True"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAMH%2F%2F%2FFs%3D","line":492,"updated":"2012-11-12 20:49:10.000000000","message":"Minor nit-pick. Hacking mandates a different convention for docstrings (1st line, blank, then rest of lines)","commit_id":"6006f6fd4905c96ab70367c1acf6d630375017ee"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"unresolved":false,"context_lines":[{"line_number":492,"context_line":"           in the allocation pools of the subnet.\"\"\""},{"line_number":493,"context_line":"        # Check if the IP is the gateway"},{"line_number":494,"context_line":"        if ip_address \u003d\u003d gateway_ip:"},{"line_number":495,"context_line":"            return True"},{"line_number":496,"context_line":""},{"line_number":497,"context_line":"        # Check if the requested IP is in a defined allocation pool"},{"line_number":498,"context_line":"        pool_qry \u003d context.session.query(models_v2.IPAllocationPool)"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAMH%2F%2F%2FFk%3D","line":495,"updated":"2012-11-12 20:49:10.000000000","message":"It seems actually that the behaviour in this case should be to just delete the ip allocation (and the code at LL 1249-1257 would have actually already remove the allocation). I wonder whether this would case problem when trying to hold an already deleted IP allocation.","commit_id":"6006f6fd4905c96ab70367c1acf6d630375017ee"},{"author":{"_account_id":2592,"name":"Mark McClain","email":"mark@mcclain.xyz","username":"markmcclain"},"change_message_id":"27de641b0cd6529f1a15bcb31e0798d968f07cbb","unresolved":false,"context_lines":[{"line_number":1246,"context_line":"        if allocated:"},{"line_number":1247,"context_line":"            for a in allocated:"},{"line_number":1248,"context_line":"                subnet \u003d self._get_subnet(context, a[\u0027subnet_id\u0027])"},{"line_number":1249,"context_line":"                if a[\u0027ip_address\u0027] \u003d\u003d subnet[\u0027gateway_ip\u0027]:"},{"line_number":1250,"context_line":"                    # Gateway address will not be recycled, but we do"},{"line_number":1251,"context_line":"                    # need to delete the allocation from the DB"},{"line_number":1252,"context_line":"                    QuantumDbPluginV2._delete_ip_allocation("}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAMH%2F%2F%2FJg%3D","line":1249,"updated":"2012-11-12 20:12:54.000000000","message":"Do we still need this special check?  Seems like 1268 should take care of it.","commit_id":"6006f6fd4905c96ab70367c1acf6d630375017ee"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"change_message_id":"b38214a220cb720c1dfbfada6c0e3bf6d1aad341","unresolved":false,"context_lines":[{"line_number":1250,"context_line":"            for a in allocated:"},{"line_number":1251,"context_line":"                subnet \u003d self._get_subnet(context, a[\u0027subnet_id\u0027])"},{"line_number":1252,"context_line":"                # Check if IP was allocated from allocation pool"},{"line_number":1253,"context_line":"                if self._check_ip_in_allocation_pool(context, a[\u0027subnet_id\u0027],"},{"line_number":1254,"context_line":"                                                     subnet[\u0027gateway_ip\u0027],"},{"line_number":1255,"context_line":"                                                     a[\u0027ip_address\u0027]):"},{"line_number":1256,"context_line":"                    QuantumDbPluginV2._hold_ip(context,"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAMH%2F%2F9Vg%3D","line":1253,"updated":"2012-11-14 06:48:33.000000000","message":"I think static method should be called with class name.","commit_id":"e05fad3387a277e0b9a186e655766c917c70d2aa"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"unresolved":false,"context_lines":[{"line_number":1250,"context_line":"            for a in allocated:"},{"line_number":1251,"context_line":"                subnet \u003d self._get_subnet(context, a[\u0027subnet_id\u0027])"},{"line_number":1252,"context_line":"                # Check if IP was allocated from allocation pool"},{"line_number":1253,"context_line":"                if self._check_ip_in_allocation_pool(context, a[\u0027subnet_id\u0027],"},{"line_number":1254,"context_line":"                                                     subnet[\u0027gateway_ip\u0027],"},{"line_number":1255,"context_line":"                                                     a[\u0027ip_address\u0027]):"},{"line_number":1256,"context_line":"                    QuantumDbPluginV2._hold_ip(context,"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAMH%2F%2F7vs%3D","line":1253,"in_reply_to":"AAAAMH%2F%2F9Vg%3D","updated":"2012-11-15 09:59:02.000000000","message":"Done","commit_id":"e05fad3387a277e0b9a186e655766c917c70d2aa"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"change_message_id":"b38214a220cb720c1dfbfada6c0e3bf6d1aad341","unresolved":false,"context_lines":[{"line_number":1261,"context_line":"                else:"},{"line_number":1262,"context_line":"                    # Gateway address or fixed IP in allocation pool will"},{"line_number":1263,"context_line":"                    # not be recycled, but we do need to delete the allocation"},{"line_number":1264,"context_line":"                    # from the DB"},{"line_number":1265,"context_line":"                    QuantumDbPluginV2._delete_ip_allocation("},{"line_number":1266,"context_line":"                        context, a[\u0027network_id\u0027],"},{"line_number":1267,"context_line":"                        a[\u0027subnet_id\u0027], a[\u0027ip_address\u0027])"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAMH%2F%2F9U8%3D","line":1264,"updated":"2012-11-14 06:48:33.000000000","message":"Does the comment applies since the previous \u0027if self._check_ip_in_allocation_pool\u0027 will filter out gateway and fixed IP in allocation pool?\n\nWhy shouldn\u0027t fixed_ip outside pool be held for a while?","commit_id":"e05fad3387a277e0b9a186e655766c917c70d2aa"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"unresolved":false,"context_lines":[{"line_number":1261,"context_line":"                else:"},{"line_number":1262,"context_line":"                    # Gateway address or fixed IP in allocation pool will"},{"line_number":1263,"context_line":"                    # not be recycled, but we do need to delete the allocation"},{"line_number":1264,"context_line":"                    # from the DB"},{"line_number":1265,"context_line":"                    QuantumDbPluginV2._delete_ip_allocation("},{"line_number":1266,"context_line":"                        context, a[\u0027network_id\u0027],"},{"line_number":1267,"context_line":"                        a[\u0027subnet_id\u0027], a[\u0027ip_address\u0027])"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAMH%2F%2F7u0%3D","line":1264,"in_reply_to":"AAAAMH%2F%2F9U8%3D","updated":"2012-11-15 09:59:02.000000000","message":"Good question. The current logic has the expiration on the allocation pool. It may be an option to also have this IP being \"held\" for a timoeout. I do not think that this is part of the scope of this patch. Unless you think otherwise.","commit_id":"e05fad3387a277e0b9a186e655766c917c70d2aa"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"change_message_id":"b38214a220cb720c1dfbfada6c0e3bf6d1aad341","unresolved":false,"context_lines":[{"line_number":1261,"context_line":"                else:"},{"line_number":1262,"context_line":"                    # Gateway address or fixed IP in allocation pool will"},{"line_number":1263,"context_line":"                    # not be recycled, but we do need to delete the allocation"},{"line_number":1264,"context_line":"                    # from the DB"},{"line_number":1265,"context_line":"                    QuantumDbPluginV2._delete_ip_allocation("},{"line_number":1266,"context_line":"                        context, a[\u0027network_id\u0027],"},{"line_number":1267,"context_line":"                        a[\u0027subnet_id\u0027], a[\u0027ip_address\u0027])"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAMH%2F%2F7nA%3D","line":1264,"updated":"2012-11-15 11:02:48.000000000","message":"I think this comment should be \u0027IPs outside of allocation pool will not be recycled, but ...\u0027","commit_id":"29a2fc3b490f7d72ac1a94365e2301fa932105be"}],"quantum/tests/unit/test_db_plugin.py":[{"author":{"_account_id":2031,"name":"Nachi Ueno","email":"nati.ueno@gmail.com","username":"nati-ueno"},"change_message_id":"4c8e60439ac0962ca5ff8ad5ee5ccfd1941f47c7","unresolved":false,"context_lines":[{"line_number":2210,"context_line":"            subnet_req \u003d self.new_create_request(\u0027subnets\u0027, data)"},{"line_number":2211,"context_line":"            subnet \u003d self.deserialize(\u0027json\u0027,"},{"line_number":2212,"context_line":"                                      subnet_req.get_response(self.api))"},{"line_number":2213,"context_line":"            # Check invalid IP fails"},{"line_number":2214,"context_line":"            kwargs \u003d {\"fixed_ips\": [{\u0027subnet_id\u0027: subnet[\u0027subnet\u0027][\u0027id\u0027],"},{"line_number":2215,"context_line":"                                     \u0027ip_address\u0027: \u002710.0.0.10\u0027}]}"},{"line_number":2216,"context_line":"            res \u003d self._create_port(fmt, net_id\u003dnet_id, **kwargs)"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAMH%2F%2F%2FRM%3D","line":2213,"updated":"2012-11-12 18:57:28.000000000","message":"This comment looks like old","commit_id":"6006f6fd4905c96ab70367c1acf6d630375017ee"}]}
