)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":11682,"name":"Ryan Moats","email":"rmoats@us.ibm.com","username":"regXboi"},"change_message_id":"a77bb19ca5f775b8018af2c6f2bd99632bee9b2e","unresolved":false,"context_lines":[{"line_number":10,"context_line":"port creatioin and update. This dns_label field will be used for DNS resolution"},{"line_number":11,"context_line":"of the hostname in dnsmasq and also will be used when Neutron can integrate"},{"line_number":12,"context_line":"with external DNS systems."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Change-Id: I6beab336dfd9b70b1af6e975939c602047faa651"},{"line_number":15,"context_line":"Closes-Bug: #1459030"},{"line_number":16,"context_line":"Implements: blueprint internal-dns-resolution"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"9a41bdd9_b8bea4fd","line":13,"updated":"2015-07-13 05:00:27.000000000","message":"Nit: shouldn\u0027t there be a DocImpact tag here given that new attributes being added to the port object?\n\nPedantically, I could also argue for an API impact tag,","commit_id":"fd619ce628fd9a3b2a177c0899046c4acadca322"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"84a77cc81fb41ea2211739a9ce4dc54ea1ef199a","unresolved":false,"context_lines":[{"line_number":10,"context_line":"port creatioin and update. This dns_label field will be used for DNS resolution"},{"line_number":11,"context_line":"of the hostname in dnsmasq and also will be used when Neutron can integrate"},{"line_number":12,"context_line":"with external DNS systems."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Change-Id: I6beab336dfd9b70b1af6e975939c602047faa651"},{"line_number":15,"context_line":"Closes-Bug: #1459030"},{"line_number":16,"context_line":"Implements: blueprint internal-dns-resolution"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"9a41bdd9_f94cfb71","line":13,"in_reply_to":"9a41bdd9_b8bea4fd","updated":"2015-07-13 23:57:41.000000000","message":"Ryan,\n\nThanks! I will add that comment in the next commit","commit_id":"fd619ce628fd9a3b2a177c0899046c4acadca322"},{"author":{"_account_id":11682,"name":"Ryan Moats","email":"rmoats@us.ibm.com","username":"regXboi"},"change_message_id":"9fb7547f270ca40e2208f941ee9b0cedf79c9091","unresolved":false,"context_lines":[{"line_number":10,"context_line":"port creatioin and update. This dns_label field will be used for DNS resolution"},{"line_number":11,"context_line":"of the hostname in dnsmasq and also will be used when Neutron can integrate"},{"line_number":12,"context_line":"with external DNS systems."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Change-Id: I6beab336dfd9b70b1af6e975939c602047faa651"},{"line_number":15,"context_line":"Closes-Bug: #1459030"},{"line_number":16,"context_line":"Implements: blueprint internal-dns-resolution"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"9a41bdd9_18f17901","line":13,"updated":"2015-07-14 14:38:01.000000000","message":"Pulling forward the nit from PS1: DocImpact tag and possibly APIImpact tag","commit_id":"fd28fa47f9ba5cfc1389fce182951dd5373be413"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"134079fd127ebad30ec7da1c5cfc2b21e087dc4a","unresolved":false,"context_lines":[{"line_number":10,"context_line":"port creatioin and update. This dns_label field will be used for DNS resolution"},{"line_number":11,"context_line":"of the hostname in dnsmasq and also will be used when Neutron can integrate"},{"line_number":12,"context_line":"with external DNS systems."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Change-Id: I6beab336dfd9b70b1af6e975939c602047faa651"},{"line_number":15,"context_line":"Closes-Bug: #1459030"},{"line_number":16,"context_line":"Implements: blueprint internal-dns-resolution"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"9a41bdd9_6d2552bf","line":13,"in_reply_to":"9a41bdd9_18f17901","updated":"2015-07-14 22:05:01.000000000","message":"Thanks! Taken care of","commit_id":"fd28fa47f9ba5cfc1389fce182951dd5373be413"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"5f26ce8d9b0f118a84a6f69f6478eef6b8a5d758","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Add dns_label processing for Ports"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Functionallity is added to enable users to specify a dns_label field during"},{"line_number":10,"context_line":"port creatioin and update. This dns_label field will be used for DNS resolution"},{"line_number":11,"context_line":"of the hostname in dnsmasq and also will be used when Neutron can integrate"},{"line_number":12,"context_line":"with external DNS systems."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"9a41bdd9_207d11b1","line":9,"updated":"2015-07-14 22:46:41.000000000","message":"Functionality","commit_id":"c0f74cf7abadd6c6cecc0c176c1f3caf738412c1"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"5f26ce8d9b0f118a84a6f69f6478eef6b8a5d758","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Add dns_label processing for Ports"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Functionallity is added to enable users to specify a dns_label field during"},{"line_number":10,"context_line":"port creatioin and update. This dns_label field will be used for DNS resolution"},{"line_number":11,"context_line":"of the hostname in dnsmasq and also will be used when Neutron can integrate"},{"line_number":12,"context_line":"with external DNS systems."},{"line_number":13,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"9a41bdd9_e0516937","line":10,"updated":"2015-07-14 22:46:41.000000000","message":"creation","commit_id":"c0f74cf7abadd6c6cecc0c176c1f3caf738412c1"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"5f26ce8d9b0f118a84a6f69f6478eef6b8a5d758","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Functionallity is added to enable users to specify a dns_label field during"},{"line_number":10,"context_line":"port creatioin and update. This dns_label field will be used for DNS resolution"},{"line_number":11,"context_line":"of the hostname in dnsmasq and also will be used when Neutron can integrate"},{"line_number":12,"context_line":"with external DNS systems."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Change-Id: I6beab336dfd9b70b1af6e975939c602047faa651"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"9a41bdd9_a047e175","line":11,"updated":"2015-07-14 22:46:41.000000000","message":"can \u003d\u003e will","commit_id":"c0f74cf7abadd6c6cecc0c176c1f3caf738412c1"},{"author":{"_account_id":10601,"name":"Renjie Sun","email":"sunrenjie6@gmail.com","username":"sunrenjie6"},"change_message_id":"70c4e20019f461da2edbe4cd418654fe6b249110","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Add dns_label processing for Ports"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Functionallity is added to enable users to specify a dns_label field during"},{"line_number":10,"context_line":"port creatioin and update. This dns_label field will be used for DNS resolution"},{"line_number":11,"context_line":"of the hostname in dnsmasq and also will be used when Neutron can integrate"},{"line_number":12,"context_line":"with external DNS systems."},{"line_number":13,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"3a50d1a3_c0b82c78","line":10,"updated":"2015-07-27 05:02:07.000000000","message":"nit: s/creatioin/creation/","commit_id":"3811b8d8b58c69ad5967339472c0f00ebefa81aa"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"47465c7cf4526f229a492443b058deb3cf111652","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Add dns_label processing for Ports"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Functionallity is added to enable users to specify a dns_label field during"},{"line_number":10,"context_line":"port creatioin and update. This dns_label field will be used for DNS resolution"},{"line_number":11,"context_line":"of the hostname in dnsmasq and also will be used when Neutron can integrate"},{"line_number":12,"context_line":"with external DNS systems."},{"line_number":13,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"3a50d1a3_7c0083ab","line":10,"in_reply_to":"3a50d1a3_c0b82c78","updated":"2015-07-28 19:11:08.000000000","message":"Done","commit_id":"3811b8d8b58c69ad5967339472c0f00ebefa81aa"}],"neutron/agent/dhcp/config.py":[{"author":{"_account_id":7018,"name":"Abhishek Raut","email":"rauta@vmware.com","username":"abhiraut"},"change_message_id":"cfa3aad8cb4f66f21d69179cba3567c016bf7ae0","unresolved":false,"context_lines":[{"line_number":36,"context_line":"    cfg.StrOpt(\u0027dhcp_confs\u0027,"},{"line_number":37,"context_line":"               default\u003d\u0027$state_path/dhcp\u0027,"},{"line_number":38,"context_line":"               help\u003d_(\u0027Location to store DHCP server config files\u0027)),"},{"line_number":39,"context_line":"    cfg.StrOpt(\u0027dhcp_domain\u0027,"},{"line_number":40,"context_line":"               default\u003d\u0027openstacklocal\u0027,"},{"line_number":41,"context_line":"               help\u003d_(\u0027Domain to use for building the hostnames\u0027)),"},{"line_number":42,"context_line":"]"}],"source_content_type":"text/x-python","patch_set":6,"id":"3a50d1a3_62e4593b","side":"PARENT","line":39,"updated":"2015-07-28 19:19:04.000000000","message":"there should be a change in neutron/etc/dhcp_agent.ini file to remove this option","commit_id":"043cdc8a25643574b99546d91289807f2f07a117"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"03e6f1606e729f80003351f92a453aba5d5560d9","unresolved":false,"context_lines":[{"line_number":36,"context_line":"    cfg.StrOpt(\u0027dhcp_confs\u0027,"},{"line_number":37,"context_line":"               default\u003d\u0027$state_path/dhcp\u0027,"},{"line_number":38,"context_line":"               help\u003d_(\u0027Location to store DHCP server config files\u0027)),"},{"line_number":39,"context_line":"    cfg.StrOpt(\u0027dhcp_domain\u0027,"},{"line_number":40,"context_line":"               default\u003d\u0027openstacklocal\u0027,"},{"line_number":41,"context_line":"               help\u003d_(\u0027Domain to use for building the hostnames\u0027)),"},{"line_number":42,"context_line":"]"}],"source_content_type":"text/x-python","patch_set":6,"id":"3a50d1a3_6b550af8","side":"PARENT","line":39,"in_reply_to":"3a50d1a3_62e4593b","updated":"2015-07-29 01:27:12.000000000","message":"Done","commit_id":"043cdc8a25643574b99546d91289807f2f07a117"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"e06642bec30692167085613b28c33ed0808266a6","unresolved":false,"context_lines":[{"line_number":38,"context_line":"               help\u003d_(\u0027Location to store DHCP server config files\u0027)),"},{"line_number":39,"context_line":"    cfg.StrOpt(\u0027dhcp_domain\u0027,"},{"line_number":40,"context_line":"               default\u003d\u0027openstacklocal\u0027,"},{"line_number":41,"context_line":"               help\u003d_(\u0027Domain to use for building the hostnames\u0027)),"},{"line_number":42,"context_line":"]"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"DNSMASQ_OPTS \u003d ["}],"source_content_type":"text/x-python","patch_set":11,"id":"1a4dcd0f_2209d1dd","side":"PARENT","line":41,"updated":"2015-08-04 22:27:44.000000000","message":"Is moving this going to have an impact on deployers who may already be customizing this?  Instead of removing this option, should it be deprecated somehow with a note that the option has moved to neutron.conf?","commit_id":"01ec1c2ca8b5cacc072d17cd205fd351f3ad4e95"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"a173026061fc2370d0f12b7c171b3e4131dafaa0","unresolved":false,"context_lines":[{"line_number":38,"context_line":"               help\u003d_(\u0027Location to store DHCP server config files\u0027)),"},{"line_number":39,"context_line":"    cfg.StrOpt(\u0027dhcp_domain\u0027,"},{"line_number":40,"context_line":"               default\u003d\u0027openstacklocal\u0027,"},{"line_number":41,"context_line":"               help\u003d_(\u0027Domain to use for building the hostnames\u0027)),"},{"line_number":42,"context_line":"]"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"DNSMASQ_OPTS \u003d ["}],"source_content_type":"text/x-python","patch_set":11,"id":"1a4dcd0f_91a97192","side":"PARENT","line":41,"in_reply_to":"1a4dcd0f_2209d1dd","updated":"2015-08-10 19:47:31.000000000","message":"Done. I put it back here and marked is as \u0027deprecated_for_removal\u0027","commit_id":"01ec1c2ca8b5cacc072d17cd205fd351f3ad4e95"}],"neutron/agent/linux/dhcp.py":[{"author":{"_account_id":8976,"name":"shihanzhang","email":"ayshihanzhang@gmail.com","username":"shihanzhang"},"change_message_id":"7a03a0386ba47c16867ccaf6439dbbc97b84c639","unresolved":false,"context_lines":[{"line_number":491,"context_line":"        for port in self.network.ports:"},{"line_number":492,"context_line":"            fixed_ips \u003d self._sort_fixed_ips_for_dnsmasq(port.fixed_ips,"},{"line_number":493,"context_line":"                                                         v6_nets)"},{"line_number":494,"context_line":"            dns_ip_map \u003d {d.ip_address: d for d in port.dns_assignment}"},{"line_number":495,"context_line":"            for alloc in fixed_ips:"},{"line_number":496,"context_line":"                # Note(scollins) Only create entries that are"},{"line_number":497,"context_line":"                # associated with the subnet being managed by this"}],"source_content_type":"text/x-python","patch_set":9,"id":"3a50d1a3_c95b4621","line":494,"updated":"2015-08-03 02:06:35.000000000","message":"port \u0027dns_name\u0027 default value is empty string, if there are two more ports which not set \u0027dns_name\u0027, these \u0027dns_name\u0027 will be same in dnsmasq lease file, so I think if a port not set \u0027dns_name\u0027, its \u0027hostname\u0027 will still as #507","commit_id":"b8537314abe1714409ae0a53e9b737dc5147c952"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"959969294fda4be20b33fe36bd881800671f799c","unresolved":false,"context_lines":[{"line_number":491,"context_line":"        for port in self.network.ports:"},{"line_number":492,"context_line":"            fixed_ips \u003d self._sort_fixed_ips_for_dnsmasq(port.fixed_ips,"},{"line_number":493,"context_line":"                                                         v6_nets)"},{"line_number":494,"context_line":"            dns_ip_map \u003d {d.ip_address: d for d in port.dns_assignment}"},{"line_number":495,"context_line":"            for alloc in fixed_ips:"},{"line_number":496,"context_line":"                # Note(scollins) Only create entries that are"},{"line_number":497,"context_line":"                # associated with the subnet being managed by this"}],"source_content_type":"text/x-python","patch_set":9,"id":"1a4dcd0f_52863d66","line":494,"in_reply_to":"3a50d1a3_c95b4621","updated":"2015-08-04 16:12:13.000000000","message":"Thanks for your review!. When dns_name is not specified by the user in the call, the port\u0027s ip address is used to form the hostname. Examples would be:\n\nhost-192-168-0-2\n\nhost-fdca-3ba5-a17a-4ba3--2\n\nThese names are created in https://review.openstack.org/#/c/200952/9/neutron/db/db_base_plugin_v2.py line 881\n\nSo different ports on the same network will have different ip addresses and therefore, different hostname for the purpose of dnsmasq","commit_id":"b8537314abe1714409ae0a53e9b737dc5147c952"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"e06642bec30692167085613b28c33ed0808266a6","unresolved":false,"context_lines":[{"line_number":491,"context_line":"        for port in self.network.ports:"},{"line_number":492,"context_line":"            fixed_ips \u003d self._sort_fixed_ips_for_dnsmasq(port.fixed_ips,"},{"line_number":493,"context_line":"                                                         v6_nets)"},{"line_number":494,"context_line":"            dns_ip_map \u003d {d.ip_address: d for d in port.dns_assignment}"},{"line_number":495,"context_line":"            for alloc in fixed_ips:"},{"line_number":496,"context_line":"                # Note(scollins) Only create entries that are"},{"line_number":497,"context_line":"                # associated with the subnet being managed by this"}],"source_content_type":"text/x-python","patch_set":11,"id":"1a4dcd0f_0205b578","line":494,"updated":"2015-08-04 22:27:44.000000000","message":"To make this a bit more robust, maybe check that port.dns_assignment exists first.  If it doesn\u0027t exist, maybe the Neutron server hasn\u0027t been upgraded, the code should be graceful about that.","commit_id":"131fc3f516353cea0e5bf9528ae3cd3b3513ee8a"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"a173026061fc2370d0f12b7c171b3e4131dafaa0","unresolved":false,"context_lines":[{"line_number":491,"context_line":"        for port in self.network.ports:"},{"line_number":492,"context_line":"            fixed_ips \u003d self._sort_fixed_ips_for_dnsmasq(port.fixed_ips,"},{"line_number":493,"context_line":"                                                         v6_nets)"},{"line_number":494,"context_line":"            dns_ip_map \u003d {d.ip_address: d for d in port.dns_assignment}"},{"line_number":495,"context_line":"            for alloc in fixed_ips:"},{"line_number":496,"context_line":"                # Note(scollins) Only create entries that are"},{"line_number":497,"context_line":"                # associated with the subnet being managed by this"}],"source_content_type":"text/x-python","patch_set":11,"id":"1a4dcd0f_44c31f39","line":494,"in_reply_to":"1a4dcd0f_0205b578","updated":"2015-08-10 19:47:31.000000000","message":"Done","commit_id":"131fc3f516353cea0e5bf9528ae3cd3b3513ee8a"},{"author":{"_account_id":8976,"name":"shihanzhang","email":"ayshihanzhang@gmail.com","username":"shihanzhang"},"change_message_id":"e3b99936620062c43ed78d509a4494c6e1766181","unresolved":false,"context_lines":[{"line_number":514,"context_line":"            # ports API"},{"line_number":515,"context_line":"            dns_assignment \u003d getattr(port, \u0027dns_assignment\u0027, None)"},{"line_number":516,"context_line":"            if dns_assignment:"},{"line_number":517,"context_line":"                dns_ip_map \u003d {d.ip_address: d for d in port.dns_assignment}"},{"line_number":518,"context_line":"            for alloc in fixed_ips:"},{"line_number":519,"context_line":"                # Note(scollins) Only create entries that are"},{"line_number":520,"context_line":"                # associated with the subnet being managed by this"}],"source_content_type":"text/x-python","patch_set":12,"id":"1a4dcd0f_41801ff7","line":517,"updated":"2015-08-13 01:27:51.000000000","message":"I think it is no need to use port.dns_assignment, you can directly use dns_assignment","commit_id":"da62fccc538aeffa4d8a331921624bc4a45d1817"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"f821556d9e80726e0022e6293ead3eb88660b5cb","unresolved":false,"context_lines":[{"line_number":514,"context_line":"            # ports API"},{"line_number":515,"context_line":"            dns_assignment \u003d getattr(port, \u0027dns_assignment\u0027, None)"},{"line_number":516,"context_line":"            if dns_assignment:"},{"line_number":517,"context_line":"                dns_ip_map \u003d {d.ip_address: d for d in port.dns_assignment}"},{"line_number":518,"context_line":"            for alloc in fixed_ips:"},{"line_number":519,"context_line":"                # Note(scollins) Only create entries that are"},{"line_number":520,"context_line":"                # associated with the subnet being managed by this"}],"source_content_type":"text/x-python","patch_set":12,"id":"1a4dcd0f_3a3efa29","line":517,"in_reply_to":"1a4dcd0f_41801ff7","updated":"2015-08-16 00:08:29.000000000","message":"Good catch. Thanks!","commit_id":"da62fccc538aeffa4d8a331921624bc4a45d1817"}],"neutron/api/v2/attributes.py":[{"author":{"_account_id":10601,"name":"Renjie Sun","email":"sunrenjie6@gmail.com","username":"sunrenjie6"},"change_message_id":"70c4e20019f461da2edbe4cd418654fe6b249110","unresolved":false,"context_lines":[{"line_number":491,"context_line":"        if data[-1] \u003d\u003d \u0027.\u0027:"},{"line_number":492,"context_line":"            data \u003d data[:-1]"},{"line_number":493,"context_line":"        for label in data.split(\u0027.\u0027):"},{"line_number":494,"context_line":"            msg \u003d _validate_regex(label, DNS_LABEL_REGEX)"},{"line_number":495,"context_line":"            if msg:"},{"line_number":496,"context_line":"                return msg"},{"line_number":497,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"3a50d1a3_2058f055","line":494,"updated":"2015-07-27 05:02:07.000000000","message":"Label component like \u0027-\u0027 + \u0027a\u0027 * DNS_LABEL_MAX_LEN passes the test; is it expected? Maybe we could validate the component length as well?","commit_id":"3811b8d8b58c69ad5967339472c0f00ebefa81aa"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"47465c7cf4526f229a492443b058deb3cf111652","unresolved":false,"context_lines":[{"line_number":491,"context_line":"        if data[-1] \u003d\u003d \u0027.\u0027:"},{"line_number":492,"context_line":"            data \u003d data[:-1]"},{"line_number":493,"context_line":"        for label in data.split(\u0027.\u0027):"},{"line_number":494,"context_line":"            msg \u003d _validate_regex(label, DNS_LABEL_REGEX)"},{"line_number":495,"context_line":"            if msg:"},{"line_number":496,"context_line":"                return msg"},{"line_number":497,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"3a50d1a3_694eb270","line":494,"in_reply_to":"3a50d1a3_2058f055","updated":"2015-07-28 19:11:08.000000000","message":"I literally added this case to the unit test included in the patchset and it is handled correctly. And yes, the validation performed here validates the correct length os each label in the PQDN / FQDN received. Again, please see unit test provided in the patchset","commit_id":"3811b8d8b58c69ad5967339472c0f00ebefa81aa"},{"author":{"_account_id":10601,"name":"Renjie Sun","email":"sunrenjie6@gmail.com","username":"sunrenjie6"},"change_message_id":"70c4e20019f461da2edbe4cd418654fe6b249110","unresolved":false,"context_lines":[{"line_number":610,"context_line":"UUID_PATTERN \u003d \u0027-\u0027.join([HEX_ELEM + \u0027{8}\u0027, HEX_ELEM + \u0027{4}\u0027,"},{"line_number":611,"context_line":"                         HEX_ELEM + \u0027{4}\u0027, HEX_ELEM + \u0027{4}\u0027,"},{"line_number":612,"context_line":"                         HEX_ELEM + \u0027{12}\u0027])"},{"line_number":613,"context_line":"DNS_LABEL_REGEX \u003d r\u0027(?![\\d-])[a-z\\d-]{1,%d}(?\u003c!-)$\u0027 % DNS_LABEL_MAX_LEN"},{"line_number":614,"context_line":"# Note: In order to ensure that the MAC address is unicast the first byte"},{"line_number":615,"context_line":"# must be even."},{"line_number":616,"context_line":"MAC_PATTERN \u003d \"^%s[aceACE02468](:%s{2}){5}$\" % (HEX_ELEM, HEX_ELEM)"}],"source_content_type":"text/x-python","patch_set":5,"id":"3a50d1a3_9bc935af","line":613,"updated":"2015-07-27 05:02:07.000000000","message":"nit: would it be better to place it before the definition for _validate_dns_name() (where it is used)?","commit_id":"3811b8d8b58c69ad5967339472c0f00ebefa81aa"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"47465c7cf4526f229a492443b058deb3cf111652","unresolved":false,"context_lines":[{"line_number":610,"context_line":"UUID_PATTERN \u003d \u0027-\u0027.join([HEX_ELEM + \u0027{8}\u0027, HEX_ELEM + \u0027{4}\u0027,"},{"line_number":611,"context_line":"                         HEX_ELEM + \u0027{4}\u0027, HEX_ELEM + \u0027{4}\u0027,"},{"line_number":612,"context_line":"                         HEX_ELEM + \u0027{12}\u0027])"},{"line_number":613,"context_line":"DNS_LABEL_REGEX \u003d r\u0027(?![\\d-])[a-z\\d-]{1,%d}(?\u003c!-)$\u0027 % DNS_LABEL_MAX_LEN"},{"line_number":614,"context_line":"# Note: In order to ensure that the MAC address is unicast the first byte"},{"line_number":615,"context_line":"# must be even."},{"line_number":616,"context_line":"MAC_PATTERN \u003d \"^%s[aceACE02468](:%s{2}){5}$\" % (HEX_ELEM, HEX_ELEM)"}],"source_content_type":"text/x-python","patch_set":5,"id":"3a50d1a3_a95fda0d","line":613,"in_reply_to":"3a50d1a3_9bc935af","updated":"2015-07-28 19:11:08.000000000","message":"Here I am just following the convention established by previous contributors to this module. All the patterns are together and regex is nothing more than a pettern","commit_id":"3811b8d8b58c69ad5967339472c0f00ebefa81aa"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"e06642bec30692167085613b28c33ed0808266a6","unresolved":false,"context_lines":[{"line_number":484,"context_line":"    if msg:"},{"line_number":485,"context_line":"        return msg"},{"line_number":486,"context_line":"    if data:"},{"line_number":487,"context_line":"        if data[-1] \u003d\u003d \u0027.\u0027:"},{"line_number":488,"context_line":"            data \u003d data[:-1]"},{"line_number":489,"context_line":"        for label in data.split(\u0027.\u0027):"},{"line_number":490,"context_line":"            msg \u003d _validate_regex(label, DNS_LABEL_REGEX)"}],"source_content_type":"text/x-python","patch_set":11,"id":"1a4dcd0f_c2e7cde2","line":487,"updated":"2015-08-04 22:27:44.000000000","message":"nit:  data.endswith(\u0027.\u0027)","commit_id":"131fc3f516353cea0e5bf9528ae3cd3b3513ee8a"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"a173026061fc2370d0f12b7c171b3e4131dafaa0","unresolved":false,"context_lines":[{"line_number":484,"context_line":"    if msg:"},{"line_number":485,"context_line":"        return msg"},{"line_number":486,"context_line":"    if data:"},{"line_number":487,"context_line":"        if data[-1] \u003d\u003d \u0027.\u0027:"},{"line_number":488,"context_line":"            data \u003d data[:-1]"},{"line_number":489,"context_line":"        for label in data.split(\u0027.\u0027):"},{"line_number":490,"context_line":"            msg \u003d _validate_regex(label, DNS_LABEL_REGEX)"}],"source_content_type":"text/x-python","patch_set":11,"id":"1a4dcd0f_e45d8b7a","line":487,"in_reply_to":"1a4dcd0f_c2e7cde2","updated":"2015-08-10 19:47:31.000000000","message":"Done","commit_id":"131fc3f516353cea0e5bf9528ae3cd3b3513ee8a"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"e06642bec30692167085613b28c33ed0808266a6","unresolved":false,"context_lines":[{"line_number":606,"context_line":"UUID_PATTERN \u003d \u0027-\u0027.join([HEX_ELEM + \u0027{8}\u0027, HEX_ELEM + \u0027{4}\u0027,"},{"line_number":607,"context_line":"                         HEX_ELEM + \u0027{4}\u0027, HEX_ELEM + \u0027{4}\u0027,"},{"line_number":608,"context_line":"                         HEX_ELEM + \u0027{12}\u0027])"},{"line_number":609,"context_line":"DNS_LABEL_REGEX \u003d r\u0027(?![\\d-])[a-z\\d-]{1,%d}(?\u003c!-)$\u0027 % DNS_LABEL_MAX_LEN"},{"line_number":610,"context_line":"# Note: In order to ensure that the MAC address is unicast the first byte"},{"line_number":611,"context_line":"# must be even."},{"line_number":612,"context_line":"MAC_PATTERN \u003d \"^%s[aceACE02468](:%s{2}){5}$\" % (HEX_ELEM, HEX_ELEM)"}],"source_content_type":"text/x-python","patch_set":11,"id":"1a4dcd0f_e2ea09ac","line":609,"updated":"2015-08-04 22:27:44.000000000","message":"Slick.  I had to look up the use of the lookahead and lookbehind assertions to be sure this does the right thing.","commit_id":"131fc3f516353cea0e5bf9528ae3cd3b3513ee8a"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"a173026061fc2370d0f12b7c171b3e4131dafaa0","unresolved":false,"context_lines":[{"line_number":606,"context_line":"UUID_PATTERN \u003d \u0027-\u0027.join([HEX_ELEM + \u0027{8}\u0027, HEX_ELEM + \u0027{4}\u0027,"},{"line_number":607,"context_line":"                         HEX_ELEM + \u0027{4}\u0027, HEX_ELEM + \u0027{4}\u0027,"},{"line_number":608,"context_line":"                         HEX_ELEM + \u0027{12}\u0027])"},{"line_number":609,"context_line":"DNS_LABEL_REGEX \u003d r\u0027(?![\\d-])[a-z\\d-]{1,%d}(?\u003c!-)$\u0027 % DNS_LABEL_MAX_LEN"},{"line_number":610,"context_line":"# Note: In order to ensure that the MAC address is unicast the first byte"},{"line_number":611,"context_line":"# must be even."},{"line_number":612,"context_line":"MAC_PATTERN \u003d \"^%s[aceACE02468](:%s{2}){5}$\" % (HEX_ELEM, HEX_ELEM)"}],"source_content_type":"text/x-python","patch_set":11,"id":"1a4dcd0f_eda5eca1","line":609,"in_reply_to":"1a4dcd0f_e2ea09ac","updated":"2015-08-10 19:47:31.000000000","message":":-)","commit_id":"131fc3f516353cea0e5bf9528ae3cd3b3513ee8a"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"e06642bec30692167085613b28c33ed0808266a6","unresolved":false,"context_lines":[{"line_number":751,"context_line":"                     \u0027convert_to\u0027: convert_to_lowercase,"},{"line_number":752,"context_line":"                     \u0027validate\u0027: {\u0027type:dns_name\u0027: FQDN_MAX_LEN},"},{"line_number":753,"context_line":"                     \u0027is_visible\u0027: True},"},{"line_number":754,"context_line":"        \u0027dns_assignment\u0027: {\u0027allow_post\u0027: False, \u0027allow_put\u0027: False,"},{"line_number":755,"context_line":"                           \u0027is_visible\u0027: True},"},{"line_number":756,"context_line":"    },"},{"line_number":757,"context_line":"    SUBNETS: {"}],"source_content_type":"text/x-python","patch_set":11,"id":"1a4dcd0f_a2cde15e","line":754,"updated":"2015-08-04 22:27:44.000000000","message":"Is this just for RPC?  Do we need it defined on the API for that?  Or, are you thinking this should be visible through the API too?","commit_id":"131fc3f516353cea0e5bf9528ae3cd3b3513ee8a"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"a173026061fc2370d0f12b7c171b3e4131dafaa0","unresolved":false,"context_lines":[{"line_number":751,"context_line":"                     \u0027convert_to\u0027: convert_to_lowercase,"},{"line_number":752,"context_line":"                     \u0027validate\u0027: {\u0027type:dns_name\u0027: FQDN_MAX_LEN},"},{"line_number":753,"context_line":"                     \u0027is_visible\u0027: True},"},{"line_number":754,"context_line":"        \u0027dns_assignment\u0027: {\u0027allow_post\u0027: False, \u0027allow_put\u0027: False,"},{"line_number":755,"context_line":"                           \u0027is_visible\u0027: True},"},{"line_number":756,"context_line":"    },"},{"line_number":757,"context_line":"    SUBNETS: {"}],"source_content_type":"text/x-python","patch_set":11,"id":"1a4dcd0f_2da99490","line":754,"in_reply_to":"1a4dcd0f_a2cde15e","updated":"2015-08-10 19:47:31.000000000","message":"The purpose of this is just to be able to show dns_assignment in the api response. I think that one big benefit of this change is that user has visibility of the dns assignment to the port. Here\u0027s a gist with a response example (notice it is showing the dns_assignment):\n\nhttps://gist.github.com/miguellavalle/6327f01c8422bb8039ef","commit_id":"131fc3f516353cea0e5bf9528ae3cd3b3513ee8a"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"d8c1c3a8daedfd8db330c20dbc0595fa59cbccc2","unresolved":false,"context_lines":[{"line_number":758,"context_line":"                      \u0027is_visible\u0027: True},"},{"line_number":759,"context_line":"        \u0027status\u0027: {\u0027allow_post\u0027: False, \u0027allow_put\u0027: False,"},{"line_number":760,"context_line":"                   \u0027is_visible\u0027: True},"},{"line_number":761,"context_line":"        \u0027dns_name\u0027: {\u0027allow_post\u0027: True, \u0027allow_put\u0027: True,"},{"line_number":762,"context_line":"                     \u0027default\u0027: \u0027\u0027,"},{"line_number":763,"context_line":"                     \u0027convert_to\u0027: convert_to_lowercase,"},{"line_number":764,"context_line":"                     \u0027validate\u0027: {\u0027type:dns_name\u0027: FQDN_MAX_LEN},"}],"source_content_type":"text/x-python","patch_set":12,"id":"1a4dcd0f_2f84dfd0","line":761,"updated":"2015-08-12 23:36:57.000000000","message":"same question as done in models_v2.py.","commit_id":"da62fccc538aeffa4d8a331921624bc4a45d1817"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"change_message_id":"13fecba9a98a6470ab620057ed6cefb0d869fdca","unresolved":false,"context_lines":[{"line_number":758,"context_line":"                      \u0027is_visible\u0027: True},"},{"line_number":759,"context_line":"        \u0027status\u0027: {\u0027allow_post\u0027: False, \u0027allow_put\u0027: False,"},{"line_number":760,"context_line":"                   \u0027is_visible\u0027: True},"},{"line_number":761,"context_line":"        \u0027dns_name\u0027: {\u0027allow_post\u0027: True, \u0027allow_put\u0027: True,"},{"line_number":762,"context_line":"                     \u0027default\u0027: \u0027\u0027,"},{"line_number":763,"context_line":"                     \u0027convert_to\u0027: convert_to_lowercase,"},{"line_number":764,"context_line":"                     \u0027validate\u0027: {\u0027type:dns_name\u0027: FQDN_MAX_LEN},"}],"source_content_type":"text/x-python","patch_set":12,"id":"1a4dcd0f_4a1a797e","line":761,"in_reply_to":"1a4dcd0f_2f84dfd0","updated":"2015-08-13 00:21:37.000000000","message":"Also why isn\u0027t this being done as an extension?","commit_id":"da62fccc538aeffa4d8a331921624bc4a45d1817"},{"author":{"_account_id":8976,"name":"shihanzhang","email":"ayshihanzhang@gmail.com","username":"shihanzhang"},"change_message_id":"e3b99936620062c43ed78d509a4494c6e1766181","unresolved":false,"context_lines":[{"line_number":758,"context_line":"                      \u0027is_visible\u0027: True},"},{"line_number":759,"context_line":"        \u0027status\u0027: {\u0027allow_post\u0027: False, \u0027allow_put\u0027: False,"},{"line_number":760,"context_line":"                   \u0027is_visible\u0027: True},"},{"line_number":761,"context_line":"        \u0027dns_name\u0027: {\u0027allow_post\u0027: True, \u0027allow_put\u0027: True,"},{"line_number":762,"context_line":"                     \u0027default\u0027: \u0027\u0027,"},{"line_number":763,"context_line":"                     \u0027convert_to\u0027: convert_to_lowercase,"},{"line_number":764,"context_line":"                     \u0027validate\u0027: {\u0027type:dns_name\u0027: FQDN_MAX_LEN},"}],"source_content_type":"text/x-python","patch_set":12,"id":"1a4dcd0f_81062784","line":761,"in_reply_to":"1a4dcd0f_4a1a797e","updated":"2015-08-13 01:27:51.000000000","message":"I also think this should be done as an extension, I am doing the distributed dhcp agent, it is conflict with this feature, in some case, user does not want to use internal DNS","commit_id":"da62fccc538aeffa4d8a331921624bc4a45d1817"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"40ff50c2f5700e40dc3f875766b16847578966a2","unresolved":false,"context_lines":[{"line_number":758,"context_line":"                      \u0027is_visible\u0027: True},"},{"line_number":759,"context_line":"        \u0027status\u0027: {\u0027allow_post\u0027: False, \u0027allow_put\u0027: False,"},{"line_number":760,"context_line":"                   \u0027is_visible\u0027: True},"},{"line_number":761,"context_line":"        \u0027dns_name\u0027: {\u0027allow_post\u0027: True, \u0027allow_put\u0027: True,"},{"line_number":762,"context_line":"                     \u0027default\u0027: \u0027\u0027,"},{"line_number":763,"context_line":"                     \u0027convert_to\u0027: convert_to_lowercase,"},{"line_number":764,"context_line":"                     \u0027validate\u0027: {\u0027type:dns_name\u0027: FQDN_MAX_LEN},"}],"source_content_type":"text/x-python","patch_set":12,"id":"1a4dcd0f_f20ed739","line":761,"in_reply_to":"1a4dcd0f_81062784","updated":"2015-08-13 03:16:29.000000000","message":"Can you elaborate why you think the two are at conflict? Come to think of it, this extension is really orthogonal to plugins, even though it is dhcp related. \n\nFor this reason, having this attribute part of the core model should not interfere; the only caveat I can see is the fact that without a separate extension we cannot advertise that the dns name can be set/read, so there\u0027s no clean integration with Nova or any system/user that intends to use Neutron pre and post Liberty.\n\nPerhaps we could use the shim extension as done for the attributes like vlan_transparent and mtu.\n\n[1] https://github.com/openstack/neutron/blob/master/neutron/extensions/netmtu.py\n\n[2] https://github.com/openstack/neutron/blob/master/neutron/extensions/vlantransparent.py","commit_id":"da62fccc538aeffa4d8a331921624bc4a45d1817"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"f821556d9e80726e0022e6293ead3eb88660b5cb","unresolved":false,"context_lines":[{"line_number":758,"context_line":"                      \u0027is_visible\u0027: True},"},{"line_number":759,"context_line":"        \u0027status\u0027: {\u0027allow_post\u0027: False, \u0027allow_put\u0027: False,"},{"line_number":760,"context_line":"                   \u0027is_visible\u0027: True},"},{"line_number":761,"context_line":"        \u0027dns_name\u0027: {\u0027allow_post\u0027: True, \u0027allow_put\u0027: True,"},{"line_number":762,"context_line":"                     \u0027default\u0027: \u0027\u0027,"},{"line_number":763,"context_line":"                     \u0027convert_to\u0027: convert_to_lowercase,"},{"line_number":764,"context_line":"                     \u0027validate\u0027: {\u0027type:dns_name\u0027: FQDN_MAX_LEN},"}],"source_content_type":"text/x-python","patch_set":12,"id":"1a4dcd0f_5a5de746","line":761,"in_reply_to":"1a4dcd0f_f20ed739","updated":"2015-08-16 00:08:29.000000000","message":"Gentlemen:\n\nThanks for your reviews! Following Armando\u0027s advice, I have implemented a shim extension. Moved all the changes in attributes.py to the extension","commit_id":"da62fccc538aeffa4d8a331921624bc4a45d1817"}],"neutron/common/config.py":[{"author":{"_account_id":7018,"name":"Abhishek Raut","email":"rauta@vmware.com","username":"abhiraut"},"change_message_id":"cfa3aad8cb4f66f21d69179cba3567c016bf7ae0","unresolved":false,"context_lines":[{"line_number":82,"context_line":"               deprecated_name\u003d\u0027dhcp_lease_time\u0027,"},{"line_number":83,"context_line":"               help\u003d_(\"DHCP lease duration (in seconds). Use -1 to tell \""},{"line_number":84,"context_line":"                      \"dnsmasq to use infinite lease times.\")),"},{"line_number":85,"context_line":"    cfg.StrOpt(\u0027dhcp_domain\u0027,"},{"line_number":86,"context_line":"               default\u003d\u0027openstacklocal\u0027,"},{"line_number":87,"context_line":"               help\u003d_(\u0027Domain to use for building the hostnames\u0027)),"},{"line_number":88,"context_line":"    cfg.BoolOpt(\u0027dhcp_agent_notification\u0027, default\u003dTrue,"}],"source_content_type":"text/x-python","patch_set":6,"id":"3a50d1a3_02cc75b9","line":85,"updated":"2015-07-28 19:19:04.000000000","message":"there should be a change in neutron/etc/neutron.conf file to add this option","commit_id":"203894a7687ca0ddd7355de01fa906ad9e1211a7"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"03e6f1606e729f80003351f92a453aba5d5560d9","unresolved":false,"context_lines":[{"line_number":82,"context_line":"               deprecated_name\u003d\u0027dhcp_lease_time\u0027,"},{"line_number":83,"context_line":"               help\u003d_(\"DHCP lease duration (in seconds). Use -1 to tell \""},{"line_number":84,"context_line":"                      \"dnsmasq to use infinite lease times.\")),"},{"line_number":85,"context_line":"    cfg.StrOpt(\u0027dhcp_domain\u0027,"},{"line_number":86,"context_line":"               default\u003d\u0027openstacklocal\u0027,"},{"line_number":87,"context_line":"               help\u003d_(\u0027Domain to use for building the hostnames\u0027)),"},{"line_number":88,"context_line":"    cfg.BoolOpt(\u0027dhcp_agent_notification\u0027, default\u003dTrue,"}],"source_content_type":"text/x-python","patch_set":6,"id":"3a50d1a3_ab76b2a1","line":85,"in_reply_to":"3a50d1a3_02cc75b9","updated":"2015-07-29 01:27:12.000000000","message":"Done","commit_id":"203894a7687ca0ddd7355de01fa906ad9e1211a7"}],"neutron/db/db_base_plugin_common.py":[{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"5f26ce8d9b0f118a84a6f69f6478eef6b8a5d758","unresolved":false,"context_lines":[{"line_number":129,"context_line":"                             for ip in port[\"fixed_ips\"]],"},{"line_number":130,"context_line":"               \"device_id\": port[\"device_id\"],"},{"line_number":131,"context_line":"               \"device_owner\": port[\"device_owner\"],"},{"line_number":132,"context_line":"               \"dns_assigment\": [{\"subnet_id\": a[\"subnet_id\"],"},{"line_number":133,"context_line":"                                  \"ip_address\": a[\"ip_address\"],"},{"line_number":134,"context_line":"                                  \"dns_name\": a[\"dns_name\"],"},{"line_number":135,"context_line":"                                  \"dns_fqdn\": a[\"dns_fqdn\"]}"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a41bdd9_a3a84bdc","line":132,"updated":"2015-07-14 22:46:41.000000000","message":"it seems you can use _make_dns_assignment_dict(port[\"dns_assignment\"])","commit_id":"c0f74cf7abadd6c6cecc0c176c1f3caf738412c1"},{"author":{"_account_id":12912,"name":"John Belamaric","email":"jbelamaric@infoblox.com","username":"johnbelamaric"},"change_message_id":"a5b4d7c32476cb715756f717019f2d8bf97918c8","unresolved":false,"context_lines":[{"line_number":129,"context_line":"                             for ip in port[\"fixed_ips\"]],"},{"line_number":130,"context_line":"               \"device_id\": port[\"device_id\"],"},{"line_number":131,"context_line":"               \"device_owner\": port[\"device_owner\"],"},{"line_number":132,"context_line":"               \"dns_assigment\": [{\"subnet_id\": a[\"subnet_id\"],"},{"line_number":133,"context_line":"                                  \"ip_address\": a[\"ip_address\"],"},{"line_number":134,"context_line":"                                  \"dns_name\": a[\"dns_name\"],"},{"line_number":135,"context_line":"                                  \"dns_fqdn\": a[\"dns_fqdn\"]}"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a41bdd9_7598836a","line":132,"in_reply_to":"9a41bdd9_a3a84bdc","updated":"2015-07-15 18:26:48.000000000","message":"+1","commit_id":"c0f74cf7abadd6c6cecc0c176c1f3caf738412c1"},{"author":{"_account_id":10601,"name":"Renjie Sun","email":"sunrenjie6@gmail.com","username":"sunrenjie6"},"change_message_id":"70c4e20019f461da2edbe4cd418654fe6b249110","unresolved":false,"context_lines":[{"line_number":271,"context_line":"                 \u0027ip_address\u0027: ip[\"ip_address\"]}"},{"line_number":272,"context_line":"                for ip in ips]"},{"line_number":273,"context_line":""},{"line_number":274,"context_line":"    def _make_dns_assignment_dict(self, dns_assignment):"},{"line_number":275,"context_line":"        return [{\u0027ip_address\u0027: dns[\u0027ip_address\u0027],"},{"line_number":276,"context_line":"                 \u0027hostname\u0027: dns[\u0027hostname\u0027],"},{"line_number":277,"context_line":"                 \u0027fqdn\u0027: dns[\u0027fqdn\u0027]}"}],"source_content_type":"text/x-python","patch_set":5,"id":"3a50d1a3_b0776b3a","line":274,"updated":"2015-07-27 05:02:07.000000000","message":"This function is not used. Is it intended?","commit_id":"3811b8d8b58c69ad5967339472c0f00ebefa81aa"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"47465c7cf4526f229a492443b058deb3cf111652","unresolved":false,"context_lines":[{"line_number":271,"context_line":"                 \u0027ip_address\u0027: ip[\"ip_address\"]}"},{"line_number":272,"context_line":"                for ip in ips]"},{"line_number":273,"context_line":""},{"line_number":274,"context_line":"    def _make_dns_assignment_dict(self, dns_assignment):"},{"line_number":275,"context_line":"        return [{\u0027ip_address\u0027: dns[\u0027ip_address\u0027],"},{"line_number":276,"context_line":"                 \u0027hostname\u0027: dns[\u0027hostname\u0027],"},{"line_number":277,"context_line":"                 \u0027fqdn\u0027: dns[\u0027fqdn\u0027]}"}],"source_content_type":"text/x-python","patch_set":5,"id":"3a50d1a3_09c36e8a","line":274,"in_reply_to":"3a50d1a3_b0776b3a","updated":"2015-07-28 19:11:08.000000000","message":"You are correct. It was left from a previous version of the patchset. Good catch!","commit_id":"3811b8d8b58c69ad5967339472c0f00ebefa81aa"}],"neutron/db/db_base_plugin_v2.py":[{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"5f26ce8d9b0f118a84a6f69f6478eef6b8a5d758","unresolved":false,"context_lines":[{"line_number":202,"context_line":"                raise n_exc.InvalidInput(error_message\u003dmsg)"},{"line_number":203,"context_line":""},{"line_number":204,"context_line":"    def _validate_dns_name(self, request_dns_name):"},{"line_number":205,"context_line":"        # If a PQDN was passed, make sure the FQDN that will be generated is of"},{"line_number":206,"context_line":"        # legal size"},{"line_number":207,"context_line":"        dns_name_len \u003d len(request_dns_name)"},{"line_number":208,"context_line":"        if request_dns_name[-1] !\u003d \u0027.\u0027:"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a41bdd9_c3846f5f","line":205,"updated":"2015-07-14 22:46:41.000000000","message":"FQDN","commit_id":"c0f74cf7abadd6c6cecc0c176c1f3caf738412c1"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"0a8afe4eb1b9ddc0c05c7d073e77fb2d2477be5e","unresolved":false,"context_lines":[{"line_number":202,"context_line":"                raise n_exc.InvalidInput(error_message\u003dmsg)"},{"line_number":203,"context_line":""},{"line_number":204,"context_line":"    def _validate_dns_name(self, request_dns_name):"},{"line_number":205,"context_line":"        # If a PQDN was passed, make sure the FQDN that will be generated is of"},{"line_number":206,"context_line":"        # legal size"},{"line_number":207,"context_line":"        dns_name_len \u003d len(request_dns_name)"},{"line_number":208,"context_line":"        if request_dns_name[-1] !\u003d \u0027.\u0027:"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a41bdd9_3fd2da28","line":205,"in_reply_to":"9a41bdd9_c3846f5f","updated":"2015-07-15 18:32:54.000000000","message":"I actually think he means PQDN (Partially qualified ...)","commit_id":"c0f74cf7abadd6c6cecc0c176c1f3caf738412c1"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"5f26ce8d9b0f118a84a6f69f6478eef6b8a5d758","unresolved":false,"context_lines":[{"line_number":222,"context_line":"            return"},{"line_number":223,"context_line":""},{"line_number":224,"context_line":"        # A FQDN was passed"},{"line_number":225,"context_line":"        msg \u003d _(\"The dns_name passed is a FQDN. Its higher level labels must \""},{"line_number":226,"context_line":"                \"be equal to the dhcp_domain option in neutron.conf, that has \""},{"line_number":227,"context_line":"                \"been set to \u0027%(dhcp_domain)s\u0027. It must also include one or \""},{"line_number":228,"context_line":"                \"valid DNS labels to the left of \u0027%(dhcp_domain)s\u0027\""}],"source_content_type":"text/x-python","patch_set":3,"id":"9a41bdd9_83f18703","line":225,"updated":"2015-07-14 22:46:41.000000000","message":"itto","commit_id":"c0f74cf7abadd6c6cecc0c176c1f3caf738412c1"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"5f26ce8d9b0f118a84a6f69f6478eef6b8a5d758","unresolved":false,"context_lines":[{"line_number":229,"context_line":"                ) % {\u0027dhcp_domain\u0027: cfg.CONF.dhcp_domain}"},{"line_number":230,"context_line":"        higher_labels \u003d \u0027.\u0027 + cfg.CONF.dhcp_domain + \u0027.\u0027"},{"line_number":231,"context_line":"        if ((dns_name_len \u003c\u003d len(higher_labels) or not"},{"line_number":232,"context_line":"             (request_dns_name[len(request_dns_name) - len(higher_labels):]"},{"line_number":233,"context_line":"             \u003d\u003d higher_labels))):"},{"line_number":234,"context_line":"            raise n_exc.InvalidInput(error_message\u003dmsg)"},{"line_number":235,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"9a41bdd9_a3292b39","line":232,"updated":"2015-07-14 22:46:41.000000000","message":"iiuc, the following will be equivalent and clearer:\n\n  if not request_dns_name.endswith(higher_labels):","commit_id":"c0f74cf7abadd6c6cecc0c176c1f3caf738412c1"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"0a8afe4eb1b9ddc0c05c7d073e77fb2d2477be5e","unresolved":false,"context_lines":[{"line_number":229,"context_line":"                ) % {\u0027dhcp_domain\u0027: cfg.CONF.dhcp_domain}"},{"line_number":230,"context_line":"        higher_labels \u003d \u0027.\u0027 + cfg.CONF.dhcp_domain + \u0027.\u0027"},{"line_number":231,"context_line":"        if ((dns_name_len \u003c\u003d len(higher_labels) or not"},{"line_number":232,"context_line":"             (request_dns_name[len(request_dns_name) - len(higher_labels):]"},{"line_number":233,"context_line":"             \u003d\u003d higher_labels))):"},{"line_number":234,"context_line":"            raise n_exc.InvalidInput(error_message\u003dmsg)"},{"line_number":235,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"9a41bdd9_3f2adadb","line":232,"in_reply_to":"9a41bdd9_a3292b39","updated":"2015-07-15 18:32:54.000000000","message":"+1  Nice catch Cedric.","commit_id":"c0f74cf7abadd6c6cecc0c176c1f3caf738412c1"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"5f26ce8d9b0f118a84a6f69f6478eef6b8a5d758","unresolved":false,"context_lines":[{"line_number":808,"context_line":""},{"line_number":809,"context_line":"    def _get_request_dns_name(self, port):"},{"line_number":810,"context_line":"        #TODO(mlavalle) I know cfg.CONF._opts[\u0027dhcp_domain\u0027][\u0027opt\u0027].default"},{"line_number":811,"context_line":"        # works. Is it frowned upon, though?"},{"line_number":812,"context_line":"        if ((cfg.CONF.dhcp_domain !\u003d"},{"line_number":813,"context_line":"             cfg.CONF._opts[\u0027dhcp_domain\u0027][\u0027opt\u0027].default and port[\u0027dns_name\u0027]"},{"line_number":814,"context_line":"             !\u003d attributes.ATTR_NOT_SPECIFIED)):"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a41bdd9_43985f78","line":811,"updated":"2015-07-14 22:46:41.000000000","message":"This code is assuming about oslo_config internals, prefer to define a constant and use it as dhcp_domain default value.","commit_id":"c0f74cf7abadd6c6cecc0c176c1f3caf738412c1"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"0a8afe4eb1b9ddc0c05c7d073e77fb2d2477be5e","unresolved":false,"context_lines":[{"line_number":808,"context_line":""},{"line_number":809,"context_line":"    def _get_request_dns_name(self, port):"},{"line_number":810,"context_line":"        #TODO(mlavalle) I know cfg.CONF._opts[\u0027dhcp_domain\u0027][\u0027opt\u0027].default"},{"line_number":811,"context_line":"        # works. Is it frowned upon, though?"},{"line_number":812,"context_line":"        if ((cfg.CONF.dhcp_domain !\u003d"},{"line_number":813,"context_line":"             cfg.CONF._opts[\u0027dhcp_domain\u0027][\u0027opt\u0027].default and port[\u0027dns_name\u0027]"},{"line_number":814,"context_line":"             !\u003d attributes.ATTR_NOT_SPECIFIED)):"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a41bdd9_9fd3e6d4","line":811,"in_reply_to":"9a41bdd9_43985f78","updated":"2015-07-15 18:32:54.000000000","message":"@Cedric:  So, define a constant with the default and then use the constant here *and* to define the option default?  I could go with that.","commit_id":"c0f74cf7abadd6c6cecc0c176c1f3caf738412c1"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"5f26ce8d9b0f118a84a6f69f6478eef6b8a5d758","unresolved":false,"context_lines":[{"line_number":818,"context_line":"                                   request_dns_name):"},{"line_number":819,"context_line":"        filter \u003d {\u0027network_id\u0027: [network_id]}"},{"line_number":820,"context_line":"        subnets \u003d self._get_subnets(context, filters\u003dfilter)"},{"line_number":821,"context_line":"        v6_subnets \u003d dict((subnet[\u0027id\u0027], subnet) for subnet in subnets"},{"line_number":822,"context_line":"                          if subnet[\u0027ip_version\u0027] \u003d\u003d 6)"},{"line_number":823,"context_line":"        dns_add \u003d []"},{"line_number":824,"context_line":"        if request_dns_name:"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a41bdd9_c391cf48","line":821,"updated":"2015-07-14 22:46:41.000000000","message":"a dict comprehension would be more readable","commit_id":"c0f74cf7abadd6c6cecc0c176c1f3caf738412c1"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"5f26ce8d9b0f118a84a6f69f6478eef6b8a5d758","unresolved":false,"context_lines":[{"line_number":890,"context_line":""},{"line_number":891,"context_line":"    def create_port(self, context, port):"},{"line_number":892,"context_line":"        p \u003d port[\u0027port\u0027]"},{"line_number":893,"context_line":"        #TODO(mlavalle) I know cfg.CONF._opts[\u0027dhcp_domain\u0027][\u0027opt\u0027].default"},{"line_number":894,"context_line":"        # works. Is it frowned upon, though?"},{"line_number":895,"context_line":"        request_dns_name \u003d self._get_request_dns_name(p)"},{"line_number":896,"context_line":"        if request_dns_name:"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a41bdd9_e3bdf3b7","line":893,"updated":"2015-07-14 22:46:41.000000000","message":"this comment seems no more required","commit_id":"c0f74cf7abadd6c6cecc0c176c1f3caf738412c1"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"0a8afe4eb1b9ddc0c05c7d073e77fb2d2477be5e","unresolved":false,"context_lines":[{"line_number":954,"context_line":"        if db_port[\u0027dns_assignment\u0027]:"},{"line_number":955,"context_line":"            default \u003d ("},{"line_number":956,"context_line":"                \u0027host-%s\u0027 %"},{"line_number":957,"context_line":"                db_port[\u0027dns_assignement\u0027][0][\u0027ip_address\u0027].replace("},{"line_number":958,"context_line":"                    \u0027.\u0027, \u0027-\u0027).replace(\u0027:\u0027, \u0027-\u0027))"},{"line_number":959,"context_line":"            if default !\u003d db_port[\u0027dns_assigment\u0027][0][\u0027dns_name\u0027]:"},{"line_number":960,"context_line":"                return db_port[\u0027dns_assigment\u0027][0][\u0027dns_name\u0027]"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a41bdd9_da7adc87","line":957,"updated":"2015-07-15 18:32:54.000000000","message":"A local variable to alias db_port[\u0027dns_assignement\u0027][0] might be nice.","commit_id":"c0f74cf7abadd6c6cecc0c176c1f3caf738412c1"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"0a8afe4eb1b9ddc0c05c7d073e77fb2d2477be5e","unresolved":false,"context_lines":[{"line_number":955,"context_line":"            default \u003d ("},{"line_number":956,"context_line":"                \u0027host-%s\u0027 %"},{"line_number":957,"context_line":"                db_port[\u0027dns_assignement\u0027][0][\u0027ip_address\u0027].replace("},{"line_number":958,"context_line":"                    \u0027.\u0027, \u0027-\u0027).replace(\u0027:\u0027, \u0027-\u0027))"},{"line_number":959,"context_line":"            if default !\u003d db_port[\u0027dns_assigment\u0027][0][\u0027dns_name\u0027]:"},{"line_number":960,"context_line":"                return db_port[\u0027dns_assigment\u0027][0][\u0027dns_name\u0027]"},{"line_number":961,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"9a41bdd9_daa17cf9","line":958,"updated":"2015-07-15 18:32:54.000000000","message":"Maybe you could add a method to encapsulate the replacing here and give that operation a meaningful name.","commit_id":"c0f74cf7abadd6c6cecc0c176c1f3caf738412c1"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"0a8afe4eb1b9ddc0c05c7d073e77fb2d2477be5e","unresolved":false,"context_lines":[{"line_number":960,"context_line":"                return db_port[\u0027dns_assigment\u0027][0][\u0027dns_name\u0027]"},{"line_number":961,"context_line":""},{"line_number":962,"context_line":"    def _update_dns_names_for_port(self, context, db_port, new_port,"},{"line_number":963,"context_line":"                                   changes_ips, request_dns_name):"},{"line_number":964,"context_line":"        network_id \u003d db_port[\u0027network_id\u0027]"},{"line_number":965,"context_line":"        current_dns_name \u003d self._get_current_dns_name(db_port)"},{"line_number":966,"context_line":"        dns_original \u003d []"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a41bdd9_7a98706a","line":963,"updated":"2015-07-15 18:32:54.000000000","message":"Just a thought:\n if not (changes.original or changes.add or changes.remove or request_dns_name):\n     return","commit_id":"c0f74cf7abadd6c6cecc0c176c1f3caf738412c1"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"0a8afe4eb1b9ddc0c05c7d073e77fb2d2477be5e","unresolved":false,"context_lines":[{"line_number":964,"context_line":"        network_id \u003d db_port[\u0027network_id\u0027]"},{"line_number":965,"context_line":"        current_dns_name \u003d self._get_current_dns_name(db_port)"},{"line_number":966,"context_line":"        dns_original \u003d []"},{"line_number":967,"context_line":"        dns_add \u003d []"},{"line_number":968,"context_line":"        dns_ip_map \u003d {dns[\u0027ip_address\u0027]: dns"},{"line_number":969,"context_line":"                      for dns in db_port[\u0027dns_assignment\u0027]}"},{"line_number":970,"context_line":"        if request_dns_name:"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a41bdd9_baca7819","line":967,"updated":"2015-07-15 18:32:54.000000000","message":"nit:  I\u0027d move this down to before L1013 to localize it a better more.","commit_id":"c0f74cf7abadd6c6cecc0c176c1f3caf738412c1"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"0a8afe4eb1b9ddc0c05c7d073e77fb2d2477be5e","unresolved":false,"context_lines":[{"line_number":966,"context_line":"        dns_original \u003d []"},{"line_number":967,"context_line":"        dns_add \u003d []"},{"line_number":968,"context_line":"        dns_ip_map \u003d {dns[\u0027ip_address\u0027]: dns"},{"line_number":969,"context_line":"                      for dns in db_port[\u0027dns_assignment\u0027]}"},{"line_number":970,"context_line":"        if request_dns_name:"},{"line_number":971,"context_line":"            fqdn \u003d request_dns_name"},{"line_number":972,"context_line":"            if request_dns_name[-1] !\u003d \u0027.\u0027:"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a41bdd9_9ab8d476","line":969,"updated":"2015-07-15 18:32:54.000000000","message":"Could move this to after L976 under the if condition to localize a bit better.","commit_id":"c0f74cf7abadd6c6cecc0c176c1f3caf738412c1"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"0a8afe4eb1b9ddc0c05c7d073e77fb2d2477be5e","unresolved":false,"context_lines":[{"line_number":969,"context_line":"                      for dns in db_port[\u0027dns_assignment\u0027]}"},{"line_number":970,"context_line":"        if request_dns_name:"},{"line_number":971,"context_line":"            fqdn \u003d request_dns_name"},{"line_number":972,"context_line":"            if request_dns_name[-1] !\u003d \u0027.\u0027:"},{"line_number":973,"context_line":"                fqdn \u003d \u0027%s.%s.\u0027 % (request_dns_name,"},{"line_number":974,"context_line":"                                   cfg.CONF.dhcp_domain)"},{"line_number":975,"context_line":"        if changes_ips.original or changes_ips.remove or changes_ips.add:"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a41bdd9_fa19e022","line":972,"updated":"2015-07-15 18:32:54.000000000","message":"if request_dns_name.ends_with(\u0027.\u0027) seems just a tiny bit more readable.","commit_id":"c0f74cf7abadd6c6cecc0c176c1f3caf738412c1"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"0a8afe4eb1b9ddc0c05c7d073e77fb2d2477be5e","unresolved":false,"context_lines":[{"line_number":975,"context_line":"        if changes_ips.original or changes_ips.remove or changes_ips.add:"},{"line_number":976,"context_line":"            if request_dns_name:"},{"line_number":977,"context_line":"                # change ip addresses, change dns name"},{"line_number":978,"context_line":"                dns_original \u003d [{\u0027ip_address\u0027: ip[\u0027ip_address\u0027], \u0027dns_name\u0027:"},{"line_number":979,"context_line":"                                 request_dns_name, \u0027dns_fqdn\u0027: fqdn,"},{"line_number":980,"context_line":"                                 \u0027subnet_id\u0027: ip[\u0027subnet_id\u0027]}"},{"line_number":981,"context_line":"                                for ip in changes_ips.original"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a41bdd9_9a8534d0","line":978,"updated":"2015-07-15 18:32:54.000000000","message":"Formatting would look a lot better if wrapped after each key/value pair","commit_id":"c0f74cf7abadd6c6cecc0c176c1f3caf738412c1"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"0a8afe4eb1b9ddc0c05c7d073e77fb2d2477be5e","unresolved":false,"context_lines":[{"line_number":983,"context_line":"            else:"},{"line_number":984,"context_line":"                # change ip addresses, no change dns name"},{"line_number":985,"context_line":"                dns_original \u003d [{\u0027ip_address\u0027: ip[\u0027ip_address\u0027], \u0027dns_name\u0027:"},{"line_number":986,"context_line":"                                 dns_ip_map[\u0027ip_address\u0027][\u0027dns_name\u0027],"},{"line_number":987,"context_line":"                                 \u0027dns_fqdn\u0027:"},{"line_number":988,"context_line":"                                 dns_ip_map[\u0027ip_address\u0027][\u0027dns_fqdn\u0027],"},{"line_number":989,"context_line":"                                 \u0027subnet_id\u0027:"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a41bdd9_d5538f15","line":986,"updated":"2015-07-15 18:32:54.000000000","message":"Should this be: dns_ip_map[ip[\u0027ip_address\u0027]] instead of dns_ip_map[\u0027ip_address\u0027]?","commit_id":"c0f74cf7abadd6c6cecc0c176c1f3caf738412c1"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"0a8afe4eb1b9ddc0c05c7d073e77fb2d2477be5e","unresolved":false,"context_lines":[{"line_number":989,"context_line":"                                 \u0027subnet_id\u0027:"},{"line_number":990,"context_line":"                                 dns_ip_map[\u0027ip_address\u0027][\u0027subnet_id\u0027]}"},{"line_number":991,"context_line":"                                for ip in changes_ips.original"},{"line_number":992,"context_line":"                                if ip[\u0027ip_address\u0027] in dns_ip_map]"},{"line_number":993,"context_line":"        else:"},{"line_number":994,"context_line":"            # no change ip addresses, change dns name"},{"line_number":995,"context_line":"            if request_dns_name:"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a41bdd9_9570a7a5","line":992,"updated":"2015-07-15 18:32:54.000000000","message":"Just playing around with this logic, how about something like this:\n\n            original_ip_dns \u003d ((ip, dns_ip_map[ip[\u0027ip_address\u0027]])\n                            for ip in changes_ips.original\n                            if ip[\u0027ip_address\u0027] in dns_ip_map)\n            if request_dns_name:               \n                # change ip addresses, change dns name\n                dns_original \u003d [{\u0027ip_address\u0027: ip[\u0027ip_address\u0027],\n                                 \u0027dns_name\u0027: request_dns_name,\n                                 \u0027dns_fqdn\u0027: fqdn,\n                                 \u0027subnet_id\u0027: ip[\u0027subnet_id\u0027]}\n                                for ip, dns in original_ip_dns]\n            else:                              \n                # change ip addresses, no change dns name\n                dns_original \u003d [{\u0027ip_address\u0027: ip[\u0027ip_address\u0027],\n                                 \u0027dns_name\u0027: dns[\u0027dns_name\u0027],\n                                 \u0027dns_fqdn\u0027: dns[\u0027dns_fqdn\u0027],\n                                 \u0027subnet_id\u0027: dns[\u0027subnet_id\u0027]}\n                                for ip, dns in original_ip_dns]","commit_id":"c0f74cf7abadd6c6cecc0c176c1f3caf738412c1"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"0a8afe4eb1b9ddc0c05c7d073e77fb2d2477be5e","unresolved":false,"context_lines":[{"line_number":992,"context_line":"                                if ip[\u0027ip_address\u0027] in dns_ip_map]"},{"line_number":993,"context_line":"        else:"},{"line_number":994,"context_line":"            # no change ip addresses, change dns name"},{"line_number":995,"context_line":"            if request_dns_name:"},{"line_number":996,"context_line":"                dns_original \u003d [{\u0027ip_address\u0027: dns[\u0027ip_address\u0027], \u0027dns_name\u0027:"},{"line_number":997,"context_line":"                                 request_dns_name, \u0027dns_fqdn\u0027: fqdn,"},{"line_number":998,"context_line":"                                 \u0027subnet_id\u0027: dns[\u0027subnet_id\u0027]}"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a41bdd9_da9bbc16","line":995,"updated":"2015-07-15 18:32:54.000000000","message":"iiuc Given the calling context, I happen to know at this point that this is always True.  Also, if check is added on L963 then it would be more obvious.  We could remove this check here and then we\u0027d know that dns_original is always assigned to something and could remove the initial assignment on L966.","commit_id":"c0f74cf7abadd6c6cecc0c176c1f3caf738412c1"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"0a8afe4eb1b9ddc0c05c7d073e77fb2d2477be5e","unresolved":false,"context_lines":[{"line_number":997,"context_line":"                                 request_dns_name, \u0027dns_fqdn\u0027: fqdn,"},{"line_number":998,"context_line":"                                 \u0027subnet_id\u0027: dns[\u0027subnet_id\u0027]}"},{"line_number":999,"context_line":"                                for dns in db_port[\u0027dns_assignment\u0027]]"},{"line_number":1000,"context_line":"        if dns_original and request_dns_name:"},{"line_number":1001,"context_line":"            for dns in dns_original:"},{"line_number":1002,"context_line":"                context.session.query(models_v2.DNSAssignment).filter_by("},{"line_number":1003,"context_line":"                    network_id\u003dnetwork_id,"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a41bdd9_9537474c","line":1000,"updated":"2015-07-15 18:32:54.000000000","message":"No need to check dns_original in this boolean expression.","commit_id":"c0f74cf7abadd6c6cecc0c176c1f3caf738412c1"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"0a8afe4eb1b9ddc0c05c7d073e77fb2d2477be5e","unresolved":false,"context_lines":[{"line_number":1002,"context_line":"                context.session.query(models_v2.DNSAssignment).filter_by("},{"line_number":1003,"context_line":"                    network_id\u003dnetwork_id,"},{"line_number":1004,"context_line":"                    ip_address\u003ddns[\u0027ip_address\u0027],"},{"line_number":1005,"context_line":"                    subnet_id\u003ddns[\u0027subnet_id\u0027]).update({\u0027dns_name\u0027:"},{"line_number":1006,"context_line":"                                                        request_dns_name,"},{"line_number":1007,"context_line":"                                                        \u0027dns_fqdn\u0027: fqdn})"},{"line_number":1008,"context_line":"        for ip in changes_ips.remove:"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a41bdd9_dc9977c5","line":1005,"updated":"2015-07-15 18:32:54.000000000","message":"You might try a different format when it gets tight like this:\n\n  subnet_id\u003ddns[\u0027subnet_id\u0027]).update({\n      \u0027dns_name\u0027: request_dns_name,\n      \u0027dns_fqdn\u0027: fqdn}","commit_id":"c0f74cf7abadd6c6cecc0c176c1f3caf738412c1"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"0a8afe4eb1b9ddc0c05c7d073e77fb2d2477be5e","unresolved":false,"context_lines":[{"line_number":1031,"context_line":"            self._validate_port_for_update(context, port, new_port, new_mac)"},{"line_number":1032,"context_line":"            changes \u003d self.ipam.update_port_with_ips(context, port,"},{"line_number":1033,"context_line":"                                                     new_port, new_mac)"},{"line_number":1034,"context_line":"            if ((changes.original or changes.add or changes.remove or"},{"line_number":1035,"context_line":"                 request_dns_name)):"},{"line_number":1036,"context_line":"                changes_dns \u003d self._update_dns_names_for_port(context,"},{"line_number":1037,"context_line":"                                                              port, new_port,"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a41bdd9_fa5480ca","line":1034,"updated":"2015-07-15 18:32:54.000000000","message":"nit:  redundant parens  Also, this check might fit better inside the _update_dns_names_for_port method better.  Just an idea.  See L963","commit_id":"c0f74cf7abadd6c6cecc0c176c1f3caf738412c1"},{"author":{"_account_id":1923,"name":"Mohammad Banikazemi","email":"mbanikazemi@gmail.com","username":"mb-s"},"change_message_id":"91037808533103dad13204d6c722a4fb682cf814","unresolved":false,"context_lines":[{"line_number":210,"context_line":"        dns_name_len \u003d len(request_dns_name)"},{"line_number":211,"context_line":"        if request_dns_name[-1] !\u003d \u0027.\u0027:"},{"line_number":212,"context_line":"            dhcp_domain_len \u003d len(cfg.CONF.dhcp_domain)"},{"line_number":213,"context_line":"            msg \u003d _(\"The dns_name passed is a PQDN and its size is \""},{"line_number":214,"context_line":"                    \"\u0027%(dns_name_len)s\u0027. The dhcp_domain option in \""},{"line_number":215,"context_line":"                    \"neutron.conf is set to %(dhcp_domain)s, with a length of \""},{"line_number":216,"context_line":"                    \"\u0027%(dhcp_domain_len)s\u0027. When the two are concatenated to \""}],"source_content_type":"text/x-python","patch_set":5,"id":"3a50d1a3_15909494","line":213,"updated":"2015-07-27 01:04:05.000000000","message":"shouldn\u0027t this and the next assignment to msg go under the following if statement where they are used?","commit_id":"3811b8d8b58c69ad5967339472c0f00ebefa81aa"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"47465c7cf4526f229a492443b058deb3cf111652","unresolved":false,"context_lines":[{"line_number":210,"context_line":"        dns_name_len \u003d len(request_dns_name)"},{"line_number":211,"context_line":"        if request_dns_name[-1] !\u003d \u0027.\u0027:"},{"line_number":212,"context_line":"            dhcp_domain_len \u003d len(cfg.CONF.dhcp_domain)"},{"line_number":213,"context_line":"            msg \u003d _(\"The dns_name passed is a PQDN and its size is \""},{"line_number":214,"context_line":"                    \"\u0027%(dns_name_len)s\u0027. The dhcp_domain option in \""},{"line_number":215,"context_line":"                    \"neutron.conf is set to %(dhcp_domain)s, with a length of \""},{"line_number":216,"context_line":"                    \"\u0027%(dhcp_domain_len)s\u0027. When the two are concatenated to \""}],"source_content_type":"text/x-python","patch_set":5,"id":"3a50d1a3_0b09fb83","line":213,"in_reply_to":"3a50d1a3_15909494","updated":"2015-07-28 19:11:08.000000000","message":"Done","commit_id":"3811b8d8b58c69ad5967339472c0f00ebefa81aa"},{"author":{"_account_id":10601,"name":"Renjie Sun","email":"sunrenjie6@gmail.com","username":"sunrenjie6"},"change_message_id":"70c4e20019f461da2edbe4cd418654fe6b249110","unresolved":false,"context_lines":[{"line_number":214,"context_line":"                    \"\u0027%(dns_name_len)s\u0027. The dhcp_domain option in \""},{"line_number":215,"context_line":"                    \"neutron.conf is set to %(dhcp_domain)s, with a length of \""},{"line_number":216,"context_line":"                    \"\u0027%(dhcp_domain_len)s\u0027. When the two are concatenated to \""},{"line_number":217,"context_line":"                    \"form a FQDN, the resulting lentgh exceeds the maximum \""},{"line_number":218,"context_line":"                    \"size of \u0027%(fqdn_max_len)s\u0027\""},{"line_number":219,"context_line":"                    ) % {\u0027dns_name_len\u0027: dns_name_len,"},{"line_number":220,"context_line":"                         \u0027dhcp_domain\u0027: cfg.CONF.dhcp_domain,"}],"source_content_type":"text/x-python","patch_set":5,"id":"3a50d1a3_bbdf5139","line":217,"updated":"2015-07-27 05:02:07.000000000","message":"nit: s/lentgh/length/","commit_id":"3811b8d8b58c69ad5967339472c0f00ebefa81aa"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"47465c7cf4526f229a492443b058deb3cf111652","unresolved":false,"context_lines":[{"line_number":214,"context_line":"                    \"\u0027%(dns_name_len)s\u0027. The dhcp_domain option in \""},{"line_number":215,"context_line":"                    \"neutron.conf is set to %(dhcp_domain)s, with a length of \""},{"line_number":216,"context_line":"                    \"\u0027%(dhcp_domain_len)s\u0027. When the two are concatenated to \""},{"line_number":217,"context_line":"                    \"form a FQDN, the resulting lentgh exceeds the maximum \""},{"line_number":218,"context_line":"                    \"size of \u0027%(fqdn_max_len)s\u0027\""},{"line_number":219,"context_line":"                    ) % {\u0027dns_name_len\u0027: dns_name_len,"},{"line_number":220,"context_line":"                         \u0027dhcp_domain\u0027: cfg.CONF.dhcp_domain,"}],"source_content_type":"text/x-python","patch_set":5,"id":"3a50d1a3_8931be5c","line":217,"in_reply_to":"3a50d1a3_bbdf5139","updated":"2015-07-28 19:11:08.000000000","message":"Done","commit_id":"3811b8d8b58c69ad5967339472c0f00ebefa81aa"},{"author":{"_account_id":1923,"name":"Mohammad Banikazemi","email":"mbanikazemi@gmail.com","username":"mb-s"},"change_message_id":"91037808533103dad13204d6c722a4fb682cf814","unresolved":false,"context_lines":[{"line_number":227,"context_line":"        # A FQDN was passed"},{"line_number":228,"context_line":"        msg \u003d _(\"The dns_name passed is a FQDN. Its higher level labels must \""},{"line_number":229,"context_line":"                \"be equal to the dhcp_domain option in neutron.conf, that has \""},{"line_number":230,"context_line":"                \"been set to \u0027%(dhcp_domain)s\u0027. It must also include one or \""},{"line_number":231,"context_line":"                \"valid DNS labels to the left of \u0027%(dhcp_domain)s\u0027\""},{"line_number":232,"context_line":"                ) % {\u0027dhcp_domain\u0027: cfg.CONF.dhcp_domain}"},{"line_number":233,"context_line":"        higher_labels \u003d \u0027.\u0027 + cfg.CONF.dhcp_domain + \u0027.\u0027"}],"source_content_type":"text/x-python","patch_set":5,"id":"3a50d1a3_f584085e","line":230,"updated":"2015-07-27 01:04:05.000000000","message":"one or more","commit_id":"3811b8d8b58c69ad5967339472c0f00ebefa81aa"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"47465c7cf4526f229a492443b058deb3cf111652","unresolved":false,"context_lines":[{"line_number":227,"context_line":"        # A FQDN was passed"},{"line_number":228,"context_line":"        msg \u003d _(\"The dns_name passed is a FQDN. Its higher level labels must \""},{"line_number":229,"context_line":"                \"be equal to the dhcp_domain option in neutron.conf, that has \""},{"line_number":230,"context_line":"                \"been set to \u0027%(dhcp_domain)s\u0027. It must also include one or \""},{"line_number":231,"context_line":"                \"valid DNS labels to the left of \u0027%(dhcp_domain)s\u0027\""},{"line_number":232,"context_line":"                ) % {\u0027dhcp_domain\u0027: cfg.CONF.dhcp_domain}"},{"line_number":233,"context_line":"        higher_labels \u003d \u0027.\u0027 + cfg.CONF.dhcp_domain + \u0027.\u0027"}],"source_content_type":"text/x-python","patch_set":5,"id":"3a50d1a3_8918ded4","line":230,"in_reply_to":"3a50d1a3_f584085e","updated":"2015-07-28 19:11:08.000000000","message":"Done","commit_id":"3811b8d8b58c69ad5967339472c0f00ebefa81aa"},{"author":{"_account_id":10601,"name":"Renjie Sun","email":"sunrenjie6@gmail.com","username":"sunrenjie6"},"change_message_id":"70c4e20019f461da2edbe4cd418654fe6b249110","unresolved":false,"context_lines":[{"line_number":838,"context_line":"        else:"},{"line_number":839,"context_line":"            return \u0027\u0027"},{"line_number":840,"context_line":""},{"line_number":841,"context_line":"    def _assign_dns_names_for_port(self, context, network_id, ips,"},{"line_number":842,"context_line":"                                   request_dns_name):"},{"line_number":843,"context_line":"        filter \u003d {\u0027network_id\u0027: [network_id]}"},{"line_number":844,"context_line":"        subnets \u003d self._get_subnets(context, filters\u003dfilter)"}],"source_content_type":"text/x-python","patch_set":5,"id":"3a50d1a3_105e5fe9","line":841,"updated":"2015-07-27 05:02:07.000000000","message":"The function name begins with \u0027assign\u0027, but it does not actually perform the assignment. This is a bit confusing, IMHO. Maybe \u0027_get_dns_assignment_for_port\u0027?","commit_id":"3811b8d8b58c69ad5967339472c0f00ebefa81aa"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"47465c7cf4526f229a492443b058deb3cf111652","unresolved":false,"context_lines":[{"line_number":838,"context_line":"        else:"},{"line_number":839,"context_line":"            return \u0027\u0027"},{"line_number":840,"context_line":""},{"line_number":841,"context_line":"    def _assign_dns_names_for_port(self, context, network_id, ips,"},{"line_number":842,"context_line":"                                   request_dns_name):"},{"line_number":843,"context_line":"        filter \u003d {\u0027network_id\u0027: [network_id]}"},{"line_number":844,"context_line":"        subnets \u003d self._get_subnets(context, filters\u003dfilter)"}],"source_content_type":"text/x-python","patch_set":5,"id":"3a50d1a3_09f84ec2","line":841,"in_reply_to":"3a50d1a3_105e5fe9","updated":"2015-07-28 19:11:08.000000000","message":"Done","commit_id":"3811b8d8b58c69ad5967339472c0f00ebefa81aa"},{"author":{"_account_id":10601,"name":"Renjie Sun","email":"sunrenjie6@gmail.com","username":"sunrenjie6"},"change_message_id":"70c4e20019f461da2edbe4cd418654fe6b249110","unresolved":false,"context_lines":[{"line_number":964,"context_line":"            self._check_mac_addr_update(context, db_port,"},{"line_number":965,"context_line":"                                        new_mac, current_owner)"},{"line_number":966,"context_line":""},{"line_number":967,"context_line":"    def _assign_dns_names_for_updated_port(self, context, db_port,"},{"line_number":968,"context_line":"                                           original_ips, original_dns_name,"},{"line_number":969,"context_line":"                                           request_dns_name, changes):"},{"line_number":970,"context_line":"        dns_assignment \u003d []"}],"source_content_type":"text/x-python","patch_set":5,"id":"3a50d1a3_f05ad3f1","line":967,"updated":"2015-07-27 05:02:07.000000000","message":"ditto","commit_id":"3811b8d8b58c69ad5967339472c0f00ebefa81aa"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"47465c7cf4526f229a492443b058deb3cf111652","unresolved":false,"context_lines":[{"line_number":964,"context_line":"            self._check_mac_addr_update(context, db_port,"},{"line_number":965,"context_line":"                                        new_mac, current_owner)"},{"line_number":966,"context_line":""},{"line_number":967,"context_line":"    def _assign_dns_names_for_updated_port(self, context, db_port,"},{"line_number":968,"context_line":"                                           original_ips, original_dns_name,"},{"line_number":969,"context_line":"                                           request_dns_name, changes):"},{"line_number":970,"context_line":"        dns_assignment \u003d []"}],"source_content_type":"text/x-python","patch_set":5,"id":"3a50d1a3_49df363a","line":967,"in_reply_to":"3a50d1a3_f05ad3f1","updated":"2015-07-28 19:11:08.000000000","message":"Done","commit_id":"3811b8d8b58c69ad5967339472c0f00ebefa81aa"},{"author":{"_account_id":10601,"name":"Renjie Sun","email":"sunrenjie6@gmail.com","username":"sunrenjie6"},"change_message_id":"70c4e20019f461da2edbe4cd418654fe6b249110","unresolved":false,"context_lines":[{"line_number":1023,"context_line":"                          \"The port has already been deleted.\","},{"line_number":1024,"context_line":"                          port_id)"},{"line_number":1025,"context_line":""},{"line_number":1026,"context_line":"    def _assign_dns_name_for_port_get(self, context, port):"},{"line_number":1027,"context_line":"        dns_assignment \u003d []"},{"line_number":1028,"context_line":"        if port[\u0027fixed_ips\u0027]:"},{"line_number":1029,"context_line":"            dns_assignment \u003d self._assign_dns_names_for_port("}],"source_content_type":"text/x-python","patch_set":5,"id":"3a50d1a3_90726f7b","line":1026,"updated":"2015-07-27 05:02:07.000000000","message":"ditto","commit_id":"3811b8d8b58c69ad5967339472c0f00ebefa81aa"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"47465c7cf4526f229a492443b058deb3cf111652","unresolved":false,"context_lines":[{"line_number":1023,"context_line":"                          \"The port has already been deleted.\","},{"line_number":1024,"context_line":"                          port_id)"},{"line_number":1025,"context_line":""},{"line_number":1026,"context_line":"    def _assign_dns_name_for_port_get(self, context, port):"},{"line_number":1027,"context_line":"        dns_assignment \u003d []"},{"line_number":1028,"context_line":"        if port[\u0027fixed_ips\u0027]:"},{"line_number":1029,"context_line":"            dns_assignment \u003d self._assign_dns_names_for_port("}],"source_content_type":"text/x-python","patch_set":5,"id":"3a50d1a3_89bc5ebc","line":1026,"in_reply_to":"3a50d1a3_90726f7b","updated":"2015-07-28 19:11:08.000000000","message":"Done","commit_id":"3811b8d8b58c69ad5967339472c0f00ebefa81aa"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"e06642bec30692167085613b28c33ed0808266a6","unresolved":false,"context_lines":[{"line_number":212,"context_line":"        # If a PQDN was passed, make sure the FQDN that will be generated is of"},{"line_number":213,"context_line":"        # legal size"},{"line_number":214,"context_line":"        dns_name_len \u003d len(request_dns_name)"},{"line_number":215,"context_line":"        if request_dns_name[-1] !\u003d \u0027.\u0027:"},{"line_number":216,"context_line":"            dhcp_domain_len \u003d len(cfg.CONF.dhcp_domain)"},{"line_number":217,"context_line":"            if dns_name_len + dhcp_domain_len \u003e attributes.FQDN_MAX_LEN:"},{"line_number":218,"context_line":"                msg \u003d _(\"The dns_name passed is a PQDN and its size is \""}],"source_content_type":"text/x-python","patch_set":11,"id":"1a4dcd0f_827d451e","line":215,"updated":"2015-08-04 22:27:44.000000000","message":"nit:  if not request_dns_name..endswith(\u0027.\u0027) is more readable.","commit_id":"131fc3f516353cea0e5bf9528ae3cd3b3513ee8a"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"a173026061fc2370d0f12b7c171b3e4131dafaa0","unresolved":false,"context_lines":[{"line_number":212,"context_line":"        # If a PQDN was passed, make sure the FQDN that will be generated is of"},{"line_number":213,"context_line":"        # legal size"},{"line_number":214,"context_line":"        dns_name_len \u003d len(request_dns_name)"},{"line_number":215,"context_line":"        if request_dns_name[-1] !\u003d \u0027.\u0027:"},{"line_number":216,"context_line":"            dhcp_domain_len \u003d len(cfg.CONF.dhcp_domain)"},{"line_number":217,"context_line":"            if dns_name_len + dhcp_domain_len \u003e attributes.FQDN_MAX_LEN:"},{"line_number":218,"context_line":"                msg \u003d _(\"The dns_name passed is a PQDN and its size is \""}],"source_content_type":"text/x-python","patch_set":11,"id":"1a4dcd0f_6402db0d","line":215,"in_reply_to":"1a4dcd0f_827d451e","updated":"2015-08-10 19:47:31.000000000","message":"Done","commit_id":"131fc3f516353cea0e5bf9528ae3cd3b3513ee8a"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"e06642bec30692167085613b28c33ed0808266a6","unresolved":false,"context_lines":[{"line_number":214,"context_line":"        dns_name_len \u003d len(request_dns_name)"},{"line_number":215,"context_line":"        if request_dns_name[-1] !\u003d \u0027.\u0027:"},{"line_number":216,"context_line":"            dhcp_domain_len \u003d len(cfg.CONF.dhcp_domain)"},{"line_number":217,"context_line":"            if dns_name_len + dhcp_domain_len \u003e attributes.FQDN_MAX_LEN:"},{"line_number":218,"context_line":"                msg \u003d _(\"The dns_name passed is a PQDN and its size is \""},{"line_number":219,"context_line":"                        \"\u0027%(dns_name_len)s\u0027. The dhcp_domain option in \""},{"line_number":220,"context_line":"                        \"neutron.conf is set to %(dhcp_domain)s, with a \""}],"source_content_type":"text/x-python","patch_set":11,"id":"1a4dcd0f_a278812c","line":217,"updated":"2015-08-04 22:27:44.000000000","message":"Do we need to leave another position for the joining \u0027.\u0027?  Also, should we consider the trailing \u0027.\u0027 in the FQDN.  \u0027openstacklocal\u0027 doesn\u0027t include it.  I imagine that the option may or may not have it.","commit_id":"131fc3f516353cea0e5bf9528ae3cd3b3513ee8a"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"a173026061fc2370d0f12b7c171b3e4131dafaa0","unresolved":false,"context_lines":[{"line_number":214,"context_line":"        dns_name_len \u003d len(request_dns_name)"},{"line_number":215,"context_line":"        if request_dns_name[-1] !\u003d \u0027.\u0027:"},{"line_number":216,"context_line":"            dhcp_domain_len \u003d len(cfg.CONF.dhcp_domain)"},{"line_number":217,"context_line":"            if dns_name_len + dhcp_domain_len \u003e attributes.FQDN_MAX_LEN:"},{"line_number":218,"context_line":"                msg \u003d _(\"The dns_name passed is a PQDN and its size is \""},{"line_number":219,"context_line":"                        \"\u0027%(dns_name_len)s\u0027. The dhcp_domain option in \""},{"line_number":220,"context_line":"                        \"neutron.conf is set to %(dhcp_domain)s, with a \""}],"source_content_type":"text/x-python","patch_set":11,"id":"1a4dcd0f_f85a082a","line":217,"in_reply_to":"1a4dcd0f_a278812c","updated":"2015-08-10 19:47:31.000000000","message":"Your are absolutely right. We need to account for the \u0027.\u0027 to join dns_name and dhcp_domain. Also we need to account for the \u0027.\u0027 at the end of the generated FQDN and the fact that the value in cfg.CONF.dhcp_domain might end with \u0027.\u0027 or not. I have taken care of this in the next revision","commit_id":"131fc3f516353cea0e5bf9528ae3cd3b3513ee8a"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"e06642bec30692167085613b28c33ed0808266a6","unresolved":false,"context_lines":[{"line_number":229,"context_line":"            return"},{"line_number":230,"context_line":""},{"line_number":231,"context_line":"        # A FQDN was passed"},{"line_number":232,"context_line":"        higher_labels \u003d \u0027.\u0027 + cfg.CONF.dhcp_domain + \u0027.\u0027"},{"line_number":233,"context_line":"        if ((dns_name_len \u003c\u003d len(higher_labels) or not"},{"line_number":234,"context_line":"             (request_dns_name[len(request_dns_name) - len(higher_labels):]"},{"line_number":235,"context_line":"             \u003d\u003d higher_labels))):"}],"source_content_type":"text/x-python","patch_set":11,"id":"1a4dcd0f_c2826d00","line":232,"updated":"2015-08-04 22:27:44.000000000","message":"What if dhcp_domain is specified with the trailing \u0027.\u0027?  If it were me, I might consider normalizing dhcp_domain with a trailing \u0027.\u0027.","commit_id":"131fc3f516353cea0e5bf9528ae3cd3b3513ee8a"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"a173026061fc2370d0f12b7c171b3e4131dafaa0","unresolved":false,"context_lines":[{"line_number":229,"context_line":"            return"},{"line_number":230,"context_line":""},{"line_number":231,"context_line":"        # A FQDN was passed"},{"line_number":232,"context_line":"        higher_labels \u003d \u0027.\u0027 + cfg.CONF.dhcp_domain + \u0027.\u0027"},{"line_number":233,"context_line":"        if ((dns_name_len \u003c\u003d len(higher_labels) or not"},{"line_number":234,"context_line":"             (request_dns_name[len(request_dns_name) - len(higher_labels):]"},{"line_number":235,"context_line":"             \u003d\u003d higher_labels))):"}],"source_content_type":"text/x-python","patch_set":11,"id":"1a4dcd0f_18e81416","line":232,"in_reply_to":"1a4dcd0f_c2826d00","updated":"2015-08-10 19:47:31.000000000","message":"Again, you are right. Yes, I will normalize at always have the FQDN end with \u0027.\u0027, regardless whether cfg.CONF.dhcp_domain ends with it or not","commit_id":"131fc3f516353cea0e5bf9528ae3cd3b3513ee8a"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"e06642bec30692167085613b28c33ed0808266a6","unresolved":false,"context_lines":[{"line_number":232,"context_line":"        higher_labels \u003d \u0027.\u0027 + cfg.CONF.dhcp_domain + \u0027.\u0027"},{"line_number":233,"context_line":"        if ((dns_name_len \u003c\u003d len(higher_labels) or not"},{"line_number":234,"context_line":"             (request_dns_name[len(request_dns_name) - len(higher_labels):]"},{"line_number":235,"context_line":"             \u003d\u003d higher_labels))):"},{"line_number":236,"context_line":"            msg \u003d _(\"The dns_name passed is a FQDN. Its higher level labels \""},{"line_number":237,"context_line":"                    \"must be equal to the dhcp_domain option in neutron.conf, \""},{"line_number":238,"context_line":"                    \"that has been set to \u0027%(dhcp_domain)s\u0027. It must also \""}],"source_content_type":"text/x-python","patch_set":11,"id":"1a4dcd0f_e2852907","line":235,"updated":"2015-08-04 22:27:44.000000000","message":"Isn\u0027t this just another .endswith?\n\n  if not request_dns_name.endswith(\u0027.%s.\u0027 % cfg.CONF.dhcp_domain):","commit_id":"131fc3f516353cea0e5bf9528ae3cd3b3513ee8a"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"a173026061fc2370d0f12b7c171b3e4131dafaa0","unresolved":false,"context_lines":[{"line_number":232,"context_line":"        higher_labels \u003d \u0027.\u0027 + cfg.CONF.dhcp_domain + \u0027.\u0027"},{"line_number":233,"context_line":"        if ((dns_name_len \u003c\u003d len(higher_labels) or not"},{"line_number":234,"context_line":"             (request_dns_name[len(request_dns_name) - len(higher_labels):]"},{"line_number":235,"context_line":"             \u003d\u003d higher_labels))):"},{"line_number":236,"context_line":"            msg \u003d _(\"The dns_name passed is a FQDN. Its higher level labels \""},{"line_number":237,"context_line":"                    \"must be equal to the dhcp_domain option in neutron.conf, \""},{"line_number":238,"context_line":"                    \"that has been set to \u0027%(dhcp_domain)s\u0027. It must also \""}],"source_content_type":"text/x-python","patch_set":11,"id":"1a4dcd0f_f8120809","line":235,"in_reply_to":"1a4dcd0f_e2852907","updated":"2015-08-10 19:47:31.000000000","message":"You are partially right with this comment. As you point out, part of this expression can be simplified to \u0027not request_dns_name.endswith(\u0027.%s.\u0027 % cfg.CONF.dhcp_domain)\u0027. We also want to know, though, that request_dns_name includes at least one label (at least one more character) to the left of those included in higher_labels","commit_id":"131fc3f516353cea0e5bf9528ae3cd3b3513ee8a"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"528f1b28598c39889aba0beae12057703db5ea86","unresolved":false,"context_lines":[{"line_number":232,"context_line":"        higher_labels \u003d \u0027.\u0027 + cfg.CONF.dhcp_domain + \u0027.\u0027"},{"line_number":233,"context_line":"        if ((dns_name_len \u003c\u003d len(higher_labels) or not"},{"line_number":234,"context_line":"             (request_dns_name[len(request_dns_name) - len(higher_labels):]"},{"line_number":235,"context_line":"             \u003d\u003d higher_labels))):"},{"line_number":236,"context_line":"            msg \u003d _(\"The dns_name passed is a FQDN. Its higher level labels \""},{"line_number":237,"context_line":"                    \"must be equal to the dhcp_domain option in neutron.conf, \""},{"line_number":238,"context_line":"                    \"that has been set to \u0027%(dhcp_domain)s\u0027. It must also \""}],"source_content_type":"text/x-python","patch_set":11,"id":"1a4dcd0f_d9f6ae5c","line":235,"in_reply_to":"1a4dcd0f_f8120809","updated":"2015-08-11 17:34:41.000000000","message":"Okay, I\u0027ll buy that.  I like what you ended up with in PS12.  It is easier to follow.","commit_id":"131fc3f516353cea0e5bf9528ae3cd3b3513ee8a"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"e06642bec30692167085613b28c33ed0808266a6","unresolved":false,"context_lines":[{"line_number":843,"context_line":""},{"line_number":844,"context_line":"    def _get_request_dns_name(self, port):"},{"line_number":845,"context_line":"        #TODO(mlavalle) I know cfg.CONF._opts[\u0027dhcp_domain\u0027][\u0027opt\u0027].default"},{"line_number":846,"context_line":"        # works. Is it frowned upon, though?"},{"line_number":847,"context_line":"        if ((cfg.CONF.dhcp_domain and cfg.CONF.dhcp_domain !\u003d"},{"line_number":848,"context_line":"             cfg.CONF._opts[\u0027dhcp_domain\u0027][\u0027opt\u0027].default)):"},{"line_number":849,"context_line":"            return port.get(\u0027dns_name\u0027, \u0027\u0027)"}],"source_content_type":"text/x-python","patch_set":11,"id":"1a4dcd0f_e2ae8997","line":846,"updated":"2015-08-04 22:27:44.000000000","message":"I liked Cedric\u0027s suggestion to use a constant to both set the default and make this check.","commit_id":"131fc3f516353cea0e5bf9528ae3cd3b3513ee8a"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"a173026061fc2370d0f12b7c171b3e4131dafaa0","unresolved":false,"context_lines":[{"line_number":843,"context_line":""},{"line_number":844,"context_line":"    def _get_request_dns_name(self, port):"},{"line_number":845,"context_line":"        #TODO(mlavalle) I know cfg.CONF._opts[\u0027dhcp_domain\u0027][\u0027opt\u0027].default"},{"line_number":846,"context_line":"        # works. Is it frowned upon, though?"},{"line_number":847,"context_line":"        if ((cfg.CONF.dhcp_domain and cfg.CONF.dhcp_domain !\u003d"},{"line_number":848,"context_line":"             cfg.CONF._opts[\u0027dhcp_domain\u0027][\u0027opt\u0027].default)):"},{"line_number":849,"context_line":"            return port.get(\u0027dns_name\u0027, \u0027\u0027)"}],"source_content_type":"text/x-python","patch_set":11,"id":"1a4dcd0f_ecfec037","line":846,"in_reply_to":"1a4dcd0f_e2ae8997","updated":"2015-08-10 19:47:31.000000000","message":"Done","commit_id":"131fc3f516353cea0e5bf9528ae3cd3b3513ee8a"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"e06642bec30692167085613b28c33ed0808266a6","unresolved":false,"context_lines":[{"line_number":848,"context_line":"             cfg.CONF._opts[\u0027dhcp_domain\u0027][\u0027opt\u0027].default)):"},{"line_number":849,"context_line":"            return port.get(\u0027dns_name\u0027, \u0027\u0027)"},{"line_number":850,"context_line":"        else:"},{"line_number":851,"context_line":"            return \u0027\u0027"},{"line_number":852,"context_line":""},{"line_number":853,"context_line":"    def _get_dns_names_for_port(self, context, network_id, ips,"},{"line_number":854,"context_line":"                                request_dns_name):"}],"source_content_type":"text/x-python","patch_set":11,"id":"1a4dcd0f_a2916154","line":851,"updated":"2015-08-04 22:27:44.000000000","message":"I think I\u0027d want to return None instead of \u0027\u0027.  In that case, just remove the else.","commit_id":"131fc3f516353cea0e5bf9528ae3cd3b3513ee8a"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"a173026061fc2370d0f12b7c171b3e4131dafaa0","unresolved":false,"context_lines":[{"line_number":848,"context_line":"             cfg.CONF._opts[\u0027dhcp_domain\u0027][\u0027opt\u0027].default)):"},{"line_number":849,"context_line":"            return port.get(\u0027dns_name\u0027, \u0027\u0027)"},{"line_number":850,"context_line":"        else:"},{"line_number":851,"context_line":"            return \u0027\u0027"},{"line_number":852,"context_line":""},{"line_number":853,"context_line":"    def _get_dns_names_for_port(self, context, network_id, ips,"},{"line_number":854,"context_line":"                                request_dns_name):"}],"source_content_type":"text/x-python","patch_set":11,"id":"1a4dcd0f_4c9494e7","line":851,"in_reply_to":"1a4dcd0f_a2916154","updated":"2015-08-10 19:47:31.000000000","message":"If I return None, I get a lot of violations of non nullable constraint in the database. That is because in line 943 I use the value returned by this function to update the database","commit_id":"131fc3f516353cea0e5bf9528ae3cd3b3513ee8a"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"e06642bec30692167085613b28c33ed0808266a6","unresolved":false,"context_lines":[{"line_number":854,"context_line":"                                request_dns_name):"},{"line_number":855,"context_line":"        filter \u003d {\u0027network_id\u0027: [network_id]}"},{"line_number":856,"context_line":"        subnets \u003d self._get_subnets(context, filters\u003dfilter)"},{"line_number":857,"context_line":"        v6_subnets \u003d dict((subnet[\u0027id\u0027], subnet) for subnet in subnets"},{"line_number":858,"context_line":"                          if subnet[\u0027ip_version\u0027] \u003d\u003d 6)"},{"line_number":859,"context_line":"        dns_assignment \u003d []"},{"line_number":860,"context_line":"        if request_dns_name:"}],"source_content_type":"text/x-python","patch_set":11,"id":"1a4dcd0f_629b5973","line":857,"updated":"2015-08-04 22:27:44.000000000","message":"nit:  dict comprehension could be used.","commit_id":"131fc3f516353cea0e5bf9528ae3cd3b3513ee8a"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"a173026061fc2370d0f12b7c171b3e4131dafaa0","unresolved":false,"context_lines":[{"line_number":854,"context_line":"                                request_dns_name):"},{"line_number":855,"context_line":"        filter \u003d {\u0027network_id\u0027: [network_id]}"},{"line_number":856,"context_line":"        subnets \u003d self._get_subnets(context, filters\u003dfilter)"},{"line_number":857,"context_line":"        v6_subnets \u003d dict((subnet[\u0027id\u0027], subnet) for subnet in subnets"},{"line_number":858,"context_line":"                          if subnet[\u0027ip_version\u0027] \u003d\u003d 6)"},{"line_number":859,"context_line":"        dns_assignment \u003d []"},{"line_number":860,"context_line":"        if request_dns_name:"}],"source_content_type":"text/x-python","patch_set":11,"id":"1a4dcd0f_8c929cf5","line":857,"in_reply_to":"1a4dcd0f_629b5973","updated":"2015-08-10 19:47:31.000000000","message":"Done","commit_id":"131fc3f516353cea0e5bf9528ae3cd3b3513ee8a"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"e06642bec30692167085613b28c33ed0808266a6","unresolved":false,"context_lines":[{"line_number":859,"context_line":"        dns_assignment \u003d []"},{"line_number":860,"context_line":"        if request_dns_name:"},{"line_number":861,"context_line":"            if request_dns_name[-1] !\u003d \u0027.\u0027:"},{"line_number":862,"context_line":"                request_fqdn \u003d \u0027%s.%s\u0027 % (request_dns_name,"},{"line_number":863,"context_line":"                                          cfg.CONF.dhcp_domain)"},{"line_number":864,"context_line":"            else:"},{"line_number":865,"context_line":"                request_fqdn \u003d request_dns_name[:-1]"}],"source_content_type":"text/x-python","patch_set":11,"id":"1a4dcd0f_62c4b95e","line":862,"updated":"2015-08-04 22:27:44.000000000","message":"Curious why not use add the trailing \u0027.\u0027?  Maybe there is a good reason.","commit_id":"131fc3f516353cea0e5bf9528ae3cd3b3513ee8a"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"a173026061fc2370d0f12b7c171b3e4131dafaa0","unresolved":false,"context_lines":[{"line_number":859,"context_line":"        dns_assignment \u003d []"},{"line_number":860,"context_line":"        if request_dns_name:"},{"line_number":861,"context_line":"            if request_dns_name[-1] !\u003d \u0027.\u0027:"},{"line_number":862,"context_line":"                request_fqdn \u003d \u0027%s.%s\u0027 % (request_dns_name,"},{"line_number":863,"context_line":"                                          cfg.CONF.dhcp_domain)"},{"line_number":864,"context_line":"            else:"},{"line_number":865,"context_line":"                request_fqdn \u003d request_dns_name[:-1]"}],"source_content_type":"text/x-python","patch_set":11,"id":"1a4dcd0f_0c3a0ce8","line":862,"in_reply_to":"1a4dcd0f_62c4b95e","updated":"2015-08-10 19:47:31.000000000","message":"No good reason. Let\u0027s standardize in having all the FQDN end with \u0027.\u0027","commit_id":"131fc3f516353cea0e5bf9528ae3cd3b3513ee8a"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"e06642bec30692167085613b28c33ed0808266a6","unresolved":false,"context_lines":[{"line_number":862,"context_line":"                request_fqdn \u003d \u0027%s.%s\u0027 % (request_dns_name,"},{"line_number":863,"context_line":"                                          cfg.CONF.dhcp_domain)"},{"line_number":864,"context_line":"            else:"},{"line_number":865,"context_line":"                request_fqdn \u003d request_dns_name[:-1]"},{"line_number":866,"context_line":"                request_dns_name \u003d request_dns_name[:-1]"},{"line_number":867,"context_line":""},{"line_number":868,"context_line":"        for ip in ips:"}],"source_content_type":"text/x-python","patch_set":11,"id":"1a4dcd0f_a2cac16c","line":865,"updated":"2015-08-04 22:27:44.000000000","message":"Curious why strip the trailing \u0027.\u0027","commit_id":"131fc3f516353cea0e5bf9528ae3cd3b3513ee8a"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"a173026061fc2370d0f12b7c171b3e4131dafaa0","unresolved":false,"context_lines":[{"line_number":862,"context_line":"                request_fqdn \u003d \u0027%s.%s\u0027 % (request_dns_name,"},{"line_number":863,"context_line":"                                          cfg.CONF.dhcp_domain)"},{"line_number":864,"context_line":"            else:"},{"line_number":865,"context_line":"                request_fqdn \u003d request_dns_name[:-1]"},{"line_number":866,"context_line":"                request_dns_name \u003d request_dns_name[:-1]"},{"line_number":867,"context_line":""},{"line_number":868,"context_line":"        for ip in ips:"}],"source_content_type":"text/x-python","patch_set":11,"id":"1a4dcd0f_cc2424c8","line":865,"in_reply_to":"1a4dcd0f_a2cac16c","updated":"2015-08-10 19:47:31.000000000","message":"Same response as line 862","commit_id":"131fc3f516353cea0e5bf9528ae3cd3b3513ee8a"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"e06642bec30692167085613b28c33ed0808266a6","unresolved":false,"context_lines":[{"line_number":983,"context_line":"    def _get_dns_names_for_updated_port(self, context, db_port,"},{"line_number":984,"context_line":"                                        original_ips, original_dns_name,"},{"line_number":985,"context_line":"                                        request_dns_name, changes):"},{"line_number":986,"context_line":"        dns_assignment \u003d []"},{"line_number":987,"context_line":"        if changes.original or changes.add or changes.remove:"},{"line_number":988,"context_line":"            dns_assignment \u003d self._get_dns_names_for_port("},{"line_number":989,"context_line":"                context, db_port[\u0027network_id\u0027], changes.original + changes.add,"}],"source_content_type":"text/x-python","patch_set":11,"id":"1a4dcd0f_82cf857e","line":986,"updated":"2015-08-04 22:27:44.000000000","message":"nit:  I like the more direct approach below but that is just me pushing my personal preferences.\n\n        if changes.original or changes.add or changes.remove:\n            return self._get_dns_names_for_port(\n                context, db_port[\u0027network_id\u0027], changes.original + changes.add,\n                request_dns_name or original_dns_name)\n        if original_ips:\n            return self._get_dns_names_for_port(\n                context, db_port[\u0027network_id\u0027], original_ips,\n                request_dns_name or original_dns_name)\n        return []","commit_id":"131fc3f516353cea0e5bf9528ae3cd3b3513ee8a"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"a173026061fc2370d0f12b7c171b3e4131dafaa0","unresolved":false,"context_lines":[{"line_number":983,"context_line":"    def _get_dns_names_for_updated_port(self, context, db_port,"},{"line_number":984,"context_line":"                                        original_ips, original_dns_name,"},{"line_number":985,"context_line":"                                        request_dns_name, changes):"},{"line_number":986,"context_line":"        dns_assignment \u003d []"},{"line_number":987,"context_line":"        if changes.original or changes.add or changes.remove:"},{"line_number":988,"context_line":"            dns_assignment \u003d self._get_dns_names_for_port("},{"line_number":989,"context_line":"                context, db_port[\u0027network_id\u0027], changes.original + changes.add,"}],"source_content_type":"text/x-python","patch_set":11,"id":"1a4dcd0f_8c2e1ca4","line":986,"in_reply_to":"1a4dcd0f_82cf857e","updated":"2015-08-10 19:47:31.000000000","message":"Done","commit_id":"131fc3f516353cea0e5bf9528ae3cd3b3513ee8a"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"e06642bec30692167085613b28c33ed0808266a6","unresolved":false,"context_lines":[{"line_number":1041,"context_line":""},{"line_number":1042,"context_line":"    def _get_dns_name_for_port_get(self, context, port):"},{"line_number":1043,"context_line":"        dns_assignment \u003d []"},{"line_number":1044,"context_line":"        if port[\u0027fixed_ips\u0027]:"},{"line_number":1045,"context_line":"            dns_assignment \u003d self._get_dns_names_for_port("},{"line_number":1046,"context_line":"                context, port[\u0027network_id\u0027], port[\u0027fixed_ips\u0027],"},{"line_number":1047,"context_line":"                port[\u0027dns_name\u0027])"}],"source_content_type":"text/x-python","patch_set":11,"id":"1a4dcd0f_e2b769f3","line":1044,"updated":"2015-08-04 22:27:44.000000000","message":"nit:  ditto (L986)","commit_id":"131fc3f516353cea0e5bf9528ae3cd3b3513ee8a"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"a173026061fc2370d0f12b7c171b3e4131dafaa0","unresolved":false,"context_lines":[{"line_number":1041,"context_line":""},{"line_number":1042,"context_line":"    def _get_dns_name_for_port_get(self, context, port):"},{"line_number":1043,"context_line":"        dns_assignment \u003d []"},{"line_number":1044,"context_line":"        if port[\u0027fixed_ips\u0027]:"},{"line_number":1045,"context_line":"            dns_assignment \u003d self._get_dns_names_for_port("},{"line_number":1046,"context_line":"                context, port[\u0027network_id\u0027], port[\u0027fixed_ips\u0027],"},{"line_number":1047,"context_line":"                port[\u0027dns_name\u0027])"}],"source_content_type":"text/x-python","patch_set":11,"id":"1a4dcd0f_ac02f809","line":1044,"in_reply_to":"1a4dcd0f_e2b769f3","updated":"2015-08-10 19:47:31.000000000","message":"Done","commit_id":"131fc3f516353cea0e5bf9528ae3cd3b3513ee8a"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"d8c1c3a8daedfd8db330c20dbc0595fa59cbccc2","unresolved":false,"context_lines":[{"line_number":62,"context_line":"# IP allocations being cleaned up by cascade."},{"line_number":63,"context_line":"AUTO_DELETE_PORT_OWNERS \u003d [constants.DEVICE_OWNER_DHCP]"},{"line_number":64,"context_line":""},{"line_number":65,"context_line":"DNS_DOMAIN_DEFAULT \u003d \u0027openstacklocal.\u0027"},{"line_number":66,"context_line":""},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"def _check_subnet_not_used(context, subnet_id):"}],"source_content_type":"text/x-python","patch_set":12,"id":"1a4dcd0f_cf569b5b","line":65,"updated":"2015-08-12 23:36:57.000000000","message":"This literal feels odd here.","commit_id":"da62fccc538aeffa4d8a331921624bc4a45d1817"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"7beee7404ff6b02ac15d239436cf95c284482265","unresolved":false,"context_lines":[{"line_number":246,"context_line":""},{"line_number":247,"context_line":"        # A FQDN was passed"},{"line_number":248,"context_line":"        if ((dns_name_len \u003c\u003d higher_labels_len or not"},{"line_number":249,"context_line":"             request_dns_name.endswith(higher_labels))):"},{"line_number":250,"context_line":"            msg \u003d _(\"The dns_name passed is a FQDN. Its higher level labels \""},{"line_number":251,"context_line":"                    \"must be equal to the dns_domain option in neutron.conf, \""},{"line_number":252,"context_line":"                    \"that has been set to \u0027%(dns_domain)s\u0027. It must also \""}],"source_content_type":"text/x-python","patch_set":12,"id":"1a4dcd0f_b92c02ad","line":249,"updated":"2015-08-11 17:42:47.000000000","message":"I like it.","commit_id":"da62fccc538aeffa4d8a331921624bc4a45d1817"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"7beee7404ff6b02ac15d239436cf95c284482265","unresolved":false,"context_lines":[{"line_number":248,"context_line":"        if ((dns_name_len \u003c\u003d higher_labels_len or not"},{"line_number":249,"context_line":"             request_dns_name.endswith(higher_labels))):"},{"line_number":250,"context_line":"            msg \u003d _(\"The dns_name passed is a FQDN. Its higher level labels \""},{"line_number":251,"context_line":"                    \"must be equal to the dns_domain option in neutron.conf, \""},{"line_number":252,"context_line":"                    \"that has been set to \u0027%(dns_domain)s\u0027. It must also \""},{"line_number":253,"context_line":"                    \"include one or more valid DNS labels to the left \""},{"line_number":254,"context_line":"                    \"of \u0027%(dns_domain)s\u0027\") % {\u0027dns_domain\u0027:"}],"source_content_type":"text/x-python","patch_set":12,"id":"1a4dcd0f_99c266e8","line":251,"updated":"2015-08-11 17:42:47.000000000","message":"I like dns_domain better than dhcp_domain.  I didn\u0027t notice you had dhcp_domain until I saw this version compared with it.","commit_id":"da62fccc538aeffa4d8a331921624bc4a45d1817"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"7beee7404ff6b02ac15d239436cf95c284482265","unresolved":false,"context_lines":[{"line_number":1022,"context_line":"        for ip in ips:"},{"line_number":1023,"context_line":"            subnet_id \u003d ip[\u0027subnet_id\u0027]"},{"line_number":1024,"context_line":"            if (subnet_id in v6_subnets and"},{"line_number":1025,"context_line":"               ipv6_utils.is_auto_address_subnet(v6_subnets[subnet_id])):"},{"line_number":1026,"context_line":"                continue"},{"line_number":1027,"context_line":"            if request_dns_name:"},{"line_number":1028,"context_line":"                hostname \u003d request_dns_name"}],"source_content_type":"text/x-python","patch_set":12,"id":"1a4dcd0f_bd05cd11","line":1025,"updated":"2015-08-11 17:42:47.000000000","message":"nit:  I think I\u0027d indent this 5 more spaces if you roll another patch set.  Or, use a temporary self-documenting variable: \n\n  is_auto_address_subnet \u003d (subnet_id in v6_subnets and\n                            ipv6_utils.is_auto_address_subnet(v6_subnets[subnet_id]))\n  if is_auto_address_subnet:\n      continue","commit_id":"da62fccc538aeffa4d8a331921624bc4a45d1817"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"f821556d9e80726e0022e6293ead3eb88660b5cb","unresolved":false,"context_lines":[{"line_number":1022,"context_line":"        for ip in ips:"},{"line_number":1023,"context_line":"            subnet_id \u003d ip[\u0027subnet_id\u0027]"},{"line_number":1024,"context_line":"            if (subnet_id in v6_subnets and"},{"line_number":1025,"context_line":"               ipv6_utils.is_auto_address_subnet(v6_subnets[subnet_id])):"},{"line_number":1026,"context_line":"                continue"},{"line_number":1027,"context_line":"            if request_dns_name:"},{"line_number":1028,"context_line":"                hostname \u003d request_dns_name"}],"source_content_type":"text/x-python","patch_set":12,"id":"1a4dcd0f_fa64f321","line":1025,"in_reply_to":"1a4dcd0f_bd05cd11","updated":"2015-08-16 00:08:29.000000000","message":"Done","commit_id":"da62fccc538aeffa4d8a331921624bc4a45d1817"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"7beee7404ff6b02ac15d239436cf95c284482265","unresolved":false,"context_lines":[{"line_number":1149,"context_line":"        if request_dns_name:"},{"line_number":1150,"context_line":"            self._validate_dns_name(request_dns_name)"},{"line_number":1151,"context_line":"        else:"},{"line_number":1152,"context_line":"            if new_port.get(\u0027dns_name\u0027, \u0027\u0027):"},{"line_number":1153,"context_line":"                new_port[\u0027dns_name\u0027] \u003d \u0027\u0027"},{"line_number":1154,"context_line":""},{"line_number":1155,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"}],"source_content_type":"text/x-python","patch_set":12,"id":"1a4dcd0f_ddb6993d","line":1152,"updated":"2015-08-11 17:42:47.000000000","message":"nit:  elif would avoid a little indentation","commit_id":"da62fccc538aeffa4d8a331921624bc4a45d1817"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"f821556d9e80726e0022e6293ead3eb88660b5cb","unresolved":false,"context_lines":[{"line_number":1149,"context_line":"        if request_dns_name:"},{"line_number":1150,"context_line":"            self._validate_dns_name(request_dns_name)"},{"line_number":1151,"context_line":"        else:"},{"line_number":1152,"context_line":"            if new_port.get(\u0027dns_name\u0027, \u0027\u0027):"},{"line_number":1153,"context_line":"                new_port[\u0027dns_name\u0027] \u003d \u0027\u0027"},{"line_number":1154,"context_line":""},{"line_number":1155,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"}],"source_content_type":"text/x-python","patch_set":12,"id":"1a4dcd0f_3a7b3bc0","line":1152,"in_reply_to":"1a4dcd0f_ddb6993d","updated":"2015-08-16 00:08:29.000000000","message":"Done","commit_id":"da62fccc538aeffa4d8a331921624bc4a45d1817"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"bdd5068f60a60475e3e9207f99e7d1e0546f5d28","unresolved":false,"context_lines":[{"line_number":245,"context_line":"            return"},{"line_number":246,"context_line":""},{"line_number":247,"context_line":"        # A FQDN was passed"},{"line_number":248,"context_line":"        if ((dns_name_len \u003c\u003d higher_labels_len or not"},{"line_number":249,"context_line":"             request_dns_name.endswith(higher_labels))):"},{"line_number":250,"context_line":"            msg \u003d _(\"The dns_name passed is a FQDN. Its higher level labels \""},{"line_number":251,"context_line":"                    \"must be equal to the dns_domain option in neutron.conf, \""}],"source_content_type":"text/x-python","patch_set":20,"id":"fa1b9901_bf7cfbb5","line":248,"updated":"2015-08-19 19:02:11.000000000","message":"nit:  Double parens not necessary","commit_id":"44b42763e6fd27b46773fe8daa847a6d09f4795a"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"41ff38b69226ccf61a0068087305a5a1faed43b8","unresolved":false,"context_lines":[{"line_number":245,"context_line":"            return"},{"line_number":246,"context_line":""},{"line_number":247,"context_line":"        # A FQDN was passed"},{"line_number":248,"context_line":"        if ((dns_name_len \u003c\u003d higher_labels_len or not"},{"line_number":249,"context_line":"             request_dns_name.endswith(higher_labels))):"},{"line_number":250,"context_line":"            msg \u003d _(\"The dns_name passed is a FQDN. Its higher level labels \""},{"line_number":251,"context_line":"                    \"must be equal to the dns_domain option in neutron.conf, \""}],"source_content_type":"text/x-python","patch_set":20,"id":"fa1b9901_99cbbb1e","line":248,"in_reply_to":"fa1b9901_bf7cfbb5","updated":"2015-08-23 00:57:14.000000000","message":"Done. Moved this method to the extension, per arosen\u0027s feedback","commit_id":"44b42763e6fd27b46773fe8daa847a6d09f4795a"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"change_message_id":"446a5116490ddad34b05b9af34cddb1ab4564a01","unresolved":false,"context_lines":[{"line_number":1075,"context_line":""},{"line_number":1076,"context_line":"    def create_port(self, context, port):"},{"line_number":1077,"context_line":"        p \u003d port[\u0027port\u0027]"},{"line_number":1078,"context_line":"        request_dns_name \u003d self._get_request_dns_name(p)"},{"line_number":1079,"context_line":"        if request_dns_name:"},{"line_number":1080,"context_line":"            self._validate_dns_name(request_dns_name)"},{"line_number":1081,"context_line":""}],"source_content_type":"text/x-python","patch_set":20,"id":"fa1b9901_b562c93c","line":1078,"updated":"2015-08-20 00:56:36.000000000","message":"Why isn\u0027t this done in the extension code to validate it before it comes here? It doesn\u0027t look like this method needs to access the db.","commit_id":"44b42763e6fd27b46773fe8daa847a6d09f4795a"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"41ff38b69226ccf61a0068087305a5a1faed43b8","unresolved":false,"context_lines":[{"line_number":1075,"context_line":""},{"line_number":1076,"context_line":"    def create_port(self, context, port):"},{"line_number":1077,"context_line":"        p \u003d port[\u0027port\u0027]"},{"line_number":1078,"context_line":"        request_dns_name \u003d self._get_request_dns_name(p)"},{"line_number":1079,"context_line":"        if request_dns_name:"},{"line_number":1080,"context_line":"            self._validate_dns_name(request_dns_name)"},{"line_number":1081,"context_line":""}],"source_content_type":"text/x-python","patch_set":20,"id":"fa1b9901_5cce71b5","line":1078,"in_reply_to":"fa1b9901_b562c93c","updated":"2015-08-23 00:57:14.000000000","message":"Done. Validation moved to the extension","commit_id":"44b42763e6fd27b46773fe8daa847a6d09f4795a"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"change_message_id":"446a5116490ddad34b05b9af34cddb1ab4564a01","unresolved":false,"context_lines":[{"line_number":1096,"context_line":"                         status\u003dp.get(\u0027status\u0027, constants.PORT_STATUS_ACTIVE),"},{"line_number":1097,"context_line":"                         device_id\u003dp[\u0027device_id\u0027],"},{"line_number":1098,"context_line":"                         device_owner\u003dp[\u0027device_owner\u0027],"},{"line_number":1099,"context_line":"                         dns_name\u003drequest_dns_name)"},{"line_number":1100,"context_line":""},{"line_number":1101,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":1102,"context_line":"            # Ensure that the network exists."}],"source_content_type":"text/x-python","patch_set":20,"id":"fa1b9901_d5673d4b","line":1099,"updated":"2015-08-20 00:56:36.000000000","message":"This adds dns_name here for all ports even though this is done as an extension.","commit_id":"44b42763e6fd27b46773fe8daa847a6d09f4795a"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"41ff38b69226ccf61a0068087305a5a1faed43b8","unresolved":false,"context_lines":[{"line_number":1096,"context_line":"                         status\u003dp.get(\u0027status\u0027, constants.PORT_STATUS_ACTIVE),"},{"line_number":1097,"context_line":"                         device_id\u003dp[\u0027device_id\u0027],"},{"line_number":1098,"context_line":"                         device_owner\u003dp[\u0027device_owner\u0027],"},{"line_number":1099,"context_line":"                         dns_name\u003drequest_dns_name)"},{"line_number":1100,"context_line":""},{"line_number":1101,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":1102,"context_line":"            # Ensure that the network exists."}],"source_content_type":"text/x-python","patch_set":20,"id":"fa1b9901_1cc1d980","line":1099,"in_reply_to":"fa1b9901_d5673d4b","updated":"2015-08-23 00:57:14.000000000","message":"Done. \u0027dns_name\u0027 is assigned to port_data ONLY if the extension is enabled","commit_id":"44b42763e6fd27b46773fe8daa847a6d09f4795a"}],"neutron/db/ipam_non_pluggable_backend.py":[{"author":{"_account_id":12912,"name":"John Belamaric","email":"jbelamaric@infoblox.com","username":"johnbelamaric"},"change_message_id":"a5b4d7c32476cb715756f717019f2d8bf97918c8","unresolved":false,"context_lines":[{"line_number":209,"context_line":"                subnet_id \u003d ip[\u0027subnet_id\u0027]"},{"line_number":210,"context_line":"                self._store_ip_allocation(context, ip_address, network_id,"},{"line_number":211,"context_line":"                                          subnet_id, port_id)"},{"line_number":212,"context_line":"            return ips"},{"line_number":213,"context_line":""},{"line_number":214,"context_line":"    def update_port_with_ips(self, context, db_port, new_port, new_mac):"},{"line_number":215,"context_line":"        changes \u003d self.Changes(add\u003d[], original\u003d[], remove\u003d[])"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a41bdd9_593499fa","line":212,"updated":"2015-07-15 18:26:48.000000000","message":"Once [1] merges, you will have to make the equivalent change in ipam_pluggable_backend.py.\n\n[1] https://review.openstack.org/#/c/183099/","commit_id":"c0f74cf7abadd6c6cecc0c176c1f3caf738412c1"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"e06642bec30692167085613b28c33ed0808266a6","unresolved":false,"context_lines":[{"line_number":207,"context_line":"                subnet_id \u003d ip[\u0027subnet_id\u0027]"},{"line_number":208,"context_line":"                self._store_ip_allocation(context, ip_address, network_id,"},{"line_number":209,"context_line":"                                          subnet_id, port_id)"},{"line_number":210,"context_line":"            return ips"},{"line_number":211,"context_line":""},{"line_number":212,"context_line":"    def update_port_with_ips(self, context, db_port, new_port, new_mac):"},{"line_number":213,"context_line":"        changes \u003d self.Changes(add\u003d[], original\u003d[], remove\u003d[])"}],"source_content_type":"text/x-python","patch_set":11,"id":"1a4dcd0f_022cd500","line":210,"updated":"2015-08-04 22:27:44.000000000","message":"I think this return should be unconditional (i.e. indent 4 fewer spaces)","commit_id":"131fc3f516353cea0e5bf9528ae3cd3b3513ee8a"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"a173026061fc2370d0f12b7c171b3e4131dafaa0","unresolved":false,"context_lines":[{"line_number":207,"context_line":"                subnet_id \u003d ip[\u0027subnet_id\u0027]"},{"line_number":208,"context_line":"                self._store_ip_allocation(context, ip_address, network_id,"},{"line_number":209,"context_line":"                                          subnet_id, port_id)"},{"line_number":210,"context_line":"            return ips"},{"line_number":211,"context_line":""},{"line_number":212,"context_line":"    def update_port_with_ips(self, context, db_port, new_port, new_mac):"},{"line_number":213,"context_line":"        changes \u003d self.Changes(add\u003d[], original\u003d[], remove\u003d[])"}],"source_content_type":"text/x-python","patch_set":11,"id":"1a4dcd0f_860f6287","line":210,"in_reply_to":"1a4dcd0f_022cd500","updated":"2015-08-10 19:47:31.000000000","message":"Done","commit_id":"131fc3f516353cea0e5bf9528ae3cd3b3513ee8a"}],"neutron/db/migration/alembic_migrations/versions/3567d4f67687_dnsassignments.py":[{"author":{"_account_id":11682,"name":"Ryan Moats","email":"rmoats@us.ibm.com","username":"regXboi"},"change_message_id":"379ca96d67d746068812da7b0623639a135d0104","unresolved":false,"context_lines":[{"line_number":34,"context_line":"def upgrade():"},{"line_number":35,"context_line":"    op.create_table(\u0027dnsassignments\u0027,"},{"line_number":36,"context_line":"                    sa.Column(\u0027port_id\u0027, sa.String(length\u003d36), nullable\u003dTrue),"},{"line_number":37,"context_line":"                    sa.Column(\u0027ip_address\u0027,"},{"line_number":38,"context_line":"                              sa.String(length\u003d64),"},{"line_number":39,"context_line":"                              nullable\u003dFalse),"},{"line_number":40,"context_line":"                    sa.Column(\u0027subnet_id\u0027,"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a41bdd9_a3384b3e","line":37,"updated":"2015-07-14 22:46:16.000000000","message":"Nit: I\u0027d really like to define the 36 and 64 as constants in neutron.api.v2.attributes, if they aren\u0027t already there","commit_id":"c0f74cf7abadd6c6cecc0c176c1f3caf738412c1"}],"neutron/db/migration/alembic_migrations/versions/liberty/contract/46df4375f3ac_add_dns_name_to_port.py":[{"author":{"_account_id":9970,"name":"John Kasperski","email":"jckasper@linux.vnet.ibm.com","username":"jckasper"},"change_message_id":"154dbbd1e0b5d93c7be6536ae2090e8325859d88","unresolved":false,"context_lines":[{"line_number":32,"context_line":""},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"def upgrade():"},{"line_number":35,"context_line":"    op.add_column(\u0027ports\u0027,"},{"line_number":36,"context_line":"                  sa.Column(\u0027dns_name\u0027,"},{"line_number":37,"context_line":"                            sa.String(length\u003dattr.FQDN_MAX_LEN),"},{"line_number":38,"context_line":"                            nullable\u003dFalse))"}],"source_content_type":"text/x-python","patch_set":5,"id":"3a50d1a3_ad35d8db","line":35,"updated":"2015-07-27 03:43:54.000000000","message":"We are adding a column to the DB.   This migration script should probably be over in the expand branch:   http://docs.openstack.org/developer/neutron/devref/db_layer.html#expand-and-contract-scripts","commit_id":"3811b8d8b58c69ad5967339472c0f00ebefa81aa"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"47465c7cf4526f229a492443b058deb3cf111652","unresolved":false,"context_lines":[{"line_number":32,"context_line":""},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"def upgrade():"},{"line_number":35,"context_line":"    op.add_column(\u0027ports\u0027,"},{"line_number":36,"context_line":"                  sa.Column(\u0027dns_name\u0027,"},{"line_number":37,"context_line":"                            sa.String(length\u003dattr.FQDN_MAX_LEN),"},{"line_number":38,"context_line":"                            nullable\u003dFalse))"}],"source_content_type":"text/x-python","patch_set":5,"id":"3a50d1a3_ffb7a282","line":35,"in_reply_to":"3a50d1a3_ad35d8db","updated":"2015-07-28 19:11:08.000000000","message":"Done","commit_id":"3811b8d8b58c69ad5967339472c0f00ebefa81aa"}],"neutron/db/migration/alembic_migrations/versions/liberty/expand/1e8add274e9a_add_dns_name_to_port.py":[{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"e06642bec30692167085613b28c33ed0808266a6","unresolved":false,"context_lines":[{"line_number":33,"context_line":""},{"line_number":34,"context_line":"def upgrade():"},{"line_number":35,"context_line":"    op.add_column(\u0027ports\u0027,"},{"line_number":36,"context_line":"                  sa.Column(\u0027dns_name\u0027,"},{"line_number":37,"context_line":"                            sa.String(length\u003dattr.FQDN_MAX_LEN),"},{"line_number":38,"context_line":"                            nullable\u003dFalse))"}],"source_content_type":"text/x-python","patch_set":11,"id":"1a4dcd0f_e238c93f","line":36,"updated":"2015-08-04 22:27:44.000000000","message":":)","commit_id":"131fc3f516353cea0e5bf9528ae3cd3b3513ee8a"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"a173026061fc2370d0f12b7c171b3e4131dafaa0","unresolved":false,"context_lines":[{"line_number":33,"context_line":""},{"line_number":34,"context_line":"def upgrade():"},{"line_number":35,"context_line":"    op.add_column(\u0027ports\u0027,"},{"line_number":36,"context_line":"                  sa.Column(\u0027dns_name\u0027,"},{"line_number":37,"context_line":"                            sa.String(length\u003dattr.FQDN_MAX_LEN),"},{"line_number":38,"context_line":"                            nullable\u003dFalse))"}],"source_content_type":"text/x-python","patch_set":11,"id":"1a4dcd0f_2f249aad","line":36,"in_reply_to":"1a4dcd0f_e238c93f","updated":"2015-08-10 19:47:31.000000000","message":"Yeah, I\u0027m also happy about this","commit_id":"131fc3f516353cea0e5bf9528ae3cd3b3513ee8a"}],"neutron/db/migration/alembic_migrations/versions/liberty/expand/d57e02f167_add_dns_name_to_port.py":[{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"bdd5068f60a60475e3e9207f99e7d1e0546f5d28","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright 2015 OpenStack Foundation"},{"line_number":2,"context_line":"#"},{"line_number":3,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"},{"line_number":4,"context_line":"#    not use this file except in compliance with the License. You may obtain"}],"source_content_type":"text/x-python","patch_set":20,"id":"fa1b9901_d15d2316","line":1,"updated":"2015-08-19 19:02:11.000000000","message":"Don\u0027t copyright OpenStack Foundation.  Use your company or nothing.","commit_id":"44b42763e6fd27b46773fe8daa847a6d09f4795a"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"41ff38b69226ccf61a0068087305a5a1faed43b8","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright 2015 OpenStack Foundation"},{"line_number":2,"context_line":"#"},{"line_number":3,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"},{"line_number":4,"context_line":"#    not use this file except in compliance with the License. You may obtain"}],"source_content_type":"text/x-python","patch_set":20,"id":"fa1b9901_9c3ba99c","line":1,"in_reply_to":"fa1b9901_d15d2316","updated":"2015-08-23 00:57:14.000000000","message":"I am aware of that. Problem here is that neutron-db generates this file like this. Maybe we need to fix neutron-db. I\u0027ll replace this line from now on with my company\u0027s name","commit_id":"44b42763e6fd27b46773fe8daa847a6d09f4795a"}],"neutron/db/models_v2.py":[{"author":{"_account_id":7249,"name":"Ann Taraday","email":"akamyshnikova@mirantis.com","username":"AKamyshnikova"},"change_message_id":"5d1a50b2d705a282c10f2f5ce866c776e12a249c","unresolved":false,"context_lines":[{"line_number":112,"context_line":""},{"line_number":113,"context_line":""},{"line_number":114,"context_line":"class DNSAssignment(model_base.BASEV2):"},{"line_number":115,"context_line":"    \"\"\"Represents the DNS names assigned to a port.\"\"\""},{"line_number":116,"context_line":""},{"line_number":117,"context_line":"    port_id \u003d sa.Column(sa.String(36), sa.ForeignKey(\u0027ports.id\u0027,"},{"line_number":118,"context_line":"                                                     ondelete\u003d\"CASCADE\"),"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a41bdd9_e6044fc1","line":115,"updated":"2015-07-14 07:35:19.000000000","message":"Table name difference between migration and model. Add __table_name__ \u003d \u0027dnsassignment\u0027 here or change in migration to \u0027dnsassignments\u0027.","commit_id":"fd28fa47f9ba5cfc1389fce182951dd5373be413"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"134079fd127ebad30ec7da1c5cfc2b21e087dc4a","unresolved":false,"context_lines":[{"line_number":112,"context_line":""},{"line_number":113,"context_line":""},{"line_number":114,"context_line":"class DNSAssignment(model_base.BASEV2):"},{"line_number":115,"context_line":"    \"\"\"Represents the DNS names assigned to a port.\"\"\""},{"line_number":116,"context_line":""},{"line_number":117,"context_line":"    port_id \u003d sa.Column(sa.String(36), sa.ForeignKey(\u0027ports.id\u0027,"},{"line_number":118,"context_line":"                                                     ondelete\u003d\"CASCADE\"),"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a41bdd9_ad86fad8","line":115,"in_reply_to":"9a41bdd9_e6044fc1","updated":"2015-07-14 22:05:01.000000000","message":"Thanks! good ctach","commit_id":"fd28fa47f9ba5cfc1389fce182951dd5373be413"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"0a8afe4eb1b9ddc0c05c7d073e77fb2d2477be5e","unresolved":false,"context_lines":[{"line_number":111,"context_line":"                           nullable\u003dFalse, primary_key\u003dTrue)"},{"line_number":112,"context_line":""},{"line_number":113,"context_line":""},{"line_number":114,"context_line":"class DNSAssignment(model_base.BASEV2):"},{"line_number":115,"context_line":"    \"\"\"Represents the DNS names assigned to a port.\"\"\""},{"line_number":116,"context_line":""},{"line_number":117,"context_line":"    port_id \u003d sa.Column(sa.String(36), sa.ForeignKey(\u0027ports.id\u0027,"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a41bdd9_d9d429ed","line":114,"updated":"2015-07-15 18:32:54.000000000","message":"I think this model could use a little discussion.  It is more complicated than I imagined (just dns_name added to port) but maybe there are good reasons for it so let\u0027s discuss them.","commit_id":"c0f74cf7abadd6c6cecc0c176c1f3caf738412c1"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"0a8afe4eb1b9ddc0c05c7d073e77fb2d2477be5e","unresolved":false,"context_lines":[{"line_number":118,"context_line":"                                                     ondelete\u003d\"CASCADE\"),"},{"line_number":119,"context_line":"                        nullable\u003dTrue)"},{"line_number":120,"context_line":"    ip_address \u003d sa.Column(sa.String(64), nullable\u003dFalse, primary_key\u003dTrue)"},{"line_number":121,"context_line":"    subnet_id \u003d sa.Column(sa.String(36), sa.ForeignKey(\u0027subnets.id\u0027,"},{"line_number":122,"context_line":"                                                       ondelete\u003d\"CASCADE\"),"},{"line_number":123,"context_line":"                          nullable\u003dFalse, primary_key\u003dTrue)"},{"line_number":124,"context_line":"    network_id \u003d sa.Column(sa.String(36), sa.ForeignKey(\"networks.id\","}],"source_content_type":"text/x-python","patch_set":3,"id":"9a41bdd9_99f0e1ca","line":121,"updated":"2015-07-15 18:32:54.000000000","message":"I\u0027m not sure I understand why the subnet is in this model.","commit_id":"c0f74cf7abadd6c6cecc0c176c1f3caf738412c1"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"0a8afe4eb1b9ddc0c05c7d073e77fb2d2477be5e","unresolved":false,"context_lines":[{"line_number":120,"context_line":"    ip_address \u003d sa.Column(sa.String(64), nullable\u003dFalse, primary_key\u003dTrue)"},{"line_number":121,"context_line":"    subnet_id \u003d sa.Column(sa.String(36), sa.ForeignKey(\u0027subnets.id\u0027,"},{"line_number":122,"context_line":"                                                       ondelete\u003d\"CASCADE\"),"},{"line_number":123,"context_line":"                          nullable\u003dFalse, primary_key\u003dTrue)"},{"line_number":124,"context_line":"    network_id \u003d sa.Column(sa.String(36), sa.ForeignKey(\"networks.id\","},{"line_number":125,"context_line":"                                                        ondelete\u003d\"CASCADE\"),"},{"line_number":126,"context_line":"                           nullable\u003dFalse, primary_key\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a41bdd9_39d3d5d6","line":123,"updated":"2015-07-15 18:32:54.000000000","message":"The combination of the ip_address and network_id should make this component of the primary_key obsolete.\n\nActually, even (ip_address, network_id) is redundant given that the Port object already covers the uniqueness of this combination.","commit_id":"c0f74cf7abadd6c6cecc0c176c1f3caf738412c1"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"0a8afe4eb1b9ddc0c05c7d073e77fb2d2477be5e","unresolved":false,"context_lines":[{"line_number":121,"context_line":"    subnet_id \u003d sa.Column(sa.String(36), sa.ForeignKey(\u0027subnets.id\u0027,"},{"line_number":122,"context_line":"                                                       ondelete\u003d\"CASCADE\"),"},{"line_number":123,"context_line":"                          nullable\u003dFalse, primary_key\u003dTrue)"},{"line_number":124,"context_line":"    network_id \u003d sa.Column(sa.String(36), sa.ForeignKey(\"networks.id\","},{"line_number":125,"context_line":"                                                        ondelete\u003d\"CASCADE\"),"},{"line_number":126,"context_line":"                           nullable\u003dFalse, primary_key\u003dTrue)"},{"line_number":127,"context_line":"    dns_name \u003d sa.Column(sa.String(attr.DNS_LABEL_MAX_LEN), nullable\u003dFalse)"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a41bdd9_19dcd144","line":124,"updated":"2015-07-15 18:32:54.000000000","message":"Network id is the same as Port.network_id?  Do we need this column?  I guess it is part of the primary key.  So, if it needs to be part of the primary key then it needs to be here I guess.","commit_id":"c0f74cf7abadd6c6cecc0c176c1f3caf738412c1"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"0a8afe4eb1b9ddc0c05c7d073e77fb2d2477be5e","unresolved":false,"context_lines":[{"line_number":124,"context_line":"    network_id \u003d sa.Column(sa.String(36), sa.ForeignKey(\"networks.id\","},{"line_number":125,"context_line":"                                                        ondelete\u003d\"CASCADE\"),"},{"line_number":126,"context_line":"                           nullable\u003dFalse, primary_key\u003dTrue)"},{"line_number":127,"context_line":"    dns_name \u003d sa.Column(sa.String(attr.DNS_LABEL_MAX_LEN), nullable\u003dFalse)"},{"line_number":128,"context_line":"    dns_fqdn \u003d sa.Column(sa.String(attr.FQDN_MAX_LEN), nullable\u003dFalse)"},{"line_number":129,"context_line":""},{"line_number":130,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"9a41bdd9_b9c28551","line":127,"updated":"2015-07-15 18:32:54.000000000","message":"I forget, was there objection to putting dns_name directly in the Port table?  I don\u0027t feel strongly.  Maybe Henry or Ann could have a look at this model for us.\n\nI\u0027m worried that a lot of this table is redundant and/or overly complex.","commit_id":"c0f74cf7abadd6c6cecc0c176c1f3caf738412c1"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"0a8afe4eb1b9ddc0c05c7d073e77fb2d2477be5e","unresolved":false,"context_lines":[{"line_number":125,"context_line":"                                                        ondelete\u003d\"CASCADE\"),"},{"line_number":126,"context_line":"                           nullable\u003dFalse, primary_key\u003dTrue)"},{"line_number":127,"context_line":"    dns_name \u003d sa.Column(sa.String(attr.DNS_LABEL_MAX_LEN), nullable\u003dFalse)"},{"line_number":128,"context_line":"    dns_fqdn \u003d sa.Column(sa.String(attr.FQDN_MAX_LEN), nullable\u003dFalse)"},{"line_number":129,"context_line":""},{"line_number":130,"context_line":""},{"line_number":131,"context_line":"class Route(object):"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a41bdd9_9948e1cd","line":128,"updated":"2015-07-15 18:32:54.000000000","message":"Is this value derived from other values?  What are the reasons for storing it here?","commit_id":"c0f74cf7abadd6c6cecc0c176c1f3caf738412c1"},{"author":{"_account_id":10601,"name":"Renjie Sun","email":"sunrenjie6@gmail.com","username":"sunrenjie6"},"change_message_id":"70c4e20019f461da2edbe4cd418654fe6b249110","unresolved":false,"context_lines":[{"line_number":165,"context_line":"        self.device_owner \u003d device_owner"},{"line_number":166,"context_line":"        self.device_id \u003d device_id"},{"line_number":167,"context_line":"        self.dns_name \u003d dns_name"},{"line_number":168,"context_line":"        # Since these ar relationships only set them if passed."},{"line_number":169,"context_line":"        if fixed_ips:"},{"line_number":170,"context_line":"            self.fixed_ips \u003d fixed_ips"},{"line_number":171,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"3a50d1a3_4d58d456","line":168,"updated":"2015-07-27 05:02:07.000000000","message":"nit: s/ar/are/","commit_id":"3811b8d8b58c69ad5967339472c0f00ebefa81aa"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"47465c7cf4526f229a492443b058deb3cf111652","unresolved":false,"context_lines":[{"line_number":165,"context_line":"        self.device_owner \u003d device_owner"},{"line_number":166,"context_line":"        self.device_id \u003d device_id"},{"line_number":167,"context_line":"        self.dns_name \u003d dns_name"},{"line_number":168,"context_line":"        # Since these ar relationships only set them if passed."},{"line_number":169,"context_line":"        if fixed_ips:"},{"line_number":170,"context_line":"            self.fixed_ips \u003d fixed_ips"},{"line_number":171,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"3a50d1a3_ebae0f2d","line":168,"in_reply_to":"3a50d1a3_4d58d456","updated":"2015-07-28 19:11:08.000000000","message":"This is a leftover from a previous review in this same patchset. I don\u0027t need to modify the comment anymore, so I restored it to its original form","commit_id":"3811b8d8b58c69ad5967339472c0f00ebefa81aa"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"d8c1c3a8daedfd8db330c20dbc0595fa59cbccc2","unresolved":false,"context_lines":[{"line_number":141,"context_line":"    device_id \u003d sa.Column(sa.String(attr.DEVICE_ID_MAX_LEN), nullable\u003dFalse)"},{"line_number":142,"context_line":"    device_owner \u003d sa.Column(sa.String(attr.DEVICE_OWNER_MAX_LEN),"},{"line_number":143,"context_line":"                             nullable\u003dFalse)"},{"line_number":144,"context_line":"    dns_name \u003d sa.Column(sa.String(attr.FQDN_MAX_LEN), nullable\u003dFalse)"},{"line_number":145,"context_line":"    __table_args__ \u003d ("},{"line_number":146,"context_line":"        sa.Index("},{"line_number":147,"context_line":"            \u0027ix_ports_network_id_mac_address\u0027, \u0027network_id\u0027, \u0027mac_address\u0027),"}],"source_content_type":"text/x-python","patch_set":12,"id":"1a4dcd0f_afeb0fa3","line":144,"updated":"2015-08-12 23:36:57.000000000","message":"did we get closure to the practice of adding attributes to core resources in a way that forces all backend\u0027s to support the newly introduced attribute? Think vlan_transparent, mtu, etc.","commit_id":"da62fccc538aeffa4d8a331921624bc4a45d1817"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"f821556d9e80726e0022e6293ead3eb88660b5cb","unresolved":false,"context_lines":[{"line_number":141,"context_line":"    device_id \u003d sa.Column(sa.String(attr.DEVICE_ID_MAX_LEN), nullable\u003dFalse)"},{"line_number":142,"context_line":"    device_owner \u003d sa.Column(sa.String(attr.DEVICE_OWNER_MAX_LEN),"},{"line_number":143,"context_line":"                             nullable\u003dFalse)"},{"line_number":144,"context_line":"    dns_name \u003d sa.Column(sa.String(attr.FQDN_MAX_LEN), nullable\u003dFalse)"},{"line_number":145,"context_line":"    __table_args__ \u003d ("},{"line_number":146,"context_line":"        sa.Index("},{"line_number":147,"context_line":"            \u0027ix_ports_network_id_mac_address\u0027, \u0027network_id\u0027, \u0027mac_address\u0027),"}],"source_content_type":"text/x-python","patch_set":12,"id":"1a4dcd0f_3a525b36","line":144,"in_reply_to":"1a4dcd0f_afeb0fa3","updated":"2015-08-16 00:08:29.000000000","message":"Following your advice in attributes.py, I have implemented a shim extension","commit_id":"da62fccc538aeffa4d8a331921624bc4a45d1817"}],"neutron/extensions/dns.py":[{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"2d4fb02160b0a828ca5f4013c953bc1cfbedf688","unresolved":false,"context_lines":[{"line_number":24,"context_line":"FQDN_MAX_LEN \u003d 255"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"def _validate_dns_name(data, max_len\u003dFQDN_MAX_LEN):"},{"line_number":28,"context_line":"    msg \u003d attr._validate_string(data, max_len)"},{"line_number":29,"context_line":"    if msg:"},{"line_number":30,"context_line":"        return msg"}],"source_content_type":"text/x-python","patch_set":18,"id":"fa1b9901_0723b5be","line":27,"updated":"2015-08-18 06:59:22.000000000","message":"validating these is tricky. A regex with lookbacks can hide exponential behavior that can lead to a DoS. Check out https://bugs.launchpad.net/neutron/+bug/1378450\n\nI actually spent quite a bit of time writing an RFC compliant validator that was taken out because we didn\u0027t need it.\n\nI would consider reverting the following removal of the validator and then leverage that:\nhttps://review.openstack.org/#/c/168886/","commit_id":"1d8525d430f0aa2f9dcf2b07757fd03b577805e0"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"6859df478a22a0fb251f1f8dea6006935693aa54","unresolved":false,"context_lines":[{"line_number":24,"context_line":"FQDN_MAX_LEN \u003d 255"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"def _validate_dns_name(data, max_len\u003dFQDN_MAX_LEN):"},{"line_number":28,"context_line":"    msg \u003d attr._validate_string(data, max_len)"},{"line_number":29,"context_line":"    if msg:"},{"line_number":30,"context_line":"        return msg"}],"source_content_type":"text/x-python","patch_set":18,"id":"fa1b9901_c641110d","line":27,"in_reply_to":"fa1b9901_0723b5be","updated":"2015-08-19 00:22:35.000000000","message":"Thanks for the review. I implemented the validator you indicated in the dns extension. I had to tweak it a little bit, but it is essentially the same thing","commit_id":"1d8525d430f0aa2f9dcf2b07757fd03b577805e0"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"25a5556ed30b8f09f35e26e7ea53844cda91bb8a","unresolved":false,"context_lines":[{"line_number":24,"context_line":"FQDN_MAX_LEN \u003d 255"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"def _validate_dns_name(data, max_len\u003dFQDN_MAX_LEN):"},{"line_number":28,"context_line":"    msg \u003d attr._validate_string(data, max_len)"},{"line_number":29,"context_line":"    if msg:"},{"line_number":30,"context_line":"        return msg"}],"source_content_type":"text/x-python","patch_set":18,"id":"fa1b9901_425c3b25","line":27,"in_reply_to":"fa1b9901_0723b5be","updated":"2015-08-18 07:04:14.000000000","message":"we\u0027ll never get to a consensus to what an acceptable OpenStack DNS validator needs to be like, so I am not going to bike shed ;)","commit_id":"1d8525d430f0aa2f9dcf2b07757fd03b577805e0"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"7dc586a008029ea4e2127ed22abb69dc2b348fe8","unresolved":false,"context_lines":[{"line_number":24,"context_line":"FQDN_MAX_LEN \u003d 255"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"def _validate_dns_name(data, max_len\u003dFQDN_MAX_LEN):"},{"line_number":28,"context_line":"    msg \u003d attr._validate_string(data, max_len)"},{"line_number":29,"context_line":"    if msg:"},{"line_number":30,"context_line":"        return msg"}],"source_content_type":"text/x-python","patch_set":18,"id":"fa1b9901_fb604003","line":27,"in_reply_to":"fa1b9901_80918f49","updated":"2015-08-19 19:21:36.000000000","message":"@Carl: I didn\u0027t mean that RFC1035 is not clear or that it can be left to interpretation. I was happy with this one, but there can be many ways to do validation (as Kevin suggested), hence my reference to \u0027acceptable OpenStack DNS validator\u0027.","commit_id":"1d8525d430f0aa2f9dcf2b07757fd03b577805e0"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"9b43ad30bc85a73c53e67ca4f705659b9eb54ad9","unresolved":false,"context_lines":[{"line_number":24,"context_line":"FQDN_MAX_LEN \u003d 255"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"def _validate_dns_name(data, max_len\u003dFQDN_MAX_LEN):"},{"line_number":28,"context_line":"    msg \u003d attr._validate_string(data, max_len)"},{"line_number":29,"context_line":"    if msg:"},{"line_number":30,"context_line":"        return msg"}],"source_content_type":"text/x-python","patch_set":18,"id":"fa1b9901_80918f49","line":27,"in_reply_to":"fa1b9901_c641110d","updated":"2015-08-19 18:59:50.000000000","message":"@Armando, I\u0027m not sure what consensus we need to get to.  RFC1035 is pretty clear.\n\n@Kevin What?!  I ran a match with this DNS_LABEL_REGEX against the \"all-ones\" label in the bug and I don\u0027t see what the problem is.  Am I missing something?","commit_id":"1d8525d430f0aa2f9dcf2b07757fd03b577805e0"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"3372aae8872bcbebbb9c9cc40c9ae0ac63b415f0","unresolved":false,"context_lines":[{"line_number":24,"context_line":"FQDN_MAX_LEN \u003d 255"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"def _validate_dns_name(data, max_len\u003dFQDN_MAX_LEN):"},{"line_number":28,"context_line":"    msg \u003d attr._validate_string(data, max_len)"},{"line_number":29,"context_line":"    if msg:"},{"line_number":30,"context_line":"        return msg"}],"source_content_type":"text/x-python","patch_set":18,"id":"fa1b9901_f06f2ffa","line":27,"in_reply_to":"fa1b9901_fb604003","updated":"2015-08-24 21:19:15.000000000","message":"@Armando:  Well, I\u0027ve got egg on my face now.  I ignored RFC 1123.  Still, there has to be a right way to validate right?","commit_id":"1d8525d430f0aa2f9dcf2b07757fd03b577805e0"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"bdd5068f60a60475e3e9207f99e7d1e0546f5d28","unresolved":false,"context_lines":[{"line_number":28,"context_line":"def _validate_dns_name(data, max_len\u003dFQDN_MAX_LEN):"},{"line_number":29,"context_line":"    # NOTE: An individual name regex instead of an entire FQDN was used"},{"line_number":30,"context_line":"    # because its easier to make correct. The logic should validate that the"},{"line_number":31,"context_line":"    # dns_name matches RFC 1123 (section 2.1) and RFC 952."},{"line_number":32,"context_line":"    if not data:"},{"line_number":33,"context_line":"        return"},{"line_number":34,"context_line":"    try:"}],"source_content_type":"text/x-python","patch_set":20,"id":"fa1b9901_c556b929","line":31,"updated":"2015-08-19 19:02:11.000000000","message":"These RFCs are not for DNS, they are for hosts.  There are subtle differences between hostnames and dns names that I discussed exhaustively in my spec.  The main rfc for dns names is rfc1035.","commit_id":"44b42763e6fd27b46773fe8daa847a6d09f4795a"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"41ff38b69226ccf61a0068087305a5a1faed43b8","unresolved":false,"context_lines":[{"line_number":28,"context_line":"def _validate_dns_name(data, max_len\u003dFQDN_MAX_LEN):"},{"line_number":29,"context_line":"    # NOTE: An individual name regex instead of an entire FQDN was used"},{"line_number":30,"context_line":"    # because its easier to make correct. The logic should validate that the"},{"line_number":31,"context_line":"    # dns_name matches RFC 1123 (section 2.1) and RFC 952."},{"line_number":32,"context_line":"    if not data:"},{"line_number":33,"context_line":"        return"},{"line_number":34,"context_line":"    try:"}],"source_content_type":"text/x-python","patch_set":20,"id":"fa1b9901_fcdc2576","line":31,"in_reply_to":"fa1b9901_c556b929","updated":"2015-08-23 00:57:14.000000000","message":"Returned to previous validation based on rfc1035","commit_id":"44b42763e6fd27b46773fe8daa847a6d09f4795a"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"bdd5068f60a60475e3e9207f99e7d1e0546f5d28","unresolved":false,"context_lines":[{"line_number":34,"context_line":"    try:"},{"line_number":35,"context_line":"        # Trailing periods are allowed to indicate that a name is fully"},{"line_number":36,"context_line":"        # qualified per RFC 1034 (page 7)."},{"line_number":37,"context_line":"        trimmed \u003d data if data[-1] !\u003d \u0027.\u0027 else data[:-1]"},{"line_number":38,"context_line":"        if len(trimmed) \u003e 255:"},{"line_number":39,"context_line":"            raise TypeError("},{"line_number":40,"context_line":"                _(\"\u0027%s\u0027 exceeds the 255 character FQDN limit\") % trimmed)"}],"source_content_type":"text/x-python","patch_set":20,"id":"fa1b9901_b1018fb1","line":37,"updated":"2015-08-19 19:02:11.000000000","message":"nit: data.endswith","commit_id":"44b42763e6fd27b46773fe8daa847a6d09f4795a"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"41ff38b69226ccf61a0068087305a5a1faed43b8","unresolved":false,"context_lines":[{"line_number":34,"context_line":"    try:"},{"line_number":35,"context_line":"        # Trailing periods are allowed to indicate that a name is fully"},{"line_number":36,"context_line":"        # qualified per RFC 1034 (page 7)."},{"line_number":37,"context_line":"        trimmed \u003d data if data[-1] !\u003d \u0027.\u0027 else data[:-1]"},{"line_number":38,"context_line":"        if len(trimmed) \u003e 255:"},{"line_number":39,"context_line":"            raise TypeError("},{"line_number":40,"context_line":"                _(\"\u0027%s\u0027 exceeds the 255 character FQDN limit\") % trimmed)"}],"source_content_type":"text/x-python","patch_set":20,"id":"fa1b9901_1cda3979","line":37,"in_reply_to":"fa1b9901_b1018fb1","updated":"2015-08-23 00:57:14.000000000","message":"Returned to previous validation based on rfc1035","commit_id":"44b42763e6fd27b46773fe8daa847a6d09f4795a"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"bdd5068f60a60475e3e9207f99e7d1e0546f5d28","unresolved":false,"context_lines":[{"line_number":39,"context_line":"            raise TypeError("},{"line_number":40,"context_line":"                _(\"\u0027%s\u0027 exceeds the 255 character FQDN limit\") % trimmed)"},{"line_number":41,"context_line":"        names \u003d trimmed.split(\u0027.\u0027)"},{"line_number":42,"context_line":"        for name in names:"},{"line_number":43,"context_line":"            if not name:"},{"line_number":44,"context_line":"                raise TypeError(_(\"Encountered an empty component.\"))"},{"line_number":45,"context_line":"            if name[-1] \u003d\u003d \u0027-\u0027 or name[0] \u003d\u003d \u0027-\u0027:"}],"source_content_type":"text/x-python","patch_set":20,"id":"fa1b9901_a006131b","line":42,"updated":"2015-08-19 19:02:11.000000000","message":"You might want to split this out into a _validate_dns_label method.","commit_id":"44b42763e6fd27b46773fe8daa847a6d09f4795a"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"41ff38b69226ccf61a0068087305a5a1faed43b8","unresolved":false,"context_lines":[{"line_number":39,"context_line":"            raise TypeError("},{"line_number":40,"context_line":"                _(\"\u0027%s\u0027 exceeds the 255 character FQDN limit\") % trimmed)"},{"line_number":41,"context_line":"        names \u003d trimmed.split(\u0027.\u0027)"},{"line_number":42,"context_line":"        for name in names:"},{"line_number":43,"context_line":"            if not name:"},{"line_number":44,"context_line":"                raise TypeError(_(\"Encountered an empty component.\"))"},{"line_number":45,"context_line":"            if name[-1] \u003d\u003d \u0027-\u0027 or name[0] \u003d\u003d \u0027-\u0027:"}],"source_content_type":"text/x-python","patch_set":20,"id":"fa1b9901_bce6ad42","line":42,"in_reply_to":"fa1b9901_a006131b","updated":"2015-08-23 00:57:14.000000000","message":"Returned to previous validation based on rfc1035","commit_id":"44b42763e6fd27b46773fe8daa847a6d09f4795a"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"bdd5068f60a60475e3e9207f99e7d1e0546f5d28","unresolved":false,"context_lines":[{"line_number":42,"context_line":"        for name in names:"},{"line_number":43,"context_line":"            if not name:"},{"line_number":44,"context_line":"                raise TypeError(_(\"Encountered an empty component.\"))"},{"line_number":45,"context_line":"            if name[-1] \u003d\u003d \u0027-\u0027 or name[0] \u003d\u003d \u0027-\u0027:"},{"line_number":46,"context_line":"                raise TypeError("},{"line_number":47,"context_line":"                    _(\"Name \u0027%s\u0027 must not start or end with a hyphen.\") % name)"},{"line_number":48,"context_line":"            if not re.match(DNS_LABEL_REGEX, name):"}],"source_content_type":"text/x-python","patch_set":20,"id":"fa1b9901_257c551e","line":45,"updated":"2015-08-19 19:02:11.000000000","message":"This check is irrelevant if the dns label is validated according to my description here [1] which is a direct result of interpretting rfc1035.\n\n[1] https://review.openstack.org/#/c/88623/16/specs/liberty/internal-dns-resolution.rst L151","commit_id":"44b42763e6fd27b46773fe8daa847a6d09f4795a"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"41ff38b69226ccf61a0068087305a5a1faed43b8","unresolved":false,"context_lines":[{"line_number":42,"context_line":"        for name in names:"},{"line_number":43,"context_line":"            if not name:"},{"line_number":44,"context_line":"                raise TypeError(_(\"Encountered an empty component.\"))"},{"line_number":45,"context_line":"            if name[-1] \u003d\u003d \u0027-\u0027 or name[0] \u003d\u003d \u0027-\u0027:"},{"line_number":46,"context_line":"                raise TypeError("},{"line_number":47,"context_line":"                    _(\"Name \u0027%s\u0027 must not start or end with a hyphen.\") % name)"},{"line_number":48,"context_line":"            if not re.match(DNS_LABEL_REGEX, name):"}],"source_content_type":"text/x-python","patch_set":20,"id":"fa1b9901_dce36132","line":45,"in_reply_to":"fa1b9901_257c551e","updated":"2015-08-23 00:57:14.000000000","message":"Returned to previous validation based on rfc1035","commit_id":"44b42763e6fd27b46773fe8daa847a6d09f4795a"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"bdd5068f60a60475e3e9207f99e7d1e0546f5d28","unresolved":false,"context_lines":[{"line_number":51,"context_line":"                      \"which can only be alphanumeric or a hyphen.\") % name)"},{"line_number":52,"context_line":"        # RFC 1123 hints that a TLD can\u0027t be all numeric. last is a TLD if"},{"line_number":53,"context_line":"        # it\u0027s an FQDN."},{"line_number":54,"context_line":"        if len(names) \u003e 1 and re.match(\"^[0-9]+$\", names[-1]):"},{"line_number":55,"context_line":"            raise TypeError(_(\"TLD \u0027%s\u0027 must not be all numeric\") % names[-1])"},{"line_number":56,"context_line":"    except TypeError as e:"},{"line_number":57,"context_line":"        msg \u003d _(\"\u0027%(data)s\u0027 not a valid PQDN or FQDN. Reason: %(reason)s\") % {"}],"source_content_type":"text/x-python","patch_set":20,"id":"fa1b9901_65156d47","line":54,"updated":"2015-08-19 19:02:11.000000000","message":"ditto (L45)","commit_id":"44b42763e6fd27b46773fe8daa847a6d09f4795a"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"41ff38b69226ccf61a0068087305a5a1faed43b8","unresolved":false,"context_lines":[{"line_number":51,"context_line":"                      \"which can only be alphanumeric or a hyphen.\") % name)"},{"line_number":52,"context_line":"        # RFC 1123 hints that a TLD can\u0027t be all numeric. last is a TLD if"},{"line_number":53,"context_line":"        # it\u0027s an FQDN."},{"line_number":54,"context_line":"        if len(names) \u003e 1 and re.match(\"^[0-9]+$\", names[-1]):"},{"line_number":55,"context_line":"            raise TypeError(_(\"TLD \u0027%s\u0027 must not be all numeric\") % names[-1])"},{"line_number":56,"context_line":"    except TypeError as e:"},{"line_number":57,"context_line":"        msg \u003d _(\"\u0027%(data)s\u0027 not a valid PQDN or FQDN. Reason: %(reason)s\") % {"}],"source_content_type":"text/x-python","patch_set":20,"id":"fa1b9901_7ccfb5b3","line":54,"in_reply_to":"fa1b9901_65156d47","updated":"2015-08-23 00:57:14.000000000","message":"Returned to previous validation based on rfc1035","commit_id":"44b42763e6fd27b46773fe8daa847a6d09f4795a"}],"neutron/tests/unit/api/v2/test_attributes.py":[{"author":{"_account_id":10601,"name":"Renjie Sun","email":"sunrenjie6@gmail.com","username":"sunrenjie6"},"change_message_id":"f9cf651123121dcd9ce29051702dda3054eeeaf3","unresolved":false,"context_lines":[{"line_number":753,"context_line":"                 (\u0027vm01.teSt1\u0027, True),"},{"line_number":754,"context_line":"                 (\u0027vm01.te$t1\u0027, True),"},{"line_number":755,"context_line":"                 (\u0027vm0#1.test1.\u0027, True),"},{"line_number":756,"context_line":"                 (\u0027-\u0027 + \u0027a\u0027 * attributes.DNS_LABEL_MAX_LEN, True),"},{"line_number":757,"context_line":"                 (\u0027a\u0027 * (attributes.DNS_LABEL_MAX_LEN + 1), True),"},{"line_number":758,"context_line":"                 ((\u0027a\u0027 * (attributes.DNS_LABEL_MAX_LEN - 1) + \u0027.\u0027) *"},{"line_number":759,"context_line":"                     num_labels + \u0027a\u0027 * (filler_len + 1), True),"}],"source_content_type":"text/x-python","patch_set":8,"id":"3a50d1a3_63c3b158","line":756,"updated":"2015-07-30 03:18:01.000000000","message":"@Miguel: Get it. you are right! I made a silly mistake (re.match vs. re.search). :)","commit_id":"a4d50e097a22981448673193ebfa5d04e671f06b"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"d5fd9d483e388432e7d82a30a570d39deaf54c11","unresolved":false,"context_lines":[{"line_number":753,"context_line":"                 (\u0027vm01.teSt1\u0027, True),"},{"line_number":754,"context_line":"                 (\u0027vm01.te$t1\u0027, True),"},{"line_number":755,"context_line":"                 (\u0027vm0#1.test1.\u0027, True),"},{"line_number":756,"context_line":"                 (\u0027-\u0027 + \u0027a\u0027 * attributes.DNS_LABEL_MAX_LEN, True),"},{"line_number":757,"context_line":"                 (\u0027a\u0027 * (attributes.DNS_LABEL_MAX_LEN + 1), True),"},{"line_number":758,"context_line":"                 ((\u0027a\u0027 * (attributes.DNS_LABEL_MAX_LEN - 1) + \u0027.\u0027) *"},{"line_number":759,"context_line":"                     num_labels + \u0027a\u0027 * (filler_len + 1), True),"}],"source_content_type":"text/x-python","patch_set":8,"id":"3a50d1a3_8cfcc173","line":756,"in_reply_to":"3a50d1a3_63c3b158","updated":"2015-07-30 22:02:38.000000000","message":"@Renjie :-)","commit_id":"a4d50e097a22981448673193ebfa5d04e671f06b"}],"neutron/tests/unit/extensions/test_dns.py":[{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"f350e61799bf8a5a20e88baf95e73e2592828b32","unresolved":false,"context_lines":[{"line_number":413,"context_line":"        dns_names \u003d [555, \u0027\\f\\n\\r\u0027, \u0027.\u0027, \u0027-vm01\u0027, \u0027_vm01\u0027, \u0027vm01-\u0027,"},{"line_number":414,"context_line":"                    \u0027-vm01.test1\u0027, \u0027vm01.-test1\u0027, \u0027vm01._test1\u0027,"},{"line_number":415,"context_line":"                    \u0027vm01.test1-\u0027, \u0027vm01.te$t1\u0027, \u0027vm0#1.test1.\u0027,"},{"line_number":416,"context_line":"                    \u0027vm01.123.\u0027, \u0027-\u0027 + \u0027a\u0027 * dns.DNS_LABEL_MAX_LEN,"},{"line_number":417,"context_line":"                    \u0027a\u0027 * (dns.DNS_LABEL_MAX_LEN + 1),"},{"line_number":418,"context_line":"                    (\u0027a\u0027 * (dns.DNS_LABEL_MAX_LEN - 1) + \u0027.\u0027) *"},{"line_number":419,"context_line":"                    num_labels + \u0027a\u0027 * (filler_len + 1)]"}],"source_content_type":"text/x-python","patch_set":24,"id":"fa1b9901_a19e4752","line":416,"updated":"2015-08-24 22:35:16.000000000","message":"\u0027vm01.123.\u0027 is a FQDN with an all numeric TLD. It shouldn\u0027t be accepted by the API validation","commit_id":"3d28fc0bfcf7f8c1fa11f83b6f4f35d82ee2eafd"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"f350e61799bf8a5a20e88baf95e73e2592828b32","unresolved":false,"context_lines":[{"line_number":445,"context_line":"        filler_len \u003d int("},{"line_number":446,"context_line":"            math.floor((dns.FQDN_MAX_LEN - higher_labels_len) %"},{"line_number":447,"context_line":"                       dns.DNS_LABEL_MAX_LEN))"},{"line_number":448,"context_line":"        dns_names \u003d [\u0027\u0027, \u0027www.1000.com\u0027, \u0027vM01\u0027, \u0027vm01.example.com.\u0027,"},{"line_number":449,"context_line":"                     \u00278vm01\u0027, \u0027vm-01.example.com.\u0027, \u0027vm01.test\u0027,"},{"line_number":450,"context_line":"                     \u0027vm01.test.example.com.\u0027, \u0027vm01.test-100\u0027,"},{"line_number":451,"context_line":"                     \u0027vm01.test-100.example.com.\u0027,"}],"source_content_type":"text/x-python","patch_set":24,"id":"fa1b9901_419f2b5f","line":448,"updated":"2015-08-24 22:35:16.000000000","message":"Added www.1000.com to the dns_names tested. It should be accepted","commit_id":"3d28fc0bfcf7f8c1fa11f83b6f4f35d82ee2eafd"}]}
