)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":7249,"name":"Ann Taraday","email":"akamyshnikova@mirantis.com","username":"AKamyshnikova"},"change_message_id":"95f1f7ff169884865a0cfdaff39ffd2572f31b6a","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     lijianlj \u003clijianlj@cn.ibm.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2015-01-15 18:47:19 +0800"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Fix dhcp-agent to support extra-dhcp-opt when using one stateless dhcpv6 subnet."},{"line_number":8,"context_line":"Closes-Bug:#1411137"},{"line_number":9,"context_line":""},{"line_number":10,"context_line":"Change-Id: Ieed16280fb3c4c91f7d906c0410446d2a112b93e"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"3a961159_8082fffc","line":7,"updated":"2015-01-15 12:24:00.000000000","message":"title should be under 50 chars. Please, pay attention to https://wiki.openstack.org/wiki/GitCommitMessages","commit_id":"f596602fc22c6c8552a30f9a4c4b14acf67d4804"},{"author":{"_account_id":8992,"name":"Billy Olsen","email":"billy.olsen@canonical.com","username":"billy-olsen"},"change_message_id":"439b83853c21ab692f91e324e1f60e81b6f4db41","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Fix extra-dhcp-opt on stateless dhcpv6 subnet"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"The opts in dnsmasq opt-file is depending on the tag setted"},{"line_number":10,"context_line":"in the host-file. When you hava only one stateless dhcpv6 subnet,"},{"line_number":11,"context_line":"it will be filter by the _iter_host() function, and will not be"},{"line_number":12,"context_line":"written to the host-file, this may lead extra-dhcp-opt not working."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"fa81d914_7903b373","line":9,"updated":"2015-01-27 20:49:18.000000000","message":"Should you need to resubmit for any reason, s/setted/set.","commit_id":"5c69c7fed83c24c95642a4e4f85bf78db642a3d8"},{"author":{"_account_id":7515,"name":"Jian LI","email":"ljianbj@cn.ibm.com","username":"leejian0612"},"change_message_id":"d1f1fcb8c1739d5d201a1470296df0b550f99aee","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Fix extra-dhcp-opt on stateless dhcpv6 subnet"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"The opts in dnsmasq opt-file is depending on the tag setted"},{"line_number":10,"context_line":"in the host-file. When you hava only one stateless dhcpv6 subnet,"},{"line_number":11,"context_line":"it will be filter by the _iter_host() function, and will not be"},{"line_number":12,"context_line":"written to the host-file, this may lead extra-dhcp-opt not working."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"fa81d914_b8fef069","line":9,"in_reply_to":"fa81d914_7903b373","updated":"2015-01-28 07:43:32.000000000","message":"Done","commit_id":"5c69c7fed83c24c95642a4e4f85bf78db642a3d8"},{"author":{"_account_id":8992,"name":"Billy Olsen","email":"billy.olsen@canonical.com","username":"billy-olsen"},"change_message_id":"439b83853c21ab692f91e324e1f60e81b6f4db41","unresolved":false,"context_lines":[{"line_number":9,"context_line":"The opts in dnsmasq opt-file is depending on the tag setted"},{"line_number":10,"context_line":"in the host-file. When you hava only one stateless dhcpv6 subnet,"},{"line_number":11,"context_line":"it will be filter by the _iter_host() function, and will not be"},{"line_number":12,"context_line":"written to the host-file, this may lead extra-dhcp-opt not working."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Closes-Bug:#1411137"},{"line_number":15,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"fa81d914_59350f45","line":12,"updated":"2015-01-27 20:49:18.000000000","message":"again, should you need to resubmit s/lead/lead to","commit_id":"5c69c7fed83c24c95642a4e4f85bf78db642a3d8"},{"author":{"_account_id":7515,"name":"Jian LI","email":"ljianbj@cn.ibm.com","username":"leejian0612"},"change_message_id":"d1f1fcb8c1739d5d201a1470296df0b550f99aee","unresolved":false,"context_lines":[{"line_number":9,"context_line":"The opts in dnsmasq opt-file is depending on the tag setted"},{"line_number":10,"context_line":"in the host-file. When you hava only one stateless dhcpv6 subnet,"},{"line_number":11,"context_line":"it will be filter by the _iter_host() function, and will not be"},{"line_number":12,"context_line":"written to the host-file, this may lead extra-dhcp-opt not working."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Closes-Bug:#1411137"},{"line_number":15,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"fa81d914_f8f7888a","line":12,"in_reply_to":"fa81d914_59350f45","updated":"2015-01-28 07:43:32.000000000","message":"Done","commit_id":"5c69c7fed83c24c95642a4e4f85bf78db642a3d8"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"175a4adb39c1fe56373af0cec86d320a565a7f9e","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Fix extra-dhcp-opt on stateless dhcpv6 subnet"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"The opts in dnsmasq opt-file is depending on the tag set"},{"line_number":10,"context_line":"in the host-file. When you hava only one stateless dhcpv6 subnet,"},{"line_number":11,"context_line":"it will be filter by the _iter_host() function, and will not be"},{"line_number":12,"context_line":"written to the host-file, this may lead to extra-dhcp-opt not working."},{"line_number":13,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":7,"id":"fa81d914_545906fd","line":10,"range":{"start_line":10,"start_character":27,"end_line":10,"end_character":31},"updated":"2015-01-29 05:50:04.000000000","message":"have","commit_id":"ca703ab07c09b507bc1d63dfdb1d30edc65c31af"},{"author":{"_account_id":7515,"name":"Jian LI","email":"ljianbj@cn.ibm.com","username":"leejian0612"},"change_message_id":"4abf46df161f14aaaa6a133245354eabb0ca86b6","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Fix extra-dhcp-opt on stateless dhcpv6 subnet"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"The opts in dnsmasq opt-file is depending on the tag set"},{"line_number":10,"context_line":"in the host-file. When you hava only one stateless dhcpv6 subnet,"},{"line_number":11,"context_line":"it will be filter by the _iter_host() function, and will not be"},{"line_number":12,"context_line":"written to the host-file, this may lead to extra-dhcp-opt not working."},{"line_number":13,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":7,"id":"fa81d914_faeca3f5","line":10,"in_reply_to":"fa81d914_545906fd","updated":"2015-01-29 07:17:40.000000000","message":"Done","commit_id":"ca703ab07c09b507bc1d63dfdb1d30edc65c31af"}],"neutron/agent/linux/dhcp.py":[{"author":{"_account_id":4656,"name":"Sean M. Collins","email":"sean@coreitpro.com","username":"scollins"},"change_message_id":"577ebb5048bf308fc121aa41fce3ff83fce8eaa6","unresolved":false,"context_lines":[{"line_number":488,"context_line":"                        # on a stateless dhcpv6 network"},{"line_number":489,"context_line":"                        alloc \u003d None"},{"line_number":490,"context_line":"                        hostname \u003d None"},{"line_number":491,"context_line":"                        fqdn \u003d None"},{"line_number":492,"context_line":"                        yield (port, alloc, hostname, fqdn)"},{"line_number":493,"context_line":"                        continue"},{"line_number":494,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"3a961159_5279bbc3","line":491,"updated":"2015-01-15 19:12:56.000000000","message":"Nit - alloc \u003d hostname \u003d fqdn \u003d None","commit_id":"92cd1d771ae0f6312a26b4cf7f2739e229a1e60f"},{"author":{"_account_id":7515,"name":"Jian LI","email":"ljianbj@cn.ibm.com","username":"leejian0612"},"change_message_id":"0514b401e4152d2012058725bec4d594147dcd17","unresolved":false,"context_lines":[{"line_number":488,"context_line":"                        # on a stateless dhcpv6 network"},{"line_number":489,"context_line":"                        alloc \u003d None"},{"line_number":490,"context_line":"                        hostname \u003d None"},{"line_number":491,"context_line":"                        fqdn \u003d None"},{"line_number":492,"context_line":"                        yield (port, alloc, hostname, fqdn)"},{"line_number":493,"context_line":"                        continue"},{"line_number":494,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"3a961159_c9bfb9c8","line":491,"in_reply_to":"3a961159_5279bbc3","updated":"2015-01-16 02:15:11.000000000","message":"Done","commit_id":"92cd1d771ae0f6312a26b4cf7f2739e229a1e60f"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"48d0c2f88d2292293a64c8d007ebd151057a5a70","unresolved":false,"context_lines":[{"line_number":529,"context_line":"            if alloc:"},{"line_number":530,"context_line":"                # don\u0027t write ip address which belongs to a dhcp disabled"},{"line_number":531,"context_line":"                # subnet."},{"line_number":532,"context_line":"                if alloc.subnet_id not in dhcp_enabled_subnet_ids:"},{"line_number":533,"context_line":"                    continue"},{"line_number":534,"context_line":""},{"line_number":535,"context_line":"                # (dzyu) Check if it is legal ipv6 address, if so, need wrap"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a961159_86363e50","line":532,"updated":"2015-01-19 13:12:59.000000000","message":"AFAIK this check should still be applied. As far as I see in the code, nothing forbids assigning an extra option to a port bound to a subnet with no DHCP.","commit_id":"3b3e2807786496dd3e75aa41810119a96d2f8371"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"90501b34d87081872e00f7e0a059c3041bccf34e","unresolved":false,"context_lines":[{"line_number":529,"context_line":"            if alloc:"},{"line_number":530,"context_line":"                # don\u0027t write ip address which belongs to a dhcp disabled"},{"line_number":531,"context_line":"                # subnet."},{"line_number":532,"context_line":"                if alloc.subnet_id not in dhcp_enabled_subnet_ids:"},{"line_number":533,"context_line":"                    continue"},{"line_number":534,"context_line":""},{"line_number":535,"context_line":"                # (dzyu) Check if it is legal ipv6 address, if so, need wrap"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a961159_d7d9af57","line":532,"in_reply_to":"3a961159_13a36b44","updated":"2015-01-20 11:03:19.000000000","message":"Thanks for clarification.","commit_id":"3b3e2807786496dd3e75aa41810119a96d2f8371"},{"author":{"_account_id":7183,"name":"Xu Han Peng","email":"xuhanp@linux.vnet.ibm.com","username":"xuhanp"},"change_message_id":"50486626231ee52581fe14024f43847815339f5a","unresolved":false,"context_lines":[{"line_number":529,"context_line":"            if alloc:"},{"line_number":530,"context_line":"                # don\u0027t write ip address which belongs to a dhcp disabled"},{"line_number":531,"context_line":"                # subnet."},{"line_number":532,"context_line":"                if alloc.subnet_id not in dhcp_enabled_subnet_ids:"},{"line_number":533,"context_line":"                    continue"},{"line_number":534,"context_line":""},{"line_number":535,"context_line":"                # (dzyu) Check if it is legal ipv6 address, if so, need wrap"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a961159_13a36b44","line":532,"in_reply_to":"3a961159_86363e50","updated":"2015-01-19 14:22:50.000000000","message":"In current IPv6 design, ipv6_address_mode could not be set to dhcpv6_stateless or dhcpv6_stateful if enable_dhcp is False. So I think we are OK here.","commit_id":"3b3e2807786496dd3e75aa41810119a96d2f8371"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"48d0c2f88d2292293a64c8d007ebd151057a5a70","unresolved":false,"context_lines":[{"line_number":539,"context_line":"                if netaddr.valid_ipv6(ip_address):"},{"line_number":540,"context_line":"                    ip_address \u003d \u0027[%s]\u0027 % ip_address"},{"line_number":541,"context_line":""},{"line_number":542,"context_line":"                LOG.debug(\u0027Adding %(mac)s : %(name)s : %(ip)s\u0027,"},{"line_number":543,"context_line":"                          {\"mac\": port.mac_address, \"name\": name,"},{"line_number":544,"context_line":"                           \"ip\": ip_address})"},{"line_number":545,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"3a961159_06424eab","line":542,"updated":"2015-01-19 13:12:59.000000000","message":"You miss any logging in your else section.","commit_id":"3b3e2807786496dd3e75aa41810119a96d2f8371"},{"author":{"_account_id":7515,"name":"Jian LI","email":"ljianbj@cn.ibm.com","username":"leejian0612"},"change_message_id":"e2a160f39b1ee036079959936567528dabaa0740","unresolved":false,"context_lines":[{"line_number":539,"context_line":"                if netaddr.valid_ipv6(ip_address):"},{"line_number":540,"context_line":"                    ip_address \u003d \u0027[%s]\u0027 % ip_address"},{"line_number":541,"context_line":""},{"line_number":542,"context_line":"                LOG.debug(\u0027Adding %(mac)s : %(name)s : %(ip)s\u0027,"},{"line_number":543,"context_line":"                          {\"mac\": port.mac_address, \"name\": name,"},{"line_number":544,"context_line":"                           \"ip\": ip_address})"},{"line_number":545,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"3a961159_70c00c2c","line":542,"in_reply_to":"3a961159_06424eab","updated":"2015-01-20 07:58:28.000000000","message":"Will be added in next patch set!","commit_id":"3b3e2807786496dd3e75aa41810119a96d2f8371"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"2bbdc96d049473dc45c621eb4397ed3a659de16d","unresolved":false,"context_lines":[{"line_number":490,"context_line":"                    if addr_mode \u003d\u003d constants.IPV6_SLAAC:"},{"line_number":491,"context_line":"                        continue"},{"line_number":492,"context_line":"                    if addr_mode \u003d\u003d constants.DHCPV6_STATELESS:"},{"line_number":493,"context_line":"                        # alloc is none means do not allocate an IPv6 address"},{"line_number":494,"context_line":"                        # on a stateless dhcpv6 network"},{"line_number":495,"context_line":"                        alloc \u003d hostname \u003d fqdn \u003d None"},{"line_number":496,"context_line":"                        yield (port, alloc, hostname, fqdn)"}],"source_content_type":"text/x-python","patch_set":5,"id":"3a961159_776f1b61","line":493,"updated":"2015-01-20 11:08:34.000000000","message":"nit: none -\u003e None","commit_id":"5c69c7fed83c24c95642a4e4f85bf78db642a3d8"},{"author":{"_account_id":7515,"name":"Jian LI","email":"ljianbj@cn.ibm.com","username":"leejian0612"},"change_message_id":"d1f1fcb8c1739d5d201a1470296df0b550f99aee","unresolved":false,"context_lines":[{"line_number":490,"context_line":"                    if addr_mode \u003d\u003d constants.IPV6_SLAAC:"},{"line_number":491,"context_line":"                        continue"},{"line_number":492,"context_line":"                    if addr_mode \u003d\u003d constants.DHCPV6_STATELESS:"},{"line_number":493,"context_line":"                        # alloc is none means do not allocate an IPv6 address"},{"line_number":494,"context_line":"                        # on a stateless dhcpv6 network"},{"line_number":495,"context_line":"                        alloc \u003d hostname \u003d fqdn \u003d None"},{"line_number":496,"context_line":"                        yield (port, alloc, hostname, fqdn)"}],"source_content_type":"text/x-python","patch_set":5,"id":"fa81d914_98304c58","line":493,"in_reply_to":"3a961159_776f1b61","updated":"2015-01-28 07:43:32.000000000","message":"Done","commit_id":"5c69c7fed83c24c95642a4e4f85bf78db642a3d8"},{"author":{"_account_id":8645,"name":"Trinath Somanchi","email":"trinath.somanchi@freescale.com","username":"trinaths"},"change_message_id":"f4f5fceda24bd17fc1f86594170423debc0b1b59","unresolved":false,"context_lines":[{"line_number":534,"context_line":""},{"line_number":535,"context_line":"                # (dzyu) Check if it is legal ipv6 address, if so, need wrap"},{"line_number":536,"context_line":"                # it with \u0027[]\u0027 to let dnsmasq to distinguish MAC address from"},{"line_number":537,"context_line":"                # IPv6 address."},{"line_number":538,"context_line":"                ip_address \u003d alloc.ip_address"},{"line_number":539,"context_line":"                if netaddr.valid_ipv6(ip_address):"},{"line_number":540,"context_line":"                    ip_address \u003d \u0027[%s]\u0027 % ip_address"}],"source_content_type":"text/x-python","patch_set":5,"id":"1a930d6b_79c7fc45","line":537,"updated":"2015-01-22 10:10:12.000000000","message":"Is the above comment a TODO, if so add a TODO tag there.","commit_id":"5c69c7fed83c24c95642a4e4f85bf78db642a3d8"},{"author":{"_account_id":7515,"name":"Jian LI","email":"ljianbj@cn.ibm.com","username":"leejian0612"},"change_message_id":"ba18424bea7c401cda0cfa716df281e464ca89bb","unresolved":false,"context_lines":[{"line_number":534,"context_line":""},{"line_number":535,"context_line":"                # (dzyu) Check if it is legal ipv6 address, if so, need wrap"},{"line_number":536,"context_line":"                # it with \u0027[]\u0027 to let dnsmasq to distinguish MAC address from"},{"line_number":537,"context_line":"                # IPv6 address."},{"line_number":538,"context_line":"                ip_address \u003d alloc.ip_address"},{"line_number":539,"context_line":"                if netaddr.valid_ipv6(ip_address):"},{"line_number":540,"context_line":"                    ip_address \u003d \u0027[%s]\u0027 % ip_address"}],"source_content_type":"text/x-python","patch_set":5,"id":"1a930d6b_c6264c16","line":537,"in_reply_to":"1a930d6b_79c7fc45","updated":"2015-01-22 11:58:29.000000000","message":"The code netaddr.valid_ipv6(ip_address) in below has done this work,  so it\u0027s implemented.","commit_id":"5c69c7fed83c24c95642a4e4f85bf78db642a3d8"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"175a4adb39c1fe56373af0cec86d320a565a7f9e","unresolved":false,"context_lines":[{"line_number":434,"context_line":"        For each host on the network we yield a tuple containing:"},{"line_number":435,"context_line":"        ("},{"line_number":436,"context_line":"            port,  # a DictModel instance representing the port."},{"line_number":437,"context_line":"            alloc,  # a DictModel instance of the allocated ip and subnet."},{"line_number":438,"context_line":"            host_name,  # Host name."},{"line_number":439,"context_line":"            name,  # Canonical hostname in the format \u0027hostname[.domain]\u0027."},{"line_number":440,"context_line":"        )"}],"source_content_type":"text/x-python","patch_set":7,"id":"fa81d914_54b586ec","line":437,"updated":"2015-01-29 05:50:04.000000000","message":"this is a more appropriate place to document the meaning of None.","commit_id":"ca703ab07c09b507bc1d63dfdb1d30edc65c31af"},{"author":{"_account_id":7515,"name":"Jian LI","email":"ljianbj@cn.ibm.com","username":"leejian0612"},"change_message_id":"4abf46df161f14aaaa6a133245354eabb0ca86b6","unresolved":false,"context_lines":[{"line_number":434,"context_line":"        For each host on the network we yield a tuple containing:"},{"line_number":435,"context_line":"        ("},{"line_number":436,"context_line":"            port,  # a DictModel instance representing the port."},{"line_number":437,"context_line":"            alloc,  # a DictModel instance of the allocated ip and subnet."},{"line_number":438,"context_line":"            host_name,  # Host name."},{"line_number":439,"context_line":"            name,  # Canonical hostname in the format \u0027hostname[.domain]\u0027."},{"line_number":440,"context_line":"        )"}],"source_content_type":"text/x-python","patch_set":7,"id":"fa81d914_3abe3bd5","line":437,"in_reply_to":"fa81d914_54b586ec","updated":"2015-01-29 07:17:40.000000000","message":"Done","commit_id":"ca703ab07c09b507bc1d63dfdb1d30edc65c31af"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"b5988791801ab5dd87d376bf9568a714561ba6cd","unresolved":false,"context_lines":[{"line_number":435,"context_line":"        ("},{"line_number":436,"context_line":"            port,  # a DictModel instance representing the port."},{"line_number":437,"context_line":"            alloc,  # a DictModel instance of the allocated ip and subnet."},{"line_number":438,"context_line":"                    # alloc is None, which means do not allocate an IPv6"},{"line_number":439,"context_line":"                    # address, when on a stateless dhcpv6 network."},{"line_number":440,"context_line":"            host_name,  # Host name."},{"line_number":441,"context_line":"            name,  # Canonical hostname in the format \u0027hostname[.domain]\u0027."}],"source_content_type":"text/x-python","patch_set":8,"id":"fa81d914_6a937e4f","line":438,"updated":"2015-01-29 09:36:07.000000000","message":"now it\u0027s not clear a bit. How about:\n\nIf alloc is None, it means that an IPv6 address should not be allocated, f.e. on a stateless dhcpv6 network.","commit_id":"8c58fa7047b511c38956750f5f98bc71187d7e8f"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"cf32d8b1455f3e1c642450966e555c2b6755ee61","unresolved":false,"context_lines":[{"line_number":435,"context_line":"        ("},{"line_number":436,"context_line":"            port,  # a DictModel instance representing the port."},{"line_number":437,"context_line":"            alloc,  # a DictModel instance of the allocated ip and subnet."},{"line_number":438,"context_line":"                    # alloc is None, which means do not allocate an IPv6"},{"line_number":439,"context_line":"                    # address, when on a stateless dhcpv6 network."},{"line_number":440,"context_line":"            host_name,  # Host name."},{"line_number":441,"context_line":"            name,  # Canonical hostname in the format \u0027hostname[.domain]\u0027."}],"source_content_type":"text/x-python","patch_set":8,"id":"fa81d914_8aa0b244","line":438,"in_reply_to":"fa81d914_6a937e4f","updated":"2015-01-29 09:50:54.000000000","message":"A bit tweaked version:\n\n  If alloc is None, it means there is no need to allocate an IPv6\n  address because of stateless DHCPv6 network.","commit_id":"8c58fa7047b511c38956750f5f98bc71187d7e8f"},{"author":{"_account_id":7515,"name":"Jian LI","email":"ljianbj@cn.ibm.com","username":"leejian0612"},"change_message_id":"a28522cde16a6ebe32a73b505774db837fbaf1e9","unresolved":false,"context_lines":[{"line_number":435,"context_line":"        ("},{"line_number":436,"context_line":"            port,  # a DictModel instance representing the port."},{"line_number":437,"context_line":"            alloc,  # a DictModel instance of the allocated ip and subnet."},{"line_number":438,"context_line":"                    # alloc is None, which means do not allocate an IPv6"},{"line_number":439,"context_line":"                    # address, when on a stateless dhcpv6 network."},{"line_number":440,"context_line":"            host_name,  # Host name."},{"line_number":441,"context_line":"            name,  # Canonical hostname in the format \u0027hostname[.domain]\u0027."}],"source_content_type":"text/x-python","patch_set":8,"id":"fa81d914_bd777739","line":438,"in_reply_to":"fa81d914_6a937e4f","updated":"2015-01-29 13:42:29.000000000","message":"Thanks for your reminding, but I think the one below may be better.","commit_id":"8c58fa7047b511c38956750f5f98bc71187d7e8f"},{"author":{"_account_id":7515,"name":"Jian LI","email":"ljianbj@cn.ibm.com","username":"leejian0612"},"change_message_id":"a28522cde16a6ebe32a73b505774db837fbaf1e9","unresolved":false,"context_lines":[{"line_number":435,"context_line":"        ("},{"line_number":436,"context_line":"            port,  # a DictModel instance representing the port."},{"line_number":437,"context_line":"            alloc,  # a DictModel instance of the allocated ip and subnet."},{"line_number":438,"context_line":"                    # alloc is None, which means do not allocate an IPv6"},{"line_number":439,"context_line":"                    # address, when on a stateless dhcpv6 network."},{"line_number":440,"context_line":"            host_name,  # Host name."},{"line_number":441,"context_line":"            name,  # Canonical hostname in the format \u0027hostname[.domain]\u0027."}],"source_content_type":"text/x-python","patch_set":8,"id":"fa81d914_9de39304","line":438,"in_reply_to":"fa81d914_8aa0b244","updated":"2015-01-29 13:42:29.000000000","message":"Done","commit_id":"8c58fa7047b511c38956750f5f98bc71187d7e8f"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"cf32d8b1455f3e1c642450966e555c2b6755ee61","unresolved":false,"context_lines":[{"line_number":452,"context_line":"                    addr_mode \u003d v6_nets[alloc.subnet_id].ipv6_address_mode"},{"line_number":453,"context_line":"                    if addr_mode \u003d\u003d constants.IPV6_SLAAC:"},{"line_number":454,"context_line":"                        continue"},{"line_number":455,"context_line":"                    if addr_mode \u003d\u003d constants.DHCPV6_STATELESS:"},{"line_number":456,"context_line":"                        alloc \u003d hostname \u003d fqdn \u003d None"},{"line_number":457,"context_line":"                        yield (port, alloc, hostname, fqdn)"},{"line_number":458,"context_line":"                        continue"}],"source_content_type":"text/x-python","patch_set":8,"id":"fa81d914_ca89cacb","line":455,"updated":"2015-01-29 09:50:54.000000000","message":"\"elif\" is better.","commit_id":"8c58fa7047b511c38956750f5f98bc71187d7e8f"},{"author":{"_account_id":7515,"name":"Jian LI","email":"ljianbj@cn.ibm.com","username":"leejian0612"},"change_message_id":"a28522cde16a6ebe32a73b505774db837fbaf1e9","unresolved":false,"context_lines":[{"line_number":452,"context_line":"                    addr_mode \u003d v6_nets[alloc.subnet_id].ipv6_address_mode"},{"line_number":453,"context_line":"                    if addr_mode \u003d\u003d constants.IPV6_SLAAC:"},{"line_number":454,"context_line":"                        continue"},{"line_number":455,"context_line":"                    if addr_mode \u003d\u003d constants.DHCPV6_STATELESS:"},{"line_number":456,"context_line":"                        alloc \u003d hostname \u003d fqdn \u003d None"},{"line_number":457,"context_line":"                        yield (port, alloc, hostname, fqdn)"},{"line_number":458,"context_line":"                        continue"}],"source_content_type":"text/x-python","patch_set":8,"id":"fa81d914_9d6e3395","line":455,"in_reply_to":"fa81d914_ca89cacb","updated":"2015-01-29 13:42:29.000000000","message":"Done","commit_id":"8c58fa7047b511c38956750f5f98bc71187d7e8f"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"cf32d8b1455f3e1c642450966e555c2b6755ee61","unresolved":false,"context_lines":[{"line_number":493,"context_line":"                if alloc.subnet_id not in dhcp_enabled_subnet_ids:"},{"line_number":494,"context_line":"                    continue"},{"line_number":495,"context_line":""},{"line_number":496,"context_line":"                # (dzyu) Check if it is legal ipv6 address, if so, need wrap"},{"line_number":497,"context_line":"                # it with \u0027[]\u0027 to let dnsmasq to distinguish MAC address from"},{"line_number":498,"context_line":"                # IPv6 address."},{"line_number":499,"context_line":"                ip_address \u003d alloc.ip_address"}],"source_content_type":"text/x-python","patch_set":8,"id":"fa81d914_eaabee1b","line":496,"updated":"2015-01-29 09:50:54.000000000","message":"nit: As a convention, a comment with a person name starts with NOTE(someone), but I don\u0027t think we need to have a name here.","commit_id":"8c58fa7047b511c38956750f5f98bc71187d7e8f"},{"author":{"_account_id":7515,"name":"Jian LI","email":"ljianbj@cn.ibm.com","username":"leejian0612"},"change_message_id":"a28522cde16a6ebe32a73b505774db837fbaf1e9","unresolved":false,"context_lines":[{"line_number":493,"context_line":"                if alloc.subnet_id not in dhcp_enabled_subnet_ids:"},{"line_number":494,"context_line":"                    continue"},{"line_number":495,"context_line":""},{"line_number":496,"context_line":"                # (dzyu) Check if it is legal ipv6 address, if so, need wrap"},{"line_number":497,"context_line":"                # it with \u0027[]\u0027 to let dnsmasq to distinguish MAC address from"},{"line_number":498,"context_line":"                # IPv6 address."},{"line_number":499,"context_line":"                ip_address \u003d alloc.ip_address"}],"source_content_type":"text/x-python","patch_set":8,"id":"fa81d914_dd68ab89","line":496,"in_reply_to":"fa81d914_eaabee1b","updated":"2015-01-29 13:42:29.000000000","message":"Done","commit_id":"8c58fa7047b511c38956750f5f98bc71187d7e8f"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"45d330a3795d0941a70e25e7a3d70b9d1ab72904","unresolved":false,"context_lines":[{"line_number":454,"context_line":"                        continue"},{"line_number":455,"context_line":"                    elif addr_mode \u003d\u003d constants.DHCPV6_STATELESS:"},{"line_number":456,"context_line":"                        alloc \u003d hostname \u003d fqdn \u003d None"},{"line_number":457,"context_line":"                        yield (port, alloc, hostname, fqdn)"},{"line_number":458,"context_line":"                        continue"},{"line_number":459,"context_line":""},{"line_number":460,"context_line":"                hostname \u003d \u0027host-%s\u0027 % alloc.ip_address.replace("}],"source_content_type":"text/x-python","patch_set":9,"id":"da86d52c_b384e85e","line":457,"updated":"2015-02-04 00:30:37.000000000","message":"I can\u0027t decide between what you have here and:\n\n  yield(port, None, None, None)\n\nOn one hand, what you\u0027ve done because it clear which field is which.  On the other hand, the docstring describing the fields isn\u0027t far away so a single liner might be more readable.\n\nI guess I can go either way.","commit_id":"501314a1ba9775c2374c50231ccd8fe89781c432"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"45d330a3795d0941a70e25e7a3d70b9d1ab72904","unresolved":false,"context_lines":[{"line_number":487,"context_line":"        dhcp_enabled_subnet_ids \u003d [s.id for s in self.network.subnets"},{"line_number":488,"context_line":"                                   if s.enable_dhcp]"},{"line_number":489,"context_line":"        for (port, alloc, hostname, name) in self._iter_hosts():"},{"line_number":490,"context_line":"            if alloc:"},{"line_number":491,"context_line":"                # don\u0027t write ip address which belongs to a dhcp disabled"},{"line_number":492,"context_line":"                # subnet."},{"line_number":493,"context_line":"                if alloc.subnet_id not in dhcp_enabled_subnet_ids:"}],"source_content_type":"text/x-python","patch_set":9,"id":"da86d52c_c81fe76a","line":490,"updated":"2015-02-04 00:30:37.000000000","message":"You could avoid a lot of extra new indentation if you put the \"if not alloc:\" case first and ended it with continue.  Changing indentation can be significantly more difficult and error prone to review.  Also, the more indentation there is, the harder it is in general to understand code.\n\nThis also follows my philosophy to put the short cases up front and get out (e.g. return or continue) quickly to indicate to the code reader that we\u0027re done and we should move on immediately for the code path.\n\nIMO it is easier to review now that way *and* easier to read down the road.","commit_id":"501314a1ba9775c2374c50231ccd8fe89781c432"}],"neutron/tests/unit/test_linux_dhcp.py":[{"author":{"_account_id":7249,"name":"Ann Taraday","email":"akamyshnikova@mirantis.com","username":"AKamyshnikova"},"change_message_id":"95f1f7ff169884865a0cfdaff39ffd2572f31b6a","unresolved":false,"context_lines":[{"line_number":1390,"context_line":""},{"line_number":1391,"context_line":"    def test_host_file_on_stateless_dhcpv6_network(self):"},{"line_number":1392,"context_line":"        exp_host_name \u003d \u0027/dhcp/bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb/host\u0027"},{"line_number":1393,"context_line":"        exp_host_data \u003d (\u002700:16:3e:c2:77:1d,set:hhhhhhhh-hhhh-hhhh-hhhh-hhhhhhhhhhhh\\n\u0027).lstrip()"},{"line_number":1394,"context_line":"        dm \u003d dhcp.Dnsmasq(self.conf, FakeV6NetworkStatelessDHCP(),"},{"line_number":1395,"context_line":"                          version\u003ddhcp.Dnsmasq.MINIMUM_VERSION)"},{"line_number":1396,"context_line":"        dm._output_hosts_file()"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a961159_e0a743a6","line":1393,"updated":"2015-01-15 12:24:00.000000000","message":"line seems to be too long. Run pep8 check before pushing change.","commit_id":"f596602fc22c6c8552a30f9a4c4b14acf67d4804"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"48d0c2f88d2292293a64c8d007ebd151057a5a70","unresolved":false,"context_lines":[{"line_number":1432,"context_line":"        self.safe.assert_has_calls([mock.call(exp_host_name,"},{"line_number":1433,"context_line":"                                              exp_host_data)])"},{"line_number":1434,"context_line":""},{"line_number":1435,"context_line":"    def test_host_and_opts_file_on_stateless_dhcpv6_network(self):"},{"line_number":1436,"context_line":"        exp_host_name \u003d \u0027/dhcp/bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb/host\u0027"},{"line_number":1437,"context_line":"        exp_host_data \u003d (\u002700:16:3e:c2:77:1d,\u0027"},{"line_number":1438,"context_line":"                         \u0027set:hhhhhhhh-hhhh-hhhh-hhhh-hhhhhhhhhhhh\\n\u0027).lstrip()"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a961159_e649c2b9","line":1435,"updated":"2015-01-19 13:12:59.000000000","message":"please also cover case when dhcp_enable is False.","commit_id":"3b3e2807786496dd3e75aa41810119a96d2f8371"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"90501b34d87081872e00f7e0a059c3041bccf34e","unresolved":false,"context_lines":[{"line_number":1432,"context_line":"        self.safe.assert_has_calls([mock.call(exp_host_name,"},{"line_number":1433,"context_line":"                                              exp_host_data)])"},{"line_number":1434,"context_line":""},{"line_number":1435,"context_line":"    def test_host_and_opts_file_on_stateless_dhcpv6_network(self):"},{"line_number":1436,"context_line":"        exp_host_name \u003d \u0027/dhcp/bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb/host\u0027"},{"line_number":1437,"context_line":"        exp_host_data \u003d (\u002700:16:3e:c2:77:1d,\u0027"},{"line_number":1438,"context_line":"                         \u0027set:hhhhhhhh-hhhh-hhhh-hhhh-hhhhhhhhhhhh\\n\u0027).lstrip()"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a961159_f7deab3d","line":1435,"in_reply_to":"3a961159_d090e044","updated":"2015-01-20 11:03:19.000000000","message":"Thanks, now I understand why it\u0027s omitted.","commit_id":"3b3e2807786496dd3e75aa41810119a96d2f8371"},{"author":{"_account_id":7183,"name":"Xu Han Peng","email":"xuhanp@linux.vnet.ibm.com","username":"xuhanp"},"change_message_id":"50486626231ee52581fe14024f43847815339f5a","unresolved":false,"context_lines":[{"line_number":1432,"context_line":"        self.safe.assert_has_calls([mock.call(exp_host_name,"},{"line_number":1433,"context_line":"                                              exp_host_data)])"},{"line_number":1434,"context_line":""},{"line_number":1435,"context_line":"    def test_host_and_opts_file_on_stateless_dhcpv6_network(self):"},{"line_number":1436,"context_line":"        exp_host_name \u003d \u0027/dhcp/bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb/host\u0027"},{"line_number":1437,"context_line":"        exp_host_data \u003d (\u002700:16:3e:c2:77:1d,\u0027"},{"line_number":1438,"context_line":"                         \u0027set:hhhhhhhh-hhhh-hhhh-hhhh-hhhhhhhhhhhh\\n\u0027).lstrip()"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a961159_16443946","line":1435,"in_reply_to":"3a961159_e649c2b9","updated":"2015-01-19 14:22:50.000000000","message":"Doesn\u0027t the above test case test_only_populates_dhcp_enabled_subnet_on_a_network already cover this?","commit_id":"3b3e2807786496dd3e75aa41810119a96d2f8371"},{"author":{"_account_id":7515,"name":"Jian LI","email":"ljianbj@cn.ibm.com","username":"leejian0612"},"change_message_id":"e2a160f39b1ee036079959936567528dabaa0740","unresolved":false,"context_lines":[{"line_number":1432,"context_line":"        self.safe.assert_has_calls([mock.call(exp_host_name,"},{"line_number":1433,"context_line":"                                              exp_host_data)])"},{"line_number":1434,"context_line":""},{"line_number":1435,"context_line":"    def test_host_and_opts_file_on_stateless_dhcpv6_network(self):"},{"line_number":1436,"context_line":"        exp_host_name \u003d \u0027/dhcp/bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb/host\u0027"},{"line_number":1437,"context_line":"        exp_host_data \u003d (\u002700:16:3e:c2:77:1d,\u0027"},{"line_number":1438,"context_line":"                         \u0027set:hhhhhhhh-hhhh-hhhh-hhhh-hhhhhhhhhhhh\\n\u0027).lstrip()"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a961159_d090e044","line":1435,"in_reply_to":"3a961159_e649c2b9","updated":"2015-01-20 07:58:28.000000000","message":"Hi,if the dhcp_enable is false, the ipv6-address-mode of the subnet can not be setted as dhcpv6-stateless, so this test case will be meaningless, and as Xu Han Peng said, we already hava a case for the network not enabled dhcp.","commit_id":"3b3e2807786496dd3e75aa41810119a96d2f8371"},{"author":{"_account_id":7515,"name":"Jian LI","email":"ljianbj@cn.ibm.com","username":"leejian0612"},"change_message_id":"f65df90ee84e00c003defbe679e1b139bef27818","unresolved":false,"context_lines":[{"line_number":123,"context_line":"        self.extra_dhcp_opts \u003d ["},{"line_number":124,"context_line":"            DhcpOpt(opt_name\u003d\u0027dns-server\u0027,"},{"line_number":125,"context_line":"                    opt_value\u003d\u0027ffea:3ba5:a17a:4ba3::100\u0027,"},{"line_number":126,"context_line":"                    ip_version\u003d6)]"},{"line_number":127,"context_line":""},{"line_number":128,"context_line":""},{"line_number":129,"context_line":"class FakeDualPort(object):"}],"source_content_type":"text/x-python","patch_set":11,"id":"da86d52c_a253af37","line":126,"updated":"2015-02-04 02:16:39.000000000","message":"Due to this patch https://review.openstack.org/#/c/136713/ ,add ip_version 6 to extra_dhcp_opts!","commit_id":"a584e35775391a2a93535482c5a05ff8774cb56b"}]}
