)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":2031,"name":"Nachi Ueno","email":"nati.ueno@gmail.com","username":"nati-ueno"},"change_message_id":"d977fba6fb7a1b0ff8a66b864c9eca3d608b9c93","unresolved":false,"context_lines":[{"line_number":14,"context_line":"In order to support stateless IPv6, Neutron should calculate an IPv6"},{"line_number":15,"context_line":"address based on the IPv6 prefix and MAC address via EUI-64 specification,"},{"line_number":16,"context_line":"and assign this address to the port."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"Implements blueprint ipv6-provider-nets-slaac"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"Change-Id: Ia76d76a67e0dc9f996a72e38d987a05aecc1b55f"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"1ae5cdf2_b38703d7","line":17,"updated":"2014-06-06 20:44:51.000000000","message":"#docImpact?","commit_id":"0ca0d84363b754993ad9d4128e22bc3839d15020"}],"neutron/db/db_base_plugin_v2.py":[{"author":{"_account_id":10257,"name":"Sridhar Gaddam","email":"sgaddam@redhat.com","username":"sridhargaddam"},"unresolved":false,"context_lines":[{"line_number":350,"context_line":"            # (dzyu) its mean both OpenStack RA mode and address mode"},{"line_number":351,"context_line":"            # is off, instance\u0027s ip will be obtained from external network"},{"line_number":352,"context_line":"            return False"},{"line_number":353,"context_line":"        elif constants.DHCPV6_STATEFUL not in mode_values:"},{"line_number":354,"context_line":"            return True"},{"line_number":355,"context_line":"        return False"},{"line_number":356,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAW3%2F%2FOtc%3D","line":353,"updated":"2014-04-15 22:26:17.000000000","message":"If we create a IPV6 subnet without specifying the ra_mode and address_mode, we need not calculate IPV6 addresses using EUI64. Can you please check this condition.","commit_id":"7e2d21b279ef2ba6ea5badb05b90f225e654c874"},{"author":{"_account_id":4656,"name":"Sean M. Collins","email":"sean@coreitpro.com","username":"scollins"},"change_message_id":"7edaccc0280de893c74f5623e851f6032d610d72","unresolved":false,"context_lines":[{"line_number":350,"context_line":"            # (dzyu) its mean both OpenStack RA mode and address mode"},{"line_number":351,"context_line":"            # is off, instance\u0027s ip will be obtained from external network"},{"line_number":352,"context_line":"            return False"},{"line_number":353,"context_line":"        elif constants.DHCPV6_STATEFUL not in mode_values:"},{"line_number":354,"context_line":"            return True"},{"line_number":355,"context_line":"        return False"},{"line_number":356,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAXH%2F%2F6AI%3D","line":353,"in_reply_to":"AAAAW3%2F%2FOtc%3D","updated":"2014-04-16 15:21:03.000000000","message":"We do - please see line 349.","commit_id":"7e2d21b279ef2ba6ea5badb05b90f225e654c874"},{"author":{"_account_id":10257,"name":"Sridhar Gaddam","email":"sgaddam@redhat.com","username":"sridhargaddam"},"unresolved":false,"context_lines":[{"line_number":350,"context_line":"            # (dzyu) its mean both OpenStack RA mode and address mode"},{"line_number":351,"context_line":"            # is off, instance\u0027s ip will be obtained from external network"},{"line_number":352,"context_line":"            return False"},{"line_number":353,"context_line":"        elif constants.DHCPV6_STATEFUL not in mode_values:"},{"line_number":354,"context_line":"            return True"},{"line_number":355,"context_line":"        return False"},{"line_number":356,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAXH%2F%2F5nQ%3D","line":353,"in_reply_to":"AAAAXH%2F%2F6AI%3D","updated":"2014-04-16 15:57:03.000000000","message":"Thanks Sean for clarifying. My bad, I interpreted the statement in a wrong way.","commit_id":"7e2d21b279ef2ba6ea5badb05b90f225e654c874"},{"author":{"_account_id":7183,"name":"Xu Han Peng","email":"xuhanp@linux.vnet.ibm.com","username":"xuhanp"},"change_message_id":"9d8e95fb48e0f78a052cefd4d3f58159e06d61e9","unresolved":false,"context_lines":[{"line_number":685,"context_line":"                        prefix, mac)"},{"line_number":686,"context_line":"                    ips.append({\u0027ip_address\u0027: ip_address.format(),"},{"line_number":687,"context_line":"                                \u0027subnet_id\u0027: subnet[\u0027id\u0027]})"},{"line_number":688,"context_line":"                    v6.remove(subnet)"},{"line_number":689,"context_line":"            version_subnets \u003d [v4, v6]"},{"line_number":690,"context_line":"            for subnets in version_subnets:"},{"line_number":691,"context_line":"                if subnets:"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAW3%2F%2F%2FJc%3D","line":688,"updated":"2014-04-09 02:22:50.000000000","message":"I didn\u0027t find this problem in previous patch but we are actually trying to remove elements from the list while iterating over it. I think this is not permitted. We should iterate a copy of v6 at line 676.","commit_id":"7e2d21b279ef2ba6ea5badb05b90f225e654c874"},{"author":{"_account_id":6685,"name":"Baodong (Robert) Li","email":"baoli@cisco.com","username":"baoli"},"unresolved":false,"context_lines":[{"line_number":685,"context_line":"                        prefix, mac)"},{"line_number":686,"context_line":"                    ips.append({\u0027ip_address\u0027: ip_address.format(),"},{"line_number":687,"context_line":"                                \u0027subnet_id\u0027: subnet[\u0027id\u0027]})"},{"line_number":688,"context_line":"                    v6.remove(subnet)"},{"line_number":689,"context_line":"            version_subnets \u003d [v4, v6]"},{"line_number":690,"context_line":"            for subnets in version_subnets:"},{"line_number":691,"context_line":"                if subnets:"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAW3%2F%2FyXU%3D","line":688,"updated":"2014-04-10 12:19:21.000000000","message":"Would it make sense to move the above chunk of code into _try_generate_ip()?","commit_id":"7e2d21b279ef2ba6ea5badb05b90f225e654c874"},{"author":{"_account_id":4656,"name":"Sean M. Collins","email":"sean@coreitpro.com","username":"scollins"},"change_message_id":"7edaccc0280de893c74f5623e851f6032d610d72","unresolved":false,"context_lines":[{"line_number":685,"context_line":"                        prefix, mac)"},{"line_number":686,"context_line":"                    ips.append({\u0027ip_address\u0027: ip_address.format(),"},{"line_number":687,"context_line":"                                \u0027subnet_id\u0027: subnet[\u0027id\u0027]})"},{"line_number":688,"context_line":"                    v6.remove(subnet)"},{"line_number":689,"context_line":"            version_subnets \u003d [v4, v6]"},{"line_number":690,"context_line":"            for subnets in version_subnets:"},{"line_number":691,"context_line":"                if subnets:"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAW3%2F%2F6Xo%3D","line":688,"in_reply_to":"AAAAW3%2F%2F%2FJc%3D","updated":"2014-04-09 14:42:29.000000000","message":"ok will revise","commit_id":"7e2d21b279ef2ba6ea5badb05b90f225e654c874"},{"author":{"_account_id":10257,"name":"Sridhar Gaddam","email":"sgaddam@redhat.com","username":"sridhargaddam"},"unresolved":false,"context_lines":[{"line_number":685,"context_line":"                        prefix, mac)"},{"line_number":686,"context_line":"                    ips.append({\u0027ip_address\u0027: ip_address.format(),"},{"line_number":687,"context_line":"                                \u0027subnet_id\u0027: subnet[\u0027id\u0027]})"},{"line_number":688,"context_line":"                    v6.remove(subnet)"},{"line_number":689,"context_line":"            version_subnets \u003d [v4, v6]"},{"line_number":690,"context_line":"            for subnets in version_subnets:"},{"line_number":691,"context_line":"                if subnets:"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAW3%2F%2FO5I%3D","line":688,"in_reply_to":"AAAAW3%2F%2FyXU%3D","updated":"2014-04-15 22:26:17.000000000","message":"+1. It can improve the readability of the code.","commit_id":"7e2d21b279ef2ba6ea5badb05b90f225e654c874"},{"author":{"_account_id":4656,"name":"Sean M. Collins","email":"sean@coreitpro.com","username":"scollins"},"change_message_id":"7edaccc0280de893c74f5623e851f6032d610d72","unresolved":false,"context_lines":[{"line_number":685,"context_line":"                        prefix, mac)"},{"line_number":686,"context_line":"                    ips.append({\u0027ip_address\u0027: ip_address.format(),"},{"line_number":687,"context_line":"                                \u0027subnet_id\u0027: subnet[\u0027id\u0027]})"},{"line_number":688,"context_line":"                    v6.remove(subnet)"},{"line_number":689,"context_line":"            version_subnets \u003d [v4, v6]"},{"line_number":690,"context_line":"            for subnets in version_subnets:"},{"line_number":691,"context_line":"                if subnets:"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAW3%2F%2FoHg%3D","line":688,"in_reply_to":"AAAAW3%2F%2FyXU%3D","updated":"2014-04-11 15:44:36.000000000","message":"I\u0027ll take a look.","commit_id":"7e2d21b279ef2ba6ea5badb05b90f225e654c874"},{"author":{"_account_id":6685,"name":"Baodong (Robert) Li","email":"baoli@cisco.com","username":"baoli"},"unresolved":false,"context_lines":[{"line_number":1367,"context_line":"            if p[\u0027mac_address\u0027] is attributes.ATTR_NOT_SPECIFIED:"},{"line_number":1368,"context_line":"                #Note(scollins) Add the generated mac_address to the port,"},{"line_number":1369,"context_line":"                #since _allocate_ips_for_port will need the mac when"},{"line_number":1370,"context_line":"                #calculating an EUI-64 address for a v6 subnet"},{"line_number":1371,"context_line":"                p[\u0027mac_address\u0027] \u003d NeutronDbPluginV2._generate_mac(context,"},{"line_number":1372,"context_line":"                                                                   network_id)"},{"line_number":1373,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAW3%2F%2FyWk%3D","line":1370,"updated":"2014-04-10 12:19:21.000000000","message":"Was the code without this change already doing that? p holds the data from the user.","commit_id":"7e2d21b279ef2ba6ea5badb05b90f225e654c874"},{"author":{"_account_id":4656,"name":"Sean M. Collins","email":"sean@coreitpro.com","username":"scollins"},"change_message_id":"7edaccc0280de893c74f5623e851f6032d610d72","unresolved":false,"context_lines":[{"line_number":1367,"context_line":"            if p[\u0027mac_address\u0027] is attributes.ATTR_NOT_SPECIFIED:"},{"line_number":1368,"context_line":"                #Note(scollins) Add the generated mac_address to the port,"},{"line_number":1369,"context_line":"                #since _allocate_ips_for_port will need the mac when"},{"line_number":1370,"context_line":"                #calculating an EUI-64 address for a v6 subnet"},{"line_number":1371,"context_line":"                p[\u0027mac_address\u0027] \u003d NeutronDbPluginV2._generate_mac(context,"},{"line_number":1372,"context_line":"                                                                   network_id)"},{"line_number":1373,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAW3%2F%2FoHk%3D","line":1370,"in_reply_to":"AAAAW3%2F%2Ftxk%3D","updated":"2014-04-11 15:44:36.000000000","message":"Done","commit_id":"7e2d21b279ef2ba6ea5badb05b90f225e654c874"},{"author":{"_account_id":6685,"name":"Baodong (Robert) Li","email":"baoli@cisco.com","username":"baoli"},"unresolved":false,"context_lines":[{"line_number":1367,"context_line":"            if p[\u0027mac_address\u0027] is attributes.ATTR_NOT_SPECIFIED:"},{"line_number":1368,"context_line":"                #Note(scollins) Add the generated mac_address to the port,"},{"line_number":1369,"context_line":"                #since _allocate_ips_for_port will need the mac when"},{"line_number":1370,"context_line":"                #calculating an EUI-64 address for a v6 subnet"},{"line_number":1371,"context_line":"                p[\u0027mac_address\u0027] \u003d NeutronDbPluginV2._generate_mac(context,"},{"line_number":1372,"context_line":"                                                                   network_id)"},{"line_number":1373,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAW3%2F%2Ftxk%3D","line":1370,"in_reply_to":"AAAAW3%2F%2FujU%3D","updated":"2014-04-10 22:10:21.000000000","message":"got it, thanks. \nthe call to _allocate_ips_for_port() in below uses the port dictionary. The following assignment statement causes the port[\u0027port\u0027][\u0027mac_address\u0027] to be populated. Can you update your comment to make that clearer? Thanks.","commit_id":"7e2d21b279ef2ba6ea5badb05b90f225e654c874"},{"author":{"_account_id":4656,"name":"Sean M. Collins","email":"sean@coreitpro.com","username":"scollins"},"change_message_id":"7edaccc0280de893c74f5623e851f6032d610d72","unresolved":false,"context_lines":[{"line_number":1367,"context_line":"            if p[\u0027mac_address\u0027] is attributes.ATTR_NOT_SPECIFIED:"},{"line_number":1368,"context_line":"                #Note(scollins) Add the generated mac_address to the port,"},{"line_number":1369,"context_line":"                #since _allocate_ips_for_port will need the mac when"},{"line_number":1370,"context_line":"                #calculating an EUI-64 address for a v6 subnet"},{"line_number":1371,"context_line":"                p[\u0027mac_address\u0027] \u003d NeutronDbPluginV2._generate_mac(context,"},{"line_number":1372,"context_line":"                                                                   network_id)"},{"line_number":1373,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAW3%2F%2FujU%3D","line":1370,"in_reply_to":"AAAAW3%2F%2FyWk%3D","updated":"2014-04-10 19:55:25.000000000","message":"They would copy p[\u0027mac_address\u0027] into a temp variable named mac_address, and if mac_address was ATTR_NOT_SPECIFIED they would generate a mac and assign it to that temp variable, *not* to the port dictionary, which would make the IP address generation fail, since the port dictionary did not have the updated value and would be passed down through some calls, and would result in a TypeError","commit_id":"7e2d21b279ef2ba6ea5badb05b90f225e654c874"},{"author":{"_account_id":2592,"name":"Mark McClain","email":"mark@mcclain.xyz","username":"markmcclain"},"change_message_id":"1f285575edcd7e55e54f5e654e2ab95b1b3803aa","unresolved":false,"context_lines":[{"line_number":353,"context_line":"            subnet_id\u003dsubnet_id).delete()"},{"line_number":354,"context_line":""},{"line_number":355,"context_line":"    @staticmethod"},{"line_number":356,"context_line":"    def _check_if_need_calculate(v6_subnet):"},{"line_number":357,"context_line":"        \"\"\"Validate that ipv6 address if need to be calculated.\"\"\""},{"line_number":358,"context_line":"        ipv6_address_mode \u003d v6_subnet[\u0027ipv6_address_mode\u0027]"},{"line_number":359,"context_line":"        if ipv6_address_mode \u003d\u003d constants.IPV6_SLAAC:"}],"source_content_type":"text/x-python","patch_set":5,"id":"1ae5cdf2_aa57b3c8","line":356,"updated":"2014-06-05 17:48:55.000000000","message":"looks like this is used in one place, do we need this as a method?","commit_id":"f0b4dbda49621bee514bc59308a5a9b2f18e2b09"},{"author":{"_account_id":4656,"name":"Sean M. Collins","email":"sean@coreitpro.com","username":"scollins"},"change_message_id":"ac903a66e0c3c1d5c8d56d5cfbb91a5f71304a6b","unresolved":false,"context_lines":[{"line_number":353,"context_line":"            subnet_id\u003dsubnet_id).delete()"},{"line_number":354,"context_line":""},{"line_number":355,"context_line":"    @staticmethod"},{"line_number":356,"context_line":"    def _check_if_need_calculate(v6_subnet):"},{"line_number":357,"context_line":"        \"\"\"Validate that ipv6 address if need to be calculated.\"\"\""},{"line_number":358,"context_line":"        ipv6_address_mode \u003d v6_subnet[\u0027ipv6_address_mode\u0027]"},{"line_number":359,"context_line":"        if ipv6_address_mode \u003d\u003d constants.IPV6_SLAAC:"}],"source_content_type":"text/x-python","patch_set":5,"id":"1ae5cdf2_fb97cb45","line":356,"in_reply_to":"1ae5cdf2_aa57b3c8","updated":"2014-06-05 18:54:09.000000000","message":"Additional logic will be added to this method for other modes, like stateful and stateless","commit_id":"f0b4dbda49621bee514bc59308a5a9b2f18e2b09"},{"author":{"_account_id":2592,"name":"Mark McClain","email":"mark@mcclain.xyz","username":"markmcclain"},"change_message_id":"1f285575edcd7e55e54f5e654e2ab95b1b3803aa","unresolved":false,"context_lines":[{"line_number":356,"context_line":"    def _check_if_need_calculate(v6_subnet):"},{"line_number":357,"context_line":"        \"\"\"Validate that ipv6 address if need to be calculated.\"\"\""},{"line_number":358,"context_line":"        ipv6_address_mode \u003d v6_subnet[\u0027ipv6_address_mode\u0027]"},{"line_number":359,"context_line":"        if ipv6_address_mode \u003d\u003d constants.IPV6_SLAAC:"},{"line_number":360,"context_line":"            return True"},{"line_number":361,"context_line":"        return False"},{"line_number":362,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"1ae5cdf2_ca5a3ff1","line":359,"updated":"2014-06-05 17:48:55.000000000","message":"return ipv6_address_mode \u003d\u003d constants.IPV6_SLAAC","commit_id":"f0b4dbda49621bee514bc59308a5a9b2f18e2b09"},{"author":{"_account_id":4656,"name":"Sean M. Collins","email":"sean@coreitpro.com","username":"scollins"},"change_message_id":"ac903a66e0c3c1d5c8d56d5cfbb91a5f71304a6b","unresolved":false,"context_lines":[{"line_number":356,"context_line":"    def _check_if_need_calculate(v6_subnet):"},{"line_number":357,"context_line":"        \"\"\"Validate that ipv6 address if need to be calculated.\"\"\""},{"line_number":358,"context_line":"        ipv6_address_mode \u003d v6_subnet[\u0027ipv6_address_mode\u0027]"},{"line_number":359,"context_line":"        if ipv6_address_mode \u003d\u003d constants.IPV6_SLAAC:"},{"line_number":360,"context_line":"            return True"},{"line_number":361,"context_line":"        return False"},{"line_number":362,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"1ae5cdf2_dbadaf9c","line":359,"in_reply_to":"1ae5cdf2_ca5a3ff1","updated":"2014-06-05 18:54:09.000000000","message":"see above comment, I believe additional conditions will be forthcoming in other patchsets","commit_id":"f0b4dbda49621bee514bc59308a5a9b2f18e2b09"},{"author":{"_account_id":2592,"name":"Mark McClain","email":"mark@mcclain.xyz","username":"markmcclain"},"change_message_id":"1f285575edcd7e55e54f5e654e2ab95b1b3803aa","unresolved":false,"context_lines":[{"line_number":691,"context_line":"                        prefix, mac)"},{"line_number":692,"context_line":"                    ips.append({\u0027ip_address\u0027: ip_address.format(),"},{"line_number":693,"context_line":"                                \u0027subnet_id\u0027: subnet[\u0027id\u0027]})"},{"line_number":694,"context_line":"                    v6.remove(subnet)"},{"line_number":695,"context_line":"            version_subnets \u003d [v4, v6]"},{"line_number":696,"context_line":"            for subnets in version_subnets:"},{"line_number":697,"context_line":"                if subnets:"}],"source_content_type":"text/x-python","patch_set":5,"id":"1ae5cdf2_ea745b69","line":694,"updated":"2014-06-05 17:48:55.000000000","message":"you should not be deleting from a list while iterating over it","commit_id":"f0b4dbda49621bee514bc59308a5a9b2f18e2b09"},{"author":{"_account_id":4656,"name":"Sean M. Collins","email":"sean@coreitpro.com","username":"scollins"},"change_message_id":"ac903a66e0c3c1d5c8d56d5cfbb91a5f71304a6b","unresolved":false,"context_lines":[{"line_number":691,"context_line":"                        prefix, mac)"},{"line_number":692,"context_line":"                    ips.append({\u0027ip_address\u0027: ip_address.format(),"},{"line_number":693,"context_line":"                                \u0027subnet_id\u0027: subnet[\u0027id\u0027]})"},{"line_number":694,"context_line":"                    v6.remove(subnet)"},{"line_number":695,"context_line":"            version_subnets \u003d [v4, v6]"},{"line_number":696,"context_line":"            for subnets in version_subnets:"},{"line_number":697,"context_line":"                if subnets:"}],"source_content_type":"text/x-python","patch_set":5,"id":"1ae5cdf2_5bbeffae","line":694,"in_reply_to":"1ae5cdf2_ea745b69","updated":"2014-06-05 18:54:09.000000000","message":"Due to greenlet - or do you mean in general? In this instance, we are generating an IP address and removing it from the list of subnets, so an IP address is not allocated from the standard _generate_ip function.","commit_id":"f0b4dbda49621bee514bc59308a5a9b2f18e2b09"},{"author":{"_account_id":9932,"name":"Franck Yelles","email":"franck110@gmail.com","username":"fyelles"},"change_message_id":"a9383022163215fab0ac351a2d837f0782884bf9","unresolved":false,"context_lines":[{"line_number":1364,"context_line":"        return self._create_bulk(\u0027port\u0027, context, ports)"},{"line_number":1365,"context_line":""},{"line_number":1366,"context_line":"    def create_port(self, context, port):"},{"line_number":1367,"context_line":"        p \u003d port[\u0027port\u0027]"},{"line_number":1368,"context_line":"        port_id \u003d p.get(\u0027id\u0027) or uuidutils.generate_uuid()"},{"line_number":1369,"context_line":"        network_id \u003d p[\u0027network_id\u0027]"},{"line_number":1370,"context_line":"        # NOTE(jkoelker) Get the tenant_id outside of the session to avoid"}],"source_content_type":"text/x-python","patch_set":5,"id":"1ae5cdf2_af8fdc73","line":1367,"updated":"2014-06-05 05:42:00.000000000","message":"Even If it\u0027s not a PEP8 requirement, having a variable with one letter is not great. Since it\u0027s a private variable maybe use the leading underscore https://docs.python.org/2/tutorial/classes.html#private-variables","commit_id":"f0b4dbda49621bee514bc59308a5a9b2f18e2b09"},{"author":{"_account_id":2592,"name":"Mark McClain","email":"mark@mcclain.xyz","username":"markmcclain"},"change_message_id":"1f285575edcd7e55e54f5e654e2ab95b1b3803aa","unresolved":false,"context_lines":[{"line_number":1364,"context_line":"        return self._create_bulk(\u0027port\u0027, context, ports)"},{"line_number":1365,"context_line":""},{"line_number":1366,"context_line":"    def create_port(self, context, port):"},{"line_number":1367,"context_line":"        p \u003d port[\u0027port\u0027]"},{"line_number":1368,"context_line":"        port_id \u003d p.get(\u0027id\u0027) or uuidutils.generate_uuid()"},{"line_number":1369,"context_line":"        network_id \u003d p[\u0027network_id\u0027]"},{"line_number":1370,"context_line":"        # NOTE(jkoelker) Get the tenant_id outside of the session to avoid"}],"source_content_type":"text/x-python","patch_set":5,"id":"1ae5cdf2_0a70a770","line":1367,"updated":"2014-06-05 17:48:55.000000000","message":"The usage of p here is acceptable","commit_id":"f0b4dbda49621bee514bc59308a5a9b2f18e2b09"},{"author":{"_account_id":4656,"name":"Sean M. Collins","email":"sean@coreitpro.com","username":"scollins"},"change_message_id":"5e13bb2ed9eea3b63b49118416e794a4f50306f0","unresolved":false,"context_lines":[{"line_number":1364,"context_line":"        return self._create_bulk(\u0027port\u0027, context, ports)"},{"line_number":1365,"context_line":""},{"line_number":1366,"context_line":"    def create_port(self, context, port):"},{"line_number":1367,"context_line":"        p \u003d port[\u0027port\u0027]"},{"line_number":1368,"context_line":"        port_id \u003d p.get(\u0027id\u0027) or uuidutils.generate_uuid()"},{"line_number":1369,"context_line":"        network_id \u003d p[\u0027network_id\u0027]"},{"line_number":1370,"context_line":"        # NOTE(jkoelker) Get the tenant_id outside of the session to avoid"}],"source_content_type":"text/x-python","patch_set":5,"id":"1ae5cdf2_f41fe758","line":1367,"in_reply_to":"1ae5cdf2_af8fdc73","updated":"2014-06-05 15:03:09.000000000","message":"Sorry, did not introduce this convention. Please feel free to submit your own patch proposing this change.","commit_id":"f0b4dbda49621bee514bc59308a5a9b2f18e2b09"},{"author":{"_account_id":2031,"name":"Nachi Ueno","email":"nati.ueno@gmail.com","username":"nati-ueno"},"change_message_id":"d977fba6fb7a1b0ff8a66b864c9eca3d608b9c93","unresolved":false,"context_lines":[{"line_number":1345,"context_line":"        p \u003d port[\u0027port\u0027]"},{"line_number":1346,"context_line":"        port_id \u003d p.get(\u0027id\u0027) or uuidutils.generate_uuid()"},{"line_number":1347,"context_line":"        network_id \u003d p[\u0027network_id\u0027]"},{"line_number":1348,"context_line":"        mac_address \u003d p[\u0027mac_address\u0027]"},{"line_number":1349,"context_line":"        # NOTE(jkoelker) Get the tenant_id outside of the session to avoid"},{"line_number":1350,"context_line":"        #                unneeded db action if the operation raises"},{"line_number":1351,"context_line":"        tenant_id \u003d self._get_tenant_id_for_create(context, p)"}],"source_content_type":"text/x-python","patch_set":6,"id":"1ae5cdf2_930be77c","side":"PARENT","line":1348,"updated":"2014-06-06 20:44:51.000000000","message":"What\u0027s intension of this change?","commit_id":"68a9191aa723a19e84b79170e434d6c0a7929725"},{"author":{"_account_id":2031,"name":"Nachi Ueno","email":"nati.ueno@gmail.com","username":"nati-ueno"},"change_message_id":"2d8b8402a0cbe69d2dc8d0bd971f2c144ff83c13","unresolved":false,"context_lines":[{"line_number":1345,"context_line":"        p \u003d port[\u0027port\u0027]"},{"line_number":1346,"context_line":"        port_id \u003d p.get(\u0027id\u0027) or uuidutils.generate_uuid()"},{"line_number":1347,"context_line":"        network_id \u003d p[\u0027network_id\u0027]"},{"line_number":1348,"context_line":"        mac_address \u003d p[\u0027mac_address\u0027]"},{"line_number":1349,"context_line":"        # NOTE(jkoelker) Get the tenant_id outside of the session to avoid"},{"line_number":1350,"context_line":"        #                unneeded db action if the operation raises"},{"line_number":1351,"context_line":"        tenant_id \u003d self._get_tenant_id_for_create(context, p)"}],"source_content_type":"text/x-python","patch_set":6,"id":"1ae5cdf2_56e30833","side":"PARENT","line":1348,"in_reply_to":"1ae5cdf2_36b83c2a","updated":"2014-06-07 04:11:00.000000000","message":"Sorry, i\u0027m still not sure..\nCould you point me where we are using p?\nL1434 uses port object returned by sql, right?","commit_id":"68a9191aa723a19e84b79170e434d6c0a7929725"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"09b45bedcef51462a124412a1b04aa74dc3bcf8f","unresolved":false,"context_lines":[{"line_number":1345,"context_line":"        p \u003d port[\u0027port\u0027]"},{"line_number":1346,"context_line":"        port_id \u003d p.get(\u0027id\u0027) or uuidutils.generate_uuid()"},{"line_number":1347,"context_line":"        network_id \u003d p[\u0027network_id\u0027]"},{"line_number":1348,"context_line":"        mac_address \u003d p[\u0027mac_address\u0027]"},{"line_number":1349,"context_line":"        # NOTE(jkoelker) Get the tenant_id outside of the session to avoid"},{"line_number":1350,"context_line":"        #                unneeded db action if the operation raises"},{"line_number":1351,"context_line":"        tenant_id \u003d self._get_tenant_id_for_create(context, p)"}],"source_content_type":"text/x-python","patch_set":6,"id":"1ae5cdf2_e8f25e05","side":"PARENT","line":1348,"in_reply_to":"1ae5cdf2_56e30833","updated":"2014-06-09 08:17:23.000000000","message":"New _allocate_ips_for_port() expects \u0027mac_address\u0027 in \u0027port\u0027 dictionary and it is called at L.1397 @new code. Thus p[\u0027mac_address\u0027] needs to be updated at L.1384 @new code.\n\nFrom this reason, I think Sean tries to use p[\u0027mac_address\u0027] throughout this method. I am not sure we need to use p[\u0027mac_address\u0027] instead of \u0027mac_address\u0027. Adding \"p[\u0027mac_address\u0027] \u003d mac_address\" and keeping \u0027mac_address\u0027 variable also sounds reasonable to me.","commit_id":"68a9191aa723a19e84b79170e434d6c0a7929725"},{"author":{"_account_id":4656,"name":"Sean M. Collins","email":"sean@coreitpro.com","username":"scollins"},"change_message_id":"3dfcc37ac7dccc8e7e891d7908c639b3588ca734","unresolved":false,"context_lines":[{"line_number":1345,"context_line":"        p \u003d port[\u0027port\u0027]"},{"line_number":1346,"context_line":"        port_id \u003d p.get(\u0027id\u0027) or uuidutils.generate_uuid()"},{"line_number":1347,"context_line":"        network_id \u003d p[\u0027network_id\u0027]"},{"line_number":1348,"context_line":"        mac_address \u003d p[\u0027mac_address\u0027]"},{"line_number":1349,"context_line":"        # NOTE(jkoelker) Get the tenant_id outside of the session to avoid"},{"line_number":1350,"context_line":"        #                unneeded db action if the operation raises"},{"line_number":1351,"context_line":"        tenant_id \u003d self._get_tenant_id_for_create(context, p)"}],"source_content_type":"text/x-python","patch_set":6,"id":"1ae5cdf2_36b83c2a","side":"PARENT","line":1348,"in_reply_to":"1ae5cdf2_930be77c","updated":"2014-06-07 04:04:28.000000000","message":"See the comment on L#1361 - there are functions in the call chain that are passed the port dictionary, not the temporary variable mac_address - so we need to generate the mac address for the port and assign it to the port dictionary, because later we pull the mac address out of the port dictionary to generate the EUI64 address.","commit_id":"68a9191aa723a19e84b79170e434d6c0a7929725"},{"author":{"_account_id":2031,"name":"Nachi Ueno","email":"nati.ueno@gmail.com","username":"nati-ueno"},"change_message_id":"ae7dd604937c19c3a9080d3f55ec0d16cddc658b","unresolved":false,"context_lines":[{"line_number":1345,"context_line":"        p \u003d port[\u0027port\u0027]"},{"line_number":1346,"context_line":"        port_id \u003d p.get(\u0027id\u0027) or uuidutils.generate_uuid()"},{"line_number":1347,"context_line":"        network_id \u003d p[\u0027network_id\u0027]"},{"line_number":1348,"context_line":"        mac_address \u003d p[\u0027mac_address\u0027]"},{"line_number":1349,"context_line":"        # NOTE(jkoelker) Get the tenant_id outside of the session to avoid"},{"line_number":1350,"context_line":"        #                unneeded db action if the operation raises"},{"line_number":1351,"context_line":"        tenant_id \u003d self._get_tenant_id_for_create(context, p)"}],"source_content_type":"text/x-python","patch_set":6,"id":"1ae5cdf2_93ac9937","side":"PARENT","line":1348,"in_reply_to":"1ae5cdf2_a050625f","updated":"2014-06-09 17:21:52.000000000","message":"I got it! thanks","commit_id":"68a9191aa723a19e84b79170e434d6c0a7929725"},{"author":{"_account_id":4656,"name":"Sean M. Collins","email":"sean@coreitpro.com","username":"scollins"},"change_message_id":"8828f31ce84ca96e729951916c5725c4e4dbe6d6","unresolved":false,"context_lines":[{"line_number":1345,"context_line":"        p \u003d port[\u0027port\u0027]"},{"line_number":1346,"context_line":"        port_id \u003d p.get(\u0027id\u0027) or uuidutils.generate_uuid()"},{"line_number":1347,"context_line":"        network_id \u003d p[\u0027network_id\u0027]"},{"line_number":1348,"context_line":"        mac_address \u003d p[\u0027mac_address\u0027]"},{"line_number":1349,"context_line":"        # NOTE(jkoelker) Get the tenant_id outside of the session to avoid"},{"line_number":1350,"context_line":"        #                unneeded db action if the operation raises"},{"line_number":1351,"context_line":"        tenant_id \u003d self._get_tenant_id_for_create(context, p)"}],"source_content_type":"text/x-python","patch_set":6,"id":"1ae5cdf2_a050625f","side":"PARENT","line":1348,"in_reply_to":"1ae5cdf2_e8f25e05","updated":"2014-06-09 14:59:37.000000000","message":"Setting the port dictionary with the new mac_address is required, because in this function at L1372 we call into the function _allocate_ips_for_port, which now has logic at L690 to pull out the mac address and do an EUI64 calculation. In the old code, if there was not a mac address, a new mac address was created and saved in a temporary variable, which is only used in a couple locations.\n\nSince we need the mac_address for L690, I decided to just update the port dictionary with the mac_address that is generated, and replace all occurances of the temporary variable with references to the value in the port dictionary.","commit_id":"68a9191aa723a19e84b79170e434d6c0a7929725"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"09b45bedcef51462a124412a1b04aa74dc3bcf8f","unresolved":false,"context_lines":[{"line_number":358,"context_line":"        ipv6_address_mode \u003d v6_subnet[\u0027ipv6_address_mode\u0027]"},{"line_number":359,"context_line":"        if ipv6_address_mode \u003d\u003d constants.IPV6_SLAAC:"},{"line_number":360,"context_line":"            return True"},{"line_number":361,"context_line":"        return False"},{"line_number":362,"context_line":""},{"line_number":363,"context_line":"    @staticmethod"},{"line_number":364,"context_line":"    def _generate_ip(context, subnets):"}],"source_content_type":"text/x-python","patch_set":6,"id":"1ae5cdf2_b4e1929c","line":361,"updated":"2014-06-09 08:17:23.000000000","message":"It can be just:\n\n  return v6_subnet[\u0027ipv6_address_mode\u0027] \u003d\u003d constants.IPV6_SLLAC","commit_id":"0ca0d84363b754993ad9d4128e22bc3839d15020"},{"author":{"_account_id":4656,"name":"Sean M. Collins","email":"sean@coreitpro.com","username":"scollins"},"change_message_id":"d8632af0c1571d3a5b99399123c175696ee22a03","unresolved":false,"context_lines":[{"line_number":358,"context_line":"        ipv6_address_mode \u003d v6_subnet[\u0027ipv6_address_mode\u0027]"},{"line_number":359,"context_line":"        if ipv6_address_mode \u003d\u003d constants.IPV6_SLAAC:"},{"line_number":360,"context_line":"            return True"},{"line_number":361,"context_line":"        return False"},{"line_number":362,"context_line":""},{"line_number":363,"context_line":"    @staticmethod"},{"line_number":364,"context_line":"    def _generate_ip(context, subnets):"}],"source_content_type":"text/x-python","patch_set":6,"id":"1ae5cdf2_da4556b4","line":361,"in_reply_to":"1ae5cdf2_b4e1929c","updated":"2014-06-09 16:02:09.000000000","message":"There will be patches that update this method, specifically for checking if it is constants.DHCPV6_STATELESS, so this method will undergo revision, so I wanted to make the change for the next patch less intrusive. The above suggestion is more compact, but it would be replaced with an if/else block in a subsequent revision.","commit_id":"0ca0d84363b754993ad9d4128e22bc3839d15020"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"09b45bedcef51462a124412a1b04aa74dc3bcf8f","unresolved":false,"context_lines":[{"line_number":681,"context_line":"                    v6.append(subnet)"},{"line_number":682,"context_line":"            for subnet in v6:"},{"line_number":683,"context_line":"                if self._check_if_need_calculate(subnet):"},{"line_number":684,"context_line":"                    #(dzyu) If is true, need calculate ip v6 address"},{"line_number":685,"context_line":"                    # by mac address and prefix, then remove this"},{"line_number":686,"context_line":"                    # subnet from subnets array to generate ip address"},{"line_number":687,"context_line":"                    # for other subnets."}],"source_content_type":"text/x-python","patch_set":6,"id":"1ae5cdf2_54884ec6","line":684,"updated":"2014-06-09 08:17:23.000000000","message":"\"If is true\" -\u003e \"If true\"","commit_id":"0ca0d84363b754993ad9d4128e22bc3839d15020"}],"neutron/tests/unit/oneconvergence/test_nvsd_plugin.py":[{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"09b45bedcef51462a124412a1b04aa74dc3bcf8f","unresolved":false,"context_lines":[{"line_number":116,"context_line":"                                 portbindings.VIF_TYPE_OVS)"},{"line_number":117,"context_line":""},{"line_number":118,"context_line":"    def test_ip_allocation_for_ipv6_subnet_slaac_adddress_mode(self):"},{"line_number":119,"context_line":"        self.skipTest(\"NVSD Plugin does not support IPV6.\")"},{"line_number":120,"context_line":""},{"line_number":121,"context_line":""},{"line_number":122,"context_line":"class TestOneConvergenceBasicGet(test_plugin.TestBasicGet,"}],"source_content_type":"text/x-python","patch_set":6,"id":"1ae5cdf2_a8cf76b2","line":119,"updated":"2014-06-09 08:17:23.000000000","message":"(hmm.... this is really annoying...)","commit_id":"0ca0d84363b754993ad9d4128e22bc3839d15020"},{"author":{"_account_id":4656,"name":"Sean M. Collins","email":"sean@coreitpro.com","username":"scollins"},"change_message_id":"62d28a5b3f2bcf84bc01369999b486988d3b0380","unresolved":false,"context_lines":[{"line_number":116,"context_line":"                                 portbindings.VIF_TYPE_OVS)"},{"line_number":117,"context_line":""},{"line_number":118,"context_line":"    def test_ip_allocation_for_ipv6_subnet_slaac_adddress_mode(self):"},{"line_number":119,"context_line":"        self.skipTest(\"NVSD Plugin does not support IPV6.\")"},{"line_number":120,"context_line":""},{"line_number":121,"context_line":""},{"line_number":122,"context_line":"class TestOneConvergenceBasicGet(test_plugin.TestBasicGet,"}],"source_content_type":"text/x-python","patch_set":6,"id":"1ae5cdf2_a0fea236","line":119,"in_reply_to":"1ae5cdf2_a8cf76b2","updated":"2014-06-09 15:00:44.000000000","message":"Yes. I don\u0027t know if we should accept plugins that do not support IPv6 in the future.","commit_id":"0ca0d84363b754993ad9d4128e22bc3839d15020"}],"neutron/tests/unit/test_db_plugin.py":[{"author":{"_account_id":8278,"name":"Dazhao Yu","email":"dazhaoyu@gmail.com","username":"Dazhao"},"change_message_id":"1aac48c9ae9c1baffa11d74ab943562442dacf40","unresolved":false,"context_lines":[{"line_number":1422,"context_line":"                                       ip_version\u003d6,"},{"line_number":1423,"context_line":"                                       ipv6_ra_mode\u003dconstants.DHCPV6_STATEFUL,"},{"line_number":1424,"context_line":"                                       ipv6_address_mode\u003dNone)"},{"line_number":1425,"context_line":"        port \u003d self._make_port(self.fmt, network[\u0027network\u0027][\u0027id\u0027])"},{"line_number":1426,"context_line":"        # Check if ipv6 address are allocated correctly"},{"line_number":1427,"context_line":"        ips \u003d port[\u0027port\u0027][\u0027fixed_ips\u0027]"},{"line_number":1428,"context_line":"        self.assertEqual(len(ips), 2)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAW3%2F%2F%2FDg%3D","line":1425,"updated":"2014-04-09 02:52:47.000000000","message":"You need to provide the mac address in the target port, such as\nmac_address \u003d port[\u0027port\u0027][\u0027mac_address\u0027], then calculate IPv6 address by mac_address","commit_id":"7e2d21b279ef2ba6ea5badb05b90f225e654c874"},{"author":{"_account_id":4656,"name":"Sean M. Collins","email":"sean@coreitpro.com","username":"scollins"},"change_message_id":"7edaccc0280de893c74f5623e851f6032d610d72","unresolved":false,"context_lines":[{"line_number":1422,"context_line":"                                       ip_version\u003d6,"},{"line_number":1423,"context_line":"                                       ipv6_ra_mode\u003dconstants.DHCPV6_STATEFUL,"},{"line_number":1424,"context_line":"                                       ipv6_address_mode\u003dNone)"},{"line_number":1425,"context_line":"        port \u003d self._make_port(self.fmt, network[\u0027network\u0027][\u0027id\u0027])"},{"line_number":1426,"context_line":"        # Check if ipv6 address are allocated correctly"},{"line_number":1427,"context_line":"        ips \u003d port[\u0027port\u0027][\u0027fixed_ips\u0027]"},{"line_number":1428,"context_line":"        self.assertEqual(len(ips), 2)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAW3%2F%2F6YU%3D","line":1425,"in_reply_to":"AAAAW3%2F%2F%2FDg%3D","updated":"2014-04-09 14:40:43.000000000","message":"Dazhao - most API calls to create an instance do not specify a mac - so there was a bug where if the mac wasn\u0027t specified an exception would be thrown - see the output of test failures in patch 1.","commit_id":"7e2d21b279ef2ba6ea5badb05b90f225e654c874"},{"author":{"_account_id":8278,"name":"Dazhao Yu","email":"dazhaoyu@gmail.com","username":"Dazhao"},"unresolved":false,"context_lines":[{"line_number":1422,"context_line":"                                       ip_version\u003d6,"},{"line_number":1423,"context_line":"                                       ipv6_ra_mode\u003dconstants.DHCPV6_STATEFUL,"},{"line_number":1424,"context_line":"                                       ipv6_address_mode\u003dNone)"},{"line_number":1425,"context_line":"        port \u003d self._make_port(self.fmt, network[\u0027network\u0027][\u0027id\u0027])"},{"line_number":1426,"context_line":"        # Check if ipv6 address are allocated correctly"},{"line_number":1427,"context_line":"        ips \u003d port[\u0027port\u0027][\u0027fixed_ips\u0027]"},{"line_number":1428,"context_line":"        self.assertEqual(len(ips), 2)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAW3%2F%2Fy2Q%3D","line":1425,"in_reply_to":"AAAAW3%2F%2F6YU%3D","updated":"2014-04-10 11:20:50.000000000","message":"Sean- maybe we can get the target mac address from port. From line 1425, we create one new port for the target network, when create port, the corresponding mac address also have been  randomly generated, we can get the mac address from port[\u0027port\u0027][\u0027mac_address\u0027]. in this unit test case, we can check if ipv6 address is correctly base on the mac address","commit_id":"7e2d21b279ef2ba6ea5badb05b90f225e654c874"},{"author":{"_account_id":4656,"name":"Sean M. Collins","email":"sean@coreitpro.com","username":"scollins"},"change_message_id":"7edaccc0280de893c74f5623e851f6032d610d72","unresolved":false,"context_lines":[{"line_number":1422,"context_line":"                                       ip_version\u003d6,"},{"line_number":1423,"context_line":"                                       ipv6_ra_mode\u003dconstants.DHCPV6_STATEFUL,"},{"line_number":1424,"context_line":"                                       ipv6_address_mode\u003dNone)"},{"line_number":1425,"context_line":"        port \u003d self._make_port(self.fmt, network[\u0027network\u0027][\u0027id\u0027])"},{"line_number":1426,"context_line":"        # Check if ipv6 address are allocated correctly"},{"line_number":1427,"context_line":"        ips \u003d port[\u0027port\u0027][\u0027fixed_ips\u0027]"},{"line_number":1428,"context_line":"        self.assertEqual(len(ips), 2)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAW3%2F%2FoIY%3D","line":1425,"in_reply_to":"AAAAW3%2F%2Fy2Q%3D","updated":"2014-04-11 15:42:48.000000000","message":"Ah - now I understand what you meant - and yes I agree. Please forgive my confusion.","commit_id":"7e2d21b279ef2ba6ea5badb05b90f225e654c874"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"09b45bedcef51462a124412a1b04aa74dc3bcf8f","unresolved":false,"context_lines":[{"line_number":1399,"context_line":"                self._delete(\u0027ports\u0027, port4[\u0027port\u0027][\u0027id\u0027])"},{"line_number":1400,"context_line":""},{"line_number":1401,"context_line":"    def test_ip_allocation_for_ipv6_subnet_slaac_adddress_mode(self):"},{"line_number":1402,"context_line":"        # Create new network"},{"line_number":1403,"context_line":"        res \u003d self._create_network(fmt\u003dself.fmt, name\u003d\u0027net\u0027,"},{"line_number":1404,"context_line":"                                   admin_state_up\u003dTrue)"},{"line_number":1405,"context_line":"        network \u003d self.deserialize(self.fmt, res)"}],"source_content_type":"text/x-python","patch_set":6,"id":"1ae5cdf2_88baba08","line":1402,"updated":"2014-06-09 08:17:23.000000000","message":"(nit) this comment looks unnecessary.","commit_id":"0ca0d84363b754993ad9d4128e22bc3839d15020"}]}
